[skyline] Use Loci skyline image

Change-Id: I0b848660be75a7106f19f83e47cdcd1100a04d11
Signed-off-by: Vladimir Kozhukalov <kozhukalov@gmail.com>
This commit is contained in:
Vladimir Kozhukalov
2025-10-22 17:26:23 -05:00
parent 18607738c1
commit e8e1998575
13 changed files with 177 additions and 13 deletions

View File

@@ -0,0 +1,9 @@
---
skyline:
- |
Bring out database migrations and nginx config generation
to separate scripts so that they can be run independently
during init container phase.
- |
Use Loci Skyline image by default.
...

View File

@@ -0,0 +1,21 @@
#!/bin/bash
{{/*
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.
*/}}
set -ex
# FIXME: Add db sync executable endpoint to skyline-apiserver package and use it here
site_packages_dir=$(python -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')
alembic -c ${site_packages_dir}/skyline_apiserver/db/alembic/alembic.ini upgrade head

View File

@@ -0,0 +1,20 @@
#!/bin/bash
{{/*
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.
*/}}
set -ex
GENERATOR_ARGS="--output-file /etc/nginx/nginx.conf"
skyline-nginx-generator ${GENERATOR_ARGS}

View File

@@ -0,0 +1,19 @@
#!/bin/bash
{{/*
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.
*/}}
set -ex
gunicorn -c /etc/skyline/gunicorn.py skyline_apiserver.main:app

View File

@@ -30,5 +30,10 @@ data:
{{- include "helm-toolkit.scripts.db_drop" . | indent 4 }}
ks-user.sh: |
{{- include "helm-toolkit.scripts.keystone_user" . | indent 4 }}
db-sync.sh: |
{{ tuple "bin/_db-sync.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
skyline-apiserver-init.sh: |
{{ tuple "bin/_skyline-apiserver-init.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
skyline-apiserver.sh: |
{{ tuple "bin/_skyline-apiserver.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}

View File

@@ -50,13 +50,50 @@ spec:
{{ .Values.labels.skyline.node_selector_key }}: {{ .Values.labels.skyline.node_selector_value }}
initContainers:
{{ tuple $envAll "skyline" $mounts_skyline_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers:
- name: skyline
- name: api-init
{{ tuple $envAll "skyline" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ dict "envAll" $envAll "application" "skyline" "container" "skyline" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
command:
- /bin/sh
- -c
- /tmp/skyline-apiserver-init.sh
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: skyline-bin
mountPath: /tmp/skyline-apiserver-init.sh
subPath: skyline-apiserver-init.sh
readOnly: true
- name: skyline-etc
mountPath: /etc/skyline/skyline.yaml
subPath: skyline.yaml
readOnly: true
- name: skyline-etc
mountPath: /etc/skyline/gunicorn.py
subPath: gunicorn.py
readOnly: true
- name: nginx-etc
mountPath: /etc/nginx
{{ if $mounts_skyline_init.volumeMounts }}{{ toYaml $mounts_skyline_init.volumeMounts | indent 12 }}{{ end }}
containers:
- name: nginx
command:
- /bin/sh
- -c
- cp /etc/nginx/.skyline/nginx.conf /etc/nginx/nginx.conf && nginx -g 'daemon off;'
{{ tuple $envAll "skyline_nginx" | include "helm-toolkit.snippets.image" | indent 10 }}
ports:
- name: api
containerPort: {{ tuple "skyline" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: nginx-etc
mountPath: /etc/nginx/.skyline
- name: skyline
{{ tuple $envAll "skyline" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ dict "envAll" $envAll "application" "skyline" "container" "skyline" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
command:
- /tmp/skyline-apiserver.sh
volumeMounts:
- name: pod-tmp
mountPath: /tmp
@@ -70,12 +107,22 @@ spec:
mountPath: /etc/skyline/gunicorn.py
subPath: gunicorn.py
readOnly: true
- name: skyline-bin
mountPath: /tmp/skyline-apiserver.sh
subPath: skyline-apiserver.sh
readOnly: true
{{ if $mounts_skyline.volumeMounts }}{{ toYaml $mounts_skyline.volumeMounts | indent 12 }}{{ end }}
volumes:
- name: pod-tmp
emptyDir: {}
- name: nginx-etc
emptyDir: {}
- name: skyline-var-lib
emptyDir: {}
- name: skyline-bin
configMap:
name: skyline-bin
defaultMode: 0555
- name: skyline-etc
secret:
secretName: skyline-etc

View File

@@ -62,10 +62,16 @@ spec:
image: {{ .Values.images.tags.skyline_db_sync | quote }}
imagePullPolicy: {{ .Values.images.pull_policy | quote }}
{{ tuple . .Values.pod.resources.jobs.db_sync | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
env:
- name: KOLLA_BOOTSTRAP
value: ""
{{ dict "envAll" . "application" "skyline" "container" "db_sync" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
command:
- /bin/sh
- -c
- /tmp/db-sync.sh
volumeMounts:
- name: skyline-bin
mountPath: /tmp/db-sync.sh
subPath: db-sync.sh
readOnly: true
- name: pod-tmp
mountPath: /tmp
- name: etc-service
@@ -80,6 +86,10 @@ spec:
emptyDir: {}
- name: etc-service
emptyDir: {}
- name: skyline-bin
configMap:
name: skyline-bin
defaultMode: 0555
- name: db-sync-conf
secret:
secretName: {{ $configMapEtc | quote }}

View File

@@ -26,11 +26,12 @@ helm3_hook: true
images:
pull_policy: IfNotPresent
tags:
skyline_db_sync: quay.io/airshipit/skyline:latest
skyline: quay.io/airshipit/skyline:latest
db_init: quay.io/airshipit/heat:2025.1-ubuntu_jammy
skyline_db_sync: quay.io/airshipit/skyline:2025.2-ubuntu_noble
skyline: quay.io/airshipit/skyline:2025.2-ubuntu_noble
skyline_nginx: quay.io/airshipit/skyline:2025.2-ubuntu_noble
db_init: quay.io/airshipit/heat:2025.2-ubuntu_noble
dep_check: 'quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_jammy'
ks_user: quay.io/airshipit/heat:2025.1-ubuntu_jammy
ks_user: quay.io/airshipit/heat:2025.2-ubuntu_noble
local_registry:
active: false
exclude:
@@ -90,7 +91,7 @@ endpoints:
path: /skyline
scheme:
default: mysql+pymysql
skyline: mysql
skyline: mysql+pymysql
port:
mysql:
default: 3306

View File

@@ -0,0 +1,10 @@
---
images:
tags:
skyline_db_sync: quay.io/airshipit/skyline:2025.1-ubuntu_jammy
skyline: quay.io/airshipit/skyline:2025.1-ubuntu_jammy
skyline_nginx: quay.io/airshipit/skyline:2025.1-ubuntu_jammy
db_init: quay.io/airshipit/heat:2025.1-ubuntu_jammy
dep_check: 'quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_jammy'
ks_user: quay.io/airshipit/heat:2025.1-ubuntu_jammy
...

View File

@@ -0,0 +1,10 @@
---
images:
tags:
skyline_db_sync: quay.io/airshipit/skyline:2025.2-ubuntu_noble
skyline: quay.io/airshipit/skyline:2025.2-ubuntu_noble
skyline_nginx: quay.io/airshipit/skyline:2025.2-ubuntu_noble
db_init: quay.io/airshipit/heat:2025.2-ubuntu_noble
dep_check: 'quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_jammy'
ks_user: quay.io/airshipit/heat:2025.2-ubuntu_noble
...

View File

@@ -55,4 +55,14 @@
container_distro_name: ubuntu
container_distro_version: noble
- job:
name: openstack-helm-skyline-2025-2-ubuntu_noble
parent: openstack-helm-skyline
nodeset: openstack-helm-3nodes-ubuntu_noble
timeout: 10800
vars:
osh_params:
openstack_release: "2025.2"
container_distro_name: ubuntu
container_distro_version: noble
...

View File

@@ -485,6 +485,8 @@
name: openstack-helm-skyline
parent: openstack-helm-deploy
timeout: 10800
files:
- skyline/.*
vars:
gate_scripts:
- ./tools/deployment/common/prepare-bashrc.sh

View File

@@ -37,7 +37,6 @@
# 2025.1 Ubuntu Jammy
- openstack-helm-cinder-2025-1-ubuntu_jammy # 3 nodes rook
- openstack-helm-compute-kit-2025-1-ubuntu_jammy # 1 node + 3 nodes
- openstack-helm-skyline-2025-1-ubuntu_jammy # 3 nodes
- openstack-helm-octavia-2025-1-ubuntu_jammy # 4 nodes
- openstack-helm-blazar-2025-1-ubuntu_jammy # 3 nodes; run only if blazar changed
- openstack-helm-cloudkitty-2025-1-ubuntu_jammy # 3 nodes; run only if cloudkitty changed
@@ -50,6 +49,7 @@
- openstack-helm-cinder-2025-2-ubuntu_noble # 5 nodes rook
- openstack-helm-compute-kit-2025-2-ubuntu_noble # 1 node + 3 nodes
- openstack-helm-compute-kit-ovn-2025-2-ubuntu_noble # 1 node + 3 nodes
- openstack-helm-skyline-2025-2-ubuntu_noble # 3 nodes
# Infra jobs
- openstack-helm-logging
- openstack-helm-monitoring