Bump up docker Pypi module version

Also updated docs generation code caused by
deprecated properties in recent version of Sphinx.

Change-Id: Ibbe5c8f6aefd53bd24a741d960871c4061b19ca6
This commit is contained in:
Sergiy Markin 2024-10-08 15:39:27 +00:00
parent 2ea619c9f3
commit 0e24346312
27 changed files with 467 additions and 645 deletions

View File

@ -1,26 +1,26 @@
plantuml plantuml
sphinxcontrib-apidoc==0.2.0 # BSD sphinxcontrib-apidoc
sphinxcontrib-plantuml sphinxcontrib-plantuml
Sphinx==5.3.0 Sphinx
sphinx-rtd-theme==0.5.0 sphinx-rtd-theme
reno==4.0.0 reno
pylibyaml==0.1.0 # pylibyaml
oslo.config==9.1.1 # oslo.config==9.1.1
oslo.policy==4.1.1 # oslo.policy==4.1.1
Beaker==1.12.1 # Beaker
deepdiff==6.3.0 # deepdiff
falcon==3.1.1 # falcon
jsonpath-ng==1.5.3 # jsonpath-ng
jsonschema==4.17.3 # jsonschema
keystoneauth1==5.1.2 # keystoneauth1==5.1.2
networkx==3.1 # networkx
Paste==3.5.2 # Paste
PasteDeploy==3.0.1 # PasteDeploy
python-barbicanclient==5.5.0 # python-barbicanclient==5.5.0
oslo.db==10.0.0 # oslo.db==10.0.0
oslo.log==5.2.0 # oslo.log==5.2.0
Werkzeug==2.1.2 # Werkzeug
jsonpickle==3.0.1 # jsonpickle
Jinja2<=3.0.3 # Jinja2

View File

@ -119,9 +119,9 @@ todo_include_todos = True
# The theme to use for HTML and HTML Help pages. See the documentation for # The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes. # a list of builtin themes.
# #
import sphinx_rtd_theme # import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme" html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# Theme options are theme-specific and customize the look and feel of a theme # Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the # further. For a list of options available for each theme, see the

View File

@ -50,7 +50,6 @@
block: block:
- pip: - pip:
name: docker name: docker
version: 4.4.4
executable: pip3 executable: pip3
become: True become: True
@ -58,7 +57,6 @@
block: block:
- pip: - pip:
name: tox name: tox
version: 3.28.0
executable: pip3 executable: pip3
become: True become: True
@ -90,6 +88,7 @@
username: "{{ airship_deckhand_quay_creds.username }}" username: "{{ airship_deckhand_quay_creds.username }}"
password: "{{ airship_deckhand_quay_creds.password }}" password: "{{ airship_deckhand_quay_creds.password }}"
registry_url: "https://quay.io/api/v1/" registry_url: "https://quay.io/api/v1/"
api_version: "1.43"
- make: - make:
chdir: "{{ zuul.project.src_dir }}" chdir: "{{ zuul.project.src_dir }}"

View File

@ -1,21 +0,0 @@
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Build Helm Charts
when: disable_keystone == false
shell: |
set -xe;
./tools/gate/scripts/010-build-charts.sh
args:
chdir: "{{ zuul.project.src_dir }}"

View File

@ -12,4 +12,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- include: build-charts.yaml - name: Build Helm Charts
when: disable_keystone == false
shell: |
set -xe;
./tools/gate/scripts/010-build-charts.sh
args:
chdir: "{{ zuul.project.src_dir }}"

View File

