From 5f2d948c3f3b0f02fcd9821c66b413aef5d58da6 Mon Sep 17 00:00:00 2001 From: troymc Date: Thu, 18 Aug 2016 14:11:30 +0200 Subject: [PATCH] docs: new page about how to set up Ansible --- docs/source/prod-node-setup-mgmt/index.rst | 2 +- .../prod-node-setup-mgmt/set-up-ansible.md | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 docs/source/prod-node-setup-mgmt/set-up-ansible.md diff --git a/docs/source/prod-node-setup-mgmt/index.rst b/docs/source/prod-node-setup-mgmt/index.rst index 025b821e..1e8ce92f 100644 --- a/docs/source/prod-node-setup-mgmt/index.rst +++ b/docs/source/prod-node-setup-mgmt/index.rst @@ -5,4 +5,4 @@ Production Node Setup & Management :maxdepth: 1 overview - + set-up-ansible diff --git a/docs/source/prod-node-setup-mgmt/set-up-ansible.md b/docs/source/prod-node-setup-mgmt/set-up-ansible.md new file mode 100644 index 00000000..df79db64 --- /dev/null +++ b/docs/source/prod-node-setup-mgmt/set-up-ansible.md @@ -0,0 +1,24 @@ +# Set Up Ansible + +## Install Ansible + +The Ansible documentation has [installation instructions](https://docs.ansible.com/ansible/intro_installation.html). Note the control machine requirements. At the time of writing, the control machine had to have Python 2.6 or 2.7. (Support for Python 3 [is a goal of Ansible 2.2](https://github.com/ansible/ansible/issues/15976#issuecomment-221264089).) You can ensure you're using a supported version of Python by creating a special Python 2.x virtualenv and installing Ansible in it. For example: +```text +cd repos/bigchaindb/ntools +virtualenv -p /usr/local/lib/python2.7.11/bin/python ansenv +source ansenv/bin/activate +pip install ansible +``` + + +## Create an Ansible Inventory File + +An Ansible "inventory" file is a file which lists all the hosts (machines) you want to manage using Ansible. (Ansible will communicate with them via SSH.) Ansible expects the inventory file to be `/etc/ansible/hosts` by default (but you can change that). Here's an example Ansible inventory file for a one-machine BigchainDB node: +```text +node1 ansible_host=192.0.2.128 +``` + +`node1` is a "host alias" (i.e. a made-up name) that you can use when referring to that host in Ansible. +`192.0.2.128` is an example IP address (IPv4): the public IP address of the node. + +