본문으로 건너뛰기

[Ansible] Red Hat Ansible Tower Bundle 설치(v3.6.3)

RHEL 7에서 저장소를 활성화하고 Ansible Tower 3.6.3 Setup Bundle의 inventory를 수정한 뒤 setup.sh로 배포하는 과정을 정리합니다.

요약

  • rhel-7-server-rpms, ansible-2.9, rhscl 저장소를 활성화하고 Ansible Tower 3.6.3 Setup Bundle을 받아 setup.sh를 실행하면 Tower가 자동으로 배포됩니다.
  • 배포 전 bundle의 inventory에서 admin_password, pg_password, rabbitmq_password를 지정합니다.
  • 배포 후 Web console에 admin 계정으로 접속해 라이선스 파일을 추가하거나 서브스크립션이 있는 RHN 계정으로 로그인합니다.

테스트 환경 RHEL 7, Red Hat Ansible Tower 3.6.3 Setup Bundle

Red Hat Ansible Tower Bundle 설치(v3.6.3)

Ansible Tower 설치 준비

Ansible Tower 설치를 위해 아래와 같이 Repository 를 Enable 합니다.

$ subscription-manager repos --enable=rhel-7-server-rpms
$ subscription-manager repos --enable=rhel-7-server-ansible-2.9-rpms
$ subscription-manager repos --enable=rhel-server-rhscl-7-rpms


위와 같이 Red Hat Ansible Tower Download Center 에서 Ansible Tower 3.6.3 Setup Bundle 을 Download 합니다.

Download 된 Bundle 을 설치할 시스템에 Upload 하고 아래와 같이 진행니다.

[root@fastvm-r77-99 ~]# tar xzvf ansible-tower-setup-bundle-3.6.3-1.tar.gz

[root@fastvm-r77-99 ~]# cd ansible-tower-setup-bundle-3.6.3-1

Ansible Tower 설치 inventory 수정

아래와 같이 Ansible Tower 에서 사용될 Password 를 지정합니다.

$ vi inventory

...

[all:vars]
admin_password='password'        << password 변경

pg_host=''
pg_port=''

pg_database='awx'
pg_username='awx'
pg_password='password'           << password 변경
pg_sslmode='prefer'  # set to 'verify-full' for client-side enforced SSL

rabbitmq_username=tower 
rabbitmq_password='password'     << password 변경
... 

필수 Package 설치

OS 설치 환경에 따라 차이가 있으나, setup.sh 에서 자동으로 설치가 진행 안되는 Package 는 수동으로 설치를 진행해야됩니다.

$ yum -y install wget curl rsync

Ansible Tower 배포

아래 bundle 디렉토리에 있는 setup.sh 스크립트를 구동하면 자동으로 ansible core 를 설치하고, 이후 Ansible Tower 를 배포하는 playbook 을 수행합니다.

[root@fastvm-r77-99 ansible-tower-setup-bundle-3.6.3-1]# ./setup.sh

배포 완료


위와 같이 배포가 완료되면 Web console 로 접근이 가능합니다.
inventory 에서 지정한 Admin 계정의 Password 를 입력하여 접근합니다.


Red Hat 에서 지급된 라이센스 파일을 추가하거나, 서브스크립션이 활성화 되어 있는 RHN 계정을 로그인합니다.


위와 같이 Ansible Tower 배포가 완료 되었습니다.

참고 자료

자주 묻는 질문

Ansible Tower 설치 전에 어떤 Repository를 활성화해야 하나요?

subscription-manager repos --enable로 rhel-7-server-rpms, rhel-7-server-ansible-2.9-rpms, rhel-server-rhscl-7-rpms를 활성화합니다.

Ansible Tower 설치 시 비밀번호는 어디서 지정하나요?

Setup Bundle 디렉터리의 inventory 파일 [all:vars]에서 admin_password, pg_password, rabbitmq_password를 지정합니다.

setup.sh가 일부 패키지를 설치하지 못하면 어떻게 하나요?

OS 설치 환경에 따라 setup.sh가 자동으로 설치하지 못하는 패키지가 있으므로 yum -y install wget curl rsync처럼 수동으로 설치합니다.