Browse Source

provider: Add vexxhost

Add vexxhost provider data for tripleo-ci jobs

Depends-On: I53851edbb8bb562dc4194fb99d6ade259227d2f9
Change-Id: I39efbfc94fe3650704b636e94445ad859f3ac801
changes/32/596432/48
Nicolas Hicher 1 year ago
parent
commit
52364c8632

+ 16
- 9
playbooks/tripleo-ci/templates/toci_gate_test.sh.j2 View File

@@ -19,14 +19,13 @@ if [ -f /etc/nodepool/provider ] ; then
# source variables common across all the scripts.
source /etc/ci/mirror_info.sh

if [ ${NODEPOOL_PROVIDER:-''} == 'rdo-cloud-tripleo' ]; then
source $(dirname $0)/scripts/rdocloud.env

# In order to save space remove the cached git repositories, at this point in
# CI the ones we are interested in have been cloned to /opt/stack/new. We
# can also remove some distro images cached on the images.
sudo rm -rf /opt/git
fi
{% if rhcloud -%}
source $(dirname $0)/scripts/{{ rhcloud }}.env
# In order to save space remove the cached git repositories, at this point in
# CI the ones we are interested in have been cloned to /opt/stack/new. We
# can also remove some distro images cached on the images.
sudo rm -rf /opt/git
{% endif %}
fi

