Skip to content

Commit

Permalink
Adds bits to set domain and enable tlse for adoption multinode ci jobs
Browse files Browse the repository at this point in the history
As part of [1] this aims to enable tls for the adoption multinode ci.

[1] https://issues.redhat.com/browse/OSPRH-8973
  • Loading branch information
marios committed Aug 16, 2024
1 parent dfcf5e3 commit 7193cc3
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 17 deletions.
16 changes: 11 additions & 5 deletions devsetup/scripts/tripleo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ CMDS_FILE=${CMDS_FILE:-"${MY_TMP_DIR}/standalone_cmds"}
SKIP_TRIPLEO_REPOS=${SKIP_TRIPLEO_REPOS:="false"}
MANILA_ENABLED=${MANILA_ENABLED:-true}
OCTAVIA_ENABLED=${OCTAVIA_ENABLED:-true}
TLSE_ENABLED=${TLSE_ENABLED:-false}
CLOUD_DOMAIN=${CLOUD_DOMAIN:-localdomain}

if [[ ! -f $SSH_KEY_FILE ]]; then
echo "$SSH_KEY_FILE is missing"
Expand All @@ -50,8 +52,8 @@ if [[ ! -f $CMDS_FILE ]]; then
set -ex
sudo dnf install -y podman python3-tripleoclient util-linux lvm2
sudo hostnamectl set-hostname undercloud.localdomain
sudo hostnamectl set-hostname undercloud.localdomain --transient
sudo hostnamectl set-hostname undercloud.${CLOUD_DOMAIN}
sudo hostnamectl set-hostname undercloud.${CLOUD_DOMAIN} --transient
export HOST_PRIMARY_RESOLV_CONF_ENTRY=${HOST_PRIMARY_RESOLV_CONF_ENTRY}
export INTERFACE_MTU=${INTERFACE_MTU:-1500}
Expand Down Expand Up @@ -116,10 +118,14 @@ ntp_server: ${NTP_SERVER}
gateway_ip: ${GATEWAY}
dns_server: ${PRIMARY_RESOLV_CONF_ENTRY}
user_home: ${HOME}
cloud_domain: ${CLOUD_DOMAIN}
EOF

jinja2_render tripleo/net_config.j2 "${J2_VARS_FILE}" > ${MY_TMP_DIR}/net_config.yaml
jinja2_render tripleo/undercloud.conf.j2 "${J2_VARS_FILE}" > ${MY_TMP_DIR}/undercloud.conf
jinja2_render tripleo/overcloud_services.yaml.j2 "${J2_VARS_FILE}" > ${MY_TMP_DIR}/overcloud_services.yaml
jinja2_render tripleo/config-download.yaml.j2 "${J2_VARS_FILE}" > ${MY_TMP_DIR}/config-download.yaml
jinja2_render tripleo/config-download-networker.yaml.j2 "${J2_VARS_FILE}" > ${MY_TMP_DIR}/config-download-networker.yaml

# Copying files
scp $SSH_OPT $REPO_SETUP_CMDS root@$IP:/tmp/repo-setup.sh
Expand All @@ -131,10 +137,10 @@ scp $SSH_OPT tripleo/undercloud-parameter-defaults.yaml zuul@$IP:$HOME/underclou
scp $SSH_OPT ${MY_TMP_DIR}/undercloud.conf zuul@$IP:$HOME/undercloud.conf
scp $SSH_OPT tripleo/network_data.yaml zuul@$IP:$HOME/network_data.yaml
scp $SSH_OPT tripleo/vips_data.yaml zuul@$IP:$HOME/vips_data.yaml
scp $SSH_OPT tripleo/config-download.yaml zuul@$IP:$HOME/config-download.yaml
scp $SSH_OPT tripleo/config-download-networker.yaml zuul@$IP:$HOME/config-download-networker.yaml
scp $SSH_OPT ${MY_TMP_DIR}/config-download.yaml zuul@$IP:$HOME/config-download.yaml
scp $SSH_OPT ${MY_TMP_DIR}/config-download-networker.yaml zuul@$IP:$HOME/config-download-networker.yaml
scp $SSH_OPT tripleo/overcloud_roles.yaml zuul@$IP:$HOME/overcloud_roles.yaml
scp $SSH_OPT tripleo/overcloud_services.yaml zuul@$IP:$HOME/overcloud_services.yaml
scp $SSH_OPT ${MY_TMP_DIR}/overcloud_services.yaml zuul@$IP:$HOME/overcloud_services.yaml
scp $SSH_OPT tripleo/ansible_config.cfg zuul@$IP:$HOME/ansible_config.cfg
if [[ "$EDPM_COMPUTE_CEPH_ENABLED" == "true" ]]; then
scp $SSH_OPT tripleo/ceph.sh root@$IP:/tmp/ceph.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ parameter_defaults:
tags:
- 192.168.122.0/24


