echo "FLAVOR LABELS" > /etc/jenkins-agent/labels
echo "127.0.0.1 $(hostname)" >> /etc/hosts
echo "FLOATING" > /etc/jenkins-agent/description
- echo "OPENSTACK_ENVIRONMENT" > /etc/jenkins-agent/location
+ echo "OPENSTACK_LOCATION" > /etc/jenkins-agent/location
echo "$(hostname | sed 's/-node-.*//')" > /etc/jenkins-agent/slave-name
if [[ "FLAVOR" == *"mos.fuel.base"* ]] ; then
LABELS: {get_param: jenkins_labels}
wc_notify: { get_attr: [wait_handle, curl_cli] }
FLOATING: { get_attr: [ floating_ip, floating_ip_address ] }
- OPENSTACK_ENVIRONMENT: {get_param: location}
+ OPENSTACK_LOCATION: {get_param: location}
outputs:
echo "LABELS" > /etc/jenkins-agent/labels
echo "127.0.0.1 $(hostname)" >> /etc/hosts
echo "FLOATING" > /etc/jenkins-agent/description
- echo "OPENSTACK_ENVIRONMENT" > /etc/jenkins-agent/location
+ echo "OPENSTACK_LOCATION" > /etc/jenkins-agent/location
echo "$(hostname | sed 's/-node-.*//')" > /etc/jenkins-agent/slave-name
if [[ "FLAVOR" == *"mos.fuel.base"* ]] ; then
LABELS: {get_param: jenkins_labels}
wc_notify: { get_attr: [wait_handle, curl_cli] }
FLOATING: { get_attr: [ floating_ip, floating_ip_address ] }
- OPENSTACK_ENVIRONMENT: {get_param: location}
+ OPENSTACK_LOCATION: {get_param: location}
outputs:
description: List of labels for jenkins swarm agent separated by whitespace
location:
type: string
- default: 'EU'
+ default: 'US'
description: Backend cluster location (available "EU" and "US")
resources:
echo "LABELS" > /etc/jenkins-agent/labels
echo "127.0.0.1 $(hostname)" >> /etc/hosts
echo "FLOATING" > /etc/jenkins-agent/description
- echo "OPENSTACK_ENVIRONMENT" > /etc/jenkins-agent/location
+ echo "OPENSTACK_LOCATION" > /etc/jenkins-agent/location
echo "$(hostname | sed 's/-node-.*//')" > /etc/jenkins-agent/slave-name
if [[ "FLAVOR" == *"mos.fuel.base"* ]] ; then
LABELS: {get_param: jenkins_labels}
wc_notify: { get_attr: [wait_handle, curl_cli] }
FLOATING: { get_attr: [ floating_ip, floating_ip_address ] }
- OPENSTACK_ENVIRONMENT: {get_param: location}
+ OPENSTACK_LOCATION: {get_param: location}
outputs:
echo "FLAVOR LABELS" > /etc/jenkins-agent/labels
echo "127.0.0.1 $(hostname)" >> /etc/hosts
echo "FLOATING" > /etc/jenkins-agent/description
- echo "OPENSTACK_ENVIRONMENT" > /etc/jenkins-agent/location
+ echo "OPENSTACK_LOCATION" > /etc/jenkins-agent/location
echo "$(hostname | sed 's/-node-.*//')" > /etc/jenkins-agent/slave-name
if [[ "FLAVOR" == *"mos.fuel.base"* ]] ; then
LABELS: {get_param: jenkins_labels}
wc_notify: { get_attr: [wait_handle, curl_cli] }
FLOATING: { get_attr: [ floating_ip, floating_ip_address ] }
- OPENSTACK_ENVIRONMENT: {get_param: location}
+ OPENSTACK_LOCATION: {get_param: location}
outputs:
description: List of labels for jenkins swarm agent separated by whitespace
location:
type: string
- default: 'EU'
+ default: 'US'
description: Backend cluster location (available "EU" and "US")
resources:
echo "FLAVOR LABELS" > /etc/jenkins-agent/labels
echo "127.0.0.1 $(hostname)" >> /etc/hosts
echo "FLOATING" > /etc/jenkins-agent/description
- echo "OPENSTACK_ENVIRONMENT" > /etc/jenkins-agent/location
+ echo "OPENSTACK_LOCATION" > /etc/jenkins-agent/location
echo "$(hostname | sed 's/-node-.*//')" > /etc/jenkins-agent/slave-name
if [[ "FLAVOR" == *"mos.fuel.base"* ]] ; then
LABELS: {get_param: jenkins_labels}
wc_notify: { get_attr: [wait_handle, curl_cli] }
FLOATING: { get_attr: [ floating_ip, floating_ip_address ] }
- OPENSTACK_ENVIRONMENT: {get_param: location}
+ OPENSTACK_LOCATION: {get_param: location}
outputs:
--- /dev/null
+OS_USER_DOMAIN_NAME=ldap_mirantis
+OS_PROJECT_DOMAIN_ID=default
+OS_REGION_NAME=RegionOne
+OS_INTERFACE=public
+OS_IDENTITY_API_VERSION=3
+
+OS_USERNAME=maintenance-ci-robot
+OS_PASSWORD=LKMwYTF4Cr3ef
\ No newline at end of file
--- /dev/null
+OS_AUTH_URL=https://ic-eu.ssl.mirantis.net:5000/v3
--- /dev/null
+OS_PROJECT_NAME=maintenance-team
\ No newline at end of file
--- /dev/null
+OS_PROJECT_NAME=sre-team
\ No newline at end of file
--- /dev/null
+OS_AUTH_URL=https://ic-us.ssl.mirantis.net:5000/v3
to: $MOS_HUGE_HDD_EXT_NODE_COUNT
step: 1
predefined-parameters: |
- OPENSTACK_ENVIRONMENT=${OPENSTACK_ENVIRONMENT}
+ OPENSTACK_LOCATION=${OPENSTACK_LOCATION}
HEAT_STACK_TEMPLATE_NAME=${HEAT_STACK_TEMPLATE_NAME}
STACK_PREFIX=${STACK_PREFIX}
USE_ANTIAFFINITY_GROUP=true
to: $MOS_BASE_HDD_EXT_NODE_COUNT
step: 1
predefined-parameters: |
- OPENSTACK_ENVIRONMENT=${OPENSTACK_ENVIRONMENT}
+ OPENSTACK_LOCATION=${OPENSTACK_LOCATION}
HEAT_STACK_TEMPLATE_NAME=${HEAT_STACK_TEMPLATE_NAME}
STACK_PREFIX=${STACK_PREFIX}
USE_ANTIAFFINITY_GROUP=true
to: $MOS_HUGE_NODE_COUNT
step: 1
predefined-parameters: |
- OPENSTACK_ENVIRONMENT=${OPENSTACK_ENVIRONMENT}
+ OPENSTACK_LOCATION=${OPENSTACK_LOCATION}
HEAT_STACK_TEMPLATE_NAME=${HEAT_STACK_TEMPLATE_NAME}
STACK_PREFIX=${STACK_PREFIX}
FLAVOR_NAME=mos.fuel.huge
to: $MOS_BASE_NODE_COUNT
step: 1
predefined-parameters: |
- OPENSTACK_ENVIRONMENT=${OPENSTACK_ENVIRONMENT}
+ OPENSTACK_LOCATION=${OPENSTACK_LOCATION}
HEAT_STACK_TEMPLATE_NAME=${HEAT_STACK_TEMPLATE_NAME}
STACK_PREFIX=${STACK_PREFIX}
FLAVOR_NAME=mos.fuel.base
- trigger-builds:
- project: "deploy-heat-stack"
predefined-parameters: |
- OPENSTACK_ENVIRONMENT=${OPENSTACK_ENVIRONMENT}
+ OPENSTACK_LOCATION=${OPENSTACK_LOCATION}
HEAT_STACK_TEMPLATE_NAME=jenkins-slave
STACK_PREFIX=image-builder
FLAVOR_NAME=dev.cmn
- project: "build-swarm-image"
block: true
predefined-parameters: |
- OPENSTACK_ENVIRONMENT=${OPENSTACK_ENVIRONMENT}
+ OPENSTACK_LOCATION=${OPENSTACK_LOCATION}
IMAGE_NAME=${BUILD_IMAGE_NAME}
GERRIT_REVIEW=${GERRIT_REVIEW}
STAGING_IMAGE=${STAGING_IMAGE}
- trigger-builds:
- project: "delete-heat-stack"
predefined-parameters: |
- OPENSTACK_ENVIRONMENT=${OPENSTACK_ENVIRONMENT}
+ OPENSTACK_LOCATION=${OPENSTACK_LOCATION}
STACK_PREFIX=image-builder
block: true
name: openstack-cloud-selector
parameters:
- choice:
- name: OPENSTACK_ENVIRONMENT
+ name: OPENSTACK_LOCATION
choices:
- EU
- US
+ - choice:
+ name: OPENSTACK_TENANT
+ choices:
+ - sre-team
+ - maintenance-team
- wrapper:
name: openstack-creds
wrappers:
- credentials-binding:
- file:
- credential-id: maintenance-ci-openrc-password-free
- variable: OPENRC_FILE
+ credential-id: base_openrc
+ variable: BASE_OPENRC_FILE
+ - file:
+ credential-id: openrc_eu_cloud
+ variable: OPENRC_EU_CLOUD_FILE
+ - file:
+ credential-id: openrc_us_cloud
+ variable: OPENRC_US_CLOUD_FILE
- file:
- credential-id: maintenance-team-openrc-eu-robot-no-password
- variable: EU_OPENRC_FILE
+ credential-id: openrc_sre_tenant
+ variable: OPENRC_SRE_TENANT_FILE
- file:
- credential-id: maintenance-team-openrc-us-robot-no-password
- variable: US_OPENRC_FILE
+ credential-id: openrc_maintenance_tenant
+ variable: OPENRC_MAINTENANCE_TENANT_FILE
- username-password-separated:
credential-id: maintenance-ci-robot-password
username: OS_USERNAME
- builder:
name: openrc-source-file-selector
builders:
+ - inject:
+ properties-file: ${BASE_OPENRC_FILE}
- conditional-step:
condition-kind: strings-match
- condition-string1: $OPENSTACK_ENVIRONMENT
+ condition-string1: $OPENSTACK_LOCATION
condition-string2: EU
condition-case-insensitive: true
steps:
- inject:
- properties-file: ${EU_OPENRC_FILE}
+ properties-file: ${OPENRC_EU_CLOUD_FILE}
- conditional-step:
condition-kind: strings-match
- condition-string1: $OPENSTACK_ENVIRONMENT
+ condition-string1: $OPENSTACK_LOCATION
condition-string2: US
condition-case-insensitive: true
steps:
- inject:
- properties-file: ${US_OPENRC_FILE}
+ properties-file: ${OPENRC_US_CLOUD_FILE}
+ - conditional-step:
+ condition-kind: strings-match
+ condition-string1: OPENSTACK_TENANT
+ condition-string2: sre-team
+ condition-case-insensitive: true
+ steps:
+ - inject:
+ properties-file: ${OPENRC_SRE_TENANT_FILE}
+ - conditional-step:
+ condition-kind: strings-match
+ condition-string1: $OPENSTACK_LOCATION
+ condition-string2: maintenance-team
+ condition-case-insensitive: true
+ steps:
+ - inject:
+ properties-file: ${OPENRC_MAINTENANCE_TENANT_FILE}
deactivate
fi
-parameter_string="location=${OPENSTACK_ENVIRONMENT}"
+parameter_string="location=${OPENSTACK_LOCATION}"
if [[ ! -z "${FLAVOR_NAME}" ]] ; then
parameter_string="flavor=${FLAVOR_NAME};$parameter_string"
fi
md5_cmd="md5"
fi
-STACK_NAME="${STACK_PREFIX:-swarm_slave}-${OPENSTACK_ENVIRONMENT,,}-$(head -c 100 /dev/urandom | "${md5_cmd}" | head -c 4)"
+STACK_NAME="${STACK_PREFIX:-swarm_slave}-${OPENSTACK_LOCATION,,}-$(head -c 100 /dev/urandom | "${md5_cmd}" | head -c 4)"
if [[ ! -z "${CUSTOM_HEAT_STACK_YAML}" ]] ; then
TEMPLATE_FILE="${CUSTOM_HEAT_STACK_YAML}"
if [[ -f "${WORKSPACE}/maintenance-ci/common/data/${HEAT_STACK_TEMPLATE_NAME}.yml" ]] ; then
TEMPLATE_FILE="${WORKSPACE}/maintenance-ci/common/data/${HEAT_STACK_TEMPLATE_NAME}.yml"
else
- TEMPLATE_FILE="${WORKSPACE}/maintenance-ci/common/data/${HEAT_STACK_TEMPLATE_NAME}-${OPENSTACK_ENVIRONMENT,,}.yml"
+ TEMPLATE_FILE="${WORKSPACE}/maintenance-ci/common/data/${HEAT_STACK_TEMPLATE_NAME}-${OPENSTACK_LOCATION,,}.yml"
fi
fi