Remove unnecessary octavia scenario AIO bootstrap

The role itself handles the certificate generation and the
download of a pre-built amphora image by default, so there
is no need to do it in the AIO bootstrap. Also, several of
the overrides implemented are the same as the defaults, or
break the role execution, so we remove them to allow the
role defaults to be used instead.

Depends-On: https://review.openstack.org/619179
Change-Id: If261478ce83b82e16da954e229bf4e7590ddcd4d
This commit is contained in:
Jesse Pretorius 2018-11-21 11:52:24 +00:00 committed by Jesse Pretorius (odyssey4me)
parent 28f71196cd
commit e55960fe30
5 changed files with 6 additions and 118 deletions

View File

@ -53,9 +53,6 @@ bootstrap_user_variables_extra_templates:
translations:
- src: user_variables_translations.yml.j2
dest: user_variables_translations.yml
octavia:
- src: user_variables_octavia.yml.j2
dest: user_variables_octavia.yml
barbican:
- src: user_variables_barbican.yml.j2
dest: user_variables_barbican.yml
@ -195,9 +192,6 @@ bootstrap_host_data_disk2_fs: "{{ bootstrap_host_data_disk2_formats[((container_
bootstrap_host_data_disk2_fs_mount_options: "{{ bootstrap_host_data_mount_options[((container_tech == 'nspawn') | ternary('btrfs', lxc_container_backing_store))] }}"
bootstrap_host_data_disk2_path: "{{ (lxc_container_backing_store == 'machinectl' or container_tech == 'nspawn') | ternary('/var/lib/machines', '/var/lib/lxc') }}"
# Boolean option to build Amphora image and certs
bootstrap_host_octavia: "{{ (bootstrap_host_scenario in ['octavia']) | bool }}"
### Optional Settings ###
# Specify the public IP address for the host.

View File

@ -117,13 +117,6 @@
tags:
- prepare-ceph
# Prepare the Octavia certs and image
- include: prepare_octavia.yml
when:
- bootstrap_host_octavia | bool
tags:
- prepare-octavia
# Ensure hostname/ip is consistent with inventory
- include: prepare_hostname.yml
tags:

View File

@ -1,80 +0,0 @@
---
# Copyright 2015, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Install apt packages
apt:
pkg: "{{ item }}"
state: "present"
update_cache: yes
register: install_packages
until: install_packages is success
retries: 5
delay: 2
with_items:
- qemu
- uuid-runtime
- curl
- kpartx
- git
- name: Create Octavia tmp dir
file:
state: directory
path: "/var/lib/octavia"
- name: Set Octavia tmp dir
set_fact:
bootstrap_host_octavia_tmp: "/var/lib/octavia"
- name: Install pip requirements
pip:
name: "{{ item }}"
state: "present"
extra_args: "-c {{ pip_install_upper_constraints_proto }}://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?id={{ requirements_git_install_branch | regex_replace(' #.*$','') }}"
register: install_packages
until: install_packages is success
retries: 5
delay: 2
with_items:
- argparse
- "Babel>=1.3"
- dib-utils
- PyYAML
- diskimage-builder
- name: Clone Octavia
git:
repo: "https://git.openstack.org/openstack/octavia"
dest: "{{ bootstrap_host_octavia_tmp }}/octavia"
version: "{{ octavia_git_install_branch }}"
# Build Octavia amphora image
- name: Create amphora image
shell: "./diskimage-create.sh -o {{ bootstrap_host_octavia_tmp }}/amphora-x64-haproxy.qcow2 -s3"
args:
chdir: "{{ bootstrap_host_octavia_tmp }}/octavia/diskimage-create"
creates: "{{ bootstrap_host_octavia_tmp }}/amphora-x64-haproxy.qcow2"
tags:
- skip_ansible_lint
- name: Change permission
file:
path: "{{ bootstrap_host_octavia_tmp }}/octavia/bin/create_certificates.sh"
mode: 0755
- name: Generate certs
shell: "{{ bootstrap_host_octavia_tmp }}/octavia/bin/create_certificates.sh {{ bootstrap_host_octavia_tmp }}/certs {{ bootstrap_host_octavia_tmp }}/octavia/etc/certificates/openssl.cnf"
args:
creates: "{{ bootstrap_host_octavia_tmp }}/certs/ca_01.pem"
tags:
- skip_ansible_lint
- name: Fix certs/private directory access
file:
path: "{{ bootstrap_host_octavia_tmp }}/certs/private"
mode: 0755

View File

@ -201,3 +201,9 @@ repo_build_pip_extra_indexes:
openstack_user_kernel_options:
- key: 'kernel.printk'
value: '4 1 7 4'
{% if bootstrap_host_scenario in ['octavia'] %}
# Octavia specific stuff
neutron_lbaas_octavia: True
octavia_management_net_subnet_cidr: "{{ (container_tech == 'nspawn') | ternary('172.29.240.0/22', '172.29.252.0/22') }}"
{% endif %}

View File

@ -1,25 +0,0 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Octavia specific stuff
octavia_system_home_folder: {{ bootstrap_host_octavia_tmp }}
neutron_lbaas_octavia: True
octavia_amp_image_file_name: {{ bootstrap_host_octavia_tmp }}/amphora-x64-haproxy.qcow2
octavia_amp_image_upload_enabled: True
octavia_glance_image_tag:
octavia_management_net_subnet_cidr: "{{ (container_tech == 'nspawn') | ternary('172.29.240.0/22', '172.29.252.0/22') }}"
# make glance only use file
glance_default_store: file