@ -1,86 +0,0 @@
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Set zuul_site_mirror_fqdn from env var if not defined
when: zuul_site_mirror_fqdn is not defined
set_fact:
zuul_site_mirror_fqdn: "{{ lookup('env','zuul_site_mirror_fqdn') }}"
# NOTE(portdirect): Untill https://github.com/ansible/ansible/issues/21433 is
# resolved, we build with a shell script to make use of the host network.
- name: Build Airship-Deckhand Image
block:
# NOTE(portdirect): We do this to ensure we are feeding the docker build
# a clean path to work with.
- name: Airship-Deckhand image build path
shell: cd "{{ work_dir }}"; pwd
register: airship_deckhand_path
vars:
work_dir: "{{ zuul.project.src_dir | default('') }}/{{ zuul_airship_deckhand_relative_path | default('') }}"
- name: Build Airship-Deckhand Image
when: proxy.http is undefined or (proxy.http | trim == "")
shell: |-
set -ex;
docker build \
--network host \
--force-rm \
--tag deckhand \
--label zuul \
--file images/deckhand/Dockerfile.{{ DISTRO }} \
{% if zuul_site_mirror_fqdn is defined and zuul_site_mirror_fqdn %}
--build-arg UBUNTU_URL="http://{{ zuul_site_mirror_fqdn }}/ubuntu/" \
--build-arg ALLOW_UNAUTHENTICATED="true" \
--build-arg PIP_INDEX_URL="http://{{ zuul_site_mirror_fqdn }}/pypi/simple" \
--build-arg PIP_TRUSTED_HOST="{{ zuul_site_mirror_fqdn }}" \
{% endif %}
.
args:
chdir: "{{ airship_deckhand_path.stdout }}"
executable: /bin/bash
become: yes
- name: Build Airship-Deckhand Image Behind Proxy
when: proxy.http is defined and (proxy.http | trim != "")
shell: |-
set -ex;
docker build \
--network host \
--force-rm \
--tag deckhand \
--label zuul \
--file images/deckhand/Dockerfile.{{ DISTRO }} \
--build-arg HTTP_PROXY="{{ proxy.http }}" \
--build-arg HTTPS_PROXY="{{ proxy.https }}" \
--build-arg NO_PROXY="{{ proxy.noproxy }}" \
{% if zuul_site_mirror_fqdn is defined and zuul_site_mirror_fqdn %}
--build-arg UBUNTU_URL="http://{{ zuul_site_mirror_fqdn }}/ubuntu/" \
--build-arg ALLOW_UNAUTHENTICATED="true" \
--build-arg PIP_INDEX_URL="http://{{ zuul_site_mirror_fqdn }}/pypi/simple" \
--build-arg PIP_TRUSTED_HOST="{{ zuul_site_mirror_fqdn }}" \
{% endif %}
.
args:
chdir: "{{ airship_deckhand_path.stdout }}"
executable: /bin/bash
become: yes
- name: Register Deckhand Image ID
shell: |-
set -e;
echo $( docker images --filter label=zuul | awk '{print $3}' | head -2 | tail -1 )
register: airship_deckhand_image_id
args:
chdir: "{{ airship_deckhand_path.stdout }}"
become: yes

View File

@ -12,4 +12,75 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- include: build-airship-deckhand-image.yaml - name: Set zuul_site_mirror_fqdn from env var if not defined
when: zuul_site_mirror_fqdn is not defined
set_fact:
zuul_site_mirror_fqdn: "{{ lookup('env','zuul_site_mirror_fqdn') }}"
# NOTE(portdirect): Untill https://github.com/ansible/ansible/issues/21433 is
# resolved, we build with a shell script to make use of the host network.
- name: Build Airship-Deckhand Image
block:
# NOTE(portdirect): We do this to ensure we are feeding the docker build
# a clean path to work with.
- name: Airship-Deckhand image build path
shell: cd "{{ work_dir }}"; pwd
register: airship_deckhand_path
vars:
work_dir: "{{ zuul.project.src_dir | default('') }}/{{ zuul_airship_deckhand_relative_path | default('') }}"
- name: Build Airship-Deckhand Image
when: proxy.http is undefined or (proxy.http | trim == "")
shell: |-
set -ex;
docker build \
--network host \
--force-rm \
--tag deckhand \
--label zuul \
--file images/deckhand/Dockerfile.{{ DISTRO }} \
{% if zuul_site_mirror_fqdn is defined and zuul_site_mirror_fqdn %}
--build-arg UBUNTU_URL="http://{{ zuul_site_mirror_fqdn }}/ubuntu/" \
--build-arg ALLOW_UNAUTHENTICATED="true" \
--build-arg PIP_INDEX_URL="http://{{ zuul_site_mirror_fqdn }}/pypi/simple" \
--build-arg PIP_TRUSTED_HOST="{{ zuul_site_mirror_fqdn }}" \
{% endif %}
.
args:
chdir: "{{ airship_deckhand_path.stdout }}"
executable: /bin/bash
become: yes
- name: Build Airship-Deckhand Image Behind Proxy
when: proxy.http is defined and (proxy.http | trim != "")
shell: |-
set -ex;
docker build \
--network host \
--force-rm \
--tag deckhand \
--label zuul \
--file images/deckhand/Dockerfile.{{ DISTRO }} \
--build-arg HTTP_PROXY="{{ proxy.http }}" \
--build-arg HTTPS_PROXY="{{ proxy.https }}" \
--build-arg NO_PROXY="{{ proxy.noproxy }}" \
{% if zuul_site_mirror_fqdn is defined and zuul_site_mirror_fqdn %}
--build-arg UBUNTU_URL="http://{{ zuul_site_mirror_fqdn }}/ubuntu/" \
--build-arg ALLOW_UNAUTHENTICATED="true" \
--build-arg PIP_INDEX_URL="http://{{ zuul_site_mirror_fqdn }}/pypi/simple" \
--build-arg PIP_TRUSTED_HOST="{{ zuul_site_mirror_fqdn }}" \
{% endif %}
.
args:
chdir: "{{ airship_deckhand_path.stdout }}"
executable: /bin/bash
become: yes
- name: Register Deckhand Image ID
shell: |-
set -e;
echo $( docker images --filter label=zuul | awk '{print $3}' | head -2 | tail -1 )
register: airship_deckhand_image_id
args:
chdir: "{{ airship_deckhand_path.stdout }}"
become: yes

