Updated base image docker repo url

Also fixed some code deprecation warnings

Change-Id: I01d924c82677213251547a677c10d5d963765b94
This commit is contained in:
Sergiy Markin 2024-12-19 22:04:37 +00:00
parent 3da73aa619
commit 2fb62659c5
7 changed files with 15 additions and 172 deletions

View File

@ -19,7 +19,7 @@
# 429 Too Many Requests - Server message: too many requests:
# You have reached your pull rate limit.
# You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
ARG FROM=public.ecr.aws/ubuntu/ubuntu:jammy
ARG FROM=public.ecr.aws/docker/library/ubuntu:jammy
FROM ${FROM}
LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc://#airshipit@freenode' \

View File

@ -59,7 +59,7 @@ oslo.versionedobjects==3.3.0
# Airship dependencies
git+https://opendev.org/airship/deckhand.git@dacedae17b71acd249dc01ad0540e58136245fe1#egg=deckhand
git+https://opendev.org/airship/drydock.git@683b03dfe11101586ed9e37bd8a667cd59a4f2f3#egg=drydock_provisioner&subdirectory=python
git+https://opendev.org/airship/armada.git@54c3ebd63efbe21ed964cd8ee11274a5c2d95390#egg=armada
git+https://opendev.org/airship/promenade.git@4283b05cbee451007edde96951d31ee6b243a642#egg=promenade
git+https://opendev.org/airship/deckhand.git@4d500e48e880ea7f9a3582324c55c61373a855ea#egg=deckhand
git+https://opendev.org/airship/drydock.git@ffcd51e00249198f1e2d40f3e83c8c1c338df3ad#egg=drydock_provisioner&subdirectory=python
git+https://opendev.org/airship/armada.git@af4bf814f3a44e9ccee7c9fd8e4be34d943e013d#egg=armada
git+https://opendev.org/airship/promenade.git@817ead27e991ff3fbed99ea1cb08aad5674d7167#egg=promenade

View File

@ -21,7 +21,7 @@ apache-airflow-providers-smtp==1.8.1
apache-airflow-providers-sqlite==3.9.1
apispec==6.8.0
argcomplete==3.5.2
Armada @ git+https://opendev.org/airship/armada.git@54c3ebd63efbe21ed964cd8ee11274a5c2d95390
Armada @ git+https://opendev.org/airship/armada.git@af4bf814f3a44e9ccee7c9fd8e4be34d943e013d
arrow==1.3.0
asgiref==3.8.1
async-timeout==5.0.1
@ -55,7 +55,7 @@ cron-descriptor==1.4.5
croniter==5.0.1
cryptography==42.0.8
debtcollector==3.0.0
Deckhand @ git+https://opendev.org/airship/deckhand.git@dacedae17b71acd249dc01ad0540e58136245fe1
Deckhand @ git+https://opendev.org/airship/deckhand.git@4d500e48e880ea7f9a3582324c55c61373a855ea
decorator==5.1.1
deepdiff==8.1.1
Deprecated==1.2.15
@ -63,7 +63,7 @@ dill==0.3.1.1
dnspython==2.7.0
docopt==0.6.2
dogpile.cache==1.3.3
drydock_provisioner @ git+https://opendev.org/airship/drydock.git@683b03dfe11101586ed9e37bd8a667cd59a4f2f3#subdirectory=python
drydock_provisioner @ git+https://opendev.org/airship/drydock.git@ffcd51e00249198f1e2d40f3e83c8c1c338df3ad#subdirectory=python
email_validator==2.2.0
eventlet==0.38.1
exceptiongroup==1.2.2
@ -188,7 +188,7 @@ pluggy==1.5.0
ply==3.11
prettytable==3.12.0
prison==0.2.1
promenade @ git+https://opendev.org/airship/promenade.git@4283b05cbee451007edde96951d31ee6b243a642
promenade @ git+https://opendev.org/airship/promenade.git@817ead27e991ff3fbed99ea1cb08aad5674d7167
prometheus_client==0.21.1
prompt_toolkit==3.0.48
propcache==0.2.1

View File

@ -125,7 +125,7 @@ def default_error_serializer(req, resp, exception):
)
def default_exception_handler(ex, req, resp, params):
def default_exception_handler(req, resp, ex, params):
"""
Catch-all exception handler for standardized output.
If this is a standard falcon HTTPError, rethrow it for handling
@ -197,7 +197,7 @@ class AppError(Exception):
return '{} : {}'.format(ttl, dsc)
@staticmethod
def handle(ex, req, resp, params):
def handle(req, resp, ex, params):
"""
The handler used for app errors and child classes
"""

View File

@ -14,8 +14,7 @@
import json
import yaml
from prettytable import PrettyTable
from prettytable.prettytable import PLAIN_COLUMNS
from prettytable import PrettyTable, TableStyle
_INDENT = ' ' * 8
@ -229,7 +228,7 @@ def table_factory(field_names=None, rows=None, style=None):
"""
p = PrettyTable()
if style is None:
p.set_style(PLAIN_COLUMNS)
p.set_style(TableStyle.PLAIN_COLUMNS)
else:
p.set_style(style)
if field_names:

View File

