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:
parent
90ab17980b
commit
c27270f78e
35
playbooks/multinode-standalone.yml
Normal file
35
playbooks/multinode-standalone.yml
Normal 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
|
||||
|
@ -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 ..."
|
||||
|
28
roles/standalone/README.md
Normal file
28
roles/standalone/README.md
Normal 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
|
13
roles/standalone/defaults/main.yml
Normal file
13
roles/standalone/defaults/main.yml
Normal 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
|
||||
|
2
roles/standalone/meta/main.yml
Normal file
2
roles/standalone/meta/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
- extras-common
|
21
roles/standalone/tasks/main.yml
Normal file
21
roles/standalone/tasks/main.yml
Normal 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 }}
|
||||
|
8
roles/standalone/templates/standalone.sh.j2
Normal file
8
roles/standalone/templates/standalone.sh.j2
Normal 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
|
34
roles/standalone/templates/standalone_config.yaml.j2
Normal file
34
roles/standalone/templates/standalone_config.yaml.j2
Normal 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
|
Loading…
Reference in New Issue
Block a user