差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

下次修改
前次修改
tech:alpine_semaphore [2023/12/29 15:47] – 建立 jonathantech:alpine_semaphore [2025/11/25 16:00] (目前版本) – [常見問題] jonathan
行 1: 行 1:
-====== 安裝 Ansible UI - Semaphore (Docker) ======+====== 安裝 Ansible UI - SemaphoreUI (Docker) ======
   * 安裝環境 : 參考 - [[tech/alpine_docker]]   * 安裝環境 : 參考 - [[tech/alpine_docker]]
  
行 21: 行 21:
     image: semaphoreui/semaphore:latest     image: semaphoreui/semaphore:latest
     environment:     environment:
 +      TZ: Asia/Taipei
       SEMAPHORE_DB_USER: semaphore       SEMAPHORE_DB_USER: semaphore
       SEMAPHORE_DB_PASS: semaphore       SEMAPHORE_DB_PASS: semaphore
行 53: 行 54:
 </cli> </cli>
   - 啟動 docker compose <cli>docker compose up -d</cli>   - 啟動 docker compose <cli>docker compose up -d</cli>
-  - 使用 http://<server_ip>:3000 就可以看到登入畫面+  - 使用 http://server_ip:3000 就可以看到登入畫面 
 + 
 +===== 常見問題 ===== 
 +  - 針對 ssh 第一次登入出現失敗問題解法 
 +    * 參考 - https://github.com/ansible-semaphore/semaphore/issues/675 
 +    * 可以在 Environment 內的 Extra variables 內加入 <file> 
 +{"ansible_ssh_common_args":"'-o StrictHostKeyChecking=no'"
 +</file> 
 +    * 或是在 inventory 設定時加上以下的段落 <file> 
 +[all:vars] 
 +ansible_ssh_common_args='-o StrictHostKeyChecking=no' 
 +
 +</file> 
 +  - 針對無法 sudo 的議題 workaround 方式 
 +    * 參考 - https://github.com/ansible-semaphore/semaphore/issues/1518 
 +    * 在目前 v2.9.37 版本會將 playbook 內的 become: yes 跳過, 造成無法 sudo 的議題 
 +    * Workaround 的方式就是 
 +      - Key Store 建立一個只有密碼但無帳號的 login with password Exp. rkeuser-none 和有帳號密碼的 rkeuser 共同使用 \\ {{:tech:2024-01-02_104611.png?600|}} 
 +      - Inventory 中 User Credentials 選有帳號密碼的 Key, Sudo Credentials 選無帳號的 Key \\ {{:tech:2024-01-02_104933.png?600|}} 
 +  - 對於 task 無法 UI 找到刪除的問題 
 +    * 參考 - https://github.com/ansible-semaphore/semaphore/issues/1101 
 +    * 在目前 v2.9.37 版本, UI 還未提供這樣的功能, 所以必須透過 API 或改 DB 方式來解決 
 +    * API Swagger - https://www.semui.co/api-docs/  
 +    * [[tech/alpine_semaphore/api]] 
 +    * [[tech/alpine_semaphore/db]] 
 +  - 刪除或編輯 template 的 UI  
 +    * 之前沒看到, 突然 UI 出現可以刪除或編輯 template 功能 \\ {{:tech:2024-01-02_195145.png?600|}} \\ {{:tech:2024-01-02_195212.png?600|}} 
 +  - 執行時 log 內出現 failed_modules: ansible.legacy.setup: ansible_facts: discovered_interpreter_python: /usr/bin/python, failed: true  
 +    * 表示目標主機內可能未安裝 python, 需要先手動進行安裝 Exp. Alpine 目標主機<cli>apk add python3</cli> 
 +  - 使用 latest tag 的 image 在升級到 2.16.45 版後, **任務範本(Task Templates)**如果出現空白 (實際上是呼叫 api/project/1/views 出現 404) 
 +    * 參考 - https://github.com/semaphoreui/semaphore/issues/3245 
 +    - 改用 image: semaphoreui/semaphore:v2.17.0-beta20  
 +    - 進入啟動的容器內執行<cli>semaphore migrate --undo-to 2.16.100</cli>執行訊息<cli> 
 +b4f992d8e0a7:~$ semaphore migrate --undo-to 2.16.100 
 +Loading config 
 +Validating config 
 + [ROLLBACK] > drop table project__template_role 
 + [ROLLBACK] > drop table role; 
 + [ROLLBACK] > alter table project__view drop column `type` 
 + [ROLLBACK] > alter table project__view drop column `hidden` 
 + [ROLLBACK] > alter table project__view drop column `filter` 
 + [ROLLBACK] > alter table project__view drop column `sort_column` 
 + [ROLLBACK] > alter table project__view drop column `sort_reverse`; 
 +Rollback Finished 
 +Postgres semaphore@postgres semaphore 
 +</cli> 
 +    - 改回 image: semaphoreui/semaphore:latest
  
 ===== 參考網址 ===== ===== 參考網址 =====
   * https://www.youtube.com/watch?v=kP8Oda17k7Q   * https://www.youtube.com/watch?v=kP8Oda17k7Q
   * https://docs.semui.co/administration-guide/installation#docker   * https://docs.semui.co/administration-guide/installation#docker
 +  * https://github.com/semaphoreui/semaphore
  
-{{tag>ansible alpine docker}}+{{tag>ansible Semaphore alpine docker}}
  
  • tech/alpine_semaphore.1703836030.txt.gz
  • 上一次變更: 2023/12/29 15:47
  • jonathan