View File

@ -1,35 +0,0 @@
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Deploy Barbican
shell: |
set -xe;
# git reset --hard "{{ barbican_stable_commit | default('') }}"
./tools/deployment/component/barbican/barbican.sh
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_relative_path | default('') }}"
- name: Retrieve Barbican URL for integration tests
shell: |-
set -e;
test_barbican_url=$(
openstack endpoint list \
--format value | grep barbican | grep public | awk '{print $7}' | sed 's/\(.*\)\//\1 /'
)
echo $test_barbican_url
register: test_barbican_url
environment:
OS_CLOUD: openstack_helm

View File

@ -12,4 +12,24 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- include: deploy-barbican.yaml - name: Deploy Barbican
shell: |
set -xe;
# git reset --hard "{{ barbican_stable_commit | default('') }}"
./tools/deployment/component/barbican/barbican.sh
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_relative_path | default('') }}"
- name: Retrieve Barbican URL for integration tests
shell: |-
set -e;
test_barbican_url=$(
openstack endpoint list \
--format value | grep barbican | grep public | awk '{print $7}' | sed 's/\(.*\)\//\1 /'
)
echo $test_barbican_url
register: test_barbican_url
environment:
OS_CLOUD: openstack_helm

View File

@ -1,80 +0,0 @@
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Perform Database Migrations
shell: |-
set -ex;
# Do database migrations.
docker run \
--rm \
--net=host \
-v "{{ deckhand_conf_dir | default('') }}":/etc/deckhand "{{ airship_deckhand_image_id.stdout }}" alembic upgrade head
# Allow migrations to complete.
sleep 10
become: yes
- name: Deploy Deckhand Container
shell: |-
set -ex;
docker run \
--rm \
--net=host \
-p 9000:9000 \
-v "{{ deckhand_conf_dir | default('') }}":/etc/deckhand "{{ airship_deckhand_image_id.stdout }}" server &
# Give the server a chance to come up. Better to poll a health check.
sleep 10
args:
chdir: "{{ airship_deckhand_path.stdout }}"
become: yes
- name: Register Deckhand Service and Endpoints
when: disable_keystone == false
block:
- name: Register Keystone Deckhand Service
shell: |-
set -ex;
if [ -z "$( openstack service list --format value | grep deckhand )" ]; then
openstack service create --enable --name deckhand deckhand
fi
environment:
OS_CLOUD: openstack_helm
register: result
failed_when: "'permission denied' in result.stdout"
- name: Register Keystone Deckhand Endpoints
shell: |-
set -ex;
echo "Registering Deckhand endpoint: {{ item }}"
deckhand_endpoint="http://127.0.0.1:9000"
if [ -z "$( openstack endpoint list --format value | grep deckhand | grep {{ item }} )" ]; then
openstack endpoint create --enable \
--region RegionOne \
deckhand "{{ item }}" $deckhand_endpoint/api/v1.0
fi
with_items:
- "admin"
- "public"
- "internal"
environment:
OS_CLOUD: openstack_helm
register: result
failed_when: "'permission denied' in result.stdout"

View File

