From 269278b56ed03eca8d5e220275ccdb5b7fa1c07d Mon Sep 17 00:00:00 2001 From: Tomas Sedovic Date: Fri, 2 Jun 2017 14:21:46 +0200 Subject: Add readme --- playbooks/provisioning/openstack/README.md | 113 +++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 playbooks/provisioning/openstack/README.md (limited to 'playbooks/provisioning/openstack/README.md') diff --git a/playbooks/provisioning/openstack/README.md b/playbooks/provisioning/openstack/README.md new file mode 100644 index 000000000..68550d3a3 --- /dev/null +++ b/playbooks/provisioning/openstack/README.md @@ -0,0 +1,113 @@ +# OpenStack Provisioning + +This repository contains playbooks and Heat templates to provision +OpenStack resources (servers, networking, volumes, security groups, +etc.). The result is an environment ready for openshift-ansible. + + +## Dependencies + +* [Ansible 2.3](https://pypi.python.org/pypi/ansible) +* [shade](https://pypi.python.org/pypi/shade) + + +## What does it do + +* Create Nova servers with floating IP addresses attached +* Assigns Cinder volumes to the servers +* Set up an `openshift` user with sudo privileges +* Optionally attach Red Hat subscriptions +* Set up a bind-based DNS server +* When deploying more than one master, set up a HAproxy server + + +## Set up + +### Copy the sample inventory + + cp openshift-ansible-contrib/playbooks/provisioning/openstack/sample-inventory inventory + +### Copy clouds.yaml + + cp openshift-ansible-contrib/playbooks/provisioning/openstack/sample-inventory/clouds.yaml clouds.yaml + +### Update `inventory/group_vars/all.yml` + +Pay special attention to the values in the first paragraph -- these +will depend on your OpenStack environment. + +The `env_id` and `openstack_dns_domain` will form the DNS domain all +your servers will be under. With the default values, this will be +`openshift.example.com`. + +`openstack_nameservers` is a list of DNS servers accessible from all +the created Nova servers. These will be serve as your DNS forwarders. + +`openstack_ssh_key` is a Nova keypair -- you can see your keypairs with +`openstack keypair list`. + +`openstack_default_image_name` is the name of the Glance image the +servers will use. You can +see your images with `openstack image list`. + +`openstack_default_flavor` is the Nova flavor the servers will use. +You can see your flavors with `openstack flavor list`. + +`openstack_external_network_name` is the name of the Neutron network +providing external connectivity. It is often called `public`, +`external` or `ext-net`. You can see your networks with `openstack +network list`. + +The `openstack_num_masters`, `openstack_num_infra` and +`openstack_num_nodes` values specify the number of Master, Infra and +App nodes to create. + +### Update the DNS names in `inventory/hosts` + +The different server groups are currently grouped by the domain name, +so if you end up using a different domain than +`openshift.example.com`, you will need to update the `inventory/hosts` +file. + +For example, if your final domain is `my.cloud.com`, you can run this +command to fix update the `hosts` file: + + sed -i 's/openshift.example.com/my.cloud.com/' inventory/hosts + +### Configure the OpenShift parameters + +Finally, you need to update the DNS entry in +`inventory/group_vars/OSEv3.yml` (look at +`openshift_master_default_subdomain`). + +In addition, this is the place where you can customise your OpenShift +installation for example by specifying the authentication. + +The full list of options is available in this sample inventory: + +https://github.com/openshift/openshift-ansible/blob/master/inventory/byo/hosts.ose.example + + +## Deployment + +### Run the playbook + +Assuming your OpenStack (Keystone) credentials are in the `keystonerc` +file, this is how you stat the provisioning process: + + . keystonerc + ansible-playbook -i inventory --private-key ~/.ssh/openshift openshift-ansible-contrib/playbooks/provisioning/openstack/provision.yaml + +### Install OpenShift + +Once it succeeds, you can install openshift by running: + + ansible-playbook --become --user openshift --private-key ~/.ssh/openshift -i inventory/ openshift-ansible/playbooks/byo/config.yml + + +## License + +As the rest of the openshift-ansible-contrib repository, the code here is +licensed under Apache 2. However, the openstack.py file under +`sample-inventory` is GPLv3+. See the INVENTORY-LICENSE.txt file for the full +text of the license. -- cgit v1.2.3 From 4bb2f005bc6cdeb8e656c2b42ac54db8fbd67fb9 Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Mon, 5 Jun 2017 16:41:09 +0200 Subject: Add a flat sec group for openstack provider Add a openstack_flat_secgroup, defaults to False. When set, merges sec rules for master, node, etcd, infra nodes into a single group. Less secure, but might help to mitigate quota limitations. Update docs. Use timeout 30s to mitigate the error: Timeout (12s) waiting for privilege escalation prompt. Signed-off-by: Bogdan Dobrelya --- playbooks/provisioning/openstack/README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'playbooks/provisioning/openstack/README.md') diff --git a/playbooks/provisioning/openstack/README.md b/playbooks/provisioning/openstack/README.md index 68550d3a3..35f37db0d 100644 --- a/playbooks/provisioning/openstack/README.md +++ b/playbooks/provisioning/openstack/README.md @@ -25,7 +25,7 @@ etc.). The result is an environment ready for openshift-ansible. ### Copy the sample inventory - cp openshift-ansible-contrib/playbooks/provisioning/openstack/sample-inventory inventory + cp -r openshift-ansible-contrib/playbooks/provisioning/openstack/sample-inventory inventory ### Copy clouds.yaml @@ -62,6 +62,11 @@ The `openstack_num_masters`, `openstack_num_infra` and `openstack_num_nodes` values specify the number of Master, Infra and App nodes to create. +The `openstack_flat_secgroup`, controls Neutron security groups creation for Heat +stacks. Set it to true, if you experience issues with sec group rules +quotas. It trades security for number of rules, by sharing the same set +of firewall rules for master, node, etcd and infra nodes. + ### Update the DNS names in `inventory/hosts` The different server groups are currently grouped by the domain name, @@ -96,13 +101,13 @@ Assuming your OpenStack (Keystone) credentials are in the `keystonerc` file, this is how you stat the provisioning process: . keystonerc - ansible-playbook -i inventory --private-key ~/.ssh/openshift openshift-ansible-contrib/playbooks/provisioning/openstack/provision.yaml + ansible-playbook -i inventory --timeout 30 --private-key ~/.ssh/openshift openshift-ansible-contrib/playbooks/provisioning/openstack/provision.yaml ### Install OpenShift Once it succeeds, you can install openshift by running: - ansible-playbook --become --user openshift --private-key ~/.ssh/openshift -i inventory/ openshift-ansible/playbooks/byo/config.yml + ansible-playbook --timeout 30 --become --user openshift --private-key ~/.ssh/openshift -i inventory/ openshift-ansible/playbooks/byo/config.yml ## License -- cgit v1.2.3 From a8719af95559926bcf4841197273dfe838a563a4 Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Mon, 5 Jun 2017 22:06:48 +0200 Subject: Add ansible.cfg for openstack provider Signed-off-by: Bogdan Dobrelya --- playbooks/provisioning/openstack/README.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'playbooks/provisioning/openstack/README.md') diff --git a/playbooks/provisioning/openstack/README.md b/playbooks/provisioning/openstack/README.md index 35f37db0d..fb2053c25 100644 --- a/playbooks/provisioning/openstack/README.md +++ b/playbooks/provisioning/openstack/README.md @@ -31,6 +31,10 @@ etc.). The result is an environment ready for openshift-ansible. cp openshift-ansible-contrib/playbooks/provisioning/openstack/sample-inventory/clouds.yaml clouds.yaml +### Copy ansible config + + cp openshift-ansible-contrib/playbooks/provisioning/openstack/sample-inventory/ansible.cfg ansible.cfg + ### Update `inventory/group_vars/all.yml` Pay special attention to the values in the first paragraph -- these -- cgit v1.2.3 From b884e6a9c77ae2d86b2de3c4ae6e8de558444610 Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Mon, 12 Jun 2017 12:02:41 +0200 Subject: Drop atomic-openshift-utils, update docs for origin TODO use with when: ansible_distribution == 'CentOS' Also update docs for origin Signed-off-by: Bogdan Dobrelya --- playbooks/provisioning/openstack/README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'playbooks/provisioning/openstack/README.md') diff --git a/playbooks/provisioning/openstack/README.md b/playbooks/provisioning/openstack/README.md index fb2053c25..c319791c9 100644 --- a/playbooks/provisioning/openstack/README.md +++ b/playbooks/provisioning/openstack/README.md @@ -96,6 +96,12 @@ The full list of options is available in this sample inventory: https://github.com/openshift/openshift-ansible/blob/master/inventory/byo/hosts.ose.example +Note, that in order to deploy OpenShift origin, you should update the following +variables for the `inventory/group_vars/OSEv3.yml`, `all.yml`: + + deployment_type: origin + origin_release: 1.5.1 + openshift_deployment_type: "{{ deployment_type }}" ## Deployment @@ -111,8 +117,11 @@ file, this is how you stat the provisioning process: Once it succeeds, you can install openshift by running: - ansible-playbook --timeout 30 --become --user openshift --private-key ~/.ssh/openshift -i inventory/ openshift-ansible/playbooks/byo/config.yml + ansible-playbook --become --user openshift --private-key ~/.ssh/openshift -i inventory/ openshift-ansible/playbooks/byo/openshift-node/network_manager.yml + ansible-playbook --become --user openshift --private-key ~/.ssh/openshift -i inventory/ openshift-ansible/playbooks/byo/config.yml +Note, the `network_manager.yml` is only required if you're deploying OpenShift +origin. ## License -- cgit v1.2.3 From ca93151d4dee1f907cf578e3ab2b565f288c37c8 Mon Sep 17 00:00:00 2001 From: Tomas Sedovic Date: Fri, 16 Jun 2017 17:16:06 +0200 Subject: Update sample inventory with the latest changes --- playbooks/provisioning/openstack/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'playbooks/provisioning/openstack/README.md') diff --git a/playbooks/provisioning/openstack/README.md b/playbooks/provisioning/openstack/README.md index c319791c9..423d57113 100644 --- a/playbooks/provisioning/openstack/README.md +++ b/playbooks/provisioning/openstack/README.md @@ -9,6 +9,7 @@ etc.). The result is an environment ready for openshift-ansible. * [Ansible 2.3](https://pypi.python.org/pypi/ansible) * [shade](https://pypi.python.org/pypi/shade) +* python-dns ## What does it do @@ -66,7 +67,7 @@ The `openstack_num_masters`, `openstack_num_infra` and `openstack_num_nodes` values specify the number of Master, Infra and App nodes to create. -The `openstack_flat_secgroup`, controls Neutron security groups creation for Heat +The `openstack_flat_secgrp`, controls Neutron security groups creation for Heat stacks. Set it to true, if you experience issues with sec group rules quotas. It trades security for number of rules, by sharing the same set of firewall rules for master, node, etcd and infra nodes. -- cgit v1.2.3