Redhat에서는 Ansible Tower라는 software는 판매하고 있지요.
이 Ansible tower의 Opensource 버전이 AWX라는 녀석인데요. 이녀석을 설치해보려고 합니다.
참고로 AWX 18버전부터는 kubernetes operator을 이용해 설치해야 방식으로 변경이 되었고,
저는 14버전으로 설치하는 설차를 기록해놓으려고 합니다.
1. AWX컨테이너 용도
- awx\_web : AWX Frontend 용 Container
- awx\_task : Ansible task용 Container
- postgres : awx DB용 Container
- redis : AWX Cache 관리용 Container
2. 설치정보
- Hardware : 2Core / 8G Mem 이상 / 60G Disk 이상
- OS : Centos7 이상
- Version : AWX 14.1.0 : Ansible 2.9.10 / python 3.6 / pip 20.1.1 / docker 18.09.7
3. software 설치
- Ansible 설치
```shell
$> yum install ansible
or
$> pip3 install ansible==2.9.5
```
- Docker-CE 설치 / docker-compose 설치
```shell
$> yum install docker-ce -y
$> pip install docker-compose
```
- AWX 다운로드 후 설정파일 변경(8081로 접근 설정)
```
$> git clone https://github.com/ansible/awx.git -b "14.1.0"
$> cd awx/installer/
$> vi inventory
...
postgres_data_dir="/svc/awx/pgdocker"
docker_compose_dir="/svc/awx/awxcompose"
...
host_port=8088
...
```
- AWX 설치
```shell
$> ansible-playbook -i inventory install.yml
```
- awx-UI 구동을 위한 컨테이너 구동상태 확인
```shell
docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
abc490b5491a postgres:10 "docker-entrypoint.s…" 40 seconds ago Up 40 seconds 0.0.0.0:5432->5432/tcp awx_postgres
23a88b84555c ansible/awx:14.1.0 "tini -- /usr/bin/la…" 7 minutes ago Up 7 minutes 8052/tcp awx_task
998f87a22c50 ansible/awx:14.1.0 "tini -- /bin/sh -c …" 7 minutes ago Up 7 minutes 0.0.0.0:8081->8052/tcp awx_web
6efe1321bb04 redis "docker-entrypoint.s…" 7 minutes ago Up 7 minutes 6379/tcp awx_redis
```
- postgres vacuum 설정 (postgres data 관리를 위한 설정)
```shell
$> vi /data/awx/pgdocker/10/data/postgresql.conf
...
track_counts = on
autovacuum = on
...
설정 후 awx_postgres 컨테이너 재기동 필요
```
4. AWX 접근
- 웹 브라우져에서 AWX 접근 ( http://{{서버IP}}:8088 )
- 최초 접근시 AWX is Upgrading 메세지 출력 (1회한)
[](http://igoni.kr/uploads/images/gallery/2024-01/dIuimage.png)
- 업그레이드 완료되면 로그인 진행 (admin / password , 패스워드 변경 필)
[](http://igoni.kr/uploads/images/gallery/2024-01/1A4image.png)