@ -12,4 +12,69 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- include: deploy-deckhand.yaml - name: Perform Database Migrations
shell: |-
set -ex;
# Do database migrations.
docker run \
--rm \
--net=host \
-v "{{ deckhand_conf_dir | default('') }}":/etc/deckhand "{{ airship_deckhand_image_id.stdout }}" alembic upgrade head
# Allow migrations to complete.
sleep 10
become: yes
- name: Deploy Deckhand Container
shell: |-
set -ex;
docker run \
--rm \
--net=host \
-p 9000:9000 \
-v "{{ deckhand_conf_dir | default('') }}":/etc/deckhand "{{ airship_deckhand_image_id.stdout }}" server &
# Give the server a chance to come up. Better to poll a health check.
sleep 10
args:
chdir: "{{ airship_deckhand_path.stdout }}"
become: yes
- name: Register Deckhand Service and Endpoints
when: disable_keystone == false
block:
- name: Register Keystone Deckhand Service
shell: |-
set -ex;
if [ -z "$( openstack service list --format value | grep deckhand )" ]; then
openstack service create --enable --name deckhand deckhand
fi
environment:
OS_CLOUD: openstack_helm
register: result
failed_when: "'permission denied' in result.stdout"
- name: Register Keystone Deckhand Endpoints
shell: |-
set -ex;
echo "Registering Deckhand endpoint: {{ item }}"
deckhand_endpoint="http://127.0.0.1:9000"
if [ -z "$( openstack endpoint list --format value | grep deckhand | grep {{ item }} )" ]; then
openstack endpoint create --enable \
--region RegionOne \
deckhand "{{ item }}" $deckhand_endpoint/api/v1.0
fi
with_items:
- "admin"
- "public"
- "internal"
environment:
OS_CLOUD: openstack_helm
register: result
failed_when: "'permission denied' in result.stdout"

View File

@ -1,92 +0,0 @@
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Set zuul_site_mirror_fqdn from env var if not defined
when: zuul_site_mirror_fqdn is not defined
set_fact:
zuul_site_mirror_fqdn: "{{ lookup('env','zuul_site_mirror_fqdn') }}"
- name: Make OSH charts
shell: |
set -xe
make all
environment:
zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_relative_path | default('') }}"
- name: Make OSH_INFRA charts
shell: |
set -xe
make all
environment:
zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
- name: Prepare kubernetes
shell: |
set -xe;
./tools/deployment/common/prepare-k8s.sh
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
- name: Setup docker-based openstack client
shell: |
set -xe;
./tools/deployment/airskiff/developer/020-setup-client.sh
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_treasuremap_relative_path | default('') }}"
- name: Deploy Ingress
shell: |
set -xe;
./tools/deployment/common/ingress.sh
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_relative_path | default('') }}"
- name: Deploy NFS
shell: |
set -xe;
./tools/deployment/component/nfs-provisioner/nfs-provisioner.sh
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_relative_path | default('') }}"
- name: Deploy MariaDB
shell: |
set -xe;
./tools/deployment/component/common/mariadb.sh
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_relative_path | default('') }}"
- name: Deploy RabbitMQ
shell: |
set -xe;
./tools/deployment/component/common/rabbitmq.sh
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_relative_path | default('') }}"
- name: Deploy Memcached
shell: |
set -xe;
./tools/deployment/component/common/memcached.sh
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_relative_path | default('') }}"
- name: Deploy Keystone
shell: |
set -xe;
./tools/deployment/component/keystone/keystone.sh
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_relative_path | default('') }}"

View File

@ -12,4 +12,81 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- include: deploy-keystone-dependencies.yaml - name: Set zuul_site_mirror_fqdn from env var if not defined
when: zuul_site_mirror_fqdn is not defined
set_fact:
zuul_site_mirror_fqdn: "{{ lookup('env','zuul_site_mirror_fqdn') }}"
- name: Make OSH charts
shell: |
set -xe
make all
environment:
zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_relative_path | default('') }}"
- name: Make OSH_INFRA charts
shell: |
set -xe
make all
environment:
zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
- name: Prepare kubernetes
shell: |
set -xe;
./tools/deployment/common/prepare-k8s.sh
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
- name: Setup docker-based openstack client
shell: |
set -xe;
./tools/deployment/airskiff/developer/020-setup-client.sh
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_treasuremap_relative_path | default('') }}"
- name: Deploy Ingress
shell: |
set -xe;
./tools/deployment/common/ingress.sh
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_relative_path | default('') }}"
- name: Deploy NFS
shell: |
set -xe;
./tools/deployment/component/nfs-provisioner/nfs-provisioner.sh
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_relative_path | default('') }}"
- name: Deploy MariaDB
shell: |
set -xe;
./tools/deployment/component/common/mariadb.sh
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_relative_path | default('') }}"
- name: Deploy RabbitMQ
shell: |
set -xe;
./tools/deployment/component/common/rabbitmq.sh
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_relative_path | default('') }}"
- name: Deploy Memcached
shell: |
set -xe;
./tools/deployment/component/common/memcached.sh
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_relative_path | default('') }}"
- name: Deploy Keystone
shell: |
set -xe;
./tools/deployment/component/keystone/keystone.sh
args:
chdir: "{{ zuul.project.src_dir }}/{{ zuul_osh_relative_path | default('') }}"

