diff options
author | Julien Danjou <julien@danjou.info> | 2017-05-29 12:21:03 +0200 |
---|---|---|
committer | gord chung <gord@live.ca> | 2017-10-21 21:30:39 +0000 |
commit | 0cb0796f8b15e9834c06cbc326c372f2394d5d35 (patch) | |
tree | 34fddf623f2ba9faa2725b92768fedd17fbc8c84 | |
parent | 255b684e3b12d9554ef2d1a609fd94469fb8d6cd (diff) | |
download | ceilometer-0cb0796f8b15e9834c06cbc326c372f2394d5d35.tar.gz |
devstack: install Gnocchi using pip
change to continue testing 3.1.x
- use file instead of redis since it don't exist
- steal uwsgi setup from devstack master
and Migrate to Zuul v3
Migrate all functional jobs and gate to zuul v3.
We will have to migrate all other legacy jobs too later.
This patch do step 1 in the docs: Move Legacy Jobs to Projects.
diff:
- do not port elasticsearch check
- remove jobs unrelated to branch
- cleanup telemetry-integration gate
Change-Id: Idf49c523c1d0632e8d095e4804817e7b5e772902
(cherry picked from commit cc7950c86fed77e3395504530ac5dd116b4b4e5b)
Change-Id: I55193f2e39a41fe2bb378b4380f2ae52c5685c8d
(cherry picked from commit 898117902437cded9d8150ffa42869a02e3765d8)
19 files changed, 1272 insertions, 19 deletions
diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 00000000..7b67ff23 --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,123 @@ +- job: + name: ceilometer-dsvm-tempest-plugin-mongodb + parent: legacy-dsvm-base + run: playbooks/legacy/ceilometer-dsvm-tempest-plugin-mongodb/run + post-run: playbooks/legacy/ceilometer-dsvm-tempest-plugin-mongodb/post + timeout: 7800 + required-projects: + - openstack-infra/devstack-gate + - openstack/ceilometer + - openstack/tempest + +- job: + name: ceilometer-dsvm-tempest-plugin-mongodb-identity-v3-only + parent: legacy-dsvm-base + run: playbooks/legacy/ceilometer-dsvm-tempest-plugin-mongodb-identity-v3-only/run + post-run: playbooks/legacy/ceilometer-dsvm-tempest-plugin-mongodb-identity-v3-only/post + timeout: 7800 + required-projects: + - openstack-infra/devstack-gate + - openstack/ceilometer + - openstack/tempest + +- job: + name: ceilometer-dsvm-tempest-plugin-mysql + parent: legacy-dsvm-base + run: playbooks/legacy/ceilometer-dsvm-tempest-plugin-mysql/run + post-run: playbooks/legacy/ceilometer-dsvm-tempest-plugin-mysql/post + timeout: 7800 + required-projects: + - openstack-infra/devstack-gate + - openstack/ceilometer + - openstack/tempest + +- job: + name: ceilometer-tox-py27-mongodb + parent: legacy-base + run: playbooks/legacy/ceilometer-tox-py27-mongodb/run + post-run: playbooks/legacy/ceilometer-tox-py27-mongodb/post + timeout: 2400 + required-projects: + - openstack/requirements + +- job: + name: ceilometer-tox-py27-mysql + parent: legacy-base + run: playbooks/legacy/ceilometer-tox-py27-mysql/run + post-run: playbooks/legacy/ceilometer-tox-py27-mysql/post + timeout: 2400 + required-projects: + - openstack/requirements + +- job: + name: ceilometer-tox-py27-postgresql + parent: legacy-base + run: playbooks/legacy/ceilometer-tox-py27-postgresql/run + post-run: playbooks/legacy/ceilometer-tox-py27-postgresql/post + timeout: 2400 + required-projects: + - openstack/requirements + +- job: + name: grenade-dsvm-ceilometer + parent: legacy-dsvm-base + run: playbooks/legacy/grenade-dsvm-ceilometer/run + post-run: playbooks/legacy/grenade-dsvm-ceilometer/post + timeout: 10800 + required-projects: + - openstack-dev/grenade + - openstack-infra/devstack-gate + - openstack/ceilometer + +- job: + name: telemetry-dsvm-integration-ceilometer + parent: legacy-dsvm-base + run: playbooks/legacy/telemetry-dsvm-integration-ceilometer/run + post-run: playbooks/legacy/telemetry-dsvm-integration-ceilometer/post + timeout: 7800 + required-projects: + - openstack-infra/devstack-gate + - openstack/aodh + - openstack/ceilometer + - openstack/panko + # following are required when DEVSTACK_GATE_HEAT, which this + # job turns on + - openstack/dib-utils + - openstack/diskimage-builder + +- project: + name: openstack/ceilometer + check: + jobs: + - ceilometer-dsvm-tempest-plugin-mongodb + - ceilometer-dsvm-tempest-plugin-mysql + - ceilometer-tox-py27-mongodb: + branches: ^(?!stable/newton) + - ceilometer-tox-py27-mysql: + branches: ^(?!stable/newton) + - ceilometer-tox-py27-postgresql: + branches: ^(?!stable/newton) + - grenade-dsvm-ceilometer: + branches: ^(?!stable/newton).*$ + irrelevant-files: + - ^(test-|)requirements.txt$ + - ^setup.cfg$ + - telemetry-dsvm-integration-ceilometer + - ceilometer-dsvm-tempest-plugin-mongodb-identity-v3-only + gate: + jobs: + - ceilometer-dsvm-tempest-plugin-mongodb + - ceilometer-dsvm-tempest-plugin-mysql + - ceilometer-tox-py27-mongodb: + branches: ^(?!stable/newton) + - ceilometer-tox-py27-mysql: + branches: ^(?!stable/newton) + - ceilometer-tox-py27-postgresql: + branches: ^(?!stable/newton) + - grenade-dsvm-ceilometer: + branches: ^(?!stable/newton).*$ + irrelevant-files: + - ^(test-|)requirements.txt$ + - ^setup.cfg$ + - telemetry-dsvm-integration-ceilometer + - ceilometer-dsvm-tempest-plugin-mongodb-identity-v3-only diff --git a/devstack/plugin.sh b/devstack/plugin.sh index dbeb60c1..a3a82efb 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -62,6 +62,10 @@ function ceilometer_service_url { } +function gnocchi_service_url { + echo "$GNOCCHI_SERVICE_PROTOCOL://$GNOCCHI_SERVICE_HOST:$GNOCCHI_SERVICE_PORT" +} + # _ceilometer_install_mongdb - Install mongodb and python lib. function _ceilometer_install_mongodb { # Server package is the same on all @@ -127,7 +131,7 @@ function _ceilometer_config_apache_wsgi { function _ceilometer_prepare_coordination { if echo $CEILOMETER_COORDINATION_URL | grep -q '^memcached:'; then install_package memcached - elif [[ "${CEILOMETER_COORDINATOR_URL%%:*}" == "redis" || "${CEILOMETER_CACHE_BACKEND##*.}" == "redis" ]]; then + elif [[ "${CEILOMETER_COORDINATOR_URL%%:*}" == "redis" || "${CEILOMETER_CACHE_BACKEND##*.}" == "redis" || "${CEILOMETER_BACKEND}" == "gnocchi" ]]; then _ceilometer_install_redis fi } @@ -179,9 +183,76 @@ function ceilometer_create_accounts { get_or_add_user_project_role "ResellerAdmin" "ceilometer" $SERVICE_PROJECT_NAME fi + if [ "$CEILOMETER_BACKEND" == "gnocchi" ]; then + create_service_user "gnocchi" + local gnocchi_service=$(get_or_create_service "gnocchi" \ + "metric" "OpenStack Metric Service") + get_or_create_endpoint $gnocchi_service \ + "$REGION_NAME" \ + "$(gnocchi_service_url)" \ + "$(gnocchi_service_url)" \ + "$(gnocchi_service_url)" + fi export OS_CLOUD=$OLD_OS_CLOUD } + +function install_gnocchi { + echo_summary "Installing Gnocchi" + pip_install "gnocchi[file,${DATABASE_TYPE},keystone]>=3.1,<4.0" + recreate_database gnocchi + sudo install -d -o $STACK_USER -m 755 $GNOCCHI_CONF_DIR + + [ ! -d $GNOCCHI_DATA_DIR ] && sudo mkdir -m 755 -p $GNOCCHI_DATA_DIR + sudo chown $STACK_USER $GNOCCHI_DATA_DIR + + if [ -n "$GNOCCHI_COORDINATOR_URL" ]; then + iniset $GNOCCHI_CONF storage coordination_url "$GNOCCHI_COORDINATOR_URL" + fi + iniset $GNOCCHI_CONF DEFAULT debug "$ENABLE_DEBUG_LOG_LEVEL" + iniset $GNOCCHI_CONF indexer url `database_connection_url gnocchi` + iniset $GNOCCHI_CONF storage driver file + iniset $GNOCCHI_CONF storage file_basepath $GNOCCHI_DATA_DIR/ + iniset $GNOCCHI_CONF metricd metric_processing_delay "$GNOCCHI_METRICD_PROCESSING_DELAY" + + iniset $GNOCCHI_CONF api auth_mode keystone + configure_auth_token_middleware $GNOCCHI_CONF gnocchi $GNOCCHI_AUTH_CACHE_DIR + + sudo mkdir -p $GNOCCHI_AUTH_CACHE_DIR + sudo chown $STACK_USER $GNOCCHI_AUTH_CACHE_DIR + rm -f $GNOCCHI_AUTH_CACHE_DIR/* + + gnocchi-upgrade --create-legacy-resource-types + + # cleanup + sudo rm -f $GNOCCHI_WSGI_DIR/*.wsgi + sudo rm -f $(apache_site_config_for gnocchi) + + sudo mkdir -p $GNOCCHI_WSGI_DIR + + local gnocchi_apache_conf=$(apache_site_config_for gnocchi) + local venv_path="" + local script_name=$GNOCCHI_SERVICE_PREFIX + + echo "from gnocchi.rest import app" | sudo tee -a $GNOCCHI_WSGI_DIR/app + echo "application = app.build_wsgi_app()" | sudo tee -a $GNOCCHI_WSGI_DIR/app + + sudo cp $CEILOMETER_DIR/devstack/apache-ceilometer.template $gnocchi_apache_conf + sudo sed -e " + s|ceilometer-api|gnocchi|g; + s|ceilometer|gnocchi|g; + s|%PORT%|$GNOCCHI_SERVICE_PORT|g; + s|%APACHE_NAME%|$APACHE_NAME|g; + s|%WSGIAPP%|$GNOCCHI_WSGI_DIR/app|g; + s|%USER%|$STACK_USER|g; + s|%VIRTUALENV%|$venv_path|g + " -i $gnocchi_apache_conf + + if [ -n "$GNOCCHI_COORDINATOR_URL" ]; then + iniset $GNOCCHI_CONF storage coordination_url "$GNOCCHI_COORDINATOR_URL" + fi +} + # Activities to do before ceilometer has been installed. function preinstall_ceilometer { echo_summary "Preinstall not in virtualenv context. Skipping." @@ -364,11 +435,6 @@ function init_ceilometer { $CEILOMETER_BIN_DIR/ceilometer-upgrade --skip-gnocchi-resource-types fi fi - if is_service_enabled gnocchi ; then - if [ "$CEILOMETER_BACKEND" = 'gnocchi' ]; then - $CEILOMETER_BIN_DIR/ceilometer-upgrade --skip-metering-database - fi - fi fi } @@ -378,10 +444,12 @@ function init_ceilometer { # installed. The context is not active during preinstall (when it would # otherwise makes sense to do the backend services). function install_ceilometer { - if is_service_enabled ceilometer-acentral ceilometer-acompute ceilometer-anotification ; then + if is_service_enabled ceilometer-acentral ceilometer-acompute ceilometer-anotification gnocchi-api gnocchi-metricd; then _ceilometer_prepare_coordination fi + [ "$CEILOMETER_BACKEND" = 'gnocchi' ] && install_gnocchi + if is_service_enabled ceilometer-collector ceilometer-api; then _ceilometer_prepare_storage_backend fi @@ -408,6 +476,21 @@ function install_ceilometerclient { # start_ceilometer() - Start running processes, including screen function start_ceilometer { + + if [ "$CEILOMETER_BACKEND" = "gnocchi" ] ; then + enable_apache_site gnocchi + restart_apache_server + tail_log gnocchi /var/log/$APACHE_NAME/gnocchi.log + tail_log gnocchi-api /var/log/$APACHE_NAME/gnocchi-access.log + echo "Waiting for gnocchi-api to start..." + if ! timeout $SERVICE_TIMEOUT sh -c "while ! curl -v --max-time 5 --noproxy '*' -s $(gnocchi_service_url)/v1/resource/generic ; do sleep 1; done"; then + die $LINENO "gnocchi-api did not start" + fi + + run_process gnocchi-metricd "/usr/local/bin/gnocchi-metricd --config-file $GNOCCHI_CONF" + $CEILOMETER_BIN_DIR/ceilometer-upgrade --skip-metering-database + fi + run_process ceilometer-acentral "$CEILOMETER_BIN_DIR/ceilometer-polling --polling-namespaces central --config-file $CEILOMETER_CONF" run_process ceilometer-anotification "$CEILOMETER_BIN_DIR/ceilometer-agent-notification --config-file $CEILOMETER_CONF" run_process ceilometer-aipmi "$CEILOMETER_BIN_DIR/ceilometer-polling --polling-namespaces ipmi --config-file $CEILOMETER_CONF" diff --git a/devstack/settings b/devstack/settings index d8ad97d5..5391230f 100644 --- a/devstack/settings +++ b/devstack/settings @@ -17,10 +17,23 @@ CEILOMETER_WSGI_DIR=${CEILOMETER_WSGI_DIR:-/var/www/ceilometer} CEILOMETER_BACKEND=${CEILOMETER_BACKEND:-none} if [ "$CEILOMETER_BACKEND" = "es" ] || [ "$CEILOMETER_BACKEND" = "mysql" ] || [ "$CEILOMETER_BACKEND" = "postgresql" ] || [ "$CEILOMETER_BACKEND" = "mongodb" ]; then enable_service ceilometer-api +elif [ "$CEILOMETER_BACKEND" = "gnocchi" ]; then + enable_service gnocchi-api gnocchi-metricd fi # Gnocchi default archive_policy for Ceilometer GNOCCHI_ARCHIVE_POLICY=${GNOCCHI_ARCHIVE_POLICY:-low} +GNOCCHI_CONF_DIR=${GNOCCHI_CONF_DIR:-/etc/gnocchi} +GNOCCHI_CONF=${GNOCCHI_CONF:-${GNOCCHI_CONF_DIR}/gnocchi.conf} +GNOCCHI_COORDINATOR_URL=${CEILOMETER_COORDINATOR_URL:-redis://localhost:6379} +GNOCCHI_METRICD_PROCESSING_DELAY=${GNOCCHI_METRICD_PROCESSING_DELAY:-5} +GNOCCHI_AUTH_CACHE_DIR=${GNOCCHI_AUTH_CACHE_DIR:-/var/cache/gnocchi} +GNOCCHI_DATA_DIR=${GNOCCHI_DATA_DIR:-${DATA_DIR}/gnocchi} + +GNOCCHI_SERVICE_PROTOCOL=http +GNOCCHI_SERVICE_HOST=${GNOCCHI_SERVICE_HOST:-${SERVICE_HOST}} +GNOCCHI_SERVICE_PORT=${GNOCCHI_SERVICE_PORT:-8041} +GNOCCHI_WSGI_DIR=${GNOCCHI_WSGI_DIR:-/var/www/gnocchi} # Ceilometer connection info. CEILOMETER_SERVICE_PROTOCOL=http @@ -55,18 +68,6 @@ function _ceilometer_check_for_storage { local plugins="${DEVSTACK_PLUGINS}" local plugin - if [ "$CEILOMETER_BACKEND" == 'gnocchi' ]; then - local seen_gnocchi=False - - for plugin in ${plugins//,/ }; do - if [ "$plugin" == 'gnocchi' ]; then - seen_gnocchi=True - elif [ "$plugin" == 'ceilometer' ] && [ "$seen_gnocchi" == 'False' ]; then - die $LINENO "gnocchi must be enabled before ceilometer!" - fi - done - fi - local seen_ceilometer=False for plugin in ${plugins//,/ }; do diff --git a/playbooks/legacy/ceilometer-dsvm-tempest-plugin-mongodb-identity-v3-only/post.yaml b/playbooks/legacy/ceilometer-dsvm-tempest-plugin-mongodb-identity-v3-only/post.yaml new file mode 100644 index 00000000..dac87534 --- /dev/null +++ b/playbooks/legacy/ceilometer-dsvm-tempest-plugin-mongodb-identity-v3-only/post.yaml @@ -0,0 +1,80 @@ +- hosts: primary + tasks: + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*nose_results.html + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*testr_results.html.gz + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/.testrepository/tmp* + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*testrepository.subunit.gz + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}/tox' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/.tox/*/log/* + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/logs/** + - --include=*/ + - --exclude=* + - --prune-empty-dirs diff --git a/playbooks/legacy/ceilometer-dsvm-tempest-plugin-mongodb-identity-v3-only/run.yaml b/playbooks/legacy/ceilometer-dsvm-tempest-plugin-mongodb-identity-v3-only/run.yaml new file mode 100644 index 00000000..36f31640 --- /dev/null +++ b/playbooks/legacy/ceilometer-dsvm-tempest-plugin-mongodb-identity-v3-only/run.yaml @@ -0,0 +1,51 @@ +- hosts: all + name: Autoconverted job legacy-ceilometer-dsvm-tempest-plugin-mongodb-identity-v3-only + from old job gate-ceilometer-dsvm-tempest-plugin-mongodb-identity-v3-only-ubuntu-xenial + tasks: + + - name: Ensure legacy workspace directory + file: + path: '{{ ansible_user_dir }}/workspace' + state: directory + + - shell: + cmd: | + set -e + set -x + cat > clonemap.yaml << EOF + clonemap: + - name: openstack-infra/devstack-gate + dest: devstack-gate + EOF + /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \ + git://git.openstack.org \ + openstack-infra/devstack-gate + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -e + set -x + export PYTHONUNBUFFERED=true + export DEVSTACK_GATE_TEMPEST=1 + export DEVSTACK_GATE_TEMPEST_REGEX="^ceilometer\." + export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1 + export DEVSTACK_GATE_CEILOMETER_BACKEND=mongodb + export DEVSTACK_LOCAL_CONFIG="enable_plugin ceilometer git://git.openstack.org/openstack/ceilometer" + export BRANCH_OVERRIDE=default + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + if [ "mongodb" = "postgresql" ] ; then + export DEVSTACK_GATE_POSTGRES=1 + fi + if [ "-identity-v3-only" == "-identity-v3-only" ] ; then + export DEVSTACK_LOCAL_CONFIG+=$'\n'"ENABLE_IDENTITY_V2=False" + fi + cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh + ./safe-devstack-vm-gate-wrap.sh + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' diff --git a/playbooks/legacy/ceilometer-dsvm-tempest-plugin-mongodb/post.yaml b/playbooks/legacy/ceilometer-dsvm-tempest-plugin-mongodb/post.yaml new file mode 100644 index 00000000..dac87534 --- /dev/null +++ b/playbooks/legacy/ceilometer-dsvm-tempest-plugin-mongodb/post.yaml @@ -0,0 +1,80 @@ +- hosts: primary + tasks: + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*nose_results.html + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*testr_results.html.gz + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/.testrepository/tmp* + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*testrepository.subunit.gz + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}/tox' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/.tox/*/log/* + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/logs/** + - --include=*/ + - --exclude=* + - --prune-empty-dirs diff --git a/playbooks/legacy/ceilometer-dsvm-tempest-plugin-mongodb/run.yaml b/playbooks/legacy/ceilometer-dsvm-tempest-plugin-mongodb/run.yaml new file mode 100644 index 00000000..3d0030ee --- /dev/null +++ b/playbooks/legacy/ceilometer-dsvm-tempest-plugin-mongodb/run.yaml @@ -0,0 +1,51 @@ +- hosts: all + name: Autoconverted job legacy-ceilometer-dsvm-tempest-plugin-mongodb from old job + gate-ceilometer-dsvm-tempest-plugin-mongodb-ubuntu-xenial + tasks: + + - name: Ensure legacy workspace directory + file: + path: '{{ ansible_user_dir }}/workspace' + state: directory + + - shell: + cmd: | + set -e + set -x + cat > clonemap.yaml << EOF + clonemap: + - name: openstack-infra/devstack-gate + dest: devstack-gate + EOF + /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \ + git://git.openstack.org \ + openstack-infra/devstack-gate + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -e + set -x + export PYTHONUNBUFFERED=true + export DEVSTACK_GATE_TEMPEST=1 + export DEVSTACK_GATE_TEMPEST_REGEX="^ceilometer\." + export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1 + export DEVSTACK_GATE_CEILOMETER_BACKEND=mongodb + export DEVSTACK_LOCAL_CONFIG="enable_plugin ceilometer git://git.openstack.org/openstack/ceilometer" + export BRANCH_OVERRIDE=default + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + if [ "mongodb" = "postgresql" ] ; then + export DEVSTACK_GATE_POSTGRES=1 + fi + if [ "" == "-identity-v3-only" ] ; then + export DEVSTACK_LOCAL_CONFIG+=$'\n'"ENABLE_IDENTITY_V2=False" + fi + cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh + ./safe-devstack-vm-gate-wrap.sh + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' diff --git a/playbooks/legacy/ceilometer-dsvm-tempest-plugin-mysql/post.yaml b/playbooks/legacy/ceilometer-dsvm-tempest-plugin-mysql/post.yaml new file mode 100644 index 00000000..dac87534 --- /dev/null +++ b/playbooks/legacy/ceilometer-dsvm-tempest-plugin-mysql/post.yaml @@ -0,0 +1,80 @@ +- hosts: primary + tasks: + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*nose_results.html + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*testr_results.html.gz + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/.testrepository/tmp* + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*testrepository.subunit.gz + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}/tox' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/.tox/*/log/* + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/logs/** + - --include=*/ + - --exclude=* + - --prune-empty-dirs diff --git a/playbooks/legacy/ceilometer-dsvm-tempest-plugin-mysql/run.yaml b/playbooks/legacy/ceilometer-dsvm-tempest-plugin-mysql/run.yaml new file mode 100644 index 00000000..9433c9a7 --- /dev/null +++ b/playbooks/legacy/ceilometer-dsvm-tempest-plugin-mysql/run.yaml @@ -0,0 +1,51 @@ +- hosts: all + name: Autoconverted job legacy-ceilometer-dsvm-tempest-plugin-mysql from old job + gate-ceilometer-dsvm-tempest-plugin-mysql-ubuntu-xenial + tasks: + + - name: Ensure legacy workspace directory + file: + path: '{{ ansible_user_dir }}/workspace' + state: directory + + - shell: + cmd: | + set -e + set -x + cat > clonemap.yaml << EOF + clonemap: + - name: openstack-infra/devstack-gate + dest: devstack-gate + EOF + /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \ + git://git.openstack.org \ + openstack-infra/devstack-gate + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -e + set -x + export PYTHONUNBUFFERED=true + export DEVSTACK_GATE_TEMPEST=1 + export DEVSTACK_GATE_TEMPEST_REGEX="^ceilometer\." + export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1 + export DEVSTACK_GATE_CEILOMETER_BACKEND=mysql + export DEVSTACK_LOCAL_CONFIG="enable_plugin ceilometer git://git.openstack.org/openstack/ceilometer" + export BRANCH_OVERRIDE=default + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + if [ "mysql" = "postgresql" ] ; then + export DEVSTACK_GATE_POSTGRES=1 + fi + if [ "" == "-identity-v3-only" ] ; then + export DEVSTACK_LOCAL_CONFIG+=$'\n'"ENABLE_IDENTITY_V2=False" + fi + cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh + ./safe-devstack-vm-gate-wrap.sh + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' diff --git a/playbooks/legacy/ceilometer-tox-py27-mongodb/post.yaml b/playbooks/legacy/ceilometer-tox-py27-mongodb/post.yaml new file mode 100644 index 00000000..68fbdf81 --- /dev/null +++ b/playbooks/legacy/ceilometer-tox-py27-mongodb/post.yaml @@ -0,0 +1,67 @@ +- hosts: primary + tasks: + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*nose_results.html + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*testr_results.html.gz + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/.testrepository/tmp* + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*testrepository.subunit.gz + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}/tox' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/.tox/*/log/* + - --include=*/ + - --exclude=* + - --prune-empty-dirs diff --git a/playbooks/legacy/ceilometer-tox-py27-mongodb/run.yaml b/playbooks/legacy/ceilometer-tox-py27-mongodb/run.yaml new file mode 100644 index 00000000..42391ed7 --- /dev/null +++ b/playbooks/legacy/ceilometer-tox-py27-mongodb/run.yaml @@ -0,0 +1,86 @@ +- hosts: all + name: Autoconverted job legacy-ceilometer-tox-py27-mongodb from old job gate-ceilometer-tox-py27-mongodb-ubuntu-xenial + tasks: + + - name: Ensure legacy workspace directory + file: + path: '{{ ansible_user_dir }}/workspace' + state: directory + + - shell: + cmd: | + set -e + set -x + CLONEMAP=`mktemp` + REQS_DIR=`mktemp -d` + function cleanup { + mkdir -p $WORKSPACE + rm -rf $CLONEMAP $REQS_DIR + } + trap cleanup EXIT + cat > $CLONEMAP << EOF + clonemap: + - name: $ZUUL_PROJECT + dest: . + EOF + # zuul cloner works poorly if there are 2 names that are the + # same in here. + if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then + cat >> $CLONEMAP << EOF + - name: openstack/requirements + dest: $REQS_DIR + EOF + fi + /usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \ + git://git.openstack.org $ZUUL_PROJECT openstack/requirements + # REQS_DIR is not set for openstack/requirements and there is also + # no need to copy in this case. + if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then + cp $REQS_DIR/upper-constraints.txt ./ + fi + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: /usr/local/jenkins/slave_scripts/install-distro-packages.sh + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + if [ -x tools/test-setup.sh ] ; then + tools/test-setup.sh + fi + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -x + sudo rm -f /etc/sudoers.d/zuul + # Prove that general sudo access is actually revoked + ! sudo -n true + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: /usr/local/jenkins/slave_scripts/run-tox.sh py27-mongodb + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + OUT=`git ls-files --other --exclude-standard --directory` + if [ -z "$OUT" ]; then + echo "No extra files created during test." + exit 0 + else + echo "The following un-ignored files were created during the test:" + echo "$OUT" + exit 0 # TODO: change to 1 to fail tests. + fi + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' diff --git a/playbooks/legacy/ceilometer-tox-py27-mysql/post.yaml b/playbooks/legacy/ceilometer-tox-py27-mysql/post.yaml new file mode 100644 index 00000000..68fbdf81 --- /dev/null +++ b/playbooks/legacy/ceilometer-tox-py27-mysql/post.yaml @@ -0,0 +1,67 @@ +- hosts: primary + tasks: + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*nose_results.html + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*testr_results.html.gz + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/.testrepository/tmp* + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*testrepository.subunit.gz + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}/tox' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/.tox/*/log/* + - --include=*/ + - --exclude=* + - --prune-empty-dirs diff --git a/playbooks/legacy/ceilometer-tox-py27-mysql/run.yaml b/playbooks/legacy/ceilometer-tox-py27-mysql/run.yaml new file mode 100644 index 00000000..181119fb --- /dev/null +++ b/playbooks/legacy/ceilometer-tox-py27-mysql/run.yaml @@ -0,0 +1,86 @@ +- hosts: all + name: Autoconverted job legacy-ceilometer-tox-py27-mysql from old job gate-ceilometer-tox-py27-mysql-ubuntu-xenial + tasks: + + - name: Ensure legacy workspace directory + file: + path: '{{ ansible_user_dir }}/workspace' + state: directory + + - shell: + cmd: | + set -e + set -x + CLONEMAP=`mktemp` + REQS_DIR=`mktemp -d` + function cleanup { + mkdir -p $WORKSPACE + rm -rf $CLONEMAP $REQS_DIR + } + trap cleanup EXIT + cat > $CLONEMAP << EOF + clonemap: + - name: $ZUUL_PROJECT + dest: . + EOF + # zuul cloner works poorly if there are 2 names that are the + # same in here. + if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then + cat >> $CLONEMAP << EOF + - name: openstack/requirements + dest: $REQS_DIR + EOF + fi + /usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \ + git://git.openstack.org $ZUUL_PROJECT openstack/requirements + # REQS_DIR is not set for openstack/requirements and there is also + # no need to copy in this case. + if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then + cp $REQS_DIR/upper-constraints.txt ./ + fi + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: /usr/local/jenkins/slave_scripts/install-distro-packages.sh + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + if [ -x tools/test-setup.sh ] ; then + tools/test-setup.sh + fi + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -x + sudo rm -f /etc/sudoers.d/zuul + # Prove that general sudo access is actually revoked + ! sudo -n true + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: /usr/local/jenkins/slave_scripts/run-tox.sh py27-mysql + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + OUT=`git ls-files --other --exclude-standard --directory` + if [ -z "$OUT" ]; then + echo "No extra files created during test." + exit 0 + else + echo "The following un-ignored files were created during the test:" + echo "$OUT" + exit 0 # TODO: change to 1 to fail tests. + fi + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' diff --git a/playbooks/legacy/ceilometer-tox-py27-postgresql/post.yaml b/playbooks/legacy/ceilometer-tox-py27-postgresql/post.yaml new file mode 100644 index 00000000..68fbdf81 --- /dev/null +++ b/playbooks/legacy/ceilometer-tox-py27-postgresql/post.yaml @@ -0,0 +1,67 @@ +- hosts: primary + tasks: + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*nose_results.html + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*testr_results.html.gz + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/.testrepository/tmp* + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*testrepository.subunit.gz + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}/tox' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/.tox/*/log/* + - --include=*/ + - --exclude=* + - --prune-empty-dirs diff --git a/playbooks/legacy/ceilometer-tox-py27-postgresql/run.yaml b/playbooks/legacy/ceilometer-tox-py27-postgresql/run.yaml new file mode 100644 index 00000000..69b20fd7 --- /dev/null +++ b/playbooks/legacy/ceilometer-tox-py27-postgresql/run.yaml @@ -0,0 +1,86 @@ +- hosts: all + name: Autoconverted job legacy-ceilometer-tox-py27-postgresql from old job gate-ceilometer-tox-py27-postgresql-ubuntu-xenial + tasks: + + - name: Ensure legacy workspace directory + file: + path: '{{ ansible_user_dir }}/workspace' + state: directory + + - shell: + cmd: | + set -e + set -x + CLONEMAP=`mktemp` + REQS_DIR=`mktemp -d` + function cleanup { + mkdir -p $WORKSPACE + rm -rf $CLONEMAP $REQS_DIR + } + trap cleanup EXIT + cat > $CLONEMAP << EOF + clonemap: + - name: $ZUUL_PROJECT + dest: . + EOF + # zuul cloner works poorly if there are 2 names that are the + # same in here. + if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then + cat >> $CLONEMAP << EOF + - name: openstack/requirements + dest: $REQS_DIR + EOF + fi + /usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \ + git://git.openstack.org $ZUUL_PROJECT openstack/requirements + # REQS_DIR is not set for openstack/requirements and there is also + # no need to copy in this case. + if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then + cp $REQS_DIR/upper-constraints.txt ./ + fi + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: /usr/local/jenkins/slave_scripts/install-distro-packages.sh + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + if [ -x tools/test-setup.sh ] ; then + tools/test-setup.sh + fi + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -x + sudo rm -f /etc/sudoers.d/zuul + # Prove that general sudo access is actually revoked + ! sudo -n true + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: /usr/local/jenkins/slave_scripts/run-tox.sh py27-postgresql + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + OUT=`git ls-files --other --exclude-standard --directory` + if [ -z "$OUT" ]; then + echo "No extra files created during test." + exit 0 + else + echo "The following un-ignored files were created during the test:" + echo "$OUT" + exit 0 # TODO: change to 1 to fail tests. + fi + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' diff --git a/playbooks/legacy/grenade-dsvm-ceilometer/post.yaml b/playbooks/legacy/grenade-dsvm-ceilometer/post.yaml new file mode 100644 index 00000000..e07f5510 --- /dev/null +++ b/playbooks/legacy/grenade-dsvm-ceilometer/post.yaml @@ -0,0 +1,15 @@ +- hosts: primary + tasks: + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/logs/** + - --include=*/ + - --exclude=* + - --prune-empty-dirs diff --git a/playbooks/legacy/grenade-dsvm-ceilometer/run.yaml b/playbooks/legacy/grenade-dsvm-ceilometer/run.yaml new file mode 100644 index 00000000..e513564c --- /dev/null +++ b/playbooks/legacy/grenade-dsvm-ceilometer/run.yaml @@ -0,0 +1,43 @@ +- hosts: all + name: Autoconverted job legacy-grenade-dsvm-ceilometer from old job gate-grenade-dsvm-ceilometer-ubuntu-xenial + tasks: + + - name: Ensure legacy workspace directory + file: + path: '{{ ansible_user_dir }}/workspace' + state: directory + + - shell: + cmd: | + set -e + set -x + cat > clonemap.yaml << EOF + clonemap: + - name: openstack-infra/devstack-gate + dest: devstack-gate + EOF + /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \ + git://git.openstack.org \ + openstack-infra/devstack-gate + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -e + set -x + export PROJECTS="openstack-dev/grenade $PROJECTS" + export PYTHONUNBUFFERED=true + export DEVSTACK_GATE_TEMPEST=1 + export DEVSTACK_GATE_GRENADE=pullup + export BRANCH_OVERRIDE=default + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + export GRENADE_PLUGINRC="enable_grenade_plugin ceilometer https://git.openstack.org/openstack/ceilometer" + cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh + ./safe-devstack-vm-gate-wrap.sh + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' diff --git a/playbooks/legacy/telemetry-dsvm-integration-ceilometer/post.yaml b/playbooks/legacy/telemetry-dsvm-integration-ceilometer/post.yaml new file mode 100644 index 00000000..dac87534 --- /dev/null +++ b/playbooks/legacy/telemetry-dsvm-integration-ceilometer/post.yaml @@ -0,0 +1,80 @@ +- hosts: primary + tasks: + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*nose_results.html + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*testr_results.html.gz + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/.testrepository/tmp* + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=**/*testrepository.subunit.gz + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}/tox' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/.tox/*/log/* + - --include=*/ + - --exclude=* + - --prune-empty-dirs + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/logs/** + - --include=*/ + - --exclude=* + - --prune-empty-dirs diff --git a/playbooks/legacy/telemetry-dsvm-integration-ceilometer/run.yaml b/playbooks/legacy/telemetry-dsvm-integration-ceilometer/run.yaml new file mode 100644 index 00000000..41afd103 --- /dev/null +++ b/playbooks/legacy/telemetry-dsvm-integration-ceilometer/run.yaml @@ -0,0 +1,56 @@ +- hosts: all + name: Autoconverted job legacy-telemetry-dsvm-integration-ceilometer from old job + gate-telemetry-dsvm-integration-ceilometer-ubuntu-xenial + tasks: + + - name: Ensure legacy workspace directory + file: + path: '{{ ansible_user_dir }}/workspace' + state: directory + + - shell: + cmd: | + set -e + set -x + cat > clonemap.yaml << EOF + clonemap: + - name: openstack-infra/devstack-gate + dest: devstack-gate + EOF + /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \ + git://git.openstack.org \ + openstack-infra/devstack-gate + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -e + set -x + export PYTHONUNBUFFERED=true + export DEVSTACK_GATE_HEAT=1 + export DEVSTACK_GATE_NEUTRON=1 + export DEVSTACK_GATE_TEMPEST=1 + export DEVSTACK_GATE_EXERCISES=0 + export DEVSTACK_GATE_INSTALL_TESTONLY=1 + export DEVSTACK_GATE_TEMPEST_NOTESTS=1 + export PROJECTS="openstack/ceilometer openstack/aodh openstack/panko" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin panko git://git.openstack.org/openstack/panko" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin ceilometer git://git.openstack.org/openstack/ceilometer" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin aodh git://git.openstack.org/openstack/aodh" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin heat git://git.openstack.org/openstack/heat" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"CEILOMETER_BACKEND=gnocchi" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"GNOCCHI_ARCHIVE_POLICY=high" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"CEILOMETER_PIPELINE_INTERVAL=15" + export DEVSTACK_PROJECT_FROM_GIT=$ZUUL_SHORT_PROJECT_NAME + function post_test_hook { + cd /opt/stack/new/ceilometer/ceilometer/tests/integration/hooks/ + ./post_test_hook.sh + } + export -f post_test_hook + cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh + ./safe-devstack-vm-gate-wrap.sh + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' |