Ansible Tower をインストールしてみる

インストールの方法については、以下のマニュアルに記載があります。

http://docs.ansible.com/ansible-tower/latest/html/quickinstall/prepare.html

 

yum install http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

おっと、いきなりepelでございますか。epelを入れたら、いつものようにyumコマンドでansibleをインストールします。

yum install ansible

これだけで、Ansibleのインストールは完了です。この後、Ansible Towerのインストールを行っていきます。

wget https://releases.ansible.com/awx/setup/ansible-tower-setup-latest.tar.gz

そしてtar.gzを適当な場所に展開して、展開したディレクトリにcdしておく。

cd ansible-tower-setup-2.4.5/

configureスクリプトがあるので、それを実行。ここでいくつか質問をされるのでそれに答えていきます。

質問される内容は、

  1. インストール先のマシン(HA構成も組めますが、今回はlocalhostでシングル構成にしました)
  2. データベースの場所。(今回はlocalhostに全部いれてしまう構成にします)
  3. Ansible Tower管理者のパスワード
  4. Muninのパスワード

これだけです。

[root@rhel72-docker-test ansible-tower-setup-2.4.5]# ./configure 
-------------------------------------------
Welcome to the Ansible Tower Install Wizard
-------------------------------------------

This wizard will guide you through the setup process.

PRIMARY TOWER MACHINE
Tower can be installed (or upgraded) on this machine, or onto a remote machine
that is reachable by SSH.

Note: If using the High Availability features of Tower, you must use DNS
resolvable hostnames or IP addresses (do not use "localhost").

Enter the hostname or IP to configure Ansible Tower
(default: localhost): 
Installing Tower on localhost.

DATABASE
Tower can use an internal database installed on the Tower machine, or an
external PostgreSQL database. An external database could be a hosted database,
such as Amazon's RDS.

An internal database is fine for most situations. However, to use the High
Availability features of Tower, an external database is required.

If using an external database, the database (but not the necessary tables) must
already exist.

Will this installation use an (i)nternal or (e)xternal database? i

PASSWORDS
For security reasons, since this is a new install, you must specify the
following application passwords.

Enter the desired Ansible Tower admin user password: 
Enter the desired Munin password: 

REVIEW
You selected the following options:

The primary Tower machine is: localhost
Tower will operate on an INTERNAL database.

Are these settings correct (y/n)? y
Settings saved to /root/tmp/ansible-tower-setup-2.4.5/tower_setup_conf.yml.

FINISHED!
You have completed the setup wizard. You may execute the installation of
Ansible Tower by issuing the following command:

sudo ./setup.sh

あとは、同ディレクトリにあるsetup.shを実行すればインストールは完了です。Ansibleは/にマウントされたディスクが10G以上空いていないいけませんので、注意が必要です。

インストールが完了したら、ブラウザでインストールしたサーバーの名前(またはIPアドレス)を指定するとAnsible Towerの画面が表示されます。ユーザー名/パスワードを聞いてきますので、admin/あなたの設定したパスワード  と入力することでログインが出来ます。

これで終わりではありません。Towerへのログインが成功すると、ライセンス情報を入力するように言われます。

f:id:daijik:20160603161240p:plain

「Get a Free Tower Trial License」というボタンを押すと、検証ライセンスが入手出来るページに飛びます。

f:id:daijik:20160603161248p:plain

今回は「FREE TOWER TRIAL - UP TO 10 NODES」のほうで試してみました。必要な情報(名前やメールアドレスなど)を入力してSubmitすると、ライセンスキーがメールで届きます。

f:id:daijik:20160603161709p:plain

 最後に届いたライセンスキーを設定して、Submitすればセットアップ完了です!