View File

@ -1,28 +0,0 @@
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Deploy PostgreSQL
shell: |-
set -e;
./tools/gate/scripts/020-deploy-postgresql.sh
args:
chdir: "{{ zuul.project.src_dir | default('') }}"
register: _airship_deckhand_database_url
become: yes
- name: Register PostgreSQL database IP address
set_fact:
airship_deckhand_database_url: "{{ _airship_deckhand_database_url.stdout_lines | last }}"
environment:
AIRSHIP_DECKHAND_DATABASE_URL: "{{ airship_deckhand_database_url | default('') }}"

View File

@ -12,4 +12,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- include: deploy-postgresql.yaml - name: Deploy PostgreSQL
shell: |-
set -e;
./tools/gate/scripts/020-deploy-postgresql.sh
args:
chdir: "{{ zuul.project.src_dir | default('') }}"
register: _airship_deckhand_database_url
become: yes
- name: Register PostgreSQL database IP address
set_fact:
airship_deckhand_database_url: "{{ _airship_deckhand_database_url.stdout_lines | last }}"
environment:
AIRSHIP_DECKHAND_DATABASE_URL: "{{ airship_deckhand_database_url | default('') }}"

View File

@ -1,37 +0,0 @@
# Copyright 2020 AT&T Intellectual Property. All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Disable systemd-resolved service
systemd:
state: stopped
enabled: no
masked: yes
daemon_reload: yes
name: systemd-resolved
become: yes
- name: Remove local stub dns from resolv.conf, if it exists
lineinfile:
path: /etc/resolv.conf
state: absent
regexp: '^nameserver.*127.0.0.1'
become: yes
- name: Add upstream nameservers in resolv.conf
blockinfile:
path: /etc/resolv.conf
block: |
nameserver 8.8.8.8
nameserver 8.8.4.4
become: yes

View File

@ -12,4 +12,26 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- include: disable-systemd-resolved.yaml - name: Disable systemd-resolved service
systemd:
state: stopped
enabled: no
masked: yes
daemon_reload: yes
name: systemd-resolved
become: yes
- name: Remove local stub dns from resolv.conf, if it exists
lineinfile:
path: /etc/resolv.conf
state: absent
regexp: '^nameserver.*127.0.0.1'
become: yes
- name: Add upstream nameservers in resolv.conf
blockinfile:
path: /etc/resolv.conf
block: |
nameserver 8.8.8.8
nameserver 8.8.4.4
become: yes

View File

