afa16ae150
Add the cloud to clouds.yaml for the undercloud so that it is available for post deploy script's. The clouds.yaml is created both in the stack users home directory ~/.config/openstack/clouds.yaml and globally for the system in /etc/openstack/clouds.yaml. Update standalone post configuration to use the same code to create and update clouds.yaml on standalone. clouds.yaml is used when setting up client's in other post scripts instead of passing all the options to each script. Partial-Bug: #1801927 Change-Id: I6402fa561745bacf184b1ad2ada44bf8f7c75324
124 lines
3.4 KiB
YAML
124 lines
3.4 KiB
YAML
heat_template_version: rocky
|
|
|
|
description: >
|
|
Post-deployment for the TripleO standalone deployment
|
|
|
|
parameters:
|
|
servers:
|
|
type: json
|
|
DeployedServerPortMap:
|
|
default: {}
|
|
type: json
|
|
StandaloneHomeDir:
|
|
description: The HOME directory where the stackrc and ssh credentials for the Standalone will be installed. Set to /home/<user> to customize the location.
|
|
type: string
|
|
default: '/root'
|
|
AdminPassword: #supplied by tripleo-undercloud-passwords.yaml
|
|
type: string
|
|
description: The password for the keystone admin account, used for monitoring, querying neutron etc.
|
|
hidden: True
|
|
SSLCertificate:
|
|
description: >
|
|
The content of the SSL certificate (without Key) in PEM format.
|
|
type: string
|
|
default: ""
|
|
hidden: True
|
|
PublicSSLCertificateAutogenerated:
|
|
default: false
|
|
description: >
|
|
Whether the public SSL certificate was autogenerated or not.
|
|
type: boolean
|
|
KeystoneRegion:
|
|
type: string
|
|
default: 'regionOne'
|
|
description: Keystone region for endpoint
|
|
StandaloneCloudName:
|
|
type: string
|
|
default: 'standalone'
|
|
description: Cloud name for the clouds.yaml
|
|
|
|
conditions:
|
|
|
|
tls_enabled:
|
|
or:
|
|
- not:
|
|
equals:
|
|
- {get_param: SSLCertificate}
|
|
- ""
|
|
- equals:
|
|
- {get_param: PublicSSLCertificateAutogenerated}
|
|
- true
|
|
|
|
resources:
|
|
|
|
StandalonePostConfig:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
group: ansible
|
|
config: |
|
|
---
|
|
- name: StandalonePostConfig
|
|
connection: local
|
|
hosts: localhost
|
|
tasks:
|
|
- name: Hiera symlink
|
|
file:
|
|
src: /etc/puppet/hiera.yaml
|
|
dest: /etc/hiera.yaml
|
|
state: link
|
|
force: yes
|
|
|
|
StandalonePostDeployment:
|
|
type: OS::Heat::SoftwareDeployments
|
|
properties:
|
|
name: StandalonePostDeployment
|
|
servers: {get_param: servers}
|
|
config: {get_resource: StandalonePostConfig}
|
|
|
|
CloudsYamlConfig:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
group: script
|
|
inputs:
|
|
- name: admin_password
|
|
- name: auth_url
|
|
- name: cloud_name
|
|
- name: home_dir
|
|
- name: identity_api_version
|
|
- name: project_name
|
|
- name: project_domain_name
|
|
- name: region_name
|
|
- name: user_name
|
|
- name: user_domain_name
|
|
config: {get_file: ./clouds_yaml.py}
|
|
|
|
CloudsYamlDeployment:
|
|
type: OS::Heat::SoftwareDeployments
|
|
properties:
|
|
name: CloudsYamlDeployment
|
|
servers: {get_param: servers}
|
|
config: {get_resource: CloudsYamlConfig}
|
|
input_values:
|
|
admin_password: {get_param: AdminPassword}
|
|
auth_url:
|
|
if:
|
|
- tls_enabled
|
|
- make_url:
|
|
scheme: https
|
|
host: {get_param: [DeployedServerPortMap, 'public_virtual_ip', fixed_ips, 0, ip_address]}
|
|
port: 13000
|
|
path: /
|
|
- make_url:
|
|
scheme: http
|
|
host: {get_param: [DeployedServerPortMap, 'control_virtual_ip', fixed_ips, 0, ip_address]}
|
|
port: 5000
|
|
path: /
|
|
cloud_name: {get_param: StandaloneCloudName}
|
|
home_dir: {get_param: StandaloneHomeDir}
|
|
identity_api_version: 3
|
|
project_name: 'admin'
|
|
project_domain_name: 'Default'
|
|
region_name: {get_param: KeystoneRegion}
|
|
user_name: 'admin'
|
|
user_domain_name: 'Default'
|