diff options
author | Bogdan Dobrelya <bdobreli@redhat.com> | 2017-07-20 16:53:05 +0200 |
---|---|---|
committer | Tomas Sedovic <tomas@sedovic.cz> | 2017-07-20 16:53:05 +0200 |
commit | e7a7d1642c1ffbfe23cd5ad2d920e842f0cae4b2 (patch) | |
tree | fe57c5ca9743a2c641ab04ebe1131a8cd6942167 /playbooks/provisioning/openstack/README.md | |
parent | 1975fb57b4ddee77eec6f849f2c7677e2ee3d6df (diff) | |
download | openshift-e7a7d1642c1ffbfe23cd5ad2d920e842f0cae4b2.tar.gz openshift-e7a7d1642c1ffbfe23cd5ad2d920e842f0cae4b2.tar.bz2 openshift-e7a7d1642c1ffbfe23cd5ad2d920e842f0cae4b2.tar.xz openshift-e7a7d1642c1ffbfe23cd5ad2d920e842f0cae4b2.zip |
Static inventory autogeneration (#550)
* At the provisioning stage, allow users to auto-generate a static
inventory w/o manual steps needed. The alternative to
go fully dynamic TBD.
* Move openshift pre-install playbook to the post provision playbook,
where the second part of the pre install tasks is already placed.
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
Diffstat (limited to 'playbooks/provisioning/openstack/README.md')
-rw-r--r-- | playbooks/provisioning/openstack/README.md | 46 |
1 files changed, 41 insertions, 5 deletions
diff --git a/playbooks/provisioning/openstack/README.md b/playbooks/provisioning/openstack/README.md index d5b7c53ee..0b0382834 100644 --- a/playbooks/provisioning/openstack/README.md +++ b/playbooks/provisioning/openstack/README.md @@ -93,8 +93,9 @@ steps, and the Neutron subnet for the Heat stack is updated to point to that server in the end. So the provisioned servers will start using it natively as a default nameserver that comes from the NetworkManager and cloud-init. -`openstack_ssh_key` is a Nova keypair -- you can see your keypairs with -`openstack keypair list`. +`openstack_ssh_key` is a Nova keypair - you can see your keypairs with +`openstack keypair list`. This guide assumes that its corresponding private +key is `~/.ssh/openshift`, stored on the ansible admin (control) node. `openstack_default_image_name` is the name of the Glance image the servers will use. You can @@ -127,6 +128,14 @@ The `required_packages` variable also provides a list of the additional prerequisite packages to be installed before to deploy an OpenShift cluster. Those are ignored though, if the `manage_packages: False`. +The `openstack_inventory` controls either a static inventory will be created after the +cluster nodes provisioned on OpenStack cloud. Note, the fully dynamic inventory +is yet to be supported, so the static inventory will be created anyway. + +The `openstack_inventory_path` points the directory to host the generated static inventory. +It should point to the copied example inventory directory, otherwise ti creates +a new one for you. + #### Security notes Configure required `*_ingress_cidr` variables to restrict public access @@ -164,21 +173,48 @@ variables for the `inventory/group_vars/OSEv3.yml`, `all.yml`: origin_release: 1.5.1 openshift_deployment_type: "{{ deployment_type }}" +### Configure static inventory + +Example inventory variables: + + openstack_private_ssh_key: ~/.ssh/openshift + openstack_inventory: static + openstack_inventory_path: ../../../../inventory + + +In this guide, the latter points to the current directory, where you run ansible commands +from. + +To verify nodes connectivity, use the command: + + ansible -v -i inventory/hosts -m ping all + +If something is broken, double-check the inventory variables, paths and the +generated `<openstack_inventory_path>/hosts` file. + +The `inventory: dynamic` can be used instead to access cluster nodes directly via +floating IPs. In this mode you can not use a bastion node and should specify +the dynamic inventory file in your ansible commands , like `-i openstack.py`. + ## Deployment ### Run the playbook Assuming your OpenStack (Keystone) credentials are in the `keystonerc` -file, this is how you stat the provisioning process: +this is how you stat the provisioning process from your ansible control node: . keystonerc - ansible-playbook -i inventory --timeout 30 --private-key ~/.ssh/openshift openshift-ansible-contrib/playbooks/provisioning/openstack/provision.yaml + ansible-playbook openshift-ansible-contrib/playbooks/provisioning/openstack/provision.yaml + +Note, here you start with an empty inventory. The static inventory will be populated +with data so you can omit providing additional arguments for future ansible commands. + ### Install OpenShift Once it succeeds, you can install openshift by running: - ansible-playbook --user openshift --private-key ~/.ssh/openshift -i inventory/ openshift-ansible/playbooks/byo/config.yml + ansible-playbook openshift-ansible/playbooks/byo/config.yml ## License |