@ -14,7 +14,7 @@
import json
from unittest.mock import MagicMock
from prettytable.prettytable import DEFAULT
from prettytable import PrettyTable, TableStyle
import shipyard_client.cli.format_utils as format_utils
@ -295,7 +295,7 @@ def test_table_factory_fields():
def test_table_factory_fields_data():
t = format_utils.table_factory(style=DEFAULT,
t = format_utils.table_factory(style=TableStyle.DEFAULT,
field_names=['a', 'b', 'c'],
rows=[['1', '2', '3'], ['4', '5', '6']])
assert 'a' in t.get_string()

View File

@ -1,156 +0,0 @@
# Copyright 2019, AT&T Intellectual Property
#
# 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.
- hosts: primary
roles:
- clear-firewall
- bindep
- disable-systemd-resolved
- ensure-python
- ensure-pip
- ensure-docker
tasks:
- name: Install Packaging python module for tools/airship
block:
- pip:
name: packaging
version: 23.1
executable: pip3
become: True
- name: Clone Required Repositories
shell: |
export CLONE_SHIPYARD={{ CLONE_SHIPYARD }}
export OSH_INFRA_COMMIT={{ OSH_INFRA_COMMIT }}
export OSH_COMMIT={{ OSH_COMMIT }}
./tools/deployment/airskiff/developer/000-clone-dependencies.sh
args:
chdir: "{{ zuul.projects['opendev.org/airship/treasuremap'].src_dir }}"
- name: Setup Apparmor
shell: |
./tools/deployment/airskiff/developer/009-setup-apparmor.sh
args:
chdir: "{{ zuul.projects['opendev.org/airship/treasuremap'].src_dir }}"
- name: Deploy Kubernetes with Minikube
shell: |
set -ex
sudo fdisk --list
df -h
sudo mkdir -p /opt/ext_vol
BIG_VOLUME=$(sudo fdisk -l 2>&1 | grep -E 80G | grep Linux | awk '{print $1}')
if ! mount | grep "${BIG_VOLUME}"
then
sudo mkfs.ext4 "${BIG_VOLUME}"
sudo mount "${BIG_VOLUME}" /opt/ext_vol
df -h
fi
./tools/deployment/airskiff/developer/010-deploy-k8s.sh
args:
chdir: "{{ zuul.projects['opendev.org/airship/treasuremap'].src_dir }}"
- name: Setup OpenStack Client
shell: |
set -ex
./tools/deployment/airskiff/developer/020-setup-client.sh
args:
chdir: "{{ zuul.projects['opendev.org/airship/treasuremap'].src_dir }}"
become: yes
- name: Build all charts locally
shell: |
set -ex
export HELM_ARTIFACT_URL={{ HELM_ARTIFACT_URL }}
export HTK_COMMIT={{ HTK_COMMIT }}
./tools/deployment/airskiff/developer/015-make-all-charts.sh
args:
chdir: "{{ zuul.projects['opendev.org/airship/treasuremap'].src_dir }}"
become: yes
- name: Build Shipyard and Airflow with submitted changes
shell: |
set -ex
export DISTRO={{ SHIPYARD_IMAGE_DISTRO }}
make images
args:
chdir: "{{ zuul.project.src_dir }}"
become: yes
- name: Use locally built images in manifests
shell: |
set -ex
docker rm registry --force || true
docker run -d -p 5000:5000 --restart=always --name registry registry:2
docker tag quay.io/airshipit/airflow:latest-ubuntu_focal localhost:5000/airflow:latest-ubuntu_focal
docker tag quay.io/airshipit/shipyard:latest-ubuntu_focal localhost:5000/shipyard:latest-ubuntu_focal
docker push localhost:5000/airflow:latest-ubuntu_focal
docker push localhost:5000/shipyard:latest-ubuntu_focal
sed -i "s#quay.io/airshipit/airflow:latest-ubuntu_focal#localhost:5000/airflow:latest-ubuntu_focal#g" ./site/airskiff/software/config/versions.yaml
sed -i "s#quay.io/airshipit/shipyard:latest-ubuntu_focal#localhost:5000/shipyard:latest-ubuntu_focal#g" ./site/airskiff/software/config/versions.yaml
args:
chdir: "{{ zuul.projects['opendev.org/airship/treasuremap'].src_dir }}"
become: yes
- name: Start artifactory
shell: |
set -ex
# start http server with artifacts
docker rm artifacts --force || true
docker run --name artifacts -p 8282:80 -v $(pwd)/../artifacts:/usr/share/nginx/html -d nginx
sleep 10
curl --verbose -I http://control-plane.minikube.internal:8282/memcached.tgz
args:
chdir: "{{ zuul.projects['opendev.org/airship/treasuremap'].src_dir }}"
become: yes
- name: Deploy Airship components using Armada
shell: |
set -ex
mkdir -p ~/.kube
cp -rp /home/zuul/.kube/config ~/.kube/config
./tools/deployment/airskiff/developer/030-armada-bootstrap.sh
args:
chdir: "{{ zuul.projects['opendev.org/airship/treasuremap'].src_dir }}"
become: yes
- name: Deploy Memcached using Airship
shell: |
set -ex
./tools/deployment/airskiff/developer/100-deploy-osh.sh
args:
chdir: "{{ zuul.projects['opendev.org/airship/treasuremap'].src_dir }}"
become: yes
- name: Wait for deployment completion
shell: |
./tools/gate/wait-for-shipyard.sh
args:
chdir: "{{ zuul.projects['opendev.org/airship/treasuremap'].src_dir }}"
become: yes
- name: Stop artifactory
shell: |
set -ex
# terminate artifactory
docker rm artifacts --force || true
args:
chdir: "{{ zuul.project.src_dir }}"
become: yes