@ -1,74 +0,0 @@
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Create temporary deckhand conf directory
tempfile:
state: directory
suffix: airship-deckhand
register: _deckhand_conf_dir
- name: Store deckhand_conf_dir in variable
set_fact:
deckhand_conf_dir: "{{ _deckhand_conf_dir.path | default('') }}"
environment:
# Used by Deckhand's initialization script to search for config files.
AIRSHIP_DECKHAND_CONFIG_DIR: "{{ deckhand_conf_dir | default('') }}"
- name: Generate test deckhand.conf file when disable_keystone is true
when: disable_keystone == true
shell: |-
set -ex;
chmod 777 -R "{{ deckhand_conf_dir | default('')}}"
conf_file="{{ deckhand_conf_dir | default('') }}"/deckhand.conf
cp etc/deckhand/logging.conf.sample "{{ deckhand_conf_dir | default('') }}"/logging.conf
envsubst '$AIRSHIP_DECKHAND_DATABASE_URL' < deckhand/tests/deckhand.conf.test > $conf_file
echo "Toggling development_mode on to disable Keystone authentication."
sed -i -e 's/development_mode = false/development_mode = true/g' $conf_file
echo $conf_file 1>&2
cat $conf_file 1>&2
echo "{{ deckhand_conf_dir | default('') }}"/logging.conf 1>&2
cat "{{ deckhand_conf_dir | default('') }}"/logging.conf 1>&2
args:
chdir: "{{ airship_deckhand_path.stdout }}"
environment:
AIRSHIP_DECKHAND_DATABASE_URL: "{{ airship_deckhand_database_url }}"
become: yes
- name: Generate test deckhand.conf file when disable_keystone is false
when: disable_keystone == false
shell: |-
set -ex;
chmod 777 -R "{{ deckhand_conf_dir | default('') }}"
conf_file="{{ deckhand_conf_dir | default('') }}"/deckhand.conf
cp etc/deckhand/logging.conf.sample "{{ deckhand_conf_dir | default('') }}"/logging.conf
envsubst '$AIRSHIP_DECKHAND_DATABASE_URL $TEST_BARBICAN_URL' < deckhand/tests/deckhand.conf.test > $conf_file
echo $conf_file 1>&2
cat $conf_file 1>&2
echo "{{ deckhand_conf_dir | default('') }}"/logging.conf 1>&2
cat "{{ deckhand_conf_dir | default('') }}"/logging.conf 1>&2
args:
chdir: "{{ airship_deckhand_path.stdout }}"
environment:
AIRSHIP_DECKHAND_DATABASE_URL: "{{ airship_deckhand_database_url }}"
TEST_BARBICAN_URL: "{{ test_barbican_url.stdout }}"
become: yes

View File

@ -1,30 +0,0 @@
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Generate test paste.ini file when disable_keystone is true
when: disable_keystone == true
shell: |-
set -ex;
echo "Using noauth-paste.ini to disable Keystone authentication."
cp etc/deckhand/noauth-paste.ini "{{ deckhand_conf_dir | default('') }}"/noauth-paste.ini
args:
chdir: "{{ airship_deckhand_path.stdout }}"
- name: Generate test paste.ini file when disable_keystone is false
when: disable_keystone == false
shell: |-
set -ex;
cp etc/deckhand/deckhand-paste.ini "{{ deckhand_conf_dir | default('') }}"/deckhand-paste.ini
args:
chdir: "{{ airship_deckhand_path.stdout }}"

View File

@ -12,5 +12,81 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- include: generate-test-config.yaml - name: Create temporary deckhand conf directory
- include: generate-test-paste.yaml tempfile:
state: directory
suffix: airship-deckhand
register: _deckhand_conf_dir
- name: Store deckhand_conf_dir in variable
set_fact:
deckhand_conf_dir: "{{ _deckhand_conf_dir.path | default('') }}"
environment:
# Used by Deckhand's initialization script to search for config files.
AIRSHIP_DECKHAND_CONFIG_DIR: "{{ deckhand_conf_dir | default('') }}"
- name: Generate test deckhand.conf file when disable_keystone is true
when: disable_keystone == true
shell: |-
set -ex;
chmod 777 -R "{{ deckhand_conf_dir | default('')}}"
conf_file="{{ deckhand_conf_dir | default('') }}"/deckhand.conf
cp etc/deckhand/logging.conf.sample "{{ deckhand_conf_dir | default('') }}"/logging.conf
envsubst '$AIRSHIP_DECKHAND_DATABASE_URL' < deckhand/tests/deckhand.conf.test > $conf_file
echo "Toggling development_mode on to disable Keystone authentication."
sed -i -e 's/development_mode = false/development_mode = true/g' $conf_file
echo $conf_file 1>&2
cat $conf_file 1>&2
echo "{{ deckhand_conf_dir | default('') }}"/logging.conf 1>&2
cat "{{ deckhand_conf_dir | default('') }}"/logging.conf 1>&2
args:
chdir: "{{ airship_deckhand_path.stdout }}"
environment:
AIRSHIP_DECKHAND_DATABASE_URL: "{{ airship_deckhand_database_url }}"
become: yes
- name: Generate test deckhand.conf file when disable_keystone is false
when: disable_keystone == false
shell: |-
set -ex;
chmod 777 -R "{{ deckhand_conf_dir | default('') }}"
conf_file="{{ deckhand_conf_dir | default('') }}"/deckhand.conf
cp etc/deckhand/logging.conf.sample "{{ deckhand_conf_dir | default('') }}"/logging.conf
envsubst '$AIRSHIP_DECKHAND_DATABASE_URL $TEST_BARBICAN_URL' < deckhand/tests/deckhand.conf.test > $conf_file
echo $conf_file 1>&2
cat $conf_file 1>&2
echo "{{ deckhand_conf_dir | default('') }}"/logging.conf 1>&2
cat "{{ deckhand_conf_dir | default('') }}"/logging.conf 1>&2
args:
chdir: "{{ airship_deckhand_path.stdout }}"
environment:
AIRSHIP_DECKHAND_DATABASE_URL: "{{ airship_deckhand_database_url }}"
TEST_BARBICAN_URL: "{{ test_barbican_url.stdout }}"
become: yes
- name: Generate test paste.ini file when disable_keystone is true
when: disable_keystone == true
shell: |-
set -ex;
echo "Using noauth-paste.ini to disable Keystone authentication."
cp etc/deckhand/noauth-paste.ini "{{ deckhand_conf_dir | default('') }}"/noauth-paste.ini
args:
chdir: "{{ airship_deckhand_path.stdout }}"
- name: Generate test paste.ini file when disable_keystone is false
when: disable_keystone == false
shell: |-
set -ex;
cp etc/deckhand/deckhand-paste.ini "{{ deckhand_conf_dir | default('') }}"/deckhand-paste.ini
args:
chdir: "{{ airship_deckhand_path.stdout }}"

