본문으로 바로가기
반응형

RHEL 8.2 기반의 싱글 노드 Ansible Tower 최신 (작성 기준 3.8.3)버전 설치 방법이다.

 

# Ansible Tower Cluster 구성방법은 아래 링크를 참고

https://hkjeon2.tistory.com/62

# Ansible Tower Single 설치에 사용했던 인스톨 파일들은 Git에서 ansible-tower-single.tar.gz 저장해서 올려놓았다.

https://github.com/hkjeon/ansible-tower

 

 

0. Ansible Tower 요구사항

  • 최소 2CPU
    • 20 forks 당 2 CPU
  • 최소 4G Memory
    • Ansible Tower 3.2 및 그 이전 : 2G RAM
    • Ansible Tower 3.3 및 3.4 이상 : 최소 4G RAM
    • 100 forks 당 4G RAM 권고

 

1. RHEL8.2 OS 설치 및 환경정보

  • 설치 환경 정보
  • CPU 4 Core / 8G Mem / 50G Disk 
  • Package Minimall
  • 1 Network (Public) 

RHEL8.2 OS 설치 완료 화면

 

2. Subscription 등록 및 ansible 2.9 활성화

subscription-manager register

subscription-manager repos --enable ansible-2.9-for-rhel-8-x86_64-rpms

 

 

3. 필요 패키지 설치 및 설정

앤서블에서 pg_password에 특수문자를 사용하면 설정에 실패할 수 있으므로, 특수문자 사용을 하지 말라고 되어있다.

[root@ansible-tower ~]# dnf install -y wget tar

[root@ansible-tower ~]# wget https://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-latest.tar.gz

[root@ansible-tower ~]# tar xvf ansible-tower-setup-latest.tar.gz

[root@ansible-tower ~]# cd ansible-tower-setup-3.8.3-1/

[root@ansible-tower ansible-tower-setup-3.8.3-1]# vi inventory
...
[all:vars]
admin_password='test1234'              <- Tower local admin password
...
pg_password='awxpass'                  <- Found in /etc/tower/conf.d/postgres.py

 

 

4.  Ansible-Tower 설치 (환경에 따라 2~30분 소요)

[root@ansible-tower ansible-tower-setup-3.8.3-1]# ./setup.sh
...


PLAY [Install Automation Hub node] ******************************************************************************************************************************************************************
skipping: no hosts matched

PLAY [Install Tower isolated node(s)] ***************************************************************************************************************************************************************
skipping: no hosts matched

PLAY RECAP ******************************************************************************************************************************************************************************************
localhost                  : ok=175  changed=85   unreachable=0    failed=0    skipped=86   rescued=0    ignored=2

The setup process completed successfully.
Setup log saved to /var/log/tower/setup-2021-07-08-18:44:35.log.

 

 

5.  Ansible Tower UI 접속

https://<서버 IP>

ID : admin

pw : test1234

Ansible Tower login 

 

 

6. Ansible Tower Subscription 등록 및 동의

 - RedHat Subscription 계정 정보 입력

 - I agree to the End User License Agreement 체크

 - GET SUBSCRIPTIONS 선택

Subscrition 등록

 

7. 라이센스 선택 및 SELECT

라이센스 선택

 

 

8. SUBMIT 선택

 

SUBMIT

 

 

9. Ansible-Tower 로그인 완료

정상 로그인 화면

 

 

10. Ansible-Tower 서비스 상태 확인

ansible-tower-service 명령을 통해 서비스를 관리할 수 있다.

[root@ansible-tower ansible-tower-setup-3.8.3-1]# ansible-tower-service
Usage: ansible-tower-service start|stop|restart|status


[root@ansible-tower ansible-tower-setup-3.8.3-1]# ansible-tower-service status
● ansible-tower.service - Ansible Tower service
   Loaded: loaded (/usr/lib/systemd/system/ansible-tower.service; enabled; vendor preset: disabled)
   Active: active (exited) since Fri 2021-07-09 17:52:15 KST; 5 days ago
  Process: 989 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
 Main PID: 989 (code=exited, status=0/SUCCESS)

Jul 09 17:52:15 ansible-tower systemd[1]: Starting Ansible Tower service...
Jul 09 17:52:15 ansible-tower systemd[1]: Started Ansible Tower service.

● postgresql.service - PostgreSQL database server
   Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/postgresql.service.d
           └─override.conf
   Active: active (running) since Fri 2021-07-09 17:52:15 KST; 5 days ago
  Process: 934 ExecStartPre=/usr/libexec/postgresql-check-db-dir postgresql (code=exited, status=0/SUCCESS)
 Main PID: 945 (postmaster)
    Tasks: 17 (limit: 49760)
    
... < 중략 >

 

728x90