-
Notifications
You must be signed in to change notification settings - Fork 7
/
awx_install.sh
35 lines (27 loc) · 1.04 KB
/
awx_install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env bash
# Install packages required to setup AWX
sudo yum -y install epel-release
sudo yum -y update all
sudo yum -y install -y wget git gettext ansible docker nodejs npm gcc-c++ bzip2 vim python-devel python2-devel pytest
sudo yum -y install python3 python3-setuptools python3-pip
alias python=/usr/bin/python3
pip install --upgrade pip
pip install --upgrade setuptools
pip3 install docker docker-compose
# Creating the docker storage setup to ensure we have a docker thin pool
cat <<EOF > /etc/sysconfig/docker-storage-setup
# DEVS=/dev/xvdf
DEVS=/dev/xvda
VG=docker-vg
EOF
# Configuring and installating Docker
docker-storage-setup
# Restart docker and go to clean state as required by docker-storage-setup.
systemctl stop docker
rm -rf /var/lib/docker/*
systemctl start docker
systemctl enable docker
# Downloading the awx repo
git clone -b 15.0.1 https://github.com/ansible/awx.git /tmp/awx_repo
# Install AWX
ansible-playbook -i /tmp/awx_repo/installer/inventory /tmp/awx_repo/installer/install.yml --extra-vars "dockerhub_version=latest"