View File

@ -1,23 +0,0 @@
# Copyright 2019 AT&T Intellectual Property. All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Install pip3 and gabbi
shell: |
set -xe;
pip3 install \
-r test-requirements.txt \
-r requirements-frozen.txt
args:
chdir: "{{ zuul.project.src_dir }}"
become: yes

View File

@ -12,4 +12,12 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- include: install-test-requirements.yaml - name: Install pip3 and gabbi
shell: |
set -xe;
pip3 install \
-r test-requirements.txt \
-r requirements-frozen.txt
args:
chdir: "{{ zuul.project.src_dir }}"
become: yes

View File

@ -1,31 +0,0 @@
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Airship-Deckhand image build path
shell: cd "{{ work_dir }}"; pwd
register: airship_deckhand_path
vars:
work_dir: "{{ zuul.project.src_dir | default('') }}/{{ zuul_airship_deckhand_relative_path | default('') }}"
- name: Run Functional Tests
shell: |
set -xe;
tox -e "{{ tox_envlist }}"
args:
chdir: "{{ zuul.project.src_dir }}"
environment:
DECKHAND_TEST_URL: "127.0.0.1:9000"
DECKHAND_TEST_DIR: "{{ airship_deckhand_path.stdout }}/deckhand/tests/functional/gabbits"
register: result
failed_when: "result.rc != 0"

View File

@ -12,4 +12,20 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- include: functional-tests.yaml - name: Airship-Deckhand image build path
shell: cd "{{ work_dir }}"; pwd
register: airship_deckhand_path
vars:
work_dir: "{{ zuul.project.src_dir | default('') }}/{{ zuul_airship_deckhand_relative_path | default('') }}"
- name: Run Functional Tests
shell: |
set -xe;
tox -e "{{ tox_envlist }}"
args:
chdir: "{{ zuul.project.src_dir }}"
environment:
DECKHAND_TEST_URL: "127.0.0.1:9000"
DECKHAND_TEST_DIR: "{{ airship_deckhand_path.stdout }}/deckhand/tests/functional/gabbits"
register: result
failed_when: "result.rc != 0"

View File