# default $NODEPOOL_PROVIDER if not already set as it's used later
@@ -76,7 +75,15 @@ export RELEASES_SCRIPT_LOGFILE=$WORKSPACE/logs/emit_releases_file.log
case {{ environment_type | default('standalone') }} in
ovb)
OVB=1
UCINSTANCEID=$(http_proxy= curl http://169.254.169.254/openstack/2015-10-15/meta_data.json | python -c 'import json, sys; print json.load(sys.stdin)["uuid"]')
METADATA_FILENAME='/mnt/config/openstack/latest/meta_data.json'
if sudo test -f $METADATA_FILENAME; then
METADATA=$(sudo cat /mnt/config/openstack/latest/meta_data.json)
set +x
UCINSTANCEID=$(echo $METADATA | python -c 'import json, sys; print json.load(sys.stdin)["uuid"]')
set -x
else
UCINSTANCEID=$(http_proxy= curl http://169.254.169.254/openstack/2015-10-15/meta_data.json | python -c 'import json, sys; print json.load(sys.stdin)["uuid"]')
fi
;;
multinode)
SUBNODES_SSH_KEY=/etc/nodepool/id_rsa

+ 9
- 2
playbooks/tripleo-ci/vars/common.yaml View File

@@ -20,6 +20,13 @@ periodic: >-

nodepool_provider: "{{ hostvars[inventory_hostname].nodepool.provider }}"

rhcloud: >-
{%- if nodepool_provider in ['rdo-cloud-tripleo', 'rdo-cloud'] -%}
rdocloud
{%- elif nodepool_provider == 'vexxhost-rdo-ca-ymq-1' -%}
vexxhost
{%- endif -%}

nodes_file: >-
{% if nodes is defined -%}
{{ tripleo_quickstart_dir }}/config/nodes/{{ nodes }}.yml
@@ -31,8 +38,8 @@ nodes_args: >-
{%- endif %}

rdo_env_vars: >-
{% if nodepool_provider in ['rdo-cloud-tripleo', 'rdo-cloud'] -%}
--extra-vars @{{ tripleo_ci_dir }}/toci-quickstart/config/testenv/{{ environment_type }}-rdocloud.yml
{% if rhcloud -%}
--extra-vars @{{ tripleo_ci_dir }}/toci-quickstart/config/testenv/{{ environment_type }}-{{ rhcloud }}.yml
{%- endif %}

env_vars: "--extra-vars @{{ tripleo_ci_dir }}/toci-quickstart/config/testenv/{{ environment_type }}.yml {{ rdo_env_vars }}"

+ 6
- 0
scripts/rdocloud.env View File

@@ -14,4 +14,10 @@ export QUOTA_FIPS=75
export QUOTA_NETS=1000
export QUOTA_PORTS=10000

export UNDERCLOUD_FLAVOR="m1.small"
export BAREMETAL_FLAVOR="ci.m1.large"
export BMC_FLAVOR="ci.m1.small"
export EXTRA_NODE_FLAVOR="ci.m1.small"
export BAREMETAL_IMAGE="CentOS-7-x86_64-GenericCloud-1708"

export TEBROKERIP=192.168.100.250

+ 6
- 6
scripts/te-broker/create-env View File

@@ -44,15 +44,15 @@ sed -i -e "s/key_name:.*/key_name: ${KEY_NAME}/" $ENVFILE
sed -i -e "s/node_count:.*/node_count: ${NODECOUNT}/" $ENVFILE
sed -i -e "s/provision_net_shared:.*/provision_net_shared: true/" $ENVFILE
sed -i -e "s/public_net_shared:.*/public_net_shared: true/" $ENVFILE
if [[ $NODEPOOL_PROVIDER == "rdo-cloud-tripleo" ]]; then
if [[ $NODEPOOL_PROVIDER == "rdo-cloud-tripleo" ]] || [[ $NODEPOOL_PROVIDER == "vexxhost-rdo-ca-ymq-1" ]]; then
sed -i -e "s/provision_net_shared:.*/provision_net_shared: false/" $ENVFILE
sed -i -e "s/public_net_shared:.*/public_net_shared: false/" $ENVFILE
sed -i -e "s/bmc_flavor:.*/bmc_flavor: ci.m1.small/" $ENVFILE
sed -i -e "s/baremetal_flavor:.*/baremetal_flavor: ci.m1.large/" $ENVFILE
sed -i -e "s/bmc_flavor:.*/bmc_flavor: ${BMC_FLAVOR}/" $ENVFILE
sed -i -e "s/baremetal_flavor:.*/baremetal_flavor: ${BAREMETAL_FLAVOR}/" $ENVFILE
fi
if [ -n "$CREATE_UNDERCLOUD" ]; then
sed -i -e "s/undercloud_name:.*/undercloud_name: extra-node/" $ENVFILE
sed -i -e "s/undercloud_flavor:.*/undercloud_flavor: m1.small/" $ENVFILE
sed -i -e "s/undercloud_flavor:.*/undercloud_flavor: ${UNDERCLOUD_FLAVOR}/" $ENVFILE
BUILD_NODES_JSON_EXTRA_ARGS="--add_undercloud"
fi
ENVIRONMENT_ARGS="-e $ENVFILE -e environments/bmc-use-cache.yaml -e environments/undercloud-floating-none.yaml"
@@ -86,10 +86,10 @@ fi
if [ $EXTRA_NODECOUNT -gt 0 ]; then
EXTRA_NODE_KEY_NAME="extra_node_key"
/bin/cp --remove-destination environments/base-extra-node.yaml $EXTRA_ENVFILE
sed -i -e "s/baremetal_flavor:.*/baremetal_flavor: ci.m1.small/" $EXTRA_ENVFILE
sed -i -e "s/baremetal_flavor:.*/baremetal_flavor: ${EXTRA_NODE_FLAVOR}/" $EXTRA_ENVFILE
sed -i -e "s/key_name:.*/key_name: ${EXTRA_NODE_KEY_NAME}/" $EXTRA_ENVFILE
sed -i -e "s/node_count:.*/node_count: ${EXTRA_NODECOUNT}/" $EXTRA_ENVFILE
sed -i -e "s/baremetal_image:.*/baremetal_image: CentOS-7-x86_64-GenericCloud-1708/" $EXTRA_ENVFILE
sed -i -e "s/baremetal_image:.*/baremetal_image: ${BAREMETAL_IMAGE}/" $EXTRA_ENVFILE
# We changed the path of the environment, so we need to fix the relative
# path in the resource registry too.
sed -i -e "s|../templates/baremetal-ports-extra-node-port-security.yaml|templates/baremetal-ports-extra-node-port-security.yaml|" $EXTRA_ENVFILE

+ 3
- 0
scripts/te-broker/start_workers.sh View File

@@ -7,6 +7,9 @@ BASEPATH=$(realpath $(dirname $0)/../..)
ENVFILE=$BASEPATH/scripts/rh1.env
if [[ $NODEPOOL_PROVIDER == "rdo-cloud-tripleo" ]]; then
ENVFILE=$BASEPATH/scripts/rdocloud.env
elif [[ $NODEPOOL_PROVIDER == "vexxhost-rdo-ca-ymq-1" ]]; then
ENVFILE=$BASEPATH/scripts/vexxhost.env
fi
fi



+ 20
- 0
scripts/vexxhost.env View File

@@ -0,0 +1,20 @@
#!/bin/bash

export PUBLIC_IP_NET=public

# The total number of testenv-workers running, to allow for timeouts
# Should be slightly higher then the max number of CI slaves running.
export TOTALOVBENVS=2

export QUOTA_RAM=100000
export QUOTA_FIPS=3
export QUOTA_NETS=100
export QUOTA_PORTS=1000

export UNDERCLOUD_FLAVOR="ci.m1.nodepool"
export BAREMETAL_FLAVOR="ci.m1.large"
export BMC_FLAVOR="ci.m1.small"
export EXTRA_NODE_FLAVOR="ci.m1.small"
export BAREMETAL_IMAGE="CentOS-7-x86_64-GenericCloud"

export TEBROKERIP=199.204.45.146

+ 59
- 0
toci-quickstart/config/testenv/ovb-vexxhost.yml View File

@@ -0,0 +1,59 @@
# This file contains settings that are specific to Vexxhost
# These settings will override the ovb default settings

# These values are defined now in the te-broker config
# https://github.com/openstack-infra/tripleo-ci/blob/master/scripts/te-broker/create-env#L47

custom_nameserver:
- 199.204.44.24
- 1.1.1.1
- 1.0.0.1
undercloud_undercloud_nameservers: "{{ custom_nameserver }}"
external_net: 'public'
overcloud_dns_servers: "{{ custom_nameserver }}"
ntp_server: 'pool.ntp.org'
workers_args: >-
-e {{ overcloud_templates_path }}/environments/low-memory-usage.yaml
-e {{ tripleo_root }}/tripleo-ci/test-environments/worker-config.yaml
-e {{ overcloud_templates_path }}/environments/debug.yaml
overcloud_image_url: http://images.rdoproject.org/{{ release }}/rdo_trunk/{{ dlrn_hash|default(dlrn_hash_tag) }}/overcloud-full.tar
ipa_image_url: http://images.rdoproject.org/{{ release }}/rdo_trunk/{{ dlrn_hash|default(dlrn_hash_tag) }}/ironic-python-agent.tar

# Container settings are set in release files

# Use cirros cached image
tempest_test_image_path: /opt/cache/files/cirros-0.3.5-x86_64-disk.img

# Container update settings
update_containers: >-
{% if containerized_overcloud|bool or containerized_undercloud|bool -%}
true
{%- endif -%}

# We don't need to cleanup TripleO CI
tempest_track_resources: false

# Tempestmail settings
tempestmail_log_server: http://logs.rdoproject.org

#build-test packages
artg_repos_dir: "{{ tripleo_root }}"

# disable disk cleaning before starting installation
undercloud_clean_nodes: false

# InfluxDB module settings
influxdb_only_successful_tasks: true
influxdb_measurement: job
influxdb_url: https://influxdb.review.rdoproject.org
influxdb_port: 8086
influxdb_user: tripleo_ci
influxdb_password:
influxdb_dbname: tripleo_ci
influxdb_data_file_path: "{{ artcl_collect_dir }}/influxdb_data"
influxdb_create_data_file: true

# Browbeat settings
cloud_name: vexxhost
elastic_host: browbeat.test.com
grafana_host: browbeat.test.com

+ 14
- 1
toci_gate_test.sh View File

@@ -23,6 +23,11 @@ if [ -f /etc/nodepool/provider ] ; then
export RHCLOUD=''
if [ ${NODEPOOL_PROVIDER:-''} == 'rdo-cloud-tripleo' ]; then
RHCLOUD='rdocloud'
elif [ ${NODEPOOL_PROVIDER:-''} == 'vexxhost-rdo-ca-ymq-1' ]; then
RHCLOUD='vexxhost'
fi

if [ -n $RHCLOUD ]; then
source $(dirname $0)/scripts/$RHCLOUD.env

# In order to save space remove the cached git repositories, at this point in
@@ -125,7 +130,15 @@ for JOB_TYPE_PART in $(sed 's/-/ /g' <<< "${TOCI_JOBTYPE:-}") ; do
ovb)
OVB=1
ENVIRONMENT="ovb"
UCINSTANCEID=$(http_proxy= curl http://169.254.169.254/openstack/2015-10-15/meta_data.json | python -c 'import json, sys; print json.load(sys.stdin)["uuid"]')
METADATA_FILENAME='/mnt/config/openstack/latest/meta_data.json'
if sudo test -f $METADATA_FILENAME; then
METADATA=$(sudo cat /mnt/config/openstack/latest/meta_data.json)
set +x
UCINSTANCEID=$(echo $METADATA | python -c 'import json, sys; print json.load(sys.stdin)["uuid"]')
set -x
else
UCINSTANCEID=$(http_proxy= curl http://169.254.169.254/openstack/2015-10-15/meta_data.json | python -c 'import json, sys; print json.load(sys.stdin)["uuid"]')
fi
if [[ " $QUICKSTART_SH_JOBS " =~ " $TOCI_JOBTYPE " ]]; then
export PLAYBOOKS=${PLAYBOOKS:-"baremetal-full-deploy.yml"}
else

+ 2
- 1
toci_quickstart.sh View File

@@ -164,7 +164,8 @@ else
[[ "$exit_value" == 0 ]] && echo "Playbook run passed successfully" || echo "Playbook run failed"

## LOGS COLLECTION RUN (if applicable)
if [[ "${NODEPOOL_PROVIDER:-''}" == "rdo-cloud-tripleo" ]] || [[ "${NODEPOOL_PROVIDER:-''}" == "tripleo-test-cloud-rh1" ]]; then
if [[ "${NODEPOOL_PROVIDER:-''}" == "rdo-cloud-tripleo" ]] || \
[[ "${NODEPOOL_PROVIDER:-''}" == "vexxhost-rdo-ca-ymq-1" ]] ; then
if [[ "$TOCI_JOBTYPE" =~ "ovb" ]]; then
bash $LOGS_DIR/collect_logs.sh
# rename script to not to run it in multinode jobs

Loading…
Cancel
Save