Gate fixes for Shipyard
* Install older version of pip<21.0 for ubuntu_xenial images * Install setuptools via pip for ubuntu_xenial images * Pin typing-extensions to 3.7.2 and apache-airflow to 1.10.5 * Move promenade Dependencies under UCP components in requirements.txt * With apache-airflow=1.10.5, strip ANSI escape sequences in test_deployment_group_manager.py * Update tox.ini to support apache-airflow=1.10.5 * airskiff gate fixes - Pin treasuremap to v1.9 branch - Pin openstack-helm-infra to master - Remove openstack client setup as it's not used Change-Id: Iee4ce59fdceacb165120a69d11c44e6e47feaea8
This commit is contained in:
parent
35e5a7f796
commit
00200ef98d
@ -126,6 +126,7 @@
|
|||||||
- airship/treasuremap
|
- airship/treasuremap
|
||||||
vars:
|
vars:
|
||||||
CLONE_SHIPYARD: false
|
CLONE_SHIPYARD: false
|
||||||
|
HTK_COMMIT: master
|
||||||
irrelevant-files: &irrelevant-files
|
irrelevant-files: &irrelevant-files
|
||||||
- ^.*\.rst$
|
- ^.*\.rst$
|
||||||
- ^doc/.*$
|
- ^doc/.*$
|
||||||
|
@ -69,13 +69,13 @@ RUN set -ex && \
|
|||||||
netcat \
|
netcat \
|
||||||
netbase \
|
netbase \
|
||||||
python3 \
|
python3 \
|
||||||
python3-setuptools \
|
|
||||||
python3-pip \
|
python3-pip \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
python3-dateutil \
|
python3-dateutil \
|
||||||
make \
|
make \
|
||||||
--no-install-recommends \
|
--no-install-recommends \
|
||||||
&& python3 -m pip install -U pip \
|
&& python3 -m pip install -U 'pip<21.0' \
|
||||||
|
&& python3 -m pip install -U setuptools \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf \
|
&& rm -rf \
|
||||||
/var/lib/apt/lists/* \
|
/var/lib/apt/lists/* \
|
||||||
|
@ -46,7 +46,6 @@ RUN set -ex && \
|
|||||||
make \
|
make \
|
||||||
netbase \
|
netbase \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
python3-setuptools \
|
|
||||||
--no-install-recommends \
|
--no-install-recommends \
|
||||||
&& apt-get autoremove -yqq --purge \
|
&& apt-get autoremove -yqq --purge \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
@ -101,7 +100,8 @@ COPY ${ctx_base}/shipyard_airflow /home/shipyard/shipyard/
|
|||||||
' \
|
' \
|
||||||
&& apt-get -qq update \
|
&& apt-get -qq update \
|
||||||
&& apt-get -y install -y $buildDeps --no-install-recommends \
|
&& apt-get -y install -y $buildDeps --no-install-recommends \
|
||||||
&& python3 -m pip install -U pip \
|
&& python3 -m pip install -U 'pip<21.0' \
|
||||||
|
&& python3 -m pip install -U setuptools \
|
||||||
&& pip3 install -r /home/shipyard/client_requirements.txt --no-cache-dir \
|
&& pip3 install -r /home/shipyard/client_requirements.txt --no-cache-dir \
|
||||||
&& cd /home/shipyard/shipyard_client \
|
&& cd /home/shipyard/shipyard_client \
|
||||||
&& python3 setup.py install \
|
&& python3 setup.py install \
|
||||||
|
@ -58,3 +58,4 @@ tabulate==0.8.03
|
|||||||
git+https://opendev.org/airship/deckhand.git@1f0c011a1708c1235a2be65edada7d386cd55d2a#egg=deckhand
|
git+https://opendev.org/airship/deckhand.git@1f0c011a1708c1235a2be65edada7d386cd55d2a#egg=deckhand
|
||||||
git+https://opendev.org/airship/drydock.git@96db568d4b28f5f163efbf606854243614a6c821#egg=drydock_provisioner&subdirectory=python
|
git+https://opendev.org/airship/drydock.git@96db568d4b28f5f163efbf606854243614a6c821#egg=drydock_provisioner&subdirectory=python
|
||||||
git+https://opendev.org/airship/armada.git@0c3aff1ba1f0e836e3dd56de81b2ee560e11c179#egg=armada
|
git+https://opendev.org/airship/armada.git@0c3aff1ba1f0e836e3dd56de81b2ee560e11c179#egg=armada
|
||||||
|
git+https://opendev.org/airship/promenade.git@9cd261294bb77c42375ab02606c2f18bff081c26#egg=promenade
|
||||||
|
@ -5,19 +5,15 @@ pytest==3.5.0
|
|||||||
pytest-cov==2.5.1
|
pytest-cov==2.5.1
|
||||||
responses==0.10.2
|
responses==0.10.2
|
||||||
testfixtures==5.1.1
|
testfixtures==5.1.1
|
||||||
# Had to upgrade apache-airflow as 1.10.1 requires a version of jinja too old
|
typing-extensions==3.7.2
|
||||||
# for promenade
|
# Pin apache-airflow 1.10.5 to align with version in airflow images requirements.txt
|
||||||
apache-airflow[crypto,celery,hive,hdfs,jdbc]==1.10.2
|
apache-airflow[crypto,celery,hive,hdfs,jdbc]==1.10.5
|
||||||
# install postgres seperately as apache-airflow 1.10.2 forces postgres to use
|
# install postgres seperately as apache-airflow 1.10.5 forces postgres to use
|
||||||
# psycopg2 instead of psycopg2-binary which requires additional apt packages
|
# psycopg2 instead of psycopg2-binary which requires additional apt packages
|
||||||
# to be installed, i.e. postgres-devel. Otherwise the following error is seen:
|
# to be installed, i.e. postgres-devel. Otherwise the following error is seen:
|
||||||
# Error: pg_config executable not found. Only seems to be an issue in xenial
|
# Error: pg_config executable not found. Only seems to be an issue in xenial
|
||||||
postgres>=3.0.0
|
postgres>=3.0.0
|
||||||
|
|
||||||
# TODO(bryan-strassner) Pin to version for airflow when added to the
|
|
||||||
# requirements.txt in the airflow images directory
|
|
||||||
git+https://opendev.org/airship/promenade.git@master#egg=promenade
|
|
||||||
|
|
||||||
# Linting
|
# Linting
|
||||||
flake8<3.8.0,>=3.6.0
|
flake8<3.8.0,>=3.6.0
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
module
|
module
|
||||||
"""
|
"""
|
||||||
import pytest
|
import pytest
|
||||||
|
import re
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from shipyard_airflow.common.deployment_group.deployment_group import (
|
from shipyard_airflow.common.deployment_group.deployment_group import (
|
||||||
@ -197,13 +198,14 @@ class TestDeploymentGroupManager:
|
|||||||
dgm.mark_group_prepared('compute-nodes-1')
|
dgm.mark_group_prepared('compute-nodes-1')
|
||||||
dgm.mark_group_failed('compute-nodes-2')
|
dgm.mark_group_failed('compute-nodes-2')
|
||||||
dgm.report_group_summary()
|
dgm.report_group_summary()
|
||||||
|
ansi_re = re.compile(r'\x1b\[[0-9;]*m')
|
||||||
assert "===== Group Summary =====" in caplog.text
|
assert "===== Group Summary =====" in caplog.text
|
||||||
assert ("Group ntp-node [Critical] ended with stage: "
|
assert ("Group ntp-node [Critical] ended with stage: "
|
||||||
"Stage.NOT_STARTED") in caplog.text
|
"Stage.NOT_STARTED") in re.sub(ansi_re, '', caplog.text)
|
||||||
caplog.clear()
|
caplog.clear()
|
||||||
dgm.report_node_summary()
|
dgm.report_node_summary()
|
||||||
assert "Nodes Stage.PREPARED: node2" in caplog.text
|
assert "Nodes Stage.PREPARED: node2" in re.sub(ansi_re, '', caplog.text)
|
||||||
assert "Nodes Stage.FAILED: node3" in caplog.text
|
assert "Nodes Stage.FAILED: node3" in re.sub(ansi_re, '', caplog.text)
|
||||||
assert "===== End Node Summary =====" in caplog.text
|
assert "===== End Node Summary =====" in caplog.text
|
||||||
assert "It was the best of times" not in caplog.text
|
assert "It was the best of times" not in caplog.text
|
||||||
|
|
||||||
|
@ -1,17 +1,21 @@
|
|||||||
[tox]
|
[tox]
|
||||||
|
skipsdist=True
|
||||||
envlist = py35, py36, pep8, bandit
|
envlist = py35, py36, pep8, bandit
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
setenv=
|
setenv=
|
||||||
PYTHONWARNING=all
|
PYTHONWARNING=all
|
||||||
|
LANG=C.UTF-8
|
||||||
|
LC_ALL=C.UTF-8
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
|
||||||
|
|
||||||
[testenv:py35]
|
[testenv:py35]
|
||||||
skipsdist=True
|
skipsdist=True
|
||||||
setenv=
|
setenv=
|
||||||
SLUGIFY_USES_TEXT_UNIDECODE=yes
|
SLUGIFY_USES_TEXT_UNIDECODE=yes
|
||||||
commands =
|
commands =
|
||||||
|
pip install -r{toxinidir}/test-requirements.txt
|
||||||
|
airflow initdb
|
||||||
pytest \
|
pytest \
|
||||||
{posargs} \
|
{posargs} \
|
||||||
--cov-branch \
|
--cov-branch \
|
||||||
@ -25,6 +29,8 @@ skipsdist=True
|
|||||||
setenv=
|
setenv=
|
||||||
SLUGIFY_USES_TEXT_UNIDECODE=yes
|
SLUGIFY_USES_TEXT_UNIDECODE=yes
|
||||||
commands =
|
commands =
|
||||||
|
pip install -r{toxinidir}/test-requirements.txt
|
||||||
|
airflow initdb
|
||||||
pytest \
|
pytest \
|
||||||
{posargs} \
|
{posargs} \
|
||||||
--cov-branch \
|
--cov-branch \
|
||||||
@ -64,6 +70,7 @@ basepython=python3
|
|||||||
setenv=
|
setenv=
|
||||||
SLUGIFY_USES_TEXT_UNIDECODE=yes
|
SLUGIFY_USES_TEXT_UNIDECODE=yes
|
||||||
commands =
|
commands =
|
||||||
|
pip install -r{toxinidir}/test-requirements.txt
|
||||||
oslo-config-generator --config-file=generator/config-generator.conf
|
oslo-config-generator --config-file=generator/config-generator.conf
|
||||||
oslopolicy-sample-generator --config-file=generator/policy-generator.conf
|
oslopolicy-sample-generator --config-file=generator/policy-generator.conf
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@ envlist = py35, py36, pep8, bandit
|
|||||||
[testenv]
|
[testenv]
|
||||||
setenv=
|
setenv=
|
||||||
PYTHONWARNING=all
|
PYTHONWARNING=all
|
||||||
|
LC_ALL=C.UTF-8
|
||||||
|
LC_ALL=C.UTF-8
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
- name: Clone Required Repositories
|
- name: Clone Required Repositories
|
||||||
shell: |
|
shell: |
|
||||||
export CLONE_SHIPYARD={{ CLONE_SHIPYARD }}
|
export CLONE_SHIPYARD={{ CLONE_SHIPYARD }}
|
||||||
|
export OSH_INFRA_COMMIT={{ HTK_COMMIT }}
|
||||||
./tools/deployment/airskiff/developer/000-clone-dependencies.sh
|
./tools/deployment/airskiff/developer/000-clone-dependencies.sh
|
||||||
args:
|
args:
|
||||||
chdir: "{{ zuul.projects['opendev.org/airship/treasuremap'].src_dir }}"
|
chdir: "{{ zuul.projects['opendev.org/airship/treasuremap'].src_dir }}"
|
||||||
@ -56,13 +57,6 @@
|
|||||||
chdir: "{{ zuul.project.src_dir }}"
|
chdir: "{{ zuul.project.src_dir }}"
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Setup OpenStack Client
|
|
||||||
shell: |
|
|
||||||
./tools/deployment/airskiff/developer/020-setup-client.sh
|
|
||||||
args:
|
|
||||||
chdir: "{{ zuul.projects['opendev.org/airship/treasuremap'].src_dir }}"
|
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Deploy Airship components using Armada
|
- name: Deploy Airship components using Armada
|
||||||
shell: |
|
shell: |
|
||||||
mkdir ~/.kube
|
mkdir ~/.kube
|
||||||
|
@ -14,9 +14,23 @@
|
|||||||
|
|
||||||
- hosts: primary
|
- hosts: primary
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: ensure pip packages are installed
|
||||||
|
apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
with_items:
|
||||||
|
- python3-pip
|
||||||
|
- python3-git
|
||||||
|
- python3-requests
|
||||||
|
- python3-yaml
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: Overwrite Armada manifest
|
- name: Overwrite Armada manifest
|
||||||
shell: |
|
shell: |
|
||||||
|
git checkout v1.9
|
||||||
mv tools/gate/manifests/full-site.yaml \
|
mv tools/gate/manifests/full-site.yaml \
|
||||||
type/skiff/manifests/full-site.yaml
|
type/skiff/manifests/full-site.yaml
|
||||||
|
# Overwrite versions.yaml with the latest Airship charts and xenial images
|
||||||
|
./tools/updater.py --in-file global/software/config/versions.yaml \
|
||||||
|
--tag-filter ubuntu_xenial --skip mariadb
|
||||||
args:
|
args:
|
||||||
chdir: "{{ zuul.projects['opendev.org/airship/treasuremap'].src_dir }}"
|
chdir: "{{ zuul.projects['opendev.org/airship/treasuremap'].src_dir }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user