@ -1,70 +0,0 @@
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Airship-Deckhand image build path
shell: cd "{{ work_dir }}"; pwd
register: airship_deckhand_path
vars:
work_dir: "{{ zuul.project.src_dir | default('') }}/{{ zuul_airship_deckhand_relative_path | default('') }}"
- name: Run Integration Tests with Docker
when: disable_keystone == false
block:
- name: Generate Keystone token for integration tests
shell: |-
set -e;
echo $( openstack token issue --format value -c id )
args:
chdir: "{{ zuul.project.src_dir }}"
register: test_auth_token
environment:
OS_CLOUD: openstack_helm
- name: Run Integration Tests
shell: |
set -ex;
stestr --test-path deckhand/tests/common/ run --serial --slowest --force-subunit-trace --color
args:
chdir: "{{ zuul.project.src_dir }}"
environment:
DECKHAND_IMAGE: "{{ airship_deckhand_image_id.stdout }}"
DECKHAND_TEST_URL: "127.0.0.1:9000"
DECKHAND_TEST_DIR: "{{ airship_deckhand_path.stdout }}/deckhand/tests/integration/gabbits"
TEST_AUTH_TOKEN: "{{ test_auth_token.stdout }}"
TEST_BARBICAN_URL: "{{ test_barbican_url.stdout }}"
register: result
failed_when: "result.rc != 0"
- name: Run Integration Tests with uwsgi
when: disable_keystone == true
shell: |
set -xe;
# NOTE(felipemonteiro): We don't use a venv because they don't play nicely
# with OpenStack-Helm, which is used to orchestrate various OpenStack
# services in the integration script called below.
sudo -E -H pip3 install -e . --verbose --use-pep517
sudo -E -H pip3 install -r requirements-frozen.txt
echo "$(pwd)" | sudo tee /usr/local/lib/python3.10/dist-packages/deckhand.pth
pifpaf run postgresql -- ./tools/integration-tests.sh
args:
chdir: "{{ zuul.project.src_dir }}"
environment:
DECKHAND_TEST_URL: "127.0.0.1:9000"
DECKHAND_TEST_DIR: "{{ airship_deckhand_path.stdout }}/deckhand/tests/integration/gabbits"
# BARBICAN_STABLE_COMMIT: "{{ barbican_stable_commit }}"
register: result
failed_when: "result.rc != 0"

View File

@ -12,4 +12,59 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- include: integration-tests.yaml
- name: Airship-Deckhand image build path
shell: cd "{{ work_dir }}"; pwd
register: airship_deckhand_path
vars:
work_dir: "{{ zuul.project.src_dir | default('') }}/{{ zuul_airship_deckhand_relative_path | default('') }}"
- name: Run Integration Tests with Docker
when: disable_keystone == false
block:
- name: Generate Keystone token for integration tests
shell: |-
set -e;
echo $( openstack token issue --format value -c id )
args:
chdir: "{{ zuul.project.src_dir }}"
register: test_auth_token
environment:
OS_CLOUD: openstack_helm
- name: Run Integration Tests
shell: |
set -ex;
stestr --test-path deckhand/tests/common/ run --serial --slowest --force-subunit-trace --color
args:
chdir: "{{ zuul.project.src_dir }}"
environment:
DECKHAND_IMAGE: "{{ airship_deckhand_image_id.stdout }}"
DECKHAND_TEST_URL: "127.0.0.1:9000"
DECKHAND_TEST_DIR: "{{ airship_deckhand_path.stdout }}/deckhand/tests/integration/gabbits"
TEST_AUTH_TOKEN: "{{ test_auth_token.stdout }}"
TEST_BARBICAN_URL: "{{ test_barbican_url.stdout }}"
register: result
failed_when: "result.rc != 0"
- name: Run Integration Tests with uwsgi
when: disable_keystone == true
shell: |
set -xe;
# NOTE(felipemonteiro): We don't use a venv because they don't play nicely
# with OpenStack-Helm, which is used to orchestrate various OpenStack
# services in the integration script called below.
sudo -E -H pip3 install -e . --verbose --use-pep517
sudo -E -H pip3 install -r requirements-frozen.txt
echo "$(pwd)" | sudo tee /usr/local/lib/python3.10/dist-packages/deckhand.pth
pifpaf run postgresql -- ./tools/integration-tests.sh
args:
chdir: "{{ zuul.project.src_dir }}"
environment:
DECKHAND_TEST_URL: "127.0.0.1:9000"
DECKHAND_TEST_DIR: "{{ airship_deckhand_path.stdout }}/deckhand/tests/integration/gabbits"
# BARBICAN_STABLE_COMMIT: "{{ barbican_stable_commit }}"
register: result
failed_when: "result.rc != 0"

View File

@ -174,6 +174,7 @@ allowlist_externals =
bash bash
deps = deps =
-r{toxinidir}/doc/requirements-docs.txt -r{toxinidir}/doc/requirements-docs.txt
-r{toxinidir}/requirements-frozen.txt
commands = commands =
bash {toxinidir}/tools/build-docs.sh bash {toxinidir}/tools/build-docs.sh