NodePortMap:
controller-0:
ctlplane:
Expand Down Expand Up @@ -225,7 +224,7 @@ parameter_defaults:

CtlplaneNetworkAttributes:
network:
dns_domain: localdomain
dns_domain: {{ cloud_domain }}
mtu: 1500
name: ctlplane
tags:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ parameter_defaults:
ip_subnet: 172.19.0.0/24
CtlplaneNetworkAttributes:
network:
dns_domain: localdomain
dns_domain: {{ cloud_domain }}
mtu: 1500
name: ctlplane
tags:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ parameter_defaults:
ComputeCount: 3
NeutronGlobalPhysnetMtu: 1350
CinderLVMLoopDeviceSize: 20480
CloudName: overcloud.localdomain
CloudNameInternal: overcloud.internalapi.localdomain
CloudNameStorage: overcloud.storage.localdomain
CloudNameStorageManagement: overcloud.storagemgmt.localdomain
CloudNameCtlplane: overcloud.ctlplane.localdomain
CloudDomain: localdomain
CloudName: overcloud.{{ cloud_domain }}
CloudNameInternal: overcloud.internalapi.{{ cloud_domain }}
CloudNameStorage: overcloud.storage.{{ cloud_domain }}
CloudNameStorageManagement: overcloud.storagemgmt.{{ cloud_domain }}
CloudNameCtlplane: overcloud.ctlplane.{{ cloud_domain }}
CloudDomain: {{ cloud_domain }}
NetworkConfigWithAnsible: false
12 changes: 9 additions & 3 deletions devsetup/tripleo/undercloud.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# the user is responsible for configuring all system hostname settings
# appropriately. If set, the undercloud install will configure all
# system hostname settings. (string value)
undercloud_hostname = undercloud.localdomain
undercloud_hostname = undercloud.{{ cloud_domain }}

# IP information for the interface on the Undercloud that will be
# handling the PXE boots and DHCP for Overcloud instances. The IP
Expand Down Expand Up @@ -51,7 +51,10 @@ undercloud_timezone = UTC
# DNS domain name to use when deploying the overcloud. The overcloud
# parameter "CloudDomain" must be set to a matching value. (string
# value)
#overcloud_domain_name = localdomain
{% if cloud_domain != 'localdomain' %}
overcloud_domain_name = {{ cloud_domain }}
{% endif %}


# Certificate file to use for OpenStack service SSL connections.
# Setting this enables SSL for the OpenStack API endpoints, leaving it
Expand All @@ -65,8 +68,11 @@ undercloud_timezone = UTC
# /etc/pki/tls/certs/undercloud-[undercloud_public_vip].pem. This
# certificate is signed by CA selected by the
# "certificate_generation_ca" option. (boolean value)
#generate_service_certificate = true
{% if cloud_domain == 'localdomain' %}
generate_service_certificate = False
{% else %}
generate_service_certificate = true
{% endif %}

# The certmonger nickname of the CA from which the certificate will be
# requested. This is used only if the generate_service_certificate
Expand Down

0 comments on commit 7193cc3

Please sign in to comment.