Add a role for the standalone deployment

This is not an undercloud or overcloud deployment.
This is a new single node composable deployment for TripleO

The review adds the role to handle the logic. It also
updates the reproducer script to handle the new toci_jobtype
definition so the job can be recreated properly.

Change-Id: I8f2c3daed748ea7a6d6a17e9db420a5ec1779d7f
This commit is contained in:
Wes Hayutin 2018-06-04 18:44:34 -04:00
parent 90ab17980b
commit c27270f78e
8 changed files with 144 additions and 1 deletions

View File

@ -0,0 +1,35 @@
---
- name: Add the overcloud nodes to the generated inventory
hosts: undercloud
gather_facts: yes
tags:
- standalone
vars:
inventory: multinode
roles:
- tripleo-inventory
- name: Prepare the undercloud for installation
hosts: undercloud
roles:
- undercloud-setup
tags:
- standalone
- name: Run DLRN gate role and install repo
hosts: undercloud
vars:
artg_compressed_gating_repo: "${HOME}/gating_repo.tar.gz"
roles:
- build-test-packages
- { role: install-built-repo, when: compressed_gating_repo is defined }
tags:
- build
- name: Deploy Standalone
hosts: undercloud
roles:
- standalone
tags:
- standalone

View File

@ -240,7 +240,9 @@ export $(awk '/subnode-0/ {print $2}' ovb_hosts)
scp ${SSH_OPTS} $WORKSPACE/nodes.json zuul@$ansible_host:/home/zuul/
{% endif %}
{% if 'multinode' in toci_jobtype or 'singlenode' in toci_jobtype %}
{% set jobtype = toci_jobtype.split('-')[0] %}
{% set types = [ "multinode", "singlenode", "standalone" ] %}
{% if jobtype in types %}
if [[ "$LIBVIRT" == "1" ]]; then
echo "Running a libvirt reproducer ..."

View File

@ -0,0 +1,28 @@
Standalone
===================
An Ansible role to deploy the Standalone ( all-in-one ) deployment of TripleO
Requirements
------------
This role expects the requirements for deploying a TripleO undercloud to be met.
For example python-tripleoclient is installed and hardware requirements met.
Role Variables
--------------
- standalone_config: <'standalone_config.yaml.j2'> -- jinja template of the deployment configuration
- standalone_network: <'192.168.24'> -- First three octets of the network used
- standalone_ip: <'192.168.24.1'> -- The IP address of the standalone deployment
- standalone_interface: <'eth1'> -- The interface for the standalone deployment
- standalone_deploy_script: <'standalone.sh.j2'> -- The script name use to deploy the standalone server
- standalone_deploy_log: <'standalone_deploy.log'> -- The log of the deployment
- standalone_role: <'Standalone.yaml'> -- The TripleO Heat Template role definition of the deployment
Dependencies
------------
The dependencies documented for TripleO Quickstart and TripleO

View File

@ -0,0 +1,13 @@
---
standalone_config: standalone_config.yaml.j2
standalone_network: 192.168.24
standalone_ip: 192.168.24.1
standalone_interface: eth1
# deploy script
standalone_deploy_script: standalone.sh.j2
standalone_deploy_log: standalone_deploy.log
# deployment role
standalone_role: Standalone.yaml

View File

@ -0,0 +1,2 @@
dependencies:
- extras-common

View File

@ -0,0 +1,21 @@
---
# tasks file for all_in_one
# standalone params
- name: Create the standalone params
template:
src: "{{ standalone_config }}"
dest: "{{ working_dir}}/standalone_parameters.yaml"
mode: 0755
- name: Create the deploy command for standalone
template:
src: "{{ standalone_deploy_script }}"
dest: "{{ working_dir}}/standalone.sh"
mode: 0755
- name: Deploy the standalone
shell: >
set -o pipefail &&
{{ working_dir }}/standalone.sh 2>&1 {{ timestamper_cmd }} > {{ working_dir }}/{{ standalone_deploy_log }}

View File

@ -0,0 +1,8 @@
sudo openstack tripleo deploy \
--templates \
--local-ip={{ standalone_ip }} \
-e {{ overcloud_templates_path }}/environments/standalone.yaml \
-r {{ overcloud_templates_path }}/roles/{{ standalone_role }} \
-e "{{ working_dir }}/standalone_parameters.yaml" \
--output-dir {{ working_dir }} \
--standalone

View File

@ -0,0 +1,34 @@
parameter_defaults:
CertmongerCA: local
CloudName: {{ standalone_ip }}
ContainerImagePrepare:
- set:
ceph_image: daemon
ceph_namespace: docker.io/ceph
ceph_tag: v3.0.3-stable-3.0-luminous-centos-7-x86_64
name_prefix: centos-binary-
name_suffix: ''
namespace: docker.io/{{ docker_registry_namespace }}
neutron_driver: null
tag: {{ dlrn_hash_tag }}
tag_from_label: rdo_version
ControlPlaneStaticRoutes: []
Debug: true
DeploymentUser: {{ undercloud_user }}
DnsServers: {{ undercloud_undercloud_nameservers }}
DockerInsecureRegistryAddress:
- {{ standalone_ip }}:8787
MasqueradeNetworks:
{{ standalone_network }}.0/24:
- {{ standalone_network }}.0/24
NeutronPublicInterface: {{ standalone_interface }}
StandaloneCtlplaneLocalSubnet: ctlplane-subnet
StandaloneCtlplaneSubnets:
ctlplane-subnet:
DhcpRangeEnd: {{ standalone_network }}.40
DhcpRangeStart: {{ standalone_network }}.20
NetworkCidr: {{ standalone_network }}.0/24
NetworkGateway: {{ standalone_ip }}
StandaloneEnableRoutedNetworks: false
StandaloneHomeDir: {{ working_dir }}
StandaloneLocalMtu: 1500