install redhat ansible with awx
ansible을 이용하여 서버 automation.
2. install ansible
[root@localhost ~]# yum -y install epel-release
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.kakao.com
* epel: mirrors.aliyun.com
* extras: mirror.kakao.com
* updates: mirror.kakao.com
Package epel-release-7-11.noarch already installed and latest version
Nothing to do
[root@localhost ~]# yum -y install git gettext ansible docker nodejs npm gcc-c++ bzip2
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.kakao.com
* epel: mirrors.aliyun.com
* extras: mirror.kakao.com
* updates: mirror.kakao.com
Package gettext-0.19.8.1-2.el7.x86_64 already installed and latest version
Package 2:docker-1.13.1-96.gitb2f74b2.el7.centos.x86_64 already installed and latest version
Package bzip2-1.0.6-13.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package ansible.noarch 0:2.8.1-1.el7 will be installed
--> Processing Dependency: python-httplib2 for package: ansible-2.8.1-1.el7.noarch
--> Processing Dependency: python-jinja2 for package: ansible-2.8.1-1.el7.noarch
--> Processing Dependency: python-paramiko for package: ansible-2.8.1-1.el7.noarch
--> Processing Dependency: python2-jmespath for package: ansible-2.8.1-1.el7.noarch
--> Processing Dependency: sshpass for package: ansible-2.8.1-1.el7.noarch
---> Package gcc-c++.x86_64 0:4.8.5-36.el7_6.2 will be installed
--> Processing Dependency: libstdc++-devel = 4.8.5-36.el7_6.2 for package: gcc-c++-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: libstdc++ = 4.8.5-36.el7_6.2 for package: gcc-c++-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: gcc = 4.8.5-36.el7_6.2 for package: gcc-c++-4.8.5-36.el7_6.2.x86_64
---> Package git.x86_64 0:1.8.3.1-20.el7 will be installed
--> Processing Dependency: perl-Git = 1.8.3.1-20.el7 for package: git-1.8.3.1-20.el7.x86_64
--> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.3.1-20.el7.x86_64
--> Processing Dependency: perl(Git) for package: git-1.8.3.1-20.el7.x86_64
--> Processing Dependency: perl(Error) for package: git-1.8.3.1-20.el7.x86_64
---> Package nodejs.x86_64 1:6.17.1-1.el7 will be installed
--> Processing Dependency: libuv >= 1:1.9.1 for package: 1:nodejs-6.17.1-1.el7.x86_64
--> Processing Dependency: libuv.so.1()(64bit) for package: 1:nodejs-6.17.1-1.el7.x86_64
---> Package npm.x86_64 1:3.10.10-1.6.17.1.1.el7 will be installed
--> Running transaction check
---> Package gcc.x86_64 0:4.8.5-36.el7_6.2 will be installed
--> Processing Dependency: libgomp = 4.8.5-36.el7_6.2 for package: gcc-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: cpp = 4.8.5-36.el7_6.2 for package: gcc-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: libgcc >= 4.8.5-36.el7_6.2 for package: gcc-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-36.el7_6.2.x86_64
---> Package libstdc++.x86_64 0:4.8.5-36.el7 will be updated
---> Package libstdc++.x86_64 0:4.8.5-36.el7_6.2 will be an update
---> Package libstdc++-devel.x86_64 0:4.8.5-36.el7_6.2 will be installed
---> Package libuv.x86_64 1:1.29.1-1.el7 will be installed
---> Package perl-Error.noarch 1:0.17020-2.el7 will be installed
---> Package perl-Git.noarch 0:1.8.3.1-20.el7 will be installed
---> Package perl-TermReadKey.x86_64 0:2.30-20.el7 will be installed
---> Package python-httplib2.noarch 0:0.9.2-1.el7 will be installed
---> Package python-jinja2.noarch 0:2.7.2-3.el7_6 will be installed
--> Processing Dependency: python-babel >= 0.8 for package: python-jinja2-2.7.2-3.el7_6.noarch
--> Processing Dependency: python-markupsafe for package: python-jinja2-2.7.2-3.el7_6.noarch
---> Package python-paramiko.noarch 0:2.1.1-9.el7 will be installed
---> Package python2-jmespath.noarch 0:0.9.0-3.el7 will be installed
---> Package sshpass.x86_64 0:1.06-2.el7 will be installed
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-36.el7_6.2 will be installed
---> Package glibc-devel.x86_64 0:2.17-260.el7_6.6 will be installed
--> Processing Dependency: glibc-headers = 2.17-260.el7_6.6 for package: glibc-devel-2.17-260.el7_6.6.x86_64
--> Processing Dependency: glibc = 2.17-260.el7_6.6 for package: glibc-devel-2.17-260.el7_6.6.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-260.el7_6.6.x86_64
---> Package libgcc.x86_64 0:4.8.5-36.el7 will be updated
---> Package libgcc.x86_64 0:4.8.5-36.el7_6.2 will be an update
---> Package libgomp.x86_64 0:4.8.5-36.el7 will be updated
---> Package libgomp.x86_64 0:4.8.5-36.el7_6.2 will be an update
---> Package python-babel.noarch 0:0.9.6-8.el7 will be installed
---> Package python-markupsafe.x86_64 0:0.11-10.el7 will be installed
--> Running transaction check
---> Package glibc.x86_64 0:2.17-260.el7 will be updated
--> Processing Dependency: glibc = 2.17-260.el7 for package: glibc-common-2.17-260.el7.x86_64
---> Package glibc.x86_64 0:2.17-260.el7_6.6 will be an update
---> Package glibc-headers.x86_64 0:2.17-260.el7_6.6 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-260.el7_6.6.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-260.el7_6.6.x86_64
--> Running transaction check
---> Package glibc-common.x86_64 0:2.17-260.el7 will be updated
---> Package glibc-common.x86_64 0:2.17-260.el7_6.6 will be an update
---> Package kernel-headers.x86_64 0:3.10.0-957.21.3.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================
Package Arch Version Repository Size
==============================================================================================================
Installing:
ansible noarch 2.8.1-1.el7 epel 15 M
gcc-c++ x86_64 4.8.5-36.el7_6.2 updates 7.2 M
git x86_64 1.8.3.1-20.el7 updates 4.4 M
nodejs x86_64 1:6.17.1-1.el7 epel 4.7 M
npm x86_64 1:3.10.10-1.6.17.1.1.el7 epel 2.5 M
Installing for dependencies:
cpp x86_64 4.8.5-36.el7_6.2 updates 5.9 M
gcc x86_64 4.8.5-36.el7_6.2 updates 16 M
glibc-devel x86_64 2.17-260.el7_6.6 updates 1.1 M
glibc-headers x86_64 2.17-260.el7_6.6 updates 684 k
kernel-headers x86_64 3.10.0-957.21.3.el7 updates 8.0 M
libstdc++-devel x86_64 4.8.5-36.el7_6.2 updates 1.5 M
libuv x86_64 1:1.29.1-1.el7 epel 137 k
perl-Error noarch 1:0.17020-2.el7 base 32 k
perl-Git noarch 1.8.3.1-20.el7 updates 55 k
perl-TermReadKey x86_64 2.30-20.el7 base 31 k
python-babel noarch 0.9.6-8.el7 base 1.4 M
python-httplib2 noarch 0.9.2-1.el7 extras 115 k
python-jinja2 noarch 2.7.2-3.el7_6 updates 518 k
python-markupsafe x86_64 0.11-10.el7 base 25 k
python-paramiko noarch 2.1.1-9.el7 updates 269 k
python2-jmespath noarch 0.9.0-3.el7 extras 39 k
sshpass x86_64 1.06-2.el7 extras 21 k
Updating for dependencies:
glibc x86_64 2.17-260.el7_6.6 updates 3.7 M
glibc-common x86_64 2.17-260.el7_6.6 updates 12 M
libgcc x86_64 4.8.5-36.el7_6.2 updates 102 k
libgomp x86_64 4.8.5-36.el7_6.2 updates 158 k
libstdc++ x86_64 4.8.5-36.el7_6.2 updates 305 k
Transaction Summary
==============================================================================================================
Install 5 Packages (+17 Dependent packages)
Upgrade ( 5 Dependent packages)
Total size: 85 M
Total download size: 69 M
Downloading packages:
(1/22): git-1.8.3.1-20.el7.x86_64.rpm | 4.4 MB 00:00:00
(2/22): cpp-4.8.5-36.el7_6.2.x86_64.rpm | 5.9 MB 00:00:00
(3/22): gcc-c++-4.8.5-36.el7_6.2.x86_64.rpm | 7.2 MB 00:00:01
(4/22): glibc-headers-2.17-260.el7_6.6.x86_64.rpm | 684 kB 00:00:00
(5/22): glibc-devel-2.17-260.el7_6.6.x86_64.rpm | 1.1 MB 00:00:00
(6/22): libstdc++-devel-4.8.5-36.el7_6.2.x86_64.rpm | 1.5 MB 00:00:00
(7/22): kernel-headers-3.10.0-957.21.3.el7.x86_64.rpm | 8.0 MB 00:00:00
(8/22): libuv-1.29.1-1.el7.x86_64.rpm | 137 kB 00:00:01
(9/22): gcc-4.8.5-36.el7_6.2.x86_64.rpm | 16 MB 00:00:04
(10/22): ansible-2.8.1-1.el7.noarch.rpm | 15 MB 00:00:13
(11/22): perl-TermReadKey-2.30-20.el7.x86_64.rpm | 31 kB 00:00:00
(12/22): perl-Error-0.17020-2.el7.noarch.rpm | 32 kB 00:00:00
(13/22): python-httplib2-0.9.2-1.el7.noarch.rpm | 115 kB 00:00:00
(14/22): perl-Git-1.8.3.1-20.el7.noarch.rpm | 55 kB 00:00:00
(15/22): python-markupsafe-0.11-10.el7.x86_64.rpm | 25 kB 00:00:00
(16/22): python-babel-0.9.6-8.el7.noarch.rpm | 1.4 MB 00:00:00
(17/22): python-paramiko-2.1.1-9.el7.noarch.rpm | 269 kB 00:00:00
(18/22): sshpass-1.06-2.el7.x86_64.rpm | 21 kB 00:00:00
(19/22): python-jinja2-2.7.2-3.el7_6.noarch.rpm | 518 kB 00:00:00
(20/22): python2-jmespath-0.9.0-3.el7.noarch.rpm | 39 kB 00:00:00
(21/22): npm-3.10.10-1.6.17.1.1.el7.x86_64.rpm | 2.5 MB 00:00:02
(22/22): nodejs-6.17.1-1.el7.x86_64.rpm | 4.7 MB 00:00:04
--------------------------------------------------------------------------------------------------------------
Total 3.9 MB/s | 69 MB 00:00:17
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : libgcc-4.8.5-36.el7_6.2.x86_64 1/32
Updating : glibc-common-2.17-260.el7_6.6.x86_64 2/32
Updating : glibc-2.17-260.el7_6.6.x86_64 3/32
Updating : libstdc++-4.8.5-36.el7_6.2.x86_64 4/32
Installing : 1:perl-Error-0.17020-2.el7.noarch 5/32
Installing : libstdc++-devel-4.8.5-36.el7_6.2.x86_64 6/32
Installing : sshpass-1.06-2.el7.x86_64 7/32
Installing : perl-TermReadKey-2.30-20.el7.x86_64 8/32
Installing : perl-Git-1.8.3.1-20.el7.noarch 9/32
Installing : git-1.8.3.1-20.el7.x86_64 10/32
Updating : libgomp-4.8.5-36.el7_6.2.x86_64 11/32
Installing : python-markupsafe-0.11-10.el7.x86_64 12/32
Installing : cpp-4.8.5-36.el7_6.2.x86_64 13/32
Installing : 1:libuv-1.29.1-1.el7.x86_64 14/32
Installing : 1:npm-3.10.10-1.6.17.1.1.el7.x86_64 15/32
Installing : 1:nodejs-6.17.1-1.el7.x86_64 16/32
Installing : python-httplib2-0.9.2-1.el7.noarch 17/32
Installing : python-babel-0.9.6-8.el7.noarch 18/32
Installing : python-jinja2-2.7.2-3.el7_6.noarch 19/32
Installing : python-paramiko-2.1.1-9.el7.noarch 20/32
Installing : kernel-headers-3.10.0-957.21.3.el7.x86_64 21/32
Installing : glibc-headers-2.17-260.el7_6.6.x86_64 22/32
Installing : glibc-devel-2.17-260.el7_6.6.x86_64 23/32
Installing : gcc-4.8.5-36.el7_6.2.x86_64 24/32
Installing : python2-jmespath-0.9.0-3.el7.noarch 25/32
Installing : ansible-2.8.1-1.el7.noarch 26/32
Installing : gcc-c++-4.8.5-36.el7_6.2.x86_64 27/32
Cleanup : libstdc++-4.8.5-36.el7.x86_64 28/32
Cleanup : libgomp-4.8.5-36.el7.x86_64 29/32
Cleanup : glibc-common-2.17-260.el7.x86_64 30/32
Cleanup : glibc-2.17-260.el7.x86_64 31/32
Cleanup : libgcc-4.8.5-36.el7.x86_64 32/32
Verifying : python2-jmespath-0.9.0-3.el7.noarch 1/32
Verifying : sshpass-1.06-2.el7.x86_64 2/32
Verifying : gcc-4.8.5-36.el7_6.2.x86_64 3/32
Verifying : kernel-headers-3.10.0-957.21.3.el7.x86_64 4/32
Verifying : libstdc++-4.8.5-36.el7_6.2.x86_64 5/32
Verifying : 1:nodejs-6.17.1-1.el7.x86_64 6/32
Verifying : perl-TermReadKey-2.30-20.el7.x86_64 7/32
Verifying : perl-Git-1.8.3.1-20.el7.noarch 8/32
Verifying : python-jinja2-2.7.2-3.el7_6.noarch 9/32
Verifying : libgcc-4.8.5-36.el7_6.2.x86_64 10/32
Verifying : libgomp-4.8.5-36.el7_6.2.x86_64 11/32
Verifying : glibc-headers-2.17-260.el7_6.6.x86_64 12/32
Verifying : libstdc++-devel-4.8.5-36.el7_6.2.x86_64 13/32
Verifying : python-markupsafe-0.11-10.el7.x86_64 14/32
Verifying : python-paramiko-2.1.1-9.el7.noarch 15/32
Verifying : python-babel-0.9.6-8.el7.noarch 16/32
Verifying : 1:perl-Error-0.17020-2.el7.noarch 17/32
Verifying : gcc-c++-4.8.5-36.el7_6.2.x86_64 18/32
Verifying : git-1.8.3.1-20.el7.x86_64 19/32
Verifying : glibc-devel-2.17-260.el7_6.6.x86_64 20/32
Verifying : 1:npm-3.10.10-1.6.17.1.1.el7.x86_64 21/32
Verifying : glibc-2.17-260.el7_6.6.x86_64 22/32
Verifying : python-httplib2-0.9.2-1.el7.noarch 23/32
Verifying : ansible-2.8.1-1.el7.noarch 24/32
Verifying : cpp-4.8.5-36.el7_6.2.x86_64 25/32
Verifying : 1:libuv-1.29.1-1.el7.x86_64 26/32
Verifying : glibc-common-2.17-260.el7_6.6.x86_64 27/32
Verifying : libgcc-4.8.5-36.el7.x86_64 28/32
Verifying : libstdc++-4.8.5-36.el7.x86_64 29/32
Verifying : glibc-2.17-260.el7.x86_64 30/32
Verifying : glibc-common-2.17-260.el7.x86_64 31/32
Verifying : libgomp-4.8.5-36.el7.x86_64 32/32
Installed:
ansible.noarch 0:2.8.1-1.el7 gcc-c++.x86_64 0:4.8.5-36.el7_6.2 git.x86_64 0:1.8.3.1-20.el7
nodejs.x86_64 1:6.17.1-1.el7 npm.x86_64 1:3.10.10-1.6.17.1.1.el7
Dependency Installed:
cpp.x86_64 0:4.8.5-36.el7_6.2 gcc.x86_64 0:4.8.5-36.el7_6.2
glibc-devel.x86_64 0:2.17-260.el7_6.6 glibc-headers.x86_64 0:2.17-260.el7_6.6
kernel-headers.x86_64 0:3.10.0-957.21.3.el7 libstdc++-devel.x86_64 0:4.8.5-36.el7_6.2
libuv.x86_64 1:1.29.1-1.el7 perl-Error.noarch 1:0.17020-2.el7
perl-Git.noarch 0:1.8.3.1-20.el7 perl-TermReadKey.x86_64 0:2.30-20.el7
python-babel.noarch 0:0.9.6-8.el7 python-httplib2.noarch 0:0.9.2-1.el7
python-jinja2.noarch 0:2.7.2-3.el7_6 python-markupsafe.x86_64 0:0.11-10.el7
python-paramiko.noarch 0:2.1.1-9.el7 python2-jmespath.noarch 0:0.9.0-3.el7
sshpass.x86_64 0:1.06-2.el7
Dependency Updated:
glibc.x86_64 0:2.17-260.el7_6.6 glibc-common.x86_64 0:2.17-260.el7_6.6 libgcc.x86_64 0:4.8.5-36.el7_6.2
libgomp.x86_64 0:4.8.5-36.el7_6.2 libstdc++.x86_64 0:4.8.5-36.el7_6.2
Complete!
[root@localhost ~]# yum -y install python-docker-py
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.kakao.com
* epel: mirrors.aliyun.com
* extras: mirror.kakao.com
* updates: mirror.kakao.com
Resolving Dependencies
--> Running transaction check
---> Package python-docker-py.noarch 1:1.10.6-9.el7_6 will be installed
--> Processing Dependency: python-websocket-client >= 0.32.0 for package: 1:python-docker-py-1.10.6-9.el7_6.no arch
--> Processing Dependency: python-docker-pycreds for package: 1:python-docker-py-1.10.6-9.el7_6.noarch
--> Running transaction check
---> Package python-docker-pycreds.noarch 1:0.3.0-9.el7_6 will be installed
---> Package python-websocket-client.noarch 0:0.56.0-3.git3c25814.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================
Package Arch Version Repository Size
==============================================================================================================
Installing:
python-docker-py noarch 1:1.10.6-9.el7_6 extras 102 k
Installing for dependencies:
python-docker-pycreds noarch 1:0.3.0-9.el7_6 extras 20 k
python-websocket-client noarch 0.56.0-3.git3c25814.el7 extras 66 k
Transaction Summary
==============================================================================================================
Install 1 Package (+2 Dependent packages)
Total download size: 189 k
Installed size: 603 k
Downloading packages:
(1/3): python-docker-pycreds-0.3.0-9.el7_6.noarch.rpm | 20 kB 00:00:00
(2/3): python-docker-py-1.10.6-9.el7_6.noarch.rpm | 102 kB 00:00:00
(3/3): python-websocket-client-0.56.0-3.git3c25814.el7.noarch.rpm | 66 kB 00:00:00
--------------------------------------------------------------------------------------------------------------
Total 663 kB/s | 189 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : python-websocket-client-0.56.0-3.git3c25814.el7.noarch 1/3
Installing : 1:python-docker-pycreds-0.3.0-9.el7_6.noarch 2/3
Installing : 1:python-docker-py-1.10.6-9.el7_6.noarch 3/3
Verifying : 1:python-docker-pycreds-0.3.0-9.el7_6.noarch 1/3
Verifying : 1:python-docker-py-1.10.6-9.el7_6.noarch 2/3
Verifying : python-websocket-client-0.56.0-3.git3c25814.el7.noarch 3/3
Installed:
python-docker-py.noarch 1:1.10.6-9.el7_6
Dependency Installed:
python-docker-pycreds.noarch 1:0.3.0-9.el7_6 python-websocket-client.noarch 0:0.56.0-3.git3c25814.el7
Complete!
[root@localhost ~]# systemctl start docker
[root@localhost ~]# systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/doc ker.service.
[root@localhost ~]# pwd
/root
[root@localhost ~]# git clone https://github.com/ansible/awx.git
Cloning into 'awx'...
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 203862 (delta 4), reused 9 (delta 4), pack-reused 203849
Receiving objects: 100% (203862/203862), 211.79 MiB | 17.62 MiB/s, done.
Resolving deltas: 100% (157692/157692), done.
[root@localhost ~]# cd awx/installer/
[root@localhost installer]# pip install docker==3.7.3
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting docker==3.7.3
Using cached https://files.pythonhosted.org/packages/09/da/7cc7ecdcd01145e9924a8ccbe9c1baf3a362fc75d4cb150676eb5231ea60/docker-3.7.3-py2.py3-none-any.whl
Requirement already satisfied: websocket-client>=0.32.0 in /usr/lib/python2.7/site-packages (from docker==3.7.3) (0.56.0)
Requirement already satisfied: backports.ssl-match-hostname>=3.5; python_version < "3.5" in /usr/lib/python2.7/site-packages (from docker==3.7.3) (3.5.0.1)
Requirement already satisfied: ipaddress>=1.0.16; python_version < "3.3" in /usr/lib/python2.7/site-packages (from docker==3.7.3) (1.0.16)
Requirement already satisfied: six>=1.4.0 in /usr/lib/python2.7/site-packages (from docker==3.7.3) (1.9.0)
Requirement already satisfied: docker-pycreds>=0.4.0 in /usr/lib/python2.7/site-packages (from docker==3.7.3) (0.4.0)
Requirement already satisfied: requests!=2.18.0,>=2.14.2 in /usr/lib/python2.7/site-packages (from docker==3.7.3) (2.20.1)
Requirement already satisfied: idna<2.8,>=2.5 in /usr/lib/python2.7/site-packages (from requests!=2.18.0,>=2.14.2->docker==3.7.3) (2.7)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/site-packages (from requests!=2.18.0,>=2.14.2->docker==3.7.3) (3.0.4)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /usr/lib/python2.7/site-packages (from requests!=2.18.0,>=2.14.2->docker==3.7.3) (1.24.3)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests!=2.18.0,>=2.14.2->docker==3.7.3) (2019.6.16)
Installing collected packages: docker
Successfully installed docker-3.7.3
[root@localhost installer]# ansible-playbook -i inventory install.yml
PLAY [Build and deploy AWX] *********************************************************************************************************
TASK [Gathering Facts] **************************************************************************************************************
ok: [localhost]
TASK [check_vars : include_tasks] ***************************************************************************************************
skipping: [localhost]
TASK [check_vars : include_tasks] ***************************************************************************************************
included: /root/awx/installer/roles/check_vars/tasks/check_docker.yml for localhost
TASK [check_vars : postgres_data_dir should be defined] *****************************************************************************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [check_vars : host_port should be defined] *************************************************************************************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [image_build : Set global version if not provided] *****************************************************************************
skipping: [localhost]
TASK [image_build : Verify awx-logos directory exists for official install] *********************************************************
skipping: [localhost]
TASK [image_build : Copy logos for inclusion in sdist] ******************************************************************************
skipping: [localhost]
TASK [image_build : Set sdist file name] ********************************************************************************************
skipping: [localhost]
TASK [image_build : AWX Distribution] ***********************************************************************************************
skipping: [localhost]
TASK [image_build : Stat distribution file] *****************************************************************************************
skipping: [localhost]
TASK [image_build : Clean distribution] *********************************************************************************************
skipping: [localhost]
TASK [image_build : Build sdist builder image] **************************************************************************************
skipping: [localhost]
TASK [image_build : Build AWX distribution using container] *************************************************************************
skipping: [localhost]
TASK [image_build : Build AWX distribution locally] *********************************************************************************
skipping: [localhost]
TASK [image_build : Set docker build base path] *************************************************************************************
skipping: [localhost]
TASK [image_build : Set awx_web image name] *****************************************************************************************
skipping: [localhost]
TASK [image_build : Set awx_task image name] ****************************************************************************************
skipping: [localhost]
TASK [image_build : Ensure directory exists] ****************************************************************************************
skipping: [localhost]
TASK [image_build : Stage sdist] ****************************************************************************************************
skipping: [localhost]
TASK [image_build : Template web Dockerfile] ****************************************************************************************
skipping: [localhost]
TASK [image_build : Template task Dockerfile] ***************************************************************************************
skipping: [localhost]
TASK [image_build : Stage launch_awx] ***********************************************************************************************
skipping: [localhost]
TASK [image_build : Stage launch_awx_task] ******************************************************************************************
skipping: [localhost]
TASK [image_build : Stage nginx.conf] ***********************************************************************************************
skipping: [localhost]
TASK [image_build : Stage supervisor.conf] ******************************************************************************************
skipping: [localhost]
TASK [image_build : Stage supervisor_task.conf] *************************************************************************************
skipping: [localhost]
TASK [image_build : Stage settings.py] **********************************************************************************************
skipping: [localhost]
TASK [image_build : Stage requirements] *********************************************************************************************
skipping: [localhost]
TASK [image_build : Stage config watcher] *******************************************************************************************
skipping: [localhost]
TASK [image_build : Stage Makefile] *************************************************************************************************
skipping: [localhost]
TASK [image_build : Stage ansible repo] *********************************************************************************************
skipping: [localhost]
TASK [image_build : Stage ansible repo key] *****************************************************************************************
skipping: [localhost]
TASK [image_build : Build base web image] *******************************************************************************************
skipping: [localhost]
TASK [image_build : Build base task image] ******************************************************************************************
skipping: [localhost]
TASK [image_build : Tag task and web images as latest] ******************************************************************************
skipping: [localhost]
TASK [image_build : Clean docker base directory] ************************************************************************************
skipping: [localhost]
TASK [image_push : Authenticate with Docker registry if registry password given] ****************************************************
skipping: [localhost]
TASK [image_push : Remove web image] ************************************************************************************************
skipping: [localhost]
TASK [image_push : Remove task image] ***********************************************************************************************
skipping: [localhost]
TASK [image_push : Tag and push web image to registry] ******************************************************************************
skipping: [localhost]
TASK [image_push : Tag and push task image to registry] *****************************************************************************
skipping: [localhost]
TASK [image_push : Set full image path for Registry] ********************************************************************************
skipping: [localhost]
TASK [kubernetes : fail] ************************************************************************************************************
skipping: [localhost]
TASK [kubernetes : include_tasks] ***************************************************************************************************
skipping: [localhost] => (item=openshift_auth.yml)
skipping: [localhost] => (item=openshift.yml)
TASK [kubernetes : include_tasks] ***************************************************************************************************
skipping: [localhost] => (item=kubernetes_auth.yml)
skipping: [localhost] => (item=kubernetes.yml)
TASK [kubernetes : Use kubectl or oc] ***********************************************************************************************
skipping: [localhost]
TASK [kubernetes : set_fact] ********************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Record deployment size] ******************************************************************************************
skipping: [localhost]
TASK [kubernetes : Set expected post-deployment Replicas value] *********************************************************************
skipping: [localhost]
TASK [kubernetes : Delete existing Deployment] **************************************************************************************
skipping: [localhost]
TASK [kubernetes : Get Postgres Service Detail] *************************************************************************************
skipping: [localhost]
TASK [kubernetes : Template PostgreSQL Deployment (OpenShift)] **********************************************************************
skipping: [localhost]
TASK [kubernetes : Deploy and Activate Postgres (OpenShift)] ************************************************************************
skipping: [localhost]
TASK [kubernetes : Deploy and Activate Postgres (Kubernetes)] ***********************************************************************
skipping: [localhost]
TASK [kubernetes : Set postgresql hostname to helm package service (Kubernetes)] ****************************************************
skipping: [localhost]
TASK [kubernetes : Wait for Postgres to activate] ***********************************************************************************
skipping: [localhost]
TASK [kubernetes : Set task image name] *********************************************************************************************
skipping: [localhost]
TASK [kubernetes : Set web image name] **********************************************************************************************
skipping: [localhost]
TASK [kubernetes : Render deployment templates] *************************************************************************************
skipping: [localhost] => (item=None)
skipping: [localhost] => (item=None)
skipping: [localhost] => (item=None)
skipping: [localhost]
TASK [kubernetes : Apply Deployment] ************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Delete any existing management pod] ******************************************************************************
skipping: [localhost]
TASK [kubernetes : Template management pod] *****************************************************************************************
skipping: [localhost]
TASK [kubernetes : Create management pod] *******************************************************************************************
skipping: [localhost]
TASK [kubernetes : Wait for management pod to start] ********************************************************************************
skipping: [localhost]
TASK [kubernetes : Migrate database] ************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Check for Tower Super users] *************************************************************************************
skipping: [localhost]
TASK [kubernetes : create django super user if it does not exist] *******************************************************************
skipping: [localhost]
TASK [kubernetes : update django super user password] *******************************************************************************
skipping: [localhost]
TASK [kubernetes : Create the default organization if it is needed.] ****************************************************************
skipping: [localhost]
TASK [kubernetes : Delete management pod] *******************************************************************************************
skipping: [localhost]
TASK [kubernetes : Scale up deployment] *********************************************************************************************
skipping: [localhost]
TASK [local_docker : Export Docker web image if it isnt local and there isnt a registry defined] ************************************
skipping: [localhost]
TASK [local_docker : Export Docker task image if it isnt local and there isnt a registry defined] ***********************************
skipping: [localhost]
TASK [local_docker : Set docker base path] ******************************************************************************************
skipping: [localhost]
TASK [local_docker : Ensure directory exists] ***************************************************************************************
skipping: [localhost]
TASK [local_docker : Copy web image to docker execution] ****************************************************************************
skipping: [localhost]
TASK [local_docker : Copy task image to docker execution] ***************************************************************************
skipping: [localhost]
TASK [local_docker : Load web image] ************************************************************************************************
skipping: [localhost]
TASK [local_docker : Load task image] ***********************************************************************************************
skipping: [localhost]
TASK [local_docker : Set full image path for local install] *************************************************************************
skipping: [localhost]
TASK [local_docker : Set DockerHub Image Paths] *************************************************************************************
ok: [localhost]
TASK [local_docker : Create /tmp/awxcompose directory] ******************************************************************************
ok: [localhost]
TASK [local_docker : Create Docker Compose Configuration] ***************************************************************************
ok: [localhost] => (item=environment.sh)
ok: [localhost] => (item=credentials.py)
ok: [localhost] => (item=docker-compose.yml)
TASK [local_docker : Render SECRET_KEY file] ****************************************************************************************
ok: [localhost]
TASK [local_docker : Start the containers] ******************************************************************************************
[DEPRECATION WARNING]: The 'docker_service' module has been renamed to 'docker_compose'.. This feature will be removed in version
2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
changed: [localhost]
TASK [local_docker : Update CA trust in awx_web container] **************************************************************************
changed: [localhost]
TASK [local_docker : Update CA trust in awx_task container] *************************************************************************
changed: [localhost]
PLAY RECAP **************************************************************************************************************************
localhost : ok=11 changed=3 unreachable=0 failed=0 skipped=77 rescued=0 ignored=0
3. check status
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8cb059cda584 ansible/awx_task:6.0.0 "/tini -- /bin/sh ..." 7 minutes ago Up 7 minutes 8052/tcp awx_task
414d2dbb0a5e ansible/awx_web:6.0.0 "/tini -- /bin/sh ..." 7 minutes ago Up 7 minutes 0.0.0.0:80->8052/tcp awx_web
c738253c5242 ansible/awx_rabbitmq:3.7.4 "docker-entrypoint..." 7 minutes ago Up 7 minutes 4369/tcp, 5671-5672/tcp, 15671-15672/tcp, 25672/tcp awx_rabbitmq
75dcd8a69eef memcached:alpine "docker-entrypoint..." 7 minutes ago Up 7 minutes 11211/tcp awx_memcached
29c466e3e72f postgres:9.6 "docker-entrypoint..." 7 minutes ago Up 7 minutes 5432/tcp awx_postgres
[root@localhost ~]#
1. 환경준비
Centos 7.x
2. install ansible
[root@localhost ~]# yum -y install epel-release
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.kakao.com
* epel: mirrors.aliyun.com
* extras: mirror.kakao.com
* updates: mirror.kakao.com
Package epel-release-7-11.noarch already installed and latest version
Nothing to do
[root@localhost ~]# yum -y install git gettext ansible docker nodejs npm gcc-c++ bzip2
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.kakao.com
* epel: mirrors.aliyun.com
* extras: mirror.kakao.com
* updates: mirror.kakao.com
Package gettext-0.19.8.1-2.el7.x86_64 already installed and latest version
Package 2:docker-1.13.1-96.gitb2f74b2.el7.centos.x86_64 already installed and latest version
Package bzip2-1.0.6-13.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package ansible.noarch 0:2.8.1-1.el7 will be installed
--> Processing Dependency: python-httplib2 for package: ansible-2.8.1-1.el7.noarch
--> Processing Dependency: python-jinja2 for package: ansible-2.8.1-1.el7.noarch
--> Processing Dependency: python-paramiko for package: ansible-2.8.1-1.el7.noarch
--> Processing Dependency: python2-jmespath for package: ansible-2.8.1-1.el7.noarch
--> Processing Dependency: sshpass for package: ansible-2.8.1-1.el7.noarch
---> Package gcc-c++.x86_64 0:4.8.5-36.el7_6.2 will be installed
--> Processing Dependency: libstdc++-devel = 4.8.5-36.el7_6.2 for package: gcc-c++-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: libstdc++ = 4.8.5-36.el7_6.2 for package: gcc-c++-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: gcc = 4.8.5-36.el7_6.2 for package: gcc-c++-4.8.5-36.el7_6.2.x86_64
---> Package git.x86_64 0:1.8.3.1-20.el7 will be installed
--> Processing Dependency: perl-Git = 1.8.3.1-20.el7 for package: git-1.8.3.1-20.el7.x86_64
--> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.3.1-20.el7.x86_64
--> Processing Dependency: perl(Git) for package: git-1.8.3.1-20.el7.x86_64
--> Processing Dependency: perl(Error) for package: git-1.8.3.1-20.el7.x86_64
---> Package nodejs.x86_64 1:6.17.1-1.el7 will be installed
--> Processing Dependency: libuv >= 1:1.9.1 for package: 1:nodejs-6.17.1-1.el7.x86_64
--> Processing Dependency: libuv.so.1()(64bit) for package: 1:nodejs-6.17.1-1.el7.x86_64
---> Package npm.x86_64 1:3.10.10-1.6.17.1.1.el7 will be installed
--> Running transaction check
---> Package gcc.x86_64 0:4.8.5-36.el7_6.2 will be installed
--> Processing Dependency: libgomp = 4.8.5-36.el7_6.2 for package: gcc-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: cpp = 4.8.5-36.el7_6.2 for package: gcc-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: libgcc >= 4.8.5-36.el7_6.2 for package: gcc-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-36.el7_6.2.x86_64
---> Package libstdc++.x86_64 0:4.8.5-36.el7 will be updated
---> Package libstdc++.x86_64 0:4.8.5-36.el7_6.2 will be an update
---> Package libstdc++-devel.x86_64 0:4.8.5-36.el7_6.2 will be installed
---> Package libuv.x86_64 1:1.29.1-1.el7 will be installed
---> Package perl-Error.noarch 1:0.17020-2.el7 will be installed
---> Package perl-Git.noarch 0:1.8.3.1-20.el7 will be installed
---> Package perl-TermReadKey.x86_64 0:2.30-20.el7 will be installed
---> Package python-httplib2.noarch 0:0.9.2-1.el7 will be installed
---> Package python-jinja2.noarch 0:2.7.2-3.el7_6 will be installed
--> Processing Dependency: python-babel >= 0.8 for package: python-jinja2-2.7.2-3.el7_6.noarch
--> Processing Dependency: python-markupsafe for package: python-jinja2-2.7.2-3.el7_6.noarch
---> Package python-paramiko.noarch 0:2.1.1-9.el7 will be installed
---> Package python2-jmespath.noarch 0:0.9.0-3.el7 will be installed
---> Package sshpass.x86_64 0:1.06-2.el7 will be installed
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-36.el7_6.2 will be installed
---> Package glibc-devel.x86_64 0:2.17-260.el7_6.6 will be installed
--> Processing Dependency: glibc-headers = 2.17-260.el7_6.6 for package: glibc-devel-2.17-260.el7_6.6.x86_64
--> Processing Dependency: glibc = 2.17-260.el7_6.6 for package: glibc-devel-2.17-260.el7_6.6.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-260.el7_6.6.x86_64
---> Package libgcc.x86_64 0:4.8.5-36.el7 will be updated
---> Package libgcc.x86_64 0:4.8.5-36.el7_6.2 will be an update
---> Package libgomp.x86_64 0:4.8.5-36.el7 will be updated
---> Package libgomp.x86_64 0:4.8.5-36.el7_6.2 will be an update
---> Package python-babel.noarch 0:0.9.6-8.el7 will be installed
---> Package python-markupsafe.x86_64 0:0.11-10.el7 will be installed
--> Running transaction check
---> Package glibc.x86_64 0:2.17-260.el7 will be updated
--> Processing Dependency: glibc = 2.17-260.el7 for package: glibc-common-2.17-260.el7.x86_64
---> Package glibc.x86_64 0:2.17-260.el7_6.6 will be an update
---> Package glibc-headers.x86_64 0:2.17-260.el7_6.6 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-260.el7_6.6.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-260.el7_6.6.x86_64
--> Running transaction check
---> Package glibc-common.x86_64 0:2.17-260.el7 will be updated
---> Package glibc-common.x86_64 0:2.17-260.el7_6.6 will be an update
---> Package kernel-headers.x86_64 0:3.10.0-957.21.3.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================
Package Arch Version Repository Size
==============================================================================================================
Installing:
ansible noarch 2.8.1-1.el7 epel 15 M
gcc-c++ x86_64 4.8.5-36.el7_6.2 updates 7.2 M
git x86_64 1.8.3.1-20.el7 updates 4.4 M
nodejs x86_64 1:6.17.1-1.el7 epel 4.7 M
npm x86_64 1:3.10.10-1.6.17.1.1.el7 epel 2.5 M
Installing for dependencies:
cpp x86_64 4.8.5-36.el7_6.2 updates 5.9 M
gcc x86_64 4.8.5-36.el7_6.2 updates 16 M
glibc-devel x86_64 2.17-260.el7_6.6 updates 1.1 M
glibc-headers x86_64 2.17-260.el7_6.6 updates 684 k
kernel-headers x86_64 3.10.0-957.21.3.el7 updates 8.0 M
libstdc++-devel x86_64 4.8.5-36.el7_6.2 updates 1.5 M
libuv x86_64 1:1.29.1-1.el7 epel 137 k
perl-Error noarch 1:0.17020-2.el7 base 32 k
perl-Git noarch 1.8.3.1-20.el7 updates 55 k
perl-TermReadKey x86_64 2.30-20.el7 base 31 k
python-babel noarch 0.9.6-8.el7 base 1.4 M
python-httplib2 noarch 0.9.2-1.el7 extras 115 k
python-jinja2 noarch 2.7.2-3.el7_6 updates 518 k
python-markupsafe x86_64 0.11-10.el7 base 25 k
python-paramiko noarch 2.1.1-9.el7 updates 269 k
python2-jmespath noarch 0.9.0-3.el7 extras 39 k
sshpass x86_64 1.06-2.el7 extras 21 k
Updating for dependencies:
glibc x86_64 2.17-260.el7_6.6 updates 3.7 M
glibc-common x86_64 2.17-260.el7_6.6 updates 12 M
libgcc x86_64 4.8.5-36.el7_6.2 updates 102 k
libgomp x86_64 4.8.5-36.el7_6.2 updates 158 k
libstdc++ x86_64 4.8.5-36.el7_6.2 updates 305 k
Transaction Summary
==============================================================================================================
Install 5 Packages (+17 Dependent packages)
Upgrade ( 5 Dependent packages)
Total size: 85 M
Total download size: 69 M
Downloading packages:
(1/22): git-1.8.3.1-20.el7.x86_64.rpm | 4.4 MB 00:00:00
(2/22): cpp-4.8.5-36.el7_6.2.x86_64.rpm | 5.9 MB 00:00:00
(3/22): gcc-c++-4.8.5-36.el7_6.2.x86_64.rpm | 7.2 MB 00:00:01
(4/22): glibc-headers-2.17-260.el7_6.6.x86_64.rpm | 684 kB 00:00:00
(5/22): glibc-devel-2.17-260.el7_6.6.x86_64.rpm | 1.1 MB 00:00:00
(6/22): libstdc++-devel-4.8.5-36.el7_6.2.x86_64.rpm | 1.5 MB 00:00:00
(7/22): kernel-headers-3.10.0-957.21.3.el7.x86_64.rpm | 8.0 MB 00:00:00
(8/22): libuv-1.29.1-1.el7.x86_64.rpm | 137 kB 00:00:01
(9/22): gcc-4.8.5-36.el7_6.2.x86_64.rpm | 16 MB 00:00:04
(10/22): ansible-2.8.1-1.el7.noarch.rpm | 15 MB 00:00:13
(11/22): perl-TermReadKey-2.30-20.el7.x86_64.rpm | 31 kB 00:00:00
(12/22): perl-Error-0.17020-2.el7.noarch.rpm | 32 kB 00:00:00
(13/22): python-httplib2-0.9.2-1.el7.noarch.rpm | 115 kB 00:00:00
(14/22): perl-Git-1.8.3.1-20.el7.noarch.rpm | 55 kB 00:00:00
(15/22): python-markupsafe-0.11-10.el7.x86_64.rpm | 25 kB 00:00:00
(16/22): python-babel-0.9.6-8.el7.noarch.rpm | 1.4 MB 00:00:00
(17/22): python-paramiko-2.1.1-9.el7.noarch.rpm | 269 kB 00:00:00
(18/22): sshpass-1.06-2.el7.x86_64.rpm | 21 kB 00:00:00
(19/22): python-jinja2-2.7.2-3.el7_6.noarch.rpm | 518 kB 00:00:00
(20/22): python2-jmespath-0.9.0-3.el7.noarch.rpm | 39 kB 00:00:00
(21/22): npm-3.10.10-1.6.17.1.1.el7.x86_64.rpm | 2.5 MB 00:00:02
(22/22): nodejs-6.17.1-1.el7.x86_64.rpm | 4.7 MB 00:00:04
--------------------------------------------------------------------------------------------------------------
Total 3.9 MB/s | 69 MB 00:00:17
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : libgcc-4.8.5-36.el7_6.2.x86_64 1/32
Updating : glibc-common-2.17-260.el7_6.6.x86_64 2/32
Updating : glibc-2.17-260.el7_6.6.x86_64 3/32
Updating : libstdc++-4.8.5-36.el7_6.2.x86_64 4/32
Installing : 1:perl-Error-0.17020-2.el7.noarch 5/32
Installing : libstdc++-devel-4.8.5-36.el7_6.2.x86_64 6/32
Installing : sshpass-1.06-2.el7.x86_64 7/32
Installing : perl-TermReadKey-2.30-20.el7.x86_64 8/32
Installing : perl-Git-1.8.3.1-20.el7.noarch 9/32
Installing : git-1.8.3.1-20.el7.x86_64 10/32
Updating : libgomp-4.8.5-36.el7_6.2.x86_64 11/32
Installing : python-markupsafe-0.11-10.el7.x86_64 12/32
Installing : cpp-4.8.5-36.el7_6.2.x86_64 13/32
Installing : 1:libuv-1.29.1-1.el7.x86_64 14/32
Installing : 1:npm-3.10.10-1.6.17.1.1.el7.x86_64 15/32
Installing : 1:nodejs-6.17.1-1.el7.x86_64 16/32
Installing : python-httplib2-0.9.2-1.el7.noarch 17/32
Installing : python-babel-0.9.6-8.el7.noarch 18/32
Installing : python-jinja2-2.7.2-3.el7_6.noarch 19/32
Installing : python-paramiko-2.1.1-9.el7.noarch 20/32
Installing : kernel-headers-3.10.0-957.21.3.el7.x86_64 21/32
Installing : glibc-headers-2.17-260.el7_6.6.x86_64 22/32
Installing : glibc-devel-2.17-260.el7_6.6.x86_64 23/32
Installing : gcc-4.8.5-36.el7_6.2.x86_64 24/32
Installing : python2-jmespath-0.9.0-3.el7.noarch 25/32
Installing : ansible-2.8.1-1.el7.noarch 26/32
Installing : gcc-c++-4.8.5-36.el7_6.2.x86_64 27/32
Cleanup : libstdc++-4.8.5-36.el7.x86_64 28/32
Cleanup : libgomp-4.8.5-36.el7.x86_64 29/32
Cleanup : glibc-common-2.17-260.el7.x86_64 30/32
Cleanup : glibc-2.17-260.el7.x86_64 31/32
Cleanup : libgcc-4.8.5-36.el7.x86_64 32/32
Verifying : python2-jmespath-0.9.0-3.el7.noarch 1/32
Verifying : sshpass-1.06-2.el7.x86_64 2/32
Verifying : gcc-4.8.5-36.el7_6.2.x86_64 3/32
Verifying : kernel-headers-3.10.0-957.21.3.el7.x86_64 4/32
Verifying : libstdc++-4.8.5-36.el7_6.2.x86_64 5/32
Verifying : 1:nodejs-6.17.1-1.el7.x86_64 6/32
Verifying : perl-TermReadKey-2.30-20.el7.x86_64 7/32
Verifying : perl-Git-1.8.3.1-20.el7.noarch 8/32
Verifying : python-jinja2-2.7.2-3.el7_6.noarch 9/32
Verifying : libgcc-4.8.5-36.el7_6.2.x86_64 10/32
Verifying : libgomp-4.8.5-36.el7_6.2.x86_64 11/32
Verifying : glibc-headers-2.17-260.el7_6.6.x86_64 12/32
Verifying : libstdc++-devel-4.8.5-36.el7_6.2.x86_64 13/32
Verifying : python-markupsafe-0.11-10.el7.x86_64 14/32
Verifying : python-paramiko-2.1.1-9.el7.noarch 15/32
Verifying : python-babel-0.9.6-8.el7.noarch 16/32
Verifying : 1:perl-Error-0.17020-2.el7.noarch 17/32
Verifying : gcc-c++-4.8.5-36.el7_6.2.x86_64 18/32
Verifying : git-1.8.3.1-20.el7.x86_64 19/32
Verifying : glibc-devel-2.17-260.el7_6.6.x86_64 20/32
Verifying : 1:npm-3.10.10-1.6.17.1.1.el7.x86_64 21/32
Verifying : glibc-2.17-260.el7_6.6.x86_64 22/32
Verifying : python-httplib2-0.9.2-1.el7.noarch 23/32
Verifying : ansible-2.8.1-1.el7.noarch 24/32
Verifying : cpp-4.8.5-36.el7_6.2.x86_64 25/32
Verifying : 1:libuv-1.29.1-1.el7.x86_64 26/32
Verifying : glibc-common-2.17-260.el7_6.6.x86_64 27/32
Verifying : libgcc-4.8.5-36.el7.x86_64 28/32
Verifying : libstdc++-4.8.5-36.el7.x86_64 29/32
Verifying : glibc-2.17-260.el7.x86_64 30/32
Verifying : glibc-common-2.17-260.el7.x86_64 31/32
Verifying : libgomp-4.8.5-36.el7.x86_64 32/32
Installed:
ansible.noarch 0:2.8.1-1.el7 gcc-c++.x86_64 0:4.8.5-36.el7_6.2 git.x86_64 0:1.8.3.1-20.el7
nodejs.x86_64 1:6.17.1-1.el7 npm.x86_64 1:3.10.10-1.6.17.1.1.el7
Dependency Installed:
cpp.x86_64 0:4.8.5-36.el7_6.2 gcc.x86_64 0:4.8.5-36.el7_6.2
glibc-devel.x86_64 0:2.17-260.el7_6.6 glibc-headers.x86_64 0:2.17-260.el7_6.6
kernel-headers.x86_64 0:3.10.0-957.21.3.el7 libstdc++-devel.x86_64 0:4.8.5-36.el7_6.2
libuv.x86_64 1:1.29.1-1.el7 perl-Error.noarch 1:0.17020-2.el7
perl-Git.noarch 0:1.8.3.1-20.el7 perl-TermReadKey.x86_64 0:2.30-20.el7
python-babel.noarch 0:0.9.6-8.el7 python-httplib2.noarch 0:0.9.2-1.el7
python-jinja2.noarch 0:2.7.2-3.el7_6 python-markupsafe.x86_64 0:0.11-10.el7
python-paramiko.noarch 0:2.1.1-9.el7 python2-jmespath.noarch 0:0.9.0-3.el7
sshpass.x86_64 0:1.06-2.el7
Dependency Updated:
glibc.x86_64 0:2.17-260.el7_6.6 glibc-common.x86_64 0:2.17-260.el7_6.6 libgcc.x86_64 0:4.8.5-36.el7_6.2
libgomp.x86_64 0:4.8.5-36.el7_6.2 libstdc++.x86_64 0:4.8.5-36.el7_6.2
Complete!
[root@localhost ~]# yum -y install python-docker-py
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.kakao.com
* epel: mirrors.aliyun.com
* extras: mirror.kakao.com
* updates: mirror.kakao.com
Resolving Dependencies
--> Running transaction check
---> Package python-docker-py.noarch 1:1.10.6-9.el7_6 will be installed
--> Processing Dependency: python-websocket-client >= 0.32.0 for package: 1:python-docker-py-1.10.6-9.el7_6.no arch
--> Processing Dependency: python-docker-pycreds for package: 1:python-docker-py-1.10.6-9.el7_6.noarch
--> Running transaction check
---> Package python-docker-pycreds.noarch 1:0.3.0-9.el7_6 will be installed
---> Package python-websocket-client.noarch 0:0.56.0-3.git3c25814.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================
Package Arch Version Repository Size
==============================================================================================================
Installing:
python-docker-py noarch 1:1.10.6-9.el7_6 extras 102 k
Installing for dependencies:
python-docker-pycreds noarch 1:0.3.0-9.el7_6 extras 20 k
python-websocket-client noarch 0.56.0-3.git3c25814.el7 extras 66 k
Transaction Summary
==============================================================================================================
Install 1 Package (+2 Dependent packages)
Total download size: 189 k
Installed size: 603 k
Downloading packages:
(1/3): python-docker-pycreds-0.3.0-9.el7_6.noarch.rpm | 20 kB 00:00:00
(2/3): python-docker-py-1.10.6-9.el7_6.noarch.rpm | 102 kB 00:00:00
(3/3): python-websocket-client-0.56.0-3.git3c25814.el7.noarch.rpm | 66 kB 00:00:00
--------------------------------------------------------------------------------------------------------------
Total 663 kB/s | 189 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : python-websocket-client-0.56.0-3.git3c25814.el7.noarch 1/3
Installing : 1:python-docker-pycreds-0.3.0-9.el7_6.noarch 2/3
Installing : 1:python-docker-py-1.10.6-9.el7_6.noarch 3/3
Verifying : 1:python-docker-pycreds-0.3.0-9.el7_6.noarch 1/3
Verifying : 1:python-docker-py-1.10.6-9.el7_6.noarch 2/3
Verifying : python-websocket-client-0.56.0-3.git3c25814.el7.noarch 3/3
Installed:
python-docker-py.noarch 1:1.10.6-9.el7_6
Dependency Installed:
python-docker-pycreds.noarch 1:0.3.0-9.el7_6 python-websocket-client.noarch 0:0.56.0-3.git3c25814.el7
Complete!
[root@localhost ~]# systemctl start docker
[root@localhost ~]# systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/doc ker.service.
[root@localhost ~]# pwd
/root
[root@localhost ~]# git clone https://github.com/ansible/awx.git
Cloning into 'awx'...
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 203862 (delta 4), reused 9 (delta 4), pack-reused 203849
Receiving objects: 100% (203862/203862), 211.79 MiB | 17.62 MiB/s, done.
Resolving deltas: 100% (157692/157692), done.
[root@localhost ~]# cd awx/installer/
[root@localhost installer]# pip install docker==3.7.3
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting docker==3.7.3
Using cached https://files.pythonhosted.org/packages/09/da/7cc7ecdcd01145e9924a8ccbe9c1baf3a362fc75d4cb150676eb5231ea60/docker-3.7.3-py2.py3-none-any.whl
Requirement already satisfied: websocket-client>=0.32.0 in /usr/lib/python2.7/site-packages (from docker==3.7.3) (0.56.0)
Requirement already satisfied: backports.ssl-match-hostname>=3.5; python_version < "3.5" in /usr/lib/python2.7/site-packages (from docker==3.7.3) (3.5.0.1)
Requirement already satisfied: ipaddress>=1.0.16; python_version < "3.3" in /usr/lib/python2.7/site-packages (from docker==3.7.3) (1.0.16)
Requirement already satisfied: six>=1.4.0 in /usr/lib/python2.7/site-packages (from docker==3.7.3) (1.9.0)
Requirement already satisfied: docker-pycreds>=0.4.0 in /usr/lib/python2.7/site-packages (from docker==3.7.3) (0.4.0)
Requirement already satisfied: requests!=2.18.0,>=2.14.2 in /usr/lib/python2.7/site-packages (from docker==3.7.3) (2.20.1)
Requirement already satisfied: idna<2.8,>=2.5 in /usr/lib/python2.7/site-packages (from requests!=2.18.0,>=2.14.2->docker==3.7.3) (2.7)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/site-packages (from requests!=2.18.0,>=2.14.2->docker==3.7.3) (3.0.4)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /usr/lib/python2.7/site-packages (from requests!=2.18.0,>=2.14.2->docker==3.7.3) (1.24.3)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests!=2.18.0,>=2.14.2->docker==3.7.3) (2019.6.16)
Installing collected packages: docker
Successfully installed docker-3.7.3
[root@localhost installer]# ansible-playbook -i inventory install.yml
PLAY [Build and deploy AWX] *********************************************************************************************************
TASK [Gathering Facts] **************************************************************************************************************
ok: [localhost]
TASK [check_vars : include_tasks] ***************************************************************************************************
skipping: [localhost]
TASK [check_vars : include_tasks] ***************************************************************************************************
included: /root/awx/installer/roles/check_vars/tasks/check_docker.yml for localhost
TASK [check_vars : postgres_data_dir should be defined] *****************************************************************************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [check_vars : host_port should be defined] *************************************************************************************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [image_build : Set global version if not provided] *****************************************************************************
skipping: [localhost]
TASK [image_build : Verify awx-logos directory exists for official install] *********************************************************
skipping: [localhost]
TASK [image_build : Copy logos for inclusion in sdist] ******************************************************************************
skipping: [localhost]
TASK [image_build : Set sdist file name] ********************************************************************************************
skipping: [localhost]
TASK [image_build : AWX Distribution] ***********************************************************************************************
skipping: [localhost]
TASK [image_build : Stat distribution file] *****************************************************************************************
skipping: [localhost]
TASK [image_build : Clean distribution] *********************************************************************************************
skipping: [localhost]
TASK [image_build : Build sdist builder image] **************************************************************************************
skipping: [localhost]
TASK [image_build : Build AWX distribution using container] *************************************************************************
skipping: [localhost]
TASK [image_build : Build AWX distribution locally] *********************************************************************************
skipping: [localhost]
TASK [image_build : Set docker build base path] *************************************************************************************
skipping: [localhost]
TASK [image_build : Set awx_web image name] *****************************************************************************************
skipping: [localhost]
TASK [image_build : Set awx_task image name] ****************************************************************************************
skipping: [localhost]
TASK [image_build : Ensure directory exists] ****************************************************************************************
skipping: [localhost]
TASK [image_build : Stage sdist] ****************************************************************************************************
skipping: [localhost]
TASK [image_build : Template web Dockerfile] ****************************************************************************************
skipping: [localhost]
TASK [image_build : Template task Dockerfile] ***************************************************************************************
skipping: [localhost]
TASK [image_build : Stage launch_awx] ***********************************************************************************************
skipping: [localhost]
TASK [image_build : Stage launch_awx_task] ******************************************************************************************
skipping: [localhost]
TASK [image_build : Stage nginx.conf] ***********************************************************************************************
skipping: [localhost]
TASK [image_build : Stage supervisor.conf] ******************************************************************************************
skipping: [localhost]
TASK [image_build : Stage supervisor_task.conf] *************************************************************************************
skipping: [localhost]
TASK [image_build : Stage settings.py] **********************************************************************************************
skipping: [localhost]
TASK [image_build : Stage requirements] *********************************************************************************************
skipping: [localhost]
TASK [image_build : Stage config watcher] *******************************************************************************************
skipping: [localhost]
TASK [image_build : Stage Makefile] *************************************************************************************************
skipping: [localhost]
TASK [image_build : Stage ansible repo] *********************************************************************************************
skipping: [localhost]
TASK [image_build : Stage ansible repo key] *****************************************************************************************
skipping: [localhost]
TASK [image_build : Build base web image] *******************************************************************************************
skipping: [localhost]
TASK [image_build : Build base task image] ******************************************************************************************
skipping: [localhost]
TASK [image_build : Tag task and web images as latest] ******************************************************************************
skipping: [localhost]
TASK [image_build : Clean docker base directory] ************************************************************************************
skipping: [localhost]
TASK [image_push : Authenticate with Docker registry if registry password given] ****************************************************
skipping: [localhost]
TASK [image_push : Remove web image] ************************************************************************************************
skipping: [localhost]
TASK [image_push : Remove task image] ***********************************************************************************************
skipping: [localhost]
TASK [image_push : Tag and push web image to registry] ******************************************************************************
skipping: [localhost]
TASK [image_push : Tag and push task image to registry] *****************************************************************************
skipping: [localhost]
TASK [image_push : Set full image path for Registry] ********************************************************************************
skipping: [localhost]
TASK [kubernetes : fail] ************************************************************************************************************
skipping: [localhost]
TASK [kubernetes : include_tasks] ***************************************************************************************************
skipping: [localhost] => (item=openshift_auth.yml)
skipping: [localhost] => (item=openshift.yml)
TASK [kubernetes : include_tasks] ***************************************************************************************************
skipping: [localhost] => (item=kubernetes_auth.yml)
skipping: [localhost] => (item=kubernetes.yml)
TASK [kubernetes : Use kubectl or oc] ***********************************************************************************************
skipping: [localhost]
TASK [kubernetes : set_fact] ********************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Record deployment size] ******************************************************************************************
skipping: [localhost]
TASK [kubernetes : Set expected post-deployment Replicas value] *********************************************************************
skipping: [localhost]
TASK [kubernetes : Delete existing Deployment] **************************************************************************************
skipping: [localhost]
TASK [kubernetes : Get Postgres Service Detail] *************************************************************************************
skipping: [localhost]
TASK [kubernetes : Template PostgreSQL Deployment (OpenShift)] **********************************************************************
skipping: [localhost]
TASK [kubernetes : Deploy and Activate Postgres (OpenShift)] ************************************************************************
skipping: [localhost]
TASK [kubernetes : Deploy and Activate Postgres (Kubernetes)] ***********************************************************************
skipping: [localhost]
TASK [kubernetes : Set postgresql hostname to helm package service (Kubernetes)] ****************************************************
skipping: [localhost]
TASK [kubernetes : Wait for Postgres to activate] ***********************************************************************************
skipping: [localhost]
TASK [kubernetes : Set task image name] *********************************************************************************************
skipping: [localhost]
TASK [kubernetes : Set web image name] **********************************************************************************************
skipping: [localhost]
TASK [kubernetes : Render deployment templates] *************************************************************************************
skipping: [localhost] => (item=None)
skipping: [localhost] => (item=None)
skipping: [localhost] => (item=None)
skipping: [localhost]
TASK [kubernetes : Apply Deployment] ************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Delete any existing management pod] ******************************************************************************
skipping: [localhost]
TASK [kubernetes : Template management pod] *****************************************************************************************
skipping: [localhost]
TASK [kubernetes : Create management pod] *******************************************************************************************
skipping: [localhost]
TASK [kubernetes : Wait for management pod to start] ********************************************************************************
skipping: [localhost]
TASK [kubernetes : Migrate database] ************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Check for Tower Super users] *************************************************************************************
skipping: [localhost]
TASK [kubernetes : create django super user if it does not exist] *******************************************************************
skipping: [localhost]
TASK [kubernetes : update django super user password] *******************************************************************************
skipping: [localhost]
TASK [kubernetes : Create the default organization if it is needed.] ****************************************************************
skipping: [localhost]
TASK [kubernetes : Delete management pod] *******************************************************************************************
skipping: [localhost]
TASK [kubernetes : Scale up deployment] *********************************************************************************************
skipping: [localhost]
TASK [local_docker : Export Docker web image if it isnt local and there isnt a registry defined] ************************************
skipping: [localhost]
TASK [local_docker : Export Docker task image if it isnt local and there isnt a registry defined] ***********************************
skipping: [localhost]
TASK [local_docker : Set docker base path] ******************************************************************************************
skipping: [localhost]
TASK [local_docker : Ensure directory exists] ***************************************************************************************
skipping: [localhost]
TASK [local_docker : Copy web image to docker execution] ****************************************************************************
skipping: [localhost]
TASK [local_docker : Copy task image to docker execution] ***************************************************************************
skipping: [localhost]
TASK [local_docker : Load web image] ************************************************************************************************
skipping: [localhost]
TASK [local_docker : Load task image] ***********************************************************************************************
skipping: [localhost]
TASK [local_docker : Set full image path for local install] *************************************************************************
skipping: [localhost]
TASK [local_docker : Set DockerHub Image Paths] *************************************************************************************
ok: [localhost]
TASK [local_docker : Create /tmp/awxcompose directory] ******************************************************************************
ok: [localhost]
TASK [local_docker : Create Docker Compose Configuration] ***************************************************************************
ok: [localhost] => (item=environment.sh)
ok: [localhost] => (item=credentials.py)
ok: [localhost] => (item=docker-compose.yml)
TASK [local_docker : Render SECRET_KEY file] ****************************************************************************************
ok: [localhost]
TASK [local_docker : Start the containers] ******************************************************************************************
[DEPRECATION WARNING]: The 'docker_service' module has been renamed to 'docker_compose'.. This feature will be removed in version
2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
changed: [localhost]
TASK [local_docker : Update CA trust in awx_web container] **************************************************************************
changed: [localhost]
TASK [local_docker : Update CA trust in awx_task container] *************************************************************************
changed: [localhost]
PLAY RECAP **************************************************************************************************************************
localhost : ok=11 changed=3 unreachable=0 failed=0 skipped=77 rescued=0 ignored=0
3. check status
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8cb059cda584 ansible/awx_task:6.0.0 "/tini -- /bin/sh ..." 7 minutes ago Up 7 minutes 8052/tcp awx_task
414d2dbb0a5e ansible/awx_web:6.0.0 "/tini -- /bin/sh ..." 7 minutes ago Up 7 minutes 0.0.0.0:80->8052/tcp awx_web
c738253c5242 ansible/awx_rabbitmq:3.7.4 "docker-entrypoint..." 7 minutes ago Up 7 minutes 4369/tcp, 5671-5672/tcp, 15671-15672/tcp, 25672/tcp awx_rabbitmq
75dcd8a69eef memcached:alpine "docker-entrypoint..." 7 minutes ago Up 7 minutes 11211/tcp awx_memcached
29c466e3e72f postgres:9.6 "docker-entrypoint..." 7 minutes ago Up 7 minutes 5432/tcp awx_postgres
[root@localhost ~]#
댓글
댓글 쓰기