diff --git a/README.rst b/README.rst index 7852faf..e105d06 100644 --- a/README.rst +++ b/README.rst @@ -4,13 +4,7 @@ OpenStack Configuration This project contains Ansible playbooks and configuration of infrastructure on an existing OpenStack cloud for the OpenStack -system. This includes: - -* A demo project and user accounts in OpenStack keystone. -* Compute node flavors in OpenStack nova for the various compute and storage - node types. -* Networks, subnets and routers in OpenStack neutron for the external and - internal networks. +system. Preparation =========== diff --git a/ansible/group_vars/all/openstack b/ansible/group_vars/all/openstack index 6e2ce34..690572b 100644 --- a/ansible/group_vars/all/openstack +++ b/ansible/group_vars/all/openstack @@ -1,22 +1,56 @@ --- -# Configuration of OpenStack authentication variables. - -# Cloud authentication type. This should be a string compatible with the -# 'auth_type' argument of most 'os_*' Ansible modules. -openstack_auth_type: "password" - -# Cloud authentication parameters. This should be a dict providing items -# compatible with the 'auth' argument of most 'os_*' Ansible modules. -# By default we pull these from the environment of the shell executing Ansible. -openstack_auth: - project_domain_id: "{{ lookup('env', 'OS_PROJECT_DOMAIN_ID') }}" - user_domain_id: "{{ lookup('env', 'OS_USER_DOMAIN_ID') }}" - project_domain_name: "{{ lookup('env', 'OS_PROJECT_DOMAIN_NAME') }}" - user_domain_name: "{{ lookup('env', 'OS_USER_DOMAIN_NAME') }}" - project_id: "{{ lookup('env', 'OS_PROJECT_ID') }}" - project_name: "{{ lookup('env', 'OS_PROJECT_NAME') }}" - username: "{{ lookup('env', 'OS_USERNAME') }}" - password: "{{ lookup('env', 'OS_PASSWORD') }}" - auth_url: "{{ lookup('env', 'OS_AUTH_URL') }}" - -openstack_cacert: "{{ lookup('env', 'OS_CACERT') }}" \ No newline at end of file +############################################################################### +# Configuration of OpenStack user environment for OpenStack. + +# List of OpenStack projects. Format is as required by the stackhpc.os-projects +# role. +openstack_projects: [] + +############################################################################### +# Configuration of networks, subnets and routers for OpenStack. + +# List of networks in the openstack project. Format is as required by the +# stackhpc.os-networks role. +openstack_networks: [] + +# List of routers in the openstack project. Format is as required by the +# stackhpc.os-networks role. +openstack_routers: [] + +# List of security groups in the openstack demo project. Format is as required by the +# stackhpc.os-networks role. +openstack_security_groups: [] + +############################################################################### +# Configuration of nova flavors for OpenStack. + +# List of nova flavors in the openstack project. Format is as required by the +# stackhpc.os-flavors role. +openstack_flavors: [] + +############################################################################### +# Configuration of glance images for OpenStack. + +# List of glance images in the openstack project. Format is as required by the +# stackhpc.os-images role. +openstack_images: [] + +# List of additional diskimage-builder elements to incorporate on the path +openstack_image_elements: [] + +# List of diskimage-builder element git repos to pull +openstack_image_git_elements: [] + +############################################################################### +# Configuration of nova host aggregates for OpenStack. + +# List of host aggregates in the openstack project. +# Format is as required by the stackhpc.os_host_aggregates role. +openstack_host_aggregates: [] + +############################################################################### +# Configuration of container clusters templates for OpenStack. + +# List of clusters templates in the openstack project. Format is as required by the +# stackhpc.os-container-clusters role. +openstack_container_clusters_templates: [] diff --git a/ansible/group_vars/all/openstack-auth b/ansible/group_vars/all/openstack-auth new file mode 100644 index 0000000..8f29431 --- /dev/null +++ b/ansible/group_vars/all/openstack-auth @@ -0,0 +1,22 @@ +--- +# Configuration of OpenStack authentication variables. + +# Cloud authentication type. This should be a string compatible with the +# 'auth_type' argument of most 'os_*' Ansible modules. +openstack_auth_type: "password" + +# Cloud authentication parameters. This should be a dict providing items +# compatible with the 'auth' argument of most 'os_*' Ansible modules. +# By default we pull these from the environment of the shell executing Ansible. +openstack_auth: + project_domain_id: "{{ lookup('env', 'OS_PROJECT_DOMAIN_ID') }}" + user_domain_id: "{{ lookup('env', 'OS_USER_DOMAIN_ID') }}" + project_domain_name: "{{ lookup('env', 'OS_PROJECT_DOMAIN_NAME') }}" + user_domain_name: "{{ lookup('env', 'OS_USER_DOMAIN_NAME') }}" + project_id: "{{ lookup('env', 'OS_PROJECT_ID') }}" + project_name: "{{ lookup('env', 'OS_PROJECT_NAME') }}" + username: "{{ lookup('env', 'OS_USERNAME') }}" + password: "{{ lookup('env', 'OS_PASSWORD') }}" + auth_url: "{{ lookup('env', 'OS_AUTH_URL') }}" + +openstack_cacert: "{{ lookup('env', 'OS_CACERT') }}" diff --git a/ansible/group_vars/all/venv b/ansible/group_vars/all/venv new file mode 100644 index 0000000..c729e5e --- /dev/null +++ b/ansible/group_vars/all/venv @@ -0,0 +1,3 @@ +--- +# Path to create virtualenv in which to install python dependencies. +openstack_venv: "{{ ansible_env.PWD }}/openstack-config-venv" diff --git a/etc/openstack-config/openstack-config.yml b/etc/openstack-config/openstack-config.yml index 33936e8..fd88313 100644 --- a/etc/openstack-config/openstack-config.yml +++ b/etc/openstack-config/openstack-config.yml @@ -54,3 +54,7 @@ # List of magnum cluster templates. Format is as required by the # stackhpc.os-container-clusters role. #openstack_container_clusters_templates: + +############################################################################### +# Dummy variable to allow Ansible to accept this file. +workaround_ansible_issue_8743: yes diff --git a/tools/openstack-config b/tools/openstack-config index 3bf9381..055a62c 100755 --- a/tools/openstack-config +++ b/tools/openstack-config @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash SCRIPT=${BASH_SOURCE[0]} TOOLS_PATH=$(dirname ${SCRIPT})