« Previous 1 2 3 4 Next »
AWX: Web-Based Console Manager for Ansible
Tower of Power
It’s Run Time!
Next, you need a run time to fire up your containers. Likely the wisest choice would be to install the Community Edition (CE) of Docker, but I am going to use the current package manager version, also known as docker.io :
$ apt install docker.io
To enter the installer directory that your git clone command created inside awx/ , use:
$ cd awx/installer
I will not go into the many options that can be tweaked in the inventory file, but you can make many adjustments, such as installing awx on a remote host. As you would expect, the installation docs can assist and are well put together.
In the awx/installer directory of your downloaded repository, simply run Ansible to start up the intricate installation process to create your AWX containers:
$ ansible-playbook -i inventory install.yml
(If you tweaked the inventory file, this is where the changes are picked up.) Go away, make a cup of tea, and come back a few minutes later. Listing 1 shows the end of the output for the playbook run.
Listing 1: An abbreviated, tweaked output denoting a successful installation.
TASK [local_docker : Activate AWX Web Container] *********************************************************************************** ok: [localhost] TASK [local_docker : Activate AWX Task Container] *********************************************************************************** ok: [localhost] TASK [local_docker : Create /var/lib/awx directory] *********************************************************************************** ok: [localhost] TASK [local_docker : Create docker-compose.yml file] *********************************************************************************** ok: [localhost] TASK [local_docker : Start the containers] *********************************************************************************** ok: [localhost] PLAY RECAP *****************************************************************
Now, run the
$ docker ps
command for another quick check (Figure 1). You can see that a number of AWX-related containers are running.
And Now,
If you are installing AWX on a local machine, simply point your browser to http://localhost . (Clearly, I am assuming that you have a sane networking and firewalling configuration.) On my droplet, however, I need to find my public IP address and point my browser there. You can type ip a on the droplet at the command line if you are not sure. (Not all cloud platforms expose the public IP address on the main network interface.)
As soon as you put the public IP address into your browser, you are presented a login screen. You will want to log in and change the default password, because the web interface currently is public to the Internet without any filtering.
If you get stuck, start following the logs in one of the containers with:
$ docker logs -f awx_task
This command should produce lots of scrolling output in your console.
Get It Together
The extensible AWX organizes through the concept of projects. You will probably see a Demo Project that offer some pointers, and you can configure that to look at a public Git repository on GitHub (with no credentials, for ease of use).
Once you have changed the password and logged in again, look to the navigation pane on the left and click Projects . Ignore the Demo Project and click the green plus sign on the top-right of that section to create a new project.
In Figure 2 you can see that I have added a name for the project, along with the URL of a super-simple Ansible playbook (Listing 2), which I will use as an example. As you can see in the listing, the GitHub repository just contains some basic YAML that I will use as an Ansible playbook.
Listing 2: A super-simple bit of YAML for testing a new project in AWX.
--- - hosts: localhost tasks: - name: Just complete as valid YAML please command: date +%F
« Previous 1 2 3 4 Next »