ci: add full-node tests (#920)

This commit is contained in:
Mohammed Naser authored and GitHub committed 2024-02-05 18:49:35 -05:00
1 parent ef722deb89
commit 12207173bb
102 files changed
+8149 -1227

No files matched your search

+8 -1
View File
@@ -5,10 +5,17 @@ exclude_paths:
- charts
- molecule
- playbooks
- plugins/filter
- roles/defaults/vars/main.yml
- roles/kube_prometheus_stack/files/jsonnet
- vendir.lock.yml
warn_list:
mock_roles:
- opendev.container_registry
skip_list:
- jinja[invalid]
- jinja[spacing]
- var-naming[no-reserved]
- var-naming[no-role-prefix]
- yaml[line-length]
+1
View File
@@ -0,0 +1 @@
.gitignore
+1 -1
View File
@@ -1 +1 @@
use nix
use flake
-123
View File
@@ -1,123 +0,0 @@
# Copyright (c) 2023 VEXXHOST, Inc.
#
# 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: ceph
on:
pull_request:
paths-ignore:
- images/**
- go.mod
- go.sum
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
network_backend:
type: choice
description: 'Network backend type'
required: true
default: 'ovn'
options:
- openvswitch
- ovn
jobs:
debug:
runs-on: v3-standard-16
if: github.event_name == 'workflow_dispatch' && inputs.debug_enabled
strategy:
fail-fast: false
concurrency:
group: ${{ github.ref }}-${{ inputs.network_backend }}
cancel-in-progress: true
steps:
- name: Checkout project
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Poetry
run: pipx install poetry
- name: Setup Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
with:
cache: poetry
- name: Install dependencies
run: poetry install --no-interaction --with dev
# NOTE(mnaser): LVM commands take a long time if there are any existing
# loop devices created by "snapd", so we uninstall it.
- name: Uninstall "snapd"
run: sudo apt-get purge -y snapd
- name: Turn off swap
run: sudo swapoff -a
- name: Run Molecule Converge
run: poetry run molecule converge -s ceph
env:
ATMOSPHERE_NETWORK_BACKEND: ${{ inputs.network_backend }}
# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@a283f9441d2d96eb62436dc46d7014f5d357ac22 # v3
timeout-minutes: 60
- name: Run Molecule Destroy
run: poetry run molecule destroy -s ceph
test:
runs-on: v3-standard-16
if: github.event_name != 'workflow_dispatch' || !inputs.debug_enabled
strategy:
fail-fast: false
matrix:
network_backend:
- openvswitch
- ovn
concurrency:
group: ${{ github.ref }}-${{ matrix.network_backend }}
cancel-in-progress: true
steps:
- name: Checkout project
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Poetry
run: pipx install poetry
- name: Setup Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
with:
cache: poetry
- name: Install dependencies
run: poetry install --no-interaction --with dev
# NOTE(mnaser): LVM commands take a long time if there are any existing
# loop devices created by "snapd", so we uninstall it.
- name: Uninstall "snapd"
run: sudo apt-get purge -y snapd
- name: Turn off swap
run: sudo swapoff -a
- name: Run Molecule
run: poetry run molecule test -s ceph
env:
ATMOSPHERE_NETWORK_BACKEND: ${{ matrix.network_backend }}
-14
View File
@@ -1,14 +0,0 @@
name: check
on:
pull_request:
jobs:
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
with:
go-version-file: go.mod
- run: go test -v ./...
-34
View File
@@ -1,34 +0,0 @@
name: docs
on:
pull_request:
paths:
- 'docs/**'
push:
branches:
- main
paths:
- 'docs/**'
permissions:
contents: write
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Earthly
uses: earthly/actions-setup@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
run: earthly --secret GITHUB_TOKEN +mkdocs-build
env:
EARTHLY_CI: true
EARTHLY_PUSH: "${{ github.event_name == 'push' }}"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-46
View File
@@ -1,46 +0,0 @@
# Copyright (c) 2023 VEXXHOST, Inc.
#
# 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: image-manifest
on:
pull_request:
paths-ignore:
- images/**
- go.mod
- go.sum
jobs:
test:
runs-on: v3-standard-8
steps:
- name: Checkout project
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Poetry
run: pipx install poetry
- name: Setup Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
with:
cache: poetry
- name: Install dependencies
run: ansible-galaxy install -r molecule/image-manifest/requirements.yml
- name: Install dependencies
run: poetry install --no-interaction --with dev
- name: Run Molecule
run: poetry run molecule test -s image-manifest
-87
View File
@@ -1,87 +0,0 @@
name: images
on:
pull_request:
push:
branches:
- main
permissions:
packages: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Earthly
uses: earthly/actions-setup@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Earthly
run: |
mkdir -p ~/.earthly/certs
cat << EOF > ~/.earthly/certs/ca_cert.pem
${{ secrets.EARTHLY_CA_CERT }}
EOF
cat << EOF > ~/.earthly/certs/earthly_cert.pem
${{ secrets.EARTHLY_CERT }}
EOF
cat << EOF > ~/.earthly/certs/earthly_key.pem
${{ secrets.EARTHLY_CERT_KEY }}
EOF
cat << EOF > ~/.earthly/config.yml
global:
buildkit_host: tcp://162.253.55.125:8372
EOF
- name: Login to GitHub Container Registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build images
run: earthly +images
env:
EARTHLY_CI: true
EARTHLY_PUSH: "${{ github.event_name == 'push' }}"
scan:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout project
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Earthly
uses: earthly/actions-setup@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Earthly
run: |
mkdir -p ~/.earthly/certs
cat << EOF > ~/.earthly/certs/ca_cert.pem
${{ secrets.EARTHLY_CA_CERT }}
EOF
cat << EOF > ~/.earthly/certs/earthly_cert.pem
${{ secrets.EARTHLY_CERT }}
EOF
cat << EOF > ~/.earthly/certs/earthly_key.pem
${{ secrets.EARTHLY_CERT_KEY }}
EOF
cat << EOF > ~/.earthly/config.yml
global:
buildkit_host: tcp://162.253.55.125:8372
EOF
- name: Scan images
run: earthly +scan-images
env:
EARTHLY_CI: true
-46
View File
@@ -1,46 +0,0 @@
# Copyright (c) 2023 VEXXHOST, Inc.
#
# 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: PXC
on:
pull_request:
paths-ignore:
- images/**
- go.mod
- go.sum
jobs:
molecule:
runs-on: v3-standard-8
steps:
- name: Checkout project
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Poetry
run: pipx install poetry
- name: Setup Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
with:
cache: poetry
- name: Install dependencies
run: poetry install --no-interaction --with dev
- name: Turn off swap
run: sudo swapoff -a
- name: Run Molecule
run: poetry run molecule test -s pxc
+4
View File
@@ -13,3 +13,7 @@ tests/output
*.orig
*.rej
.direnv
junit.xml
junit-go.xml
ansible-lint.xml
output
+9
View File
@@ -0,0 +1,9 @@
{
"ignores": [
"docs/static/*.png",
],
"outputFormatters": [
[ "markdownlint-cli2-formatter-junit", { "name": "junit.xml" } ],
[ "markdownlint-cli2-formatter-default" ]
]
}
-12
View File
@@ -16,12 +16,6 @@ repos:
stages:
- commit-msg
- repo: https://github.com/ansible/ansible-lint
rev: v6.13.1
hooks:
- id: ansible-lint
files: \.(yaml|yml)$
- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
@@ -36,9 +30,3 @@ repos:
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.32.2
hooks:
- id: markdownlint
args: ["--ignore=CHANGELOG.md"]
+118 -32
View File
@@ -1,4 +1,91 @@
VERSION --use-copy-link 0.7
VERSION --use-copy-link --try 0.8
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
lint:
BUILD +lint.ansible-lint
BUILD +lint.markdownlint
BUILD +lint.image-manifest
lint.helm:
FROM alpine:3
RUN mkdir -p /output
COPY --dir charts/ /src
FOR CHART IN $(ls /src)
FOR VERSION IN $(seq 22 28)
COPY (+lint.helm.chart/junit.xml --CHART ${CHART} --VERSION "1.${VERSION}.0") /output/junit-helm-${CHART}-1-${VERSION}-0.xml
END
END
SAVE ARTIFACT /output AS LOCAL output
lint.helm.chart:
FROM alpine:3
RUN apk add --no-cache git helm python3
RUN helm plugin install https://github.com/melmorabity/helm-kubeconform
RUN mkdir -p /cache /output
ARG --required CHART
COPY --dir charts/${CHART} /src
ARG --required VERSION
RUN \
--mount=type=cache,target=/cache \
helm kubeconform /src \
--cache /cache \
--schema-location default \
--schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json' \
--ignore-missing-schemas \
--kube-version ${VERSION} \
--output junit 2> /output/junit.xml
SAVE ARTIFACT /output/junit.xml
lint.markdownlint:
FROM davidanson/markdownlint-cli2
COPY --dir docs/ .markdownlint.yaml .markdownlint-cli2.jsonc /src
WORKDIR /src
TRY
RUN markdownlint-cli2 **
FINALLY
SAVE ARTIFACT /src/junit.xml AS LOCAL junit.xml
END
lint.ansible-lint:
FROM registry.gitlab.com/pipeline-components/ansible-lint:latest
COPY --dir meta/ molecule/ playbooks/ plugins/ roles/ tests/ .ansible-lint CHANGELOG.md galaxy.yml /code
TRY
RUN ansible-lint -v --show-relpath -f pep8 --nocolor | ansible-lint-junit -o ansible-lint.xml
FINALLY
SAVE ARTIFACT ansible-lint.xml AS LOCAL ansible-lint.xml
END
lint.image-manifest:
FROM quay.io/skopeo/stable:latest
COPY roles/defaults/vars/main.yml /defaults.yml
FOR IMAGE IN $(cat /defaults.yml | grep sha256 | cut -d' ' -f4 | sort | uniq | sed 's/:[^@]*//')
BUILD +lint.image-manifest.image --IMAGE ${IMAGE}
END
lint.image-manifest.image:
FROM quay.io/skopeo/stable:latest
ARG --required IMAGE
RUN skopeo inspect --no-tags docker://${IMAGE} >/dev/null && echo "Manifest is valid for ${IMAGE}" || echo "Manifest is not valid for ${IMAGE}"
unit.go:
FROM golang:1.21
RUN go install github.com/jstemmer/go-junit-report/v2@latest
COPY --dir go.mod go.sum /src
WORKDIR /src
RUN go mod download
COPY --dir charts/ cmd/ internal/ roles/ tools/ /src
TRY
RUN go test -v 2>&1 ./... | go-junit-report -set-exit-code > junit-go.xml
FINALLY
SAVE ARTIFACT /src/junit-go.xml AS LOCAL junit-go.xml
END
build.collection:
FROM registry.gitlab.com/pipeline-components/ansible-lint:latest
COPY . /src
RUN ansible-galaxy collection build /src
SAVE ARTIFACT /code/*.tar.gz AS LOCAL dist/
go.build:
FROM golang:1.21
@@ -27,7 +114,7 @@ libvirt-tls-sidecar.platform-image:
--platform=linux/amd64 \
(+libvirt-tls-sidecar.build/main --GOARCH=$TARGETARCH --VARIANT=$TARGETVARIANT) /usr/bin/libvirt-tls-sidecar
ENTRYPOINT ["/usr/bin/libvirt-tls-sidecar"]
SAVE IMAGE --push ghcr.io/vexxhost/atmosphere/libvirt-tls-sidecar:latest
SAVE IMAGE --push ${REGISTRY}/libvirt-tls-sidecar:latest
libvirt-tls-sidecar.image:
BUILD --platform=linux/amd64 --platform=linux/arm64 +libvirt-tls-sidecar.platform-image
@@ -79,37 +166,37 @@ image:
ENV PATH=/venv/bin:$PATH
COPY +build.collections/ /usr/share/ansible
ARG tag=latest
SAVE IMAGE --push ghcr.io/vexxhost/atmosphere:${tag}
SAVE IMAGE --push ${REGISTRY}:${tag}
images:
BUILD +libvirt-tls-sidecar.image
BUILD ./images/barbican+image
BUILD ./images/cinder+image
BUILD ./images/cluster-api-provider-openstack+image
BUILD ./images/designate+image
BUILD ./images/glance+image
BUILD ./images/heat+image
BUILD ./images/horizon+image
BUILD ./images/ironic+image
BUILD ./images/keystone+image
BUILD ./images/kubernetes-entrypoint+image
BUILD ./images/libvirtd+image
BUILD ./images/magnum+image
BUILD ./images/manila+image
BUILD ./images/netoffload+image
BUILD ./images/neutron+image
BUILD ./images/nova-ssh+image
BUILD ./images/nova+image
BUILD ./images/octavia+image
BUILD ./images/openvswitch+image
BUILD ./images/ovn+images
BUILD ./images/placement+image
BUILD ./images/senlin+image
BUILD ./images/staffeln+image
BUILD ./images/tempest+image
BUILD +libvirt-tls-sidecar.image --REGISTRY=${REGISTRY}
BUILD ./images/barbican+image --REGISTRY=${REGISTRY}
BUILD ./images/cinder+image --REGISTRY=${REGISTRY}
BUILD ./images/cluster-api-provider-openstack+image --REGISTRY=${REGISTRY}
BUILD ./images/designate+image --REGISTRY=${REGISTRY}
BUILD ./images/glance+image --REGISTRY=${REGISTRY}
BUILD ./images/heat+image --REGISTRY=${REGISTRY}
BUILD ./images/horizon+image --REGISTRY=${REGISTRY}
BUILD ./images/ironic+image --REGISTRY=${REGISTRY}
BUILD ./images/keystone+image --REGISTRY=${REGISTRY}
BUILD ./images/kubernetes-entrypoint+image --REGISTRY=${REGISTRY}
BUILD ./images/libvirtd+image --REGISTRY=${REGISTRY}
BUILD ./images/magnum+image --REGISTRY=${REGISTRY}
BUILD ./images/manila+image --REGISTRY=${REGISTRY}
BUILD ./images/netoffload+image --REGISTRY=${REGISTRY}
BUILD ./images/neutron+image --REGISTRY=${REGISTRY}
BUILD ./images/nova-ssh+image --REGISTRY=${REGISTRY}
BUILD ./images/nova+image --REGISTRY=${REGISTRY}
BUILD ./images/octavia+image --REGISTRY=${REGISTRY}
BUILD ./images/openvswitch+image --REGISTRY=${REGISTRY}
BUILD ./images/ovn+images --REGISTRY=${REGISTRY}
BUILD ./images/placement+image --REGISTRY=${REGISTRY}
BUILD ./images/senlin+image --REGISTRY=${REGISTRY}
BUILD ./images/staffeln+image --REGISTRY=${REGISTRY}
BUILD ./images/tempest+image --REGISTRY=${REGISTRY}
SCAN_IMAGE:
COMMAND
FUNCTION
ARG --required IMAGE
# TODO(mnaser): Include secret scanning when it's more reliable.
RUN \
@@ -130,16 +217,15 @@ scan-images:
FROM ./images/trivy+image
COPY roles/defaults/vars/main.yml /defaults.yml
# TODO(mnaser): Scan all images eventually
FOR IMAGE IN $(cat /defaults.yml | grep 'ghcr.io/vexxhost' | cut -d' ' -f4 | sort | uniq)
FOR IMAGE IN $(cat /defaults.yml | egrep -E 'ghcr.io/vexxhost|registry.atmosphere.dev' | cut -d' ' -f4 | sort | uniq)
BUILD +scan-image --IMAGE ${IMAGE}
# DO +SCAN_IMAGE --IMAGE ${IMAGE}
END
pin-images:
FROM +build.venv.dev
COPY roles/defaults/vars/main.yml /defaults.yml
COPY build/pin-images.py /usr/local/bin/pin-images
RUN --no-cache /usr/local/bin/pin-images /defaults.yml /pinned.yml
RUN --no-cache /usr/local/bin/pin-images --registry ${REGISTRY} /defaults.yml /pinned.yml
SAVE ARTIFACT /pinned.yml AS LOCAL roles/defaults/vars/main.yml
gh:
Vendored
+202
View File
@@ -0,0 +1,202 @@
pipeline {
agent none
options {
disableConcurrentBuilds(abortPrevious: true);
}
// TODO: periodic multi-node jobs
environment {
TEST_REGISTRY = "registry.atmosphere.dev:5000/${env.BRANCH_NAME.toLowerCase()}"
PROD_REGISTRY = "ghcr.io/vexxhost/atmosphere"
REGISTRY = "${env.BRANCH_NAME == 'main' ? PROD_REGISTRY : TEST_REGISTRY}"
EARTHLY_CI = 'true'
EARTHLY_BUILD_ARGS = "REGISTRY=${REGISTRY}"
}
stages {
stage('lint') {
parallel {
stage('ansible-lint') {
agent {
label 'earthly'
}
steps {
sh 'earthly --output +lint.ansible-lint'
}
post {
always {
junit testResults: 'ansible-lint.xml', allowEmptyResults: true
}
}
}
stage('helm') {
agent {
label 'earthly'
}
steps {
sh 'earthly --output +lint.helm'
}
post {
always {
junit testResults: 'output/junit-helm-*.xml', allowEmptyResults: true
}
}
}
stage('markdownlint') {
agent {
label 'earthly'
}
steps {
sh 'earthly --output +lint.markdownlint'
}
post {
always {
junit testResults: 'junit.xml', allowEmptyResults: true
}
}
}
stage('image-manifest') {
agent {
label 'earthly'
}
steps {
sh 'earthly +lint.image-manifest'
}
}
}
}
stage('unit') {
parallel {
stage('go') {
agent {
label 'earthly'
}
steps {
sh 'earthly --output +unit.go'
}
post {
always {
junit 'junit-go.xml'
}
}
}
}
}
stage('build') {
parallel {
stage('collection') {
agent {
label 'earthly'
}
steps {
sh 'earthly --output +build.collection'
archiveArtifacts artifacts: 'dist/**'
}
}
stage('images') {
agent {
label 'earthly'
}
steps {
script {
if (env.BRANCH_NAME == 'main') {
docker.withRegistry('https://ghcr.io', 'github-packages-token') {
sh 'earthly --push +images'
}
} else {
sh 'earthly --push +images'
}
}
sh 'earthly --output +pin-images'
sh 'earthly +scan-images'
stash name: 'src-with-pinned-images', includes: '**'
}
}
stage('docs') {
agent {
label 'earthly'
}
steps {
sh 'earthly +mkdocs-build'
}
}
}
}
stage('integration') {
matrix {
axes {
axis {
name 'NETWORK_BACKEND'
values 'openvswitch', 'ovn'
}
}
agent {
label 'jammy-16c-64g'
}
environment {
ATMOSPHERE_DEBUG = "true"
ATMOSPHERE_NETWORK_BACKEND = "${NETWORK_BACKEND}"
}
stages {
stage('molecule') {
steps {
// Checkout code with built/pinned images
unstash 'src-with-pinned-images'
// Install dependencies
sh 'sudo apt-get install -y git python3-pip'
sh 'sudo pip install poetry'
// Run tests
sh 'sudo poetry install --with dev'
sh 'sudo --preserve-env=ATMOSPHERE_DEBUG,ATMOSPHERE_NETWORK_BACKEND poetry run molecule test -s aio'
}
}
}
post {
always {
// Kubernetes logs
sh "sudo ./build/fetch-kubernetes-logs.sh logs/${NETWORK_BACKEND}/kubernetes || true"
archiveArtifacts artifacts: 'logs/**', allowEmptyArchive: true
// JUnit results for Tempest
sh "sudo ./build/fetch-junit-xml.sh tempest-${NETWORK_BACKEND}.xml || true"
junit "tempest-${NETWORK_BACKEND}.xml"
}
}
}
}
// promote images
// release?
// todo: manual pin commit to main (avoiding loop)
}
}
+18
View File
@@ -0,0 +1,18 @@
# Copyright (c) 2022 VEXXHOST, Inc.
#
# 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.
REPORT_FILE_NAME="${1:-report.xml}"
sudo apt-get install -y subunit python3-junitxml
sudo subunit-1to2 /tmp/stestr/0 | subunit2junitxml > "${REPORT_FILE_NAME}"
+78
View File
@@ -0,0 +1,78 @@
#!/bin/bash -x
# Check if an argument was provided
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <path_to_save_logs>"
exit 1
fi
# Define the base directory where you want to save the logs
BASE_DIR="$1"
# Create the base directory if it doesn't exist
mkdir -p "$BASE_DIR"
# Function to fetch logs for a pod and container
fetch_logs() {
local ns="$1"
local pod="$2"
local container="$3"
local pod_dir="$BASE_DIR/$ns/$pod"
local log_file="$pod_dir/$container.log"
local prev_log_file="$pod_dir/${container}-previous.log"
# Ensure the pod directory exists
mkdir -p "$pod_dir"
# Fetch current logs
kubectl logs "$pod" -n "$ns" -c "$container" > "$log_file" 2>/dev/null
# Fetch previous logs if they exist
if kubectl logs "$pod" -n "$ns" -c "$container" --previous &>/dev/null; then
kubectl logs "$pod" -n "$ns" -c "$container" --previous > "$prev_log_file" 2>/dev/null
fi
}
export -f fetch_logs
export BASE_DIR
# Get all namespaces
namespaces=$(kubectl get ns -o jsonpath='{.items[*].metadata.name}')
# Loop through each namespace
for ns in $namespaces; do
(
# Create a directory for the namespace
mkdir -p "$BASE_DIR/$ns"
# Get all pods in the namespace
pods=$(kubectl get pods -n "$ns" -o jsonpath='{.items[*].metadata.name}')
# Loop through each pod
for pod in $pods; do
(
# Create a directory for the pod
mkdir -p "$BASE_DIR/$ns/$pod"
# Get all containers in the pod
containers=$(kubectl get pod "$pod" -n "$ns" -o jsonpath='{.spec.containers[*].name}')
# Loop through each container
for container in $containers; do
# Fetch logs in parallel
fetch_logs "$ns" "$pod" "$container" &
done
# Wait for all background log fetches to complete before moving to the next pod
wait
) &
done
# Wait for all background pods processing to complete before moving to the next namespace
wait
) &
done
# Wait for all background namespaces processing to complete
wait
echo "Logs have been saved to $BASE_DIR"
+21 -3
View File
@@ -3,11 +3,11 @@
import argparse
import functools
import requests
from docker_image import reference
from oslo_config import cfg
from oslo_log import log as logging
from ruyaml import YAML
import requests
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
@@ -46,7 +46,11 @@ def get_digest(image_ref, token=None):
def get_pinned_image(image_src):
image_ref = reference.Reference.parse(image_src)
if image_ref.domain() in ("registry.k8s.io", "us-docker.pkg.dev"):
if image_ref.domain() in (
"registry.k8s.io",
"us-docker.pkg.dev",
"registry.atmosphere.dev",
):
digest = get_digest(image_ref)
if image_ref.domain() == "quay.io":
@@ -109,16 +113,30 @@ def main():
"src", help="Path for default values file", type=argparse.FileType("r")
)
parser.add_argument("dst", help="Path for output file", type=argparse.FileType("w"))
parser.add_argument(
"-r",
"--registry",
default="ghcr.io/vexxhost/atmosphere",
help="Registry containing Atmosphere images",
)
args = parser.parse_args()
registry = args.registry
if "registry.atmosphere.dev:5000" in registry:
registry = registry.replace(
"registry.atmosphere.dev:5000", "registry.atmosphere.dev"
)
yaml = YAML(typ="rt")
data = yaml.load(args.src)
for image in data["_atmosphere_images"]:
if image in SKIP_IMAGE_LIST:
continue
image_src = data["_atmosphere_images"][image]
image_src = data["_atmosphere_images"][image].replace(
"ghcr.io/vexxhost/atmosphere", registry
)
pinned_image = get_pinned_image(image_src)
LOG.info("Pinning image %s from %s to %s", image, image_src, pinned_image)
@@ -17,6 +17,9 @@ limitations under the License.
set -ex
chown ${NEUTRON_USER_UID} /var/lib/neutron/openstack-helm
{{- if (has "ovn" .Values.network.backend) }}
chown ${NEUTRON_USER_UID} /run/openvswitch/db.sock
{{- end }}
{{- if and ( empty .Values.conf.neutron.DEFAULT.host ) ( .Values.pod.use_fqdn.neutron_agent ) }}
mkdir -p /tmp/pod-shared
@@ -100,6 +100,8 @@ spec:
command:
- /tmp/neutron-metadata-agent-init.sh
volumeMounts:
- name: run
mountPath: /run
- name: pod-tmp
mountPath: /tmp
- name: neutron-bin
@@ -1,39 +0,0 @@
#!/bin/bash -xe
# Copyright 2023 VEXXHOST, Inc.
#
# 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.
COMMAND="${@:-start}"
function start () {
/usr/share/ovn/scripts/ovn-ctl start_controller \
--ovn-manage-ovsdb=no
tail --follow=name /var/log/ovn/ovn-controller.log
}
function stop () {
/usr/share/ovn/scripts/ovn-ctl stop_controller
pkill tail
}
function liveness () {
ovs-appctl -t /var/run/ovn/ovn-controller.$(cat /var/run/ovn/ovn-controller.pid).ctl status
}
function readiness () {
ovs-appctl -t /var/run/ovn/ovn-controller.$(cat /var/run/ovn/ovn-controller.pid).ctl status
}
$COMMAND
@@ -1,57 +0,0 @@
#!/bin/bash -xe
# Copyright 2023 VEXXHOST, Inc.
#
# 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.
COMMAND="${@:-start}"
{{- $nb_svc_name := "ovn-ovsdb-nb" -}}
{{- $nb_svc := (tuple $nb_svc_name "internal" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup") -}}
{{- $nb_port := (tuple "ovn-ovsdb-nb" "internal" "ovsdb" . | include "helm-toolkit.endpoints.endpoint_port_lookup") -}}
{{- $nb_service_list := list -}}
{{- range $i := until (.Values.pod.replicas.ovn_ovsdb_nb | int) -}}
{{- $nb_service_list = printf "tcp:%s-%d.%s:%s" $nb_svc_name $i $nb_svc $nb_port | append $nb_service_list -}}
{{- end -}}
{{- $sb_svc_name := "ovn-ovsdb-sb" -}}
{{- $sb_svc := (tuple $sb_svc_name "internal" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup") -}}
{{- $sb_port := (tuple "ovn-ovsdb-sb" "internal" "ovsdb" . | include "helm-toolkit.endpoints.endpoint_port_lookup") -}}
{{- $sb_service_list := list -}}
{{- range $i := until (.Values.pod.replicas.ovn_ovsdb_sb | int) -}}
{{- $sb_service_list = printf "tcp:%s-%d.%s:%s" $sb_svc_name $i $sb_svc $sb_port | append $sb_service_list -}}
{{- end }}
function start () {
/usr/share/ovn/scripts/ovn-ctl start_northd \
--ovn-manage-ovsdb=no \
--ovn-northd-nb-db={{ include "helm-toolkit.utils.joinListWithComma" $nb_service_list }} \
--ovn-northd-sb-db={{ include "helm-toolkit.utils.joinListWithComma" $sb_service_list }}
tail --follow=name /var/log/ovn/ovn-northd.log
}
function stop () {
/usr/share/ovn/scripts/ovn-ctl stop_northd
pkill tail
}
function liveness () {
ovs-appctl -t /var/run/ovn/ovn-northd.$(cat /var/run/ovn/ovn-northd.pid).ctl status
}
function readiness () {
ovs-appctl -t /var/run/ovn/ovn-northd.$(cat /var/run/ovn/ovn-northd.pid).ctl status
}
$COMMAND
@@ -1,72 +0,0 @@
#!/bin/bash -xe
# Copyright 2023 VEXXHOST, Inc.
#
# 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.
COMMAND="${@:-start}"
OVSDB_HOST=$(hostname -f)
ARGS=(
--db-${OVS_DATABASE}-create-insecure-remote=yes
--db-${OVS_DATABASE}-cluster-local-proto=tcp
--db-${OVS_DATABASE}-cluster-local-addr=$(hostname -f)
)
if [[ ! $HOSTNAME == *-0 && $OVSDB_HOST =~ (.+)-([0-9]+)\. ]]; then
OVSDB_BOOTSTRAP_HOST="${BASH_REMATCH[1]}-0.${OVSDB_HOST#*.}"
ARGS+=(
--db-${OVS_DATABASE}-cluster-remote-proto=tcp
--db-${OVS_DATABASE}-cluster-remote-addr=${OVSDB_BOOTSTRAP_HOST}
)
fi
function start () {
/usr/share/ovn/scripts/ovn-ctl start_${OVS_DATABASE}_ovsdb ${ARGS[@]}
tail --follow=name /var/log/ovn/ovsdb-server-${OVS_DATABASE}.log
}
function stop () {
/usr/share/ovn/scripts/ovn-ctl stop_${OVS_DATABASE}_ovsdb
pkill tail
}
function liveness () {
if [[ $OVS_DATABASE == "nb" ]]; then
OVN_DATABASE="Northbound"
elif [[ $OVS_DATABASE == "sb" ]]; then
OVN_DATABASE="Southbound"
else
echo "OVS_DATABASE must be nb or sb"
exit 1
fi
ovs-appctl -t /var/run/ovn/ovn${OVS_DATABASE}_db.ctl cluster/status OVN_${OVN_DATABASE}
}
function readiness () {
if [[ $OVS_DATABASE == "nb" ]]; then
OVN_DATABASE="Northbound"
elif [[ $OVS_DATABASE == "sb" ]]; then
OVN_DATABASE="Southbound"
else
echo "OVS_DATABASE must be nb or sb"
exit 1
fi
ovs-appctl -t /var/run/ovn/ovn${OVS_DATABASE}_db.ctl cluster/status OVN_${OVN_DATABASE}
}
$COMMAND
-6
View File
@@ -24,12 +24,6 @@ data:
image-repo-sync.sh: |
{{- include "helm-toolkit.scripts.image_repo_sync" . | indent 4 }}
{{- end }}
ovsdb-server.sh: |
{{ tuple "bin/_ovsdb-server.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
ovn-northd.sh: |
{{ tuple "bin/_ovn-northd.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
ovn-controller-init.sh: |
{{ tuple "bin/_ovn-controller-init.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
ovn-controller.sh: |
{{ tuple "bin/_ovn-controller.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
@@ -12,6 +12,15 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- define "controllerGatewayReadinessProbeTemplate" }}
exec:
command:
- /usr/bin/ovn-kube-util
- readiness-probe
- -t
- ovn-controller
{{- end }}
{{- if .Values.manifests.daemonset_ovn_controller_gw }}
{{- $envAll := . }}
@@ -76,25 +85,33 @@ spec:
readOnly: true
containers:
- name: controller
command:
- /root/ovnkube.sh
- ovn-controller
{{ tuple $envAll "ovn_controller" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.server | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
{{ dict "envAll" $envAll "application" "ovn_controller_gw" "container" "controller" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
command:
- /tmp/ovn-controller.sh
- start
lifecycle:
preStop:
exec:
command:
- /tmp/ovn-controller.sh
- stop
{{ dict "envAll" . "component" "ovn_controller_gw" "container" "controller" "type" "readiness" "probeTemplate" (include "controllerGatewayReadinessProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
env:
- name: OVN_DAEMONSET_VERSION
value: "3"
- name: OVN_LOGLEVEL_CONTROLLER
value: "-vconsole:info -vfile:info"
- name: OVN_KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: OVN_KUBERNETES_NB_STATEFULSET
value: ovn-ovsdb-nb
- name: OVN_KUBERNETES_SB_STATEFULSET
value: ovn-ovsdb-sb
- name: OVN_SSL_ENABLE
value: "no"
volumeMounts:
- name: ovn-bin
mountPath: /tmp/ovn-controller.sh
subPath: ovn-controller.sh
readOnly: true
- name: run-openvswitch
mountPath: /run/openvswitch
mountPath: /var/run/ovn
- name: run-openvswitch
mountPath: /var/run/openvswitch
volumes:
- name: ovn-bin
configMap:
+31 -14
View File
@@ -12,6 +12,15 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- define "controllerReadinessProbeTemplate" }}
exec:
command:
- /usr/bin/ovn-kube-util
- readiness-probe
- -t
- ovn-controller
{{- end }}
{{- if .Values.manifests.daemonset_ovn_controller }}
{{- $envAll := . }}
@@ -76,25 +85,33 @@ spec:
readOnly: true
containers:
- name: controller
command:
- /root/ovnkube.sh
- ovn-controller
{{ tuple $envAll "ovn_controller" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.server | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
{{ dict "envAll" $envAll "application" "ovn_controller" "container" "controller" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
command:
- /tmp/ovn-controller.sh
- start
lifecycle:
preStop:
exec:
command:
- /tmp/ovn-controller.sh
- stop
{{ dict "envAll" . "component" "ovn_controller" "container" "controller" "type" "readiness" "probeTemplate" (include "controllerReadinessProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
env:
- name: OVN_DAEMONSET_VERSION
value: "3"
- name: OVN_LOGLEVEL_CONTROLLER
value: "-vconsole:info -vfile:info"
- name: OVN_KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: OVN_KUBERNETES_NB_STATEFULSET
value: ovn-ovsdb-nb
- name: OVN_KUBERNETES_SB_STATEFULSET
value: ovn-ovsdb-sb
- name: OVN_SSL_ENABLE
value: "no"
volumeMounts:
- name: ovn-bin
mountPath: /tmp/ovn-controller.sh
subPath: ovn-controller.sh
readOnly: true
- name: run-openvswitch
mountPath: /run/openvswitch
mountPath: /var/run/ovn
- name: run-openvswitch
mountPath: /var/run/openvswitch
volumes:
- name: ovn-bin
configMap:
+24 -31
View File
@@ -12,18 +12,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- define "livenessProbeTemplate" }}
{{- define "northdReadinessProbeTemplate" }}
exec:
command:
- /tmp/ovn-northd.sh
- liveness
{{- end }}
{{- define "readinessProbeTemplate" }}
exec:
command:
- /tmp/ovn-northd.sh
- readiness
- /usr/bin/ovn-kube-util
- readiness-probe
- -t
- ovn-northd
{{- end }}
{{- if .Values.manifests.deployment_northd }}
@@ -60,28 +55,26 @@ spec:
{{- tuple $envAll "ovn_northd" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers:
- name: northd
command:
- /root/ovnkube.sh
- run-ovn-northd
{{ tuple $envAll "ovn_northd" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.server | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
{{ dict "envAll" $envAll "application" "ovn_northd" "container" "northd" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
{{ dict "envAll" . "component" "ovn_northd" "container" "northd" "type" "liveness" "probeTemplate" (include "livenessProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
{{ dict "envAll" . "component" "ovn_northd" "container" "northd" "type" "readiness" "probeTemplate" (include "readinessProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
command:
- /tmp/ovn-northd.sh
- start
lifecycle:
preStop:
exec:
command:
- /tmp/ovn-northd.sh
- stop
volumeMounts:
- name: ovn-bin
mountPath: /tmp/ovn-northd.sh
subPath: ovn-northd.sh
readOnly: true
volumes:
- name: ovn-bin
configMap:
name: ovn-bin
defaultMode: 0555
{{ dict "envAll" . "component" "ovn_northd" "container" "northd" "type" "readiness" "probeTemplate" (include "northdReadinessProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
env:
- name: OVN_DAEMONSET_VERSION
value: "3"
- name: OVN_LOGLEVEL_NORTHD
value: "-vconsole:info -vfile:info"
- name: OVN_KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: OVN_KUBERNETES_NB_STATEFULSET
value: ovn-ovsdb-nb
- name: OVN_KUBERNETES_SB_STATEFULSET
value: ovn-ovsdb-sb
- name: OVN_SSL_ENABLE
value: "no"
{{- end }}
+11
View File
@@ -0,0 +1,11 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: ovn-controller
rules:
- apiGroups:
- discovery.k8s.io
resources:
- endpointslices
verbs:
- list
+11
View File
@@ -0,0 +1,11 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: ovn-northd
rules:
- apiGroups:
- discovery.k8s.io
resources:
- endpointslices
verbs:
- list
+19
View File
@@ -0,0 +1,19 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: ovn-ovsdb
rules:
- apiGroups:
- "apps"
resources:
- statefulsets
verbs:
- get
- apiGroups:
- ""
resources:
- pods
- endpoints
verbs:
- list
- get
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: ovn-controller
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: ovn-controller
subjects:
- kind: ServiceAccount
name: ovn-controller
- kind: ServiceAccount
name: ovn-controller-gw
@@ -0,0 +1,11 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: ovn-northd
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: ovn-northd
subjects:
- kind: ServiceAccount
name: ovn-northd
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: ovn-ovsdb
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: ovn-ovsdb
subjects:
- kind: ServiceAccount
name: ovn-ovsdb-nb
- kind: ServiceAccount
name: ovn-ovsdb-sb
@@ -20,6 +20,7 @@ kind: Service
metadata:
name: {{ tuple "ovn-ovsdb-nb" "direct" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
spec:
publishNotReadyAddresses: true
ports:
- name: ovsdb
port: {{ tuple "ovn-ovsdb-nb" "internal" "ovsdb" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
@@ -20,6 +20,7 @@ kind: Service
metadata:
name: {{ tuple "ovn-ovsdb-sb" "direct" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
spec:
publishNotReadyAddresses: true
ports:
- name: ovsdb
port: {{ tuple "ovn-ovsdb-sb" "internal" "ovsdb" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+48 -21
View File
@@ -12,6 +12,19 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- define "ovnnbReadinessProbeTemplate" }}
exec:
command:
- /usr/bin/ovn-kube-util
- readiness-probe
- -t
{{- if gt (int .Values.pod.replicas.ovn_ovsdb_nb) 1 }}
- ovnnb-db-raft
{{- else }}
- ovnnb-db
{{- end }}
{{- end }}
{{- if .Values.manifests.statefulset_ovn_ovsdb_nb }}
{{- $envAll := . }}
@@ -28,6 +41,7 @@ metadata:
{{ tuple $envAll "ovn" "ovn-ovsdb-nb" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
spec:
serviceName: {{ tuple "ovn-ovsdb-nb" "direct" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
podManagementPolicy: Parallel
replicas: {{ .Values.pod.replicas.ovn_ovsdb_nb }}
selector:
matchLabels:
@@ -49,41 +63,54 @@ spec:
{{- tuple $envAll "ovn_ovsdb_nb" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers:
- name: ovsdb
command:
- /root/ovnkube.sh
{{- if gt (int .Values.pod.replicas.ovn_ovsdb_nb) 1 }}
- nb-ovsdb-raft
{{- else }}
- nb-ovsdb
{{- end }}
{{ tuple $envAll "ovn_ovsdb_nb" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.server | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
{{ dict "envAll" . "component" "ovn_ovsdb_nb" "container" "ovsdb" "type" "readiness" "probeTemplate" (include "ovnnbReadinessProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
ports:
- containerPort: {{ tuple "ovn-ovsdb-nb" "internal" "ovsdb" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
- containerPort: {{ tuple "ovn-ovsdb-nb" "internal" "raft" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
env:
- name: OVS_DATABASE
value: nb
- name: OVS_PORT
- name: OVN_DAEMONSET_VERSION
value: "3"
- name: OVN_LOGLEVEL_NB
value: "-vconsole:info -vfile:info"
- name: OVN_KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: OVN_KUBERNETES_STATEFULSET
value: ovn-ovsdb-nb
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OVN_SSL_ENABLE
value: "no"
- name: ENABLE_IPSEC
value: "false"
- name: OVN_NB_RAFT_ELECTION_TIMER
value: "1000"
- name: OVN_NB_PORT
value: {{ tuple "ovn-ovsdb-nb" "internal" "ovsdb" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
command:
- /tmp/ovsdb-server.sh
- start
lifecycle:
preStop:
exec:
command:
- /tmp/ovsdb-server.sh
- stop
- name: OVN_NB_RAFT_PORT
value: {{ tuple "ovn-ovsdb-nb" "internal" "raft" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
volumeMounts:
- name: ovn-bin
mountPath: /tmp/ovsdb-server.sh
subPath: ovsdb-server.sh
readOnly: true
- name: run-openvswitch
mountPath: /run/openvswitch
mountPath: /var/run/openvswitch
- name: run-openvswitch
mountPath: /var/run/ovn
- name: data
mountPath: /var/lib/ovn
volumes:
- name: run-openvswitch
emptyDir: {}
- name: ovn-bin
configMap:
name: ovn-bin
defaultMode: 0555
{{- if not .Values.volume.ovn_ovsdb_nb.enabled }}
- name: data
emptyDir: {}
+49 -22
View File
@@ -12,6 +12,19 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- define "ovnsbReadinessProbeTemplate" }}
exec:
command:
- /usr/bin/ovn-kube-util
- readiness-probe
- -t
{{- if gt (int .Values.pod.replicas.ovn_ovsdb_sb) 1 }}
- ovnsb-db-raft
{{- else }}
- ovnsb-db
{{- end }}
{{- end }}
{{- if .Values.manifests.statefulset_ovn_ovsdb_sb }}
{{- $envAll := . }}
@@ -28,6 +41,7 @@ metadata:
{{ tuple $envAll "ovn" "ovn-ovsdb-sb" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
spec:
serviceName: {{ tuple "ovn-ovsdb-sb" "direct" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
podManagementPolicy: Parallel
replicas: {{ .Values.pod.replicas.ovn_ovsdb_sb }}
selector:
matchLabels:
@@ -49,41 +63,54 @@ spec:
{{- tuple $envAll "ovn_ovsdb_sb" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers:
- name: ovsdb
command:
- /root/ovnkube.sh
{{- if gt (int .Values.pod.replicas.ovn_ovsdb_sb) 1 }}
- sb-ovsdb-raft
{{- else }}
- sb-ovsdb
{{- end }}
{{ tuple $envAll "ovn_ovsdb_sb" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.server | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
{{ dict "envAll" . "component" "ovn_ovsdb_sb" "container" "ovsdb" "type" "readiness" "probeTemplate" (include "ovnsbReadinessProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
ports:
- containerPort: {{ tuple "ovn-ovsdb-sb" "internal" "ovsdb" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
- containerPort: {{ tuple "ovn-ovsdb-sb" "internal" "raft" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
env:
- name: OVS_DATABASE
value: sb
- name: OVS_PORT
- name: OVN_DAEMONSET_VERSION
value: "3"
- name: OVN_LOGLEVEL_SB
value: "-vconsole:info -vfile:info"
- name: OVN_KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: OVN_KUBERNETES_STATEFULSET
value: ovn-ovsdb-sb
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OVN_SSL_ENABLE
value: "no"
- name: ENABLE_IPSEC
value: "false"
- name: OVN_SB_RAFT_ELECTION_TIMER
value: "1000"
- name: OVN_SB_PORT
value: {{ tuple "ovn-ovsdb-sb" "internal" "ovsdb" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
command:
- /tmp/ovsdb-server.sh
- start
lifecycle:
preStop:
exec:
command:
- /tmp/ovsdb-server.sh
- stop
- name: OVN_SB_RAFT_PORT
value: {{ tuple "ovn-ovsdb-sb" "internal" "raft" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
volumeMounts:
- name: ovn-bin
mountPath: /tmp/ovsdb-server.sh
subPath: ovsdb-server.sh
readOnly: true
- name: run-openvswitch
mountPath: /run/openvswitch
mountPath: /var/run/openvswitch
- name: run-openvswitch
mountPath: /var/run/ovn
- name: data
mountPath: /var/lib/ovn
volumes:
- name: run-openvswitch
emptyDir: {}
- name: ovn-bin
configMap:
name: ovn-bin
defaultMode: 0555
{{- if not .Values.volume.ovn_ovsdb_sb.enabled }}
- name: data
emptyDir: {}
@@ -93,10 +120,10 @@ spec:
name: data
spec:
accessModes: ["ReadWriteOnce"]
storageClassName: {{ $envAll.Values.volume.ovn_ovsdb_sb.class_name }}
resources:
requests:
storage: {{ $envAll.Values.volume.ovn_ovsdb_sb.size }}
storageClassName: {{ $envAll.Values.volume.ovn_ovsdb_sb.class_name }}
{{- end }}
{{- end }}
+37 -9
View File
@@ -138,13 +138,41 @@ pod:
readiness:
enabled: true
params:
initialDelaySeconds: 5
timeoutSeconds: 10
liveness:
initialDelaySeconds: 30
timeoutSeconds: 30
periodSeconds: 60
ovn_ovsdb_nb:
ovsdb:
readiness:
enabled: true
params:
initialDelaySeconds: 5
timeoutSeconds: 10
initialDelaySeconds: 30
timeoutSeconds: 30
periodSeconds: 60
ovn_ovsdb_sb:
ovsdb:
readiness:
enabled: true
params:
initialDelaySeconds: 30
timeoutSeconds: 30
periodSeconds: 60
ovn_controller:
controller:
readiness:
enabled: true
params:
initialDelaySeconds: 30
timeoutSeconds: 30
periodSeconds: 60
ovn_controller_gw:
controller:
readiness:
enabled: true
params:
initialDelaySeconds: 30
timeoutSeconds: 30
periodSeconds: 60
dns_policy: "ClusterFirstWithHostNet"
replicas:
ovn_ovsdb_nb: 1
@@ -179,18 +207,18 @@ pod:
ovs:
ovn_ovsdb_nb:
requests:
memory: "128Mi"
memory: "384Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
cpu: "1000m"
ovn_ovsdb_sb:
requests:
memory: "128Mi"
memory: "384Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
cpu: "1000m"
ovn_northd:
requests:
memory: "128Mi"
@@ -97,6 +97,8 @@ spec:
subPath: test-whitelist
readOnly: true
{{- end }}
- name: stestr
mountPath: /.stestr
- name: tempest-reports
mountPath: /var/lib/tempest/data
{{- dict "enabled" (or .Values.manifests.certificates .Values.tls.identity) "name" .Values.secrets.tls.identity.api.internal "path" "/etc/tempest/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }}
@@ -113,6 +115,9 @@ spec:
configMap:
name: tempest-bin
defaultMode: 0555
- name: stestr
hostPath:
path: /tmp/stestr
- name: tempest-reports
{{- if not .Values.pvc.enabled }}
emptyDir: {}
+3 -1
View File
@@ -1,6 +1,8 @@
# Summary
- [Deployment Guide](deploy.md)
- Deployment
- [Quick start](deploy/quick-start.md)
- [Production](deploy/production.md)
- [Ingress](ingress.md)
- [Monitoring](monitoring.md)
- OpenStack
File renamed without changes.
+81
View File
@@ -0,0 +1,81 @@
# Quick-start
## All-in-one
The easiest way to get started with Atmosphere is to deploy the all-in-one
installation. This will install an entire stack of Atmosphere, with Ceph
and all the OpenStack services inside a single machine.
!!! info
The all-in-one installation is not for production use, it's perfect
for testing and development.
!!! warning
The all-in-one will fully take-over the machine by making system-level
changes. It's recommended to run it inside a virtual machine or a
physical machine that can be dedicated to this purpose.
In order to get started, you'll need a **Ubuntu 22.04** system with the
following minimum system requirements:
- Cores: 8 threads / vCPUs
- Memory: 32GB
If you're looking to run Kubernetes clusters, you'll need more memory
for the workloads, it following minimum is recommended (but more memory
is always better!):
- Cores: 16 threads / vCPUs
- Memory: 64GB
!!! info
If you're running this inside a virtual machine, it is **extremely**
important that the virtual machines supported nested virtualization,
otherwise the performance of the VMs will be un-usable.
You can use the following commands to deploy the all-in-one environment:
```bash
# Install dependencies
sudo apt-get update
sudo apt-get install git python3-pip
sudo pip install poetry
# Clone the repository
git clone https://github.com/vexxhost/atmosphere.git
# Deploy AIO
cd atmosphere
sudo poetry install --with dev
sudo poetry run molecule converge -s aio
```
Once the deployment is done, you can either use the CLI to interact with
the OpenStack environment, or you can access the Horizon dashboard.
For the CLI, you can `source /root/openrc` and then use the `openstack`
CLI. For example, if you want to list the networks, you can run the
following command:
```bash
source /root/openrc
openstack network list
```
For the Horizon dashboard, you can find the URL to access it by running
the following command:
```bash
kubectl -n openstack get ingress/dashboard -ojsonpath='{.spec.rules[0].host}'
```
You can find the credentials to login to the dashboard reading the
`/root/openrc` file. You can use the following variables to match
the credentials:
- Username: `OS_USERNAME`
- Password: `OS_PASSWORD`
- Domain: `OS_USER_DOMAIN_NAME`
+23
View File
@@ -0,0 +1,23 @@
# Atmosphere
Atmosphere is an advanced OpenStack distribution built by [VEXXHOST](https://vexxhost.com)
powered by Kuberentes, which allows you to easily deliver virtual machines,
Kubernetes and bare-metal on your on-premise hardware.
The difference between Atmosphere and other deployment tools is that it is
fully open source with batteries included. It ships with settings that are
curated by years of experience from our team alongside comprehensive day-2
operations such as monitoring, centralized logging and simplified upgrades
that only require upgrading your Atmosphere version.
If you're looking to get started quickly, you can review our
[Quick Start](deploy/quick-start.md) guide.
## Community
If you have any questions and discussions about Atmosphere, you can join the
community:
* [`#atmosphere`](https://kubernetes.slack.com/archives/C056YSPJB7U) channel
on the Kubernetes Slack. If you are new to Kubernetes Slack workspace,
[Join the Kubernetes Slack workspace](https://slack.kubernetes.io/) first.
+34
View File
@@ -0,0 +1,34 @@
# OVN
## Recovering cluster
If any of the OVN database pods fail, they will no longer be ready. You can
recover the cluster by deleting the pods and allowing them to be recreated.
For example, if the `ovn-ovsdb-nb-0` pod fails, you can recover the cluster by
deleting the pod:
```bash
kubectl -n openstack delete pods/ovn-ovsdb-nb-0
```
If the entire cluster fails, you can recover the cluster by deleting all of the
pods. For example, if the southbound database fails, you can recover the
cluster with this command:
```bash
kubectl -n openstack delete pods -lcomponent=ovn-ovsdb-sb
```
If the state of Neutron is lost from the cluster, you can recover it by running
the repair command:
```bash
kubectl -n openstack exec deploy/neutron-server -- \
neutron-ovn-db-sync-util \
--debug \
--config-file /etc/neutron/neutron.conf \
--config-file /tmp/pod-shared/ovn.ini \
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini \
--ovn-neutron_sync_mode repair
```
Generated
+6 -6
View File
@@ -5,11 +5,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
@@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1701040486,
"narHash": "sha256-vawYwoHA5CwvjfqaT3A5CT9V36Eq43gxdwpux32Qkjw=",
"lastModified": 1706925685,
"narHash": "sha256-hVInjWMmgH4yZgA4ZtbgJM1qEAel72SYhP5nOWX4UIM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "45827faa2132b8eade424f6bdd48d8828754341a",
"rev": "79a13f1437e149dc7be2d1290c74d378dad60814",
"type": "github"
},
"original": {
+3
View File
@@ -16,6 +16,9 @@
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
earthly
go
nixpkgs-fmt
poetry
vendir
];
};
+4 -4
View File
@@ -1,7 +1,7 @@
VERSION 0.7
VERSION 0.8
APT_INSTALL:
COMMAND
FUNCTION
ARG PACKAGES
RUN \
apt-get update && \
@@ -10,7 +10,7 @@ APT_INSTALL:
rm -rf /var/lib/apt/lists/*
DNF_INSTALL:
COMMAND
FUNCTION
ARG PACKAGES
RUN \
dnf -y install \
@@ -21,7 +21,7 @@ DNF_INSTALL:
rm -rf /var/cache/dnf
CREATE_PROJECT_USER:
COMMAND
FUNCTION
ARG PROJECT
ARG SHELL=/usr/sbin/nologin
RUN \
+3 -2
View File
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global PROJECT=barbican
ARG --global RELEASE=2023.2
ARG --global PROJECT_REF=a00fcade4138ffc52cd9c84b5999297966f019b5
@@ -15,5 +16,5 @@ image:
FROM ../openstack-service+image --RELEASE ${RELEASE} --PROJECT ${PROJECT}
COPY +build/venv /var/lib/openstack
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${RELEASE} \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${PROJECT_REF}
${REGISTRY}/${PROJECT}:${RELEASE} \
${REGISTRY}/${PROJECT}:${PROJECT_REF}
+1 -10
View File
@@ -1,14 +1,5 @@
VERSION 0.7
image:
FROM ubuntu:jammy-20240111
FROM ubuntu:jammy-20240125
LABEL org.opencontainers.image.source=https://github.com/vexxhost/atmosphere
# TODO(mnaser): Remove this when a new image that includes 1.4.0-11ubuntu2.4 is released.
# https://avd.aquasec.com/nvd/cve-2024-22365
DO ../+APT_INSTALL \
--PACKAGES "libpam0g libpam-modules libpam-modules-bin libpam-runtime"
# TODO(mnaser): Remove this when a new image that includes 3.7.3-4ubuntu1.4 is released.
# https://avd.aquasec.com/nvd/cve-2024-0553
# https://avd.aquasec.com/nvd/cve-2024-0567
DO ../+APT_INSTALL \
--PACKAGES "libgnutls30"
+3 -2
View File
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global PROJECT=cinder
ARG --global RELEASE=2023.2
ARG --global PROJECT_REF=8d453fa7b6daf1c1b6105a71f7c660b9036541f3
@@ -18,5 +19,5 @@ image:
DO ../+APT_INSTALL \
--PACKAGES "ceph-common lsscsi nvme-cli python3-rados python3-rbd qemu-utils sysfsutils udev util-linux"
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${RELEASE} \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${PROJECT_REF}
${REGISTRY}/${PROJECT}:${RELEASE} \
${REGISTRY}/${PROJECT}:${PROJECT_REF}
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global CAPO_VERSION=v0.8.0
ARG --global EPOCH=2
@@ -14,4 +15,4 @@ clone:
image:
FROM DOCKERFILE -f +clone/src/Dockerfile +clone/src/*
LABEL org.opencontainers.image.source=https://github.com/vexxhost/atmosphere
SAVE IMAGE --push ghcr.io/vexxhost/atmosphere/capi-openstack-controller:${CAPO_VERSION}-${EPOCH}
SAVE IMAGE --push ${REGISTRY}/capi-openstack-controller:${CAPO_VERSION}-${EPOCH}
+3 -2
View File
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global PROJECT=designate
ARG --global RELEASE=2023.2
ARG --global PROJECT_REF=2c817b3d7f01de44023f195c6e8de8853683a54a
@@ -16,5 +17,5 @@ image:
DO ../+APT_INSTALL \
--PACKAGES "bind9utils"
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${RELEASE} \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${PROJECT_REF}
${REGISTRY}/${PROJECT}:${RELEASE} \
${REGISTRY}/${PROJECT}:${PROJECT_REF}
+3 -2
View File
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global PROJECT=glance
ARG --global RELEASE=2023.2
ARG --global PROJECT_REF=9a4a3067b5c7c7f8ee9363bd939a3d86b260d660
@@ -27,5 +28,5 @@ image:
DO ../+APT_INSTALL \
--PACKAGES "ceph-common lsscsi nvme-cli python3-rados python3-rbd qemu-utils sysfsutils udev util-linux"
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${RELEASE} \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${PROJECT_REF}
${REGISTRY}/${PROJECT}:${RELEASE} \
${REGISTRY}/${PROJECT}:${PROJECT_REF}
+3 -2
View File
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global PROJECT=heat
ARG --global RELEASE=2023.2
ARG --global PROJECT_REF=d1363cc17646893054f9e8daf40de67699078e7c
@@ -16,5 +17,5 @@ image:
DO ../+APT_INSTALL \
--PACKAGES "curl jq"
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${RELEASE} \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${PROJECT_REF}
${REGISTRY}/${PROJECT}:${RELEASE} \
${REGISTRY}/${PROJECT}:${PROJECT_REF}
+3 -2
View File
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global PROJECT=horizon
ARG --global RELEASE=2023.2
ARG --global PROJECT_REF=3c6029cd94846235e25058b71522c13556f41f58
@@ -33,5 +34,5 @@ image:
DO ../+APT_INSTALL \
--PACKAGES "apache2 gettext libapache2-mod-wsgi-py3"
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${RELEASE} \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${PROJECT_REF}
${REGISTRY}/${PROJECT}:${RELEASE} \
${REGISTRY}/${PROJECT}:${PROJECT_REF}
+3 -2
View File
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global PROJECT=ironic
ARG --global RELEASE=zed
ARG --global PROJECT_REF=e38735cb95263b0c54f2fd719ff6b714efbddbb3
@@ -17,5 +18,5 @@ image:
DO ../+APT_INSTALL \
--PACKAGES "ethtool ipmitool iproute2 ipxe lshw qemu-utils tftpd-hpa"
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${RELEASE} \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${PROJECT_REF}
${REGISTRY}/${PROJECT}:${RELEASE} \
${REGISTRY}/${PROJECT}:${PROJECT_REF}
+3 -2
View File
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global RELEASE=2023.2
ARG --global PROJECT=keystone
ARG --global PROJECT_REF=653d82b1b4e09b2ff37b56868e57d08c8e3af7dd
@@ -29,5 +30,5 @@ image:
apt-get clean && \
rm -rfv /var/lib/apt/lists/* libapache2-mod-auth-openidc_${MOD_AUTH_OPENIDC_VERSION}-1.$(lsb_release -sc)_${TARGETARCH}.deb
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${RELEASE} \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${PROJECT_REF}
${REGISTRY}/${PROJECT}:${RELEASE} \
${REGISTRY}/${PROJECT}:${PROJECT_REF}
+4 -2
View File
@@ -1,4 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global COMMIT=e8c2b17e1261c6a1b0fed1fcd5e1c337fc014219
build:
@@ -26,8 +28,8 @@ platform-image:
USER 65534
ENTRYPOINT ["/kubernetes-entrypoint"]
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/kubernetes-entrypoint:${COMMIT} \
ghcr.io/vexxhost/atmosphere/kubernetes-entrypoint:latest
${REGISTRY}/kubernetes-entrypoint:${COMMIT} \
${REGISTRY}/kubernetes-entrypoint:latest
image:
BUILD --platform linux/amd64 --platform linux/arm64 +platform-image
+3 -1
View File
@@ -1,5 +1,7 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
platform-image:
ARG RELEASE=zed
FROM ../cloud-archive-base+image --RELEASE=${RELEASE}
@@ -14,7 +16,7 @@ platform-image:
END
DO ../+APT_INSTALL --PACKAGES="ceph-common cgroup-tools dmidecode ebtables iproute2 ipxe-qemu kmod libvirt-clients libvirt-daemon-system openssh-client openvswitch-switch ovmf pm-utils qemu-block-extra qemu-efi qemu-kvm seabios"
DO ../+CREATE_PROJECT_USER --PROJECT=nova
SAVE IMAGE --push ghcr.io/vexxhost/atmosphere/libvirtd:${RELEASE}
SAVE IMAGE --push ${REGISTRY}/libvirtd:${RELEASE}
image:
BUILD --platform linux/amd64 --platform linux/arm64 +platform-image
+3 -2
View File
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global PROJECT=magnum
ARG --global RELEASE=2023.2
ARG --global PROJECT_REF=156f6f52d38a670e6fe10725966aeea4ddf65146
@@ -18,5 +19,5 @@ image:
--PACKAGES "haproxy"
COPY ../helm+binary/helm /usr/local/bin/helm
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${RELEASE} \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${PROJECT_REF}
${REGISTRY}/${PROJECT}:${RELEASE} \
${REGISTRY}/${PROJECT}:${PROJECT_REF}
+3 -2
View File
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global PROJECT=manila
ARG --global RELEASE=2023.2
ARG --global PROJECT_REF=98bc755673fe48a9c67203e4262315b048efe25d
@@ -16,5 +17,5 @@ image:
DO ../+APT_INSTALL \
--PACKAGES "iproute2 openvswitch-switch"
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${RELEASE} \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${PROJECT_REF}
${REGISTRY}/${PROJECT}:${RELEASE} \
${REGISTRY}/${PROJECT}:${PROJECT_REF}
+3 -2
View File
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global PROJECT=netoffload
ARG --global RELEASE=main
ARG --global PROJECT_REF=94b8c0fdb0b83bd1b7e14b9a58077a047c78a800
@@ -20,8 +21,8 @@ platform-image:
COPY +build/offloadctl /usr/local/bin/offloadctl
ENTRYPOINT ["/usr/local/bin/offloadctl"]
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${RELEASE} \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${PROJECT_REF}
${REGISTRY}/${PROJECT}:${RELEASE} \
${REGISTRY}/${PROJECT}:${PROJECT_REF}
image:
BUILD --platform linux/amd64 --platform linux/arm64 +platform-image
+3 -2
View File
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global PROJECT=neutron
ARG --global RELEASE=zed
ARG --global PROJECT_REF=222c997022392561c2de2cb493f0f5214eb20dfc
@@ -17,8 +18,8 @@ platform-image:
DO ../+APT_INSTALL \
--PACKAGES "conntrack dnsmasq dnsmasq-utils ebtables ethtool haproxy iproute2 ipset iptables iputils-arping jq keepalived lshw openvswitch-switch strongswan uuid-runtime"
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${RELEASE} \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${PROJECT_REF}
${REGISTRY}/${PROJECT}:${RELEASE} \
${REGISTRY}/${PROJECT}:${PROJECT_REF}
image:
BUILD --platform linux/amd64 --platform linux/arm64 +platform-image
+3 -1
View File
@@ -1,5 +1,7 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
platform-image:
FROM ../base+image
DO ../+CREATE_PROJECT_USER \
@@ -11,7 +13,7 @@ platform-image:
chown -R nova: /etc/ssh && \
mkdir /var/run/sshd && \
chmod 0755 /var/run/sshd
SAVE IMAGE --push ghcr.io/vexxhost/atmosphere/nova-ssh:latest
SAVE IMAGE --push ${REGISTRY}/nova-ssh:latest
image:
BUILD --platform linux/amd64 --platform linux/arm64 +platform-image
+3 -2
View File
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global PROJECT=nova
ARG --global RELEASE=zed
ARG --global PROJECT_REF=226f3e95c1cdadd1845c7adee55f5c5f29f3a7a8
@@ -17,8 +18,8 @@ platform-image:
--PACKAGES "ceph-common genisoimage iproute2 libosinfo-bin lsscsi ndctl nvme-cli openssh-client ovmf python3-libvirt python3-rados python3-rbd qemu-efi-aarch64 qemu-utils sysfsutils udev util-linux"
GIT CLONE --branch v1.4.0 https://github.com/novnc/noVNC.git /usr/share/novnc
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${RELEASE} \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${PROJECT_REF}
${REGISTRY}/${PROJECT}:${RELEASE} \
${REGISTRY}/${PROJECT}:${PROJECT_REF}
image:
BUILD --platform linux/amd64 --platform linux/arm64 +platform-image
+3 -2
View File
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global PROJECT=octavia
ARG --global RELEASE=2023.2
ARG --global PROJECT_REF=88d7315a60314e44fcce88ad198ceb3c0c107fe6
@@ -17,5 +18,5 @@ image:
DO ../+APT_INSTALL \
--PACKAGES "isc-dhcp-client openssh-client"
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${RELEASE} \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${PROJECT_REF}
${REGISTRY}/${PROJECT}:${RELEASE} \
${REGISTRY}/${PROJECT}:${PROJECT_REF}
+4 -4
View File
@@ -1,7 +1,7 @@
VERSION 0.7
VERSION 0.8
PIP_INSTALL:
COMMAND
FUNCTION
ARG PACKAGES
RUN --mount=type=cache,target=/root/.cache \
/var/lib/openstack/bin/pip3 install \
@@ -9,7 +9,7 @@ PIP_INSTALL:
${PACKAGES}
GIT_CHECKOUT:
COMMAND
FUNCTION
ARG PROJECT
ARG PROJECT_REPO=https://github.com/openstack/${PROJECT}
ARG PROJECT_REF
@@ -24,7 +24,7 @@ GIT_CHECKOUT:
END
BUILD_VENV:
COMMAND
FUNCTION
ARG PROJECT
ARG PROJECT_REPO=https://github.com/openstack/${PROJECT}
ARG PROJECT_REF
+3 -2
View File
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global SERIES=3.1
ARG --global VERSION=3.1.0-65
@@ -9,8 +10,8 @@ platform-image:
DO ../+DNF_INSTALL --PACKAGES "centos-release-nfv-openvswitch.noarch"
DO ../+DNF_INSTALL --PACKAGES "openvswitch${SERIES}-${VERSION}.el9s iptables"
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/openvswitch:${SERIES} \
ghcr.io/vexxhost/atmosphere/openvswitch:${VERSION}
${REGISTRY}/openvswitch:${SERIES} \
${REGISTRY}/openvswitch:${VERSION}
image:
BUILD --platform linux/amd64 --platform linux/arm64 +platform-image
+21 -5
View File
@@ -1,19 +1,35 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global SERIES=23.03
ARG --global VERSION=23.03.0-69
ovn-kubernetes:
FROM golang:1.20
GIT CLONE --branch master https://github.com/ovn-org/ovn-kubernetes /src
WORKDIR /src
COPY patches/ovn-kubernetes /patches
DO ../+APT_INSTALL --PACKAGES "git"
RUN git apply --verbose /patches/*.patch
SAVE ARTIFACT /src/dist/images/ovndb-raft-functions.sh
SAVE ARTIFACT /src/dist/images/ovnkube.sh
RUN \
cd /src/go-controller && \
go build -o /build/ovn-kube-util ./cmd/ovn-kube-util
SAVE ARTIFACT /build/ovn-kube-util
component-image:
FROM ../openvswitch+platform-image
DO ../+DNF_INSTALL --PACKAGES "firewalld-filesystem hostname ovn${SERIES}-${VERSION}.el9s procps-ng"
ARG --required NAME
DO ../+DNF_INSTALL --PACKAGES "ovn${SERIES}-${NAME}-${VERSION}.el9s"
IF [ "${NAME}" = "host" ]
COPY ../kubernetes+image/kubectl /usr/local/bin/kubectl
END
COPY ../kubernetes+image/kubectl /usr/local/bin/kubectl
COPY +ovn-kubernetes/ovndb-raft-functions.sh /root
COPY +ovn-kubernetes/ovnkube.sh /root
COPY +ovn-kubernetes/ovn-kube-util /usr/bin
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/ovn-${NAME}:${SERIES} \
ghcr.io/vexxhost/atmosphere/ovn-${NAME}:${VERSION}
${REGISTRY}/ovn-${NAME}:${SERIES} \
${REGISTRY}/ovn-${NAME}:${VERSION}
central:
BUILD +component-image --NAME central
@@ -0,0 +1,161 @@
From 0227559bb404c3d7d5f32737809c38024bbabef0 Mon Sep 17 00:00:00 2001
From: Mohammed Naser <mnaser@vexxhost.com>
Date: Thu, 18 Jan 2024 12:42:24 -0500
Subject: [PATCH 1/2] chore: refactor to using OVN_KUBERNETES_STATEFULSET
---
dist/images/ovndb-raft-functions.sh | 32 ++++++++++++++---------------
dist/images/ovnkube.sh | 5 ++++-
2 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/dist/images/ovndb-raft-functions.sh b/dist/images/ovndb-raft-functions.sh
index dceb4ec2e..65e9b6d9b 100644
--- a/dist/images/ovndb-raft-functions.sh
+++ b/dist/images/ovndb-raft-functions.sh
@@ -10,7 +10,7 @@ verify-ovsdb-raft() {
fi
replicas=$(kubectl --server=${K8S_APISERVER} --token=${k8s_token} --certificate-authority=${K8S_CACERT} \
- get statefulset -n ${ovn_kubernetes_namespace} ovnkube-db -o=jsonpath='{.spec.replicas}')
+ get statefulset -n ${ovn_kubernetes_namespace} ${ovn_kubernetes_statefulset} -o=jsonpath='{.spec.replicas}')
if [[ ${replicas} -lt 3 || $((${replicas} % 2)) -eq 0 ]]; then
echo "at least 3 nodes need to be configured, and it must be odd number of nodes"
exit 1
@@ -45,14 +45,14 @@ db_part_of_cluster() {
}
# Checks if cluster has already been initialized.
-# If not it returns false and sets init_ip to ovnkube-db-0
+# If not it returns false and sets init_ip to ${ovn_kubernetes_statefulset}-0
cluster_exists() {
# See if ep is available ...
local db=${1}
local port=${2}
db_pods=$(kubectl --server=${K8S_APISERVER} --token=${k8s_token} --certificate-authority=${K8S_CACERT} \
- get pod -n ${ovn_kubernetes_namespace} -o=jsonpath='{.items[*].metadata.name}' | egrep -o 'ovnkube-db[^ ]+')
+ get pod -n ${ovn_kubernetes_namespace} -o=jsonpath='{.items[*].metadata.name}' | egrep -o "${ovn_kubernetes_statefulset}[^ ]+")
for db_pod in $db_pods; do
if db_part_of_cluster $db_pod $db $port; then
@@ -63,7 +63,7 @@ cluster_exists() {
# if we get here there is no cluster, set init_ip and get out
init_ip="$(kubectl --server=${K8S_APISERVER} --token=${k8s_token} --certificate-authority=${K8S_CACERT} \
- get pod -n ${ovn_kubernetes_namespace} ovnkube-db-0 -o=jsonpath='{.status.podIP}')"
+ get pod -n ${ovn_kubernetes_namespace} ${ovn_kubernetes_statefulset}-0 -o=jsonpath='{.status.podIP}')"
if [[ $? != 0 ]]; then
return 1
fi
@@ -90,17 +90,17 @@ check_and_apply_ovnkube_db_ep() {
# return if ovn db service endpoint already exists
result=$(kubectl --server=${K8S_APISERVER} --token=${k8s_token} --certificate-authority=${K8S_CACERT} \
- get ep -n ${ovn_kubernetes_namespace} ovnkube-db 2>&1)
+ get ep -n ${ovn_kubernetes_namespace} ${ovn_kubernetes_statefulset} 2>&1)
test $? -eq 0 && return
if ! echo ${result} | grep -q "NotFound"; then
- echo "Failed to find ovnkube-db endpoint: ${result}, Exiting..."
+ echo "Failed to find ${ovn_kubernetes_statefulset} endpoint: ${result}, Exiting..."
exit 12
fi
- # Get IPs of all ovnkube-db PODs
+ # Get IPs of all ${ovn_kubernetes_statefulset} PODs
ips=()
for ((i = 0; i < ${replicas}; i++)); do
ip=$(kubectl --server=${K8S_APISERVER} --token=${k8s_token} --certificate-authority=${K8S_CACERT} \
- get pod -n ${ovn_kubernetes_namespace} ovnkube-db-${i} -o=jsonpath='{.status.podIP}')
+ get pod -n ${ovn_kubernetes_namespace} ${ovn_kubernetes_statefulset}-${i} -o=jsonpath='{.status.podIP}')
if [[ ${ip} == "" ]]; then
break
fi
@@ -108,7 +108,7 @@ check_and_apply_ovnkube_db_ep() {
done
if [[ ${i} -eq ${replicas} ]]; then
- # Number of POD IPs is same as number of statefulset replicas. Now, if the number of ovnkube-db endpoints
+ # Number of POD IPs is same as number of statefulset replicas. Now, if the number of ${ovn_kubernetes_statefulset} endpoints
# is 0, then we are applying the endpoint for the first time. So, we need to make sure that each of the
# pod IP responds to the `ovsdb-client list-dbs` call before we set the endpoint. If they don't, retry several
# times and then give up.
@@ -170,7 +170,7 @@ set_election_timer() {
return 0
}
-# set_connection() will be called for ovnkube-db-0 pod when :
+# set_connection() will be called for ${ovn_kubernetes_statefulset}-0 pod when :
# 1. it is first started or
# 2. it restarts after the initial start has failed or
# 3. subsequent restarts during the lifetime of the pod
@@ -307,7 +307,7 @@ ovsdb-raft() {
--ovn-${db}-log="${ovn_loglevel_db}" &
else
# either we need to initialize a new cluster or wait for db-0 to create it
- if [[ "${POD_NAME}" == "ovnkube-db-0" ]]; then
+ if [[ "${POD_NAME}" == "${ovn_kubernetes_statefulset}-0" ]]; then
echo "Cluster does not exist for DB: ${db}, creating new raft cluster"
run_as_ovs_user_if_needed \
${OVNCTL_PATH} run_${db}_ovsdb --no-monitor \
@@ -317,7 +317,7 @@ ovsdb-raft() {
${db_ssl_opts} \
--ovn-${db}-log="${ovn_loglevel_db}" &
else
- echo "Cluster does not exist for DB: ${db}, waiting for ovnkube-db-0 pod to create it"
+ echo "Cluster does not exist for DB: ${db}, waiting for ${ovn_kubernetes_statefulset}-0 pod to create it"
# all non pod-0 pods will be blocked here till connection is set
wait_for_event cluster_exists ${db} ${port}
run_as_ovs_user_if_needed \
@@ -356,8 +356,8 @@ ovsdb-raft() {
fi
echo "=============== ${db}-ovsdb-raft ========== RUNNING"
- if [[ "${POD_NAME}" == "ovnkube-db-0" ]]; then
- # post raft create work has to be done only once and in ovnkube-db-0 while it is still
+ if [[ "${POD_NAME}" == "${ovn_kubernetes_statefulset}-0" ]]; then
+ # post raft create work has to be done only once and in ${ovn_kubernetes_statefulset}-0 while it is still
# a single-node cluster, additional protection against the case when pod-0 isn't a leader
# is needed in the cases of sudden pod-0 initialization logic restarts
current_raft_role=$(ovs-appctl -t ${OVN_RUNDIR}/ovn${db}_db.ctl cluster/status ${database} 2>&1 | grep "^Role")
@@ -381,9 +381,9 @@ ovsdb-raft() {
fi
last_node_index=$(expr ${replicas} - 1)
- # Create endpoints only if all ovnkube-db pods have started and are running. We do this
+ # Create endpoints only if all ${ovn_kubernetes_statefulset} pods have started and are running. We do this
# from the last pod of the statefulset.
- if [[ ${db} == "nb" && "${POD_NAME}" == "ovnkube-db-"${last_node_index} ]]; then
+ if [[ ${db} == "nb" && "${POD_NAME}" == "${ovn_kubernetes_statefulset}-"${last_node_index} ]]; then
check_and_apply_ovnkube_db_ep ${port}
fi
diff --git a/dist/images/ovnkube.sh b/dist/images/ovnkube.sh
index bf3989e37..720b3e14d 100755
--- a/dist/images/ovnkube.sh
+++ b/dist/images/ovnkube.sh
@@ -40,6 +40,7 @@ fi
# OVN_NET_CIDR - the network cidr - v3
# OVN_SVC_CIDR - the cluster-service-cidr - v3
# OVN_KUBERNETES_NAMESPACE - k8s namespace - v3
+# OVN_KUBERNETES_STATEFULSET - k8s statefulset - v3
# K8S_NODE - hostname of the node - v3
#
# OVN_DAEMONSET_VERSION - version match daemonset and image - v3
@@ -198,12 +199,14 @@ metrics_bind_port=${OVN_METRICS_BIND_PORT:-9476}
metrics_exporter_port=${OVN_METRICS_EXPORTER_PORT:-9310}
ovn_kubernetes_namespace=${OVN_KUBERNETES_NAMESPACE:-ovn-kubernetes}
+ovn_kubernetes_statefulset=${OVN_KUBERNETES_STATEFULSET:-ovnkube-db}
+
# namespace used for classifying host network traffic
ovn_host_network_namespace=${OVN_HOST_NETWORK_NAMESPACE:-ovn-host-network}
# host on which ovnkube-db POD is running and this POD contains both
# OVN NB and SB DB running in their own container.
-ovn_db_host=${K8S_NODE_IP:-""}
+ovn_db_host=${K8S_NODE_IP:-$(hostname -f)}
# OVN_NB_PORT - ovn north db port (default 6641)
ovn_nb_port=${OVN_NB_PORT:-6641}
--
2.42.0
@@ -0,0 +1,144 @@
From 90851bd77718bc834446ebe2ddf34b8e9383dee8 Mon Sep 17 00:00:00 2001
From: Mohammed Naser <mnaser@vexxhost.com>
Date: Thu, 18 Jan 2024 16:16:11 -0500
Subject: [PATCH 2/2] chore(northd): refactor to being able to use split svcs
---
dist/images/ovnkube.sh | 75 +++++++++++++++++++++++++++++++++---------
1 file changed, 59 insertions(+), 16 deletions(-)
diff --git a/dist/images/ovnkube.sh b/dist/images/ovnkube.sh
index 720b3e14d..1d3059cf8 100755
--- a/dist/images/ovnkube.sh
+++ b/dist/images/ovnkube.sh
@@ -200,6 +200,8 @@ metrics_exporter_port=${OVN_METRICS_EXPORTER_PORT:-9310}
ovn_kubernetes_namespace=${OVN_KUBERNETES_NAMESPACE:-ovn-kubernetes}
ovn_kubernetes_statefulset=${OVN_KUBERNETES_STATEFULSET:-ovnkube-db}
+ovn_kubernetes_nb_statefulset=${OVN_KUBERNETES_NB_STATEFULSET:-ovnkube-db}
+ovn_kubernetes_sb_statefulset=${OVN_KUBERNETES_SB_STATEFULSET:-ovnkube-db}
# namespace used for classifying host network traffic
ovn_host_network_namespace=${OVN_HOST_NETWORK_NAMESPACE:-ovn-host-network}
@@ -374,6 +376,24 @@ wait_for_event() {
done
}
+wait_for_db () {
+ local db=$1
+ local ep=$(get_ovnkube_zone_db_ep ${db})
+
+ echo "Getting the ${ep} ep"
+ # See if ep is available ...
+ IFS=" " read -a ep_hosts <<<"$(kubectl --server=${K8S_APISERVER} --token=${k8s_token} --certificate-authority=${K8S_CACERT} \
+ get endpointslice -n ${ovn_kubernetes_namespace} -l kubernetes.io/service-name=${ep} -o=jsonpath='{range .items[0].endpoints[*]}{.addresses[0]} ')"
+ if [[ ${#ep_hosts[@]} == 0 ]]; then
+ return 1
+ fi
+
+ ep_hosts_string="${ep_hosts[*]}"
+ declare -g -a "ovn_${db}db_hosts=($ep_hosts_string)"
+
+ return 0
+}
+
# The ovnkube-db kubernetes service must be populated with OVN DB service endpoints
# before various OVN K8s containers can come up. This functions checks for that.
# If OVN dbs are configured to listen only on unix sockets, then there will not be
@@ -384,15 +404,18 @@ ready_to_start_node() {
return 0
fi
- ovnkube_db_ep=$(get_ovnkube_zone_db_ep)
- echo "Getting the ${ovnkube_db_ep} ep"
- # See if ep is available ...
- IFS=" " read -a ovn_db_hosts <<<"$(kubectl --server=${K8S_APISERVER} --token=${k8s_token} --certificate-authority=${K8S_CACERT} \
- get ep -n ${ovn_kubernetes_namespace} ${ovnkube_db_ep} -o=jsonpath='{range .subsets[0].addresses[*]}{.ip}{" "}')"
- if [[ ${#ovn_db_hosts[@]} == 0 ]]; then
+ wait_for_db nb
+ if [[ $? != 0 ]]; then
+ return 1
+ fi
+
+ wait_for_db sb
+ if [[ $? != 0 ]]; then
return 1
fi
+
get_ovn_db_vars
+
return 0
}
# wait_for_event ready_to_start_node
@@ -410,17 +433,29 @@ check_ovn_daemonset_version() {
}
get_ovn_db_vars() {
+
+ index=0
ovn_nbdb_str=""
- ovn_sbdb_str=""
- for i in "${ovn_db_hosts[@]}"; do
+ for i in "${ovn_nbdb_hosts[@]}"; do
if [ -n "$ovn_nbdb_str" ]; then
ovn_nbdb_str=${ovn_nbdb_str}","
+ fi
+ host="${ovn_kubernetes_nb_statefulset}-${index}.${ovn_kubernetes_nb_statefulset}.${ovn_kubernetes_namespace}.svc.cluster.local"
+ ovn_nbdb_str=${ovn_nbdb_str}${transport}://${host}:${ovn_nb_port}
+ index=$((index + 1))
+ done
+
+ index=0
+ ovn_sbdb_str=""
+ for i in "${ovn_sbdb_hosts[@]}"; do
+ if [ -n "$ovn_sbdb_str" ]; then
ovn_sbdb_str=${ovn_sbdb_str}","
fi
- ip=$(bracketify $i)
- ovn_nbdb_str=${ovn_nbdb_str}${transport}://${ip}:${ovn_nb_port}
- ovn_sbdb_str=${ovn_sbdb_str}${transport}://${ip}:${ovn_sb_port}
+ host="${ovn_kubernetes_sb_statefulset}-${index}.${ovn_kubernetes_sb_statefulset}.${ovn_kubernetes_namespace}.svc.cluster.local"
+ ovn_sbdb_str=${ovn_sbdb_str}${transport}://${host}:${ovn_sb_port}
+ index=$((index + 1))
done
+
# OVN_NORTH and OVN_SOUTH override derived host
ovn_nbdb=${OVN_NORTH:-$ovn_nbdb_str}
ovn_sbdb=${OVN_SOUTH:-$ovn_sbdb_str}
@@ -730,7 +765,7 @@ set_ovnkube_db_ep() {
ips=("$@")
ovn_zone=$(get_node_zone)
- ovnkube_db_ep=$(get_ovnkube_zone_db_ep)
+ ovnkube_db_ep=$(get_ovnkube_zone_db_ep sb)
echo "=============== setting ${ovnkube_db_ep} endpoints to ${ips[@]}"
# create a new endpoint for the headless onvkube-db service without selectors
kubectl --server=${K8S_APISERVER} --token=${k8s_token} --certificate-authority=${K8S_CACERT} apply -f - <<EOF
@@ -779,12 +814,20 @@ function get_node_zone() {
}
function get_ovnkube_zone_db_ep() {
- zone=$(get_node_zone)
- if [ "$zone" == "global" ]; then
- echo "ovnkube-db"
+ local db=$1
+
+ if [ "$db" == "nb" ]; then
+ ep="${ovn_kubernetes_nb_statefulset}"
else
- echo "ovnkube-db-$zone"
+ ep="${ovn_kubernetes_sb_statefulset}"
fi
+
+ zone=$(get_node_zone)
+ if [ "$zone" != "global" ]; then
+ ep="${ep}-${zone}"
+ fi
+
+ echo "${ep}"
}
# v3 - run nb_ovsdb in a separate container
--
2.42.0
@@ -0,0 +1,26 @@
From 71b19667c04fd114e49d3fda957e26e7fa595675 Mon Sep 17 00:00:00 2001
From: Mohammed Naser <mnaser@vexxhost.com>
Date: Sun, 4 Feb 2024 14:15:49 -0500
Subject: [PATCH] stop creating ovnkube eps
---
dist/images/ovnkube.sh | 3 ---
1 file changed, 3 deletions(-)
diff --git a/dist/images/ovnkube.sh b/dist/images/ovnkube.sh
index 1d3059cf8..069d36648 100755
--- a/dist/images/ovnkube.sh
+++ b/dist/images/ovnkube.sh
@@ -908,9 +908,6 @@ sb-ovsdb() {
}
ovn-sbctl --inactivity-probe=0 set-connection p${transport}:${ovn_sb_port}:$(bracketify ${ovn_db_host})
- # create the ovnkube-db endpoints
- wait_for_event attempts=10 check_ovnkube_db_ep ${ovn_db_host} ${ovn_nb_port}
- set_ovnkube_db_ep ${ovn_db_host}
if memory_trim_on_compaction_supported "sbdb"
then
# Enable SBDB memory trimming on DB compaction, Every 10mins DBs are compacted
--
2.43.0
+3 -2
View File
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global PROJECT=placement
ARG --global RELEASE=2023.2
ARG --global PROJECT_REF=a361622d749d3b24aad638ec1b03a7d7124a87b3
@@ -14,5 +15,5 @@ image:
FROM ../openstack-service+image --RELEASE ${RELEASE} --PROJECT ${PROJECT}
COPY +build/venv /var/lib/openstack
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${RELEASE} \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${PROJECT_REF}
${REGISTRY}/${PROJECT}:${RELEASE} \
${REGISTRY}/${PROJECT}:${PROJECT_REF}
+3 -2
View File
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global PROJECT=senlin
ARG --global RELEASE=2023.2
ARG --global PROJECT_REF=5382259276d6be6807634c58c7b69b03b57ad6f5
@@ -14,5 +15,5 @@ image:
FROM ../openstack-service+image --RELEASE ${RELEASE} --PROJECT ${PROJECT}
COPY +build/venv /var/lib/openstack
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${RELEASE} \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${PROJECT_REF}
${REGISTRY}/${PROJECT}:${RELEASE} \
${REGISTRY}/${PROJECT}:${PROJECT_REF}
+3 -2
View File
@@ -1,5 +1,6 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global PROJECT=staffeln
ARG --global RELEASE=master
ARG --global PROJECT_REF=v2.2.3
@@ -15,5 +16,5 @@ image:
FROM ../openstack-service+image --RELEASE ${RELEASE} --PROJECT ${PROJECT}
COPY +build/venv /var/lib/openstack
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${RELEASE} \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${PROJECT_REF}
${REGISTRY}/${PROJECT}:${RELEASE} \
${REGISTRY}/${PROJECT}:${PROJECT_REF}
+32 -4
View File
@@ -1,21 +1,49 @@
VERSION 0.7
ARG --global REGISTRY=ghcr.io/vexxhost/atmosphere
ARG --global PROJECT=tempest
ARG --global RELEASE=master
ARG --global PROJECT_REF=699749ec27897efe9bd7824664237c16c3339c03
build.plugin:
ARG PLUGIN
FROM ../openstack-service+builder --RELEASE=${RELEASE}
DO ../openstack-service+GIT_CHECKOUT \
--PROJECT=${PLUGIN} \
--PROJECT_REF=${RELEASE}
SAVE ARTIFACT /src
octavia-test-server:
FROM golang:1.18
COPY (+build.plugin/src --PLUGIN=octavia-tempest-plugin) /src
ENV GO111MODULE=off
ENV CGO_ENABLED=0
ENV GOOS=linux
RUN go build \
-a -ldflags '-s -w -extldflags -static' \
-o /build/test_server.bin \
/src/octavia_tempest_plugin/contrib/test_server/test_server.go
SAVE ARTIFACT /build/test_server.bin
build:
FROM ../openstack-service+builder --RELEASE=${RELEASE}
COPY (+build.plugin/src --PLUGIN=barbican-tempest-plugin) /barbican-tempest-plugin
COPY (+build.plugin/src --PLUGIN=cinder-tempest-plugin) /cinder-tempest-plugin
COPY (+build.plugin/src --PLUGIN=heat-tempest-plugin) /heat-tempest-plugin
COPY (+build.plugin/src --PLUGIN=keystone-tempest-plugin) /keystone-tempest-plugin
COPY (+build.plugin/src --PLUGIN=neutron-tempest-plugin) /neutron-tempest-plugin
COPY (+build.plugin/src --PLUGIN=octavia-tempest-plugin) /octavia-tempest-plugin
DO ../openstack-service+BUILD_VENV \
--PROJECT=${PROJECT} \
--PROJECT_REF=${PROJECT_REF} \
--PIP_PACKAGES="git+https://github.com/openstack/barbican-tempest-plugin.git git+https://github.com/openstack/cinder-tempest-plugin.git git+https://github.com/openstack/heat-tempest-plugin.git git+https://github.com/openstack/keystone-tempest-plugin.git git+https://github.com/openstack/neutron-tempest-plugin.git git+https://github.com/openstack/octavia-tempest-plugin.git"
--PIP_PACKAGES="/barbican-tempest-plugin /cinder-tempest-plugin /heat-tempest-plugin /keystone-tempest-plugin /neutron-tempest-plugin /octavia-tempest-plugin junitxml"
image:
FROM ../openstack-service+image --RELEASE ${RELEASE} --PROJECT ${PROJECT}
COPY +octavia-test-server/test_server.bin /opt/octavia-tempest-plugin/test_server.bin
COPY +build/venv /var/lib/openstack
DO ../+APT_INSTALL \
--PACKAGES "iputils-ping"
--PACKAGES "iputils-ping openssh-client"
SAVE IMAGE --push \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${RELEASE} \
ghcr.io/vexxhost/atmosphere/${PROJECT}:${PROJECT_REF}
${REGISTRY}/${PROJECT}:${RELEASE} \
${REGISTRY}/${PROJECT}:${PROJECT_REF}
+1 -1
View File
@@ -1,2 +1,2 @@
---
requires_ansible: ">=2.13.4"
requires_ansible: ">=2.14.0"
+45
View File
@@ -0,0 +1,45 @@
# Copyright (c) 2024 VEXXHOST, Inc.
#
# 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 Ceph
ansible.builtin.import_playbook: vexxhost.ceph.site
vars:
# TODO(mnaser): Drop this once we switch to vexxhost.ceph 3.0.0
ceph_version: 18.2.1
ceph_repository_version: 18.2.1
- name: Install Kubernetes
ansible.builtin.import_playbook: vexxhost.atmosphere.kubernetes
- name: Install CSI
ansible.builtin.import_playbook: vexxhost.atmosphere.csi
- name: Deploy Infrastructure
ansible.builtin.import_playbook: vexxhost.atmosphere.infrastructure
- name: Deploy OpenStack
ansible.builtin.import_playbook: vexxhost.atmosphere.openstack
- name: Configure networking
hosts: all
tasks:
- name: Add IP address to "br-ex"
changed_when: false
ansible.builtin.shell:
cmd: ip addr add 10.96.250.10/24 dev br-ex || true
- name: Set "br-ex" interface to "up"
changed_when: false
ansible.builtin.shell:
cmd: ip link set br-ex up || true
+99
View File
@@ -0,0 +1,99 @@
# Copyright (c) 2024 VEXXHOST, Inc.
#
# 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: Wait for user to read warning
hosts: localhost
tasks:
- name: Wait for user to read warning
ignore_errors: true # noqa: ignore-errors
ansible.builtin.fail:
msg: >-
⚠️
This code will make substantial changes to your machine, it is strongly
recommended that you run this on a server or virtual machine that you
dedicate to this purpose.
⚠️
- name: Wait for user to read warning
ansible.builtin.wait_for:
timeout: 15
- name: Generate workspace
ansible.builtin.import_playbook: vexxhost.atmosphere.generate_workspace
vars:
workspace_path: "{{ lookup('env', 'MOLECULE_SCENARIO_DIRECTORY') }}"
domain_name: "{{ ansible_default_ipv4['address'].replace('.', '-') }}.{{ lookup('env', 'ATMOSPHERE_DNS_SUFFIX_NAME') | default('nip.io', True) }}"
- name: Setup networking
hosts: all
become: true
vars:
management_bridge: "br-mgmt"
tasks:
- name: Create bridge for management network
ignore_errors: true # noqa: ignore-errors
changed_when: false
ansible.builtin.command:
cmd: "ip link add name {{ management_bridge }} type bridge"
- name: Create fake interface for management bridge
ignore_errors: true # noqa: ignore-errors
changed_when: false
ansible.builtin.command:
cmd: "ip link add dummy0 type dummy"
# NOTE(mnaser): The bridge will not go up until it has an interface
# so we need to assign the dummy interface to the bridge
- name: Assign dummy interface to management bridge
ignore_errors: true # noqa: ignore-errors
changed_when: false
ansible.builtin.command:
cmd: "ip link set dummy0 master {{ management_bridge }}"
- name: Assign IP address for management bridge
ignore_errors: true # noqa: ignore-errors
changed_when: false
ansible.builtin.command:
cmd: "ip addr add 10.96.240.200/24 dev {{ management_bridge }}"
- name: Bring up interfaces
ignore_errors: true # noqa: ignore-errors
changed_when: false
ansible.builtin.command:
cmd: "ip link set {{ item }} up"
loop:
- br-mgmt
- dummy0
- name: Setup host for deployment
hosts: all
become: true
tasks:
- name: Purge "snapd" package
become: true
ansible.builtin.apt:
name: snapd
state: absent
purge: true
# TODO(mnaser): Get rid of this once default workspace uses this.
- name: Overwrite existing osds.yml file
ansible.builtin.copy:
dest: "{{ lookup('env', 'MOLECULE_SCENARIO_DIRECTORY') }}/group_vars/cephs/osds.yml"
mode: '0644'
content: |
ceph_osd_devices:
- "/dev/ceph-{{ inventory_hostname_short }}-osd0/data"
- "/dev/ceph-{{ inventory_hostname_short }}-osd1/data"
- "/dev/ceph-{{ inventory_hostname_short }}-osd2/data"
File renamed without changes.
+249
View File
@@ -0,0 +1,249 @@
ceph_conf_overrides:
- section: global
option: mon allow pool size one
value: true
- section: global
option: osd crush chooseleaf type
value: 0
- section: mon
option: auth allow insecure global id reclaim
value: false
kubernetes_keepalived_interface: br-mgmt
cilium_helm_values:
operator:
replicas: 1
csi_driver: local-path-provisioner
cluster_issuer_type: self-signed
ingress_nginx_helm_values:
controller:
config:
worker-processes: 2
percona_xtradb_cluster_spec:
allowUnsafeConfigurations: true
pxc:
size: 1
haproxy:
size: 1
keystone_helm_values:
conf:
keystone:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
pod:
replicas:
api: 1
barbican_helm_values:
conf:
barbican:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
pod:
replicas:
api: 1
rook_ceph_cluster_radosgw_spec:
metadataPool:
failureDomain: osd
dataPool:
failureDomain: osd
gateway:
instances: 1
glance_helm_values:
conf:
glance:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
workers: 2
glance_store:
rbd_store_replication: 1
pod:
replicas:
api: 1
glance_images:
- name: cirros
url: http://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img
min_disk: 1
disk_format: raw
container_format: bare
is_public: true
staffeln_helm_values:
conf:
staffeln:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
pod:
replicas:
api: 1
conductor: 1
cinder_helm_values:
conf:
ceph:
pools:
backup:
replication: 1
cinder.volumes:
replication: 1
cinder:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
osapi_volume_workers: 2
pod:
replicas:
api: 1
scheduler: 1
placement_helm_values:
conf:
placement:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
placement_api_uwsgi:
uwsgi:
processes: 2
pod:
replicas:
api: 1
atmosphere_network_backend: "{{ lookup('env', 'ATMOSPHERE_NETWORK_BACKEND') | default('openvswitch', True) }}"
ovn_helm_values:
conf:
auto_bridge_add:
br-ex: null
pod:
replicas:
ovn_ovsdb_nb: 1
ovn_ovsdb_sb: 1
ovn_northd: 1
coredns_helm_values:
replicaCount: 1
nova_helm_values:
# TODO: reserve memory for host for aio scenario?
conf:
nova:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
osapi_compute_workers: 2
metadata_workers: 2
conductor:
workers: 2
scheduler:
workers: 2
pod:
replicas:
api_metadata: 1
osapi: 1
conductor: 1
scheduler: 1
novncproxy: 1
spiceproxy: 1
neutron_helm_values:
conf:
neutron:
DEFAULT:
api_workers: 2
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
rpc_workers: 2
metadata_workers: 2
pod:
replicas:
server: 1
senlin_helm_values:
conf:
senlin:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
pod:
replicas:
api: 1
conductor: 1
engine: 1
health_manager: 1
heat_helm_values:
conf:
heat:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
num_engine_workers: 2
heat_api:
workers: 2
heat_api_cfn:
workers: 2
heat_api_cloudwatch:
workers: 2
pod:
replicas:
api: 1
cfn: 1
cloudwatch: 1
engine: 1
octavia_helm_values:
conf:
octavia:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
controller_worker:
workers: 2
octavia_api_uwsgi:
uwsgi:
processes: 2
pod:
replicas:
api: 1
worker: 1
housekeeping: 1
magnum_helm_values:
conf:
magnum:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
api:
workers: 2
conductor:
workers: 2
pod:
replicas:
api: 1
conductor: 1
magnum_image_disk_format: qcow2
magnum_images:
- name: ubuntu-2204-kube-v1.27.8s
url: https://object-storage.public.mtl1.vexxhost.net/swift/v1/a91f106f55e64246babde7402c21b87a/magnum-capi/ubuntu-2204-kube-v1.27.8.qcow2
distro: ubuntu
manila_helm_values:
conf:
manila:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
osapi_share_workers: 2
pod:
replicas:
api: 1
scheduler: 1
horizon_helm_values:
conf:
horizon:
local_settings:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
pod:
replicas:
server: 1
File renamed without changes.
+40
View File
@@ -0,0 +1,40 @@
# Copyright (c) 2024 VEXXHOST, Inc.
#
# 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.
dependency:
name: galaxy
driver:
name: default
options:
managed: False
ansible_connection_options:
ansible_become: "true"
ansible_connection: local
platforms:
- name: instance
groups:
- controllers
- cephs
- computes
provisioner:
name: ansible
config_options:
defaults:
callbacks_enabled: ansible.posix.profile_tasks
inventory:
links:
host_vars: "${ATMOSPHERE_ANSIBLE_VARS_PATH-$MOLECULE_SCENARIO_DIRECTORY}/host_vars"
group_vars: "${ATMOSPHERE_ANSIBLE_VARS_PATH-$MOLECULE_SCENARIO_DIRECTORY}/group_vars"
verifier:
name: ansible
+32
View File
@@ -0,0 +1,32 @@
# Copyright (c) 2024 VEXXHOST, Inc.
#
# 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 fake devices for Ceph
ansible.builtin.import_playbook: vexxhost.ceph.create_fake_devices
- name: Prepare system for Neutron
ansible.builtin.import_playbook: ../shared/prepare/neutron.yml
# TODO(mnaser): Drop this once we switch to vexxhost.ceph 3.0.0
- name: Configure Ceph workarounds
hosts: cephs
roles:
- vexxhost.ceph.repository
post_tasks:
- name: Install "ceph-volume"
ansible.builtin.package:
name: ceph-volume
state: present
vars:
ceph_version: 18.2.1
@@ -1,4 +1,4 @@
# Copyright (c) 2023 VEXXHOST, Inc.
# Copyright (c) 2024 VEXXHOST, Inc.
#
# 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
@@ -12,4 +12,5 @@
# License for the specific language governing permissions and limitations
# under the License.
- import_playbook: vexxhost.atmosphere.tempest
- name: Run Tempest tests
ansible.builtin.import_playbook: vexxhost.atmosphere.tempest
-39
View File
@@ -1,39 +0,0 @@
# Copyright (c) 2023 VEXXHOST, Inc.
#
# 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.
- ansible.builtin.import_playbook: vexxhost.ceph.destroy_fake_devices
- hosts: localhost
connection: local
gather_facts: false
no_log: "{{ molecule_no_log }}"
vars:
workspace_path: "{{ lookup('env', 'MOLECULE_SCENARIO_DIRECTORY') }}"
tasks:
- name: Capture var files to delete
find:
paths:
- "{{ workspace_path }}/group_vars"
- "{{ workspace_path }}/host_vars"
file_type: file
recurse: true
excludes:
- "molecule.yml"
register: _var_files
- name: Delete var files
file:
path: "{{ item.path }}"
state: absent
with_items: "{{ _var_files['files'] }}"
-65
View File
@@ -1,65 +0,0 @@
# Copyright (c) 2023 VEXXHOST, Inc.
#
# 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.
- ansible.builtin.import_playbook: vexxhost.ceph.site
- ansible.builtin.import_playbook: vexxhost.atmosphere.kubernetes
# NOTE(mnaser): When using Docker with custom networks, it will use 127.0.0.11
# as the DNS server which trips up the CoreDNS "loop" plugin.
- name: Switch CoreDNS to use CloudFlare DNS
hosts: controllers[0]
become: true
tasks:
- name: Update CoreDNS ConfigMap
kubernetes.core.k8s:
state: present
definition:
apiVersion: v1
kind: ConfigMap
metadata:
name: coredns
namespace: kube-system
data:
Corefile: |
.:53 {
errors
health {
lameduck 5s
}
ready
kubernetes cluster.local in-addr.arpa ip6.arpa {
pods insecure
fallthrough in-addr.arpa ip6.arpa
ttl 30
}
prometheus :9153
forward . 1.1.1.1 {
max_concurrent 1000
}
cache 30
loop
reload
loadbalance
}
notify:
- Rollout CoreDNS
- Wait for CoreDNS to be ready
handlers:
- name: Rollout CoreDNS
command: kubectl -n kube-system rollout restart deploy/coredns
- name: Wait for CoreDNS to be ready
command: kubectl -n kube-system rollout status deploy/coredns
- ansible.builtin.import_playbook: vexxhost.atmosphere.csi
- ansible.builtin.import_playbook: vexxhost.atmosphere.openstack
-126
View File
@@ -1,126 +0,0 @@
ceph_conf_overrides:
- section: global
option: osd crush chooseleaf type
value: 0
- section: mon
option: auth allow insecure global id reclaim
value: false
kubernetes_keepalived_interface: eth0
cilium_helm_values:
operator:
replicas: 1
csi_driver: local-path-provisioner
cluster_issuer_type: self-signed
ingress_nginx_helm_values:
controller:
config:
worker-processes: 2
percona_xtradb_cluster_spec:
allowUnsafeConfigurations: true
pxc:
size: 1
haproxy:
size: 1
keystone_helm_values:
pod:
replicas:
api: 1
barbican_helm_values:
pod:
replicas:
api: 1
rook_ceph_cluster_radosgw_spec:
metadataPool:
failureDomain: osd
dataPool:
failureDomain: osd
gateway:
instances: 1
glance_helm_values:
conf:
glance:
DEFAULT:
workers: 2
pod:
replicas:
api: 1
glance_images:
- name: cirros
url: http://download.cirros-cloud.net/0.6.1/cirros-0.6.1-x86_64-disk.img
min_disk: 1
disk_format: raw
container_format: bare
is_public: true
cinder_helm_values:
pod:
replicas:
api: 1
scheduler: 1
placement_helm_values:
pod:
replicas:
api: 1
coredns_helm_values:
replicaCount: 1
atmosphere_network_backend: "{{ lookup('env', 'ATMOSPHERE_NETWORK_BACKEND') | default('openvswitch', True) }}"
ovn_helm_values:
conf:
auto_bridge_add:
br-ex: eth1
pod:
replicas:
ovn_ovsdb_nb: 1
ovn_ovsdb_sb: 1
ovn_northd: 1
nova_helm_values:
conf:
nova:
DEFAULT:
osapi_compute_workers: 2
metadata_workers: 2
conductor:
workers: 2
scheduler:
workers: 2
pod:
replicas:
api_metadata: 1
osapi: 1
conductor: 1
scheduler: 1
novncproxy: 1
spiceproxy: 1
neutron_helm_values:
conf:
auto_bridge_add:
br-ex: eth1
neutron:
DEFAULT:
api_workers: 2
rpc_workers: 2
metadata_workers: 2
pod:
replicas:
server: 1
tempest_helm_values:
conf:
tempest:
service_available:
horizon: false
-84
View File
@@ -1,84 +0,0 @@
# Copyright (c) 2023 VEXXHOST, Inc.
#
# 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.
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: instance
image: geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest
command: ${MOLECULE_DOCKER_COMMAND:-""}
privileged: true
cgroupns_mode: host
pre_build_image: true
purge_networks: true
dns_servers:
- 1.1.1.1
docker_networks:
- name: mgmt
ipam_config:
- subnet: 10.96.240.0/24
gateway: 10.96.240.1
- name: public
ipam_config:
- subnet: 10.96.250.0/24
gateway: 10.96.250.1
networks:
- name: mgmt
- name: public
security_opts:
- apparmor=unconfined
volumes:
- /dev:/dev
- /lib/modules:/lib/modules:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- /usr/src:/usr/src:ro
groups:
- controllers
- cephs
- computes
provisioner:
name: ansible
config_options:
connection:
pipelining: true
tags:
skip: >-
sysctl,
ethtool,
node-feature-discovery,
kube-prometheus-stack,
loki,
vector,
ipmi-exporter,
prometheus-pushgateway,
multipathd,
lpfc,
senlin,
designate,
heat,
octavia,
magnum,
manila,
horizon,
openstack-exporter
options:
inventory: "${MOLECULE_EPHEMERAL_DIRECTORY}/workspace"
inventory:
links:
host_vars: "${MOLECULE_SCENARIO_DIRECTORY}/host_vars"
group_vars: "${MOLECULE_SCENARIO_DIRECTORY}/group_vars"
verifier:
name: ansible
-75
View File
@@ -1,75 +0,0 @@
# Copyright (c) 2023 VEXXHOST, Inc.
#
# 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.
- import_playbook: vexxhost.atmosphere.generate_workspace
vars:
workspace_path: "{{ lookup('env', 'MOLECULE_SCENARIO_DIRECTORY') }}"
domain_name: "{{ '{{' }} ansible_default_ipv4['address'].replace('.', '-') {{ '}}' }}.{{ lookup('env', 'ATMOSPHERE_DNS_SUFFIX_NAME') | default('nip.io', True) }}"
- name: Prepare
hosts: all
become: true
pre_tasks:
- name: Wait for systemd to complete initialization
ansible.builtin.command: systemctl is-system-running
register: systemctl_status
until: >
'running' in systemctl_status.stdout or
'degraded' in systemctl_status.stdout
retries: 30
delay: 5
changed_when: false
failed_when: systemctl_status.rc > 1
tasks:
- name: Refresh cache & install "iptables"
ansible.builtin.package:
name: iptables
update_cache: true
# NOTE(mnaser): The base image installs Ansible using `pip` which breaks
# the system Python, we uninstall all Python packages.
- name: Fix Python installation
block:
- name: Get all Python packages
ansible.builtin.command: pip freeze
register: pip_freeze
- name: Uninstall all Python packages
ansible.builtin.pip:
name: "{{ pip_freeze.stdout_lines }}"
state: absent
- ansible.builtin.import_playbook: vexxhost.ceph.create_fake_devices
- hosts: controllers
become: true
tasks:
- name: Overwrite existing osds.yml file
delegate_to: localhost
ansible.builtin.copy:
dest: "{{ lookup('env', 'MOLECULE_SCENARIO_DIRECTORY') }}/group_vars/cephs/osds.yml"
content: |
ceph_osd_devices:
- "/dev/ceph-{{ inventory_hostname_short }}-osd0/data"
- "/dev/ceph-{{ inventory_hostname_short }}-osd1/data"
- "/dev/ceph-{{ inventory_hostname_short }}-osd2/data"
- name: Set masquerade rule
become: yes
ansible.builtin.iptables:
table: nat
chain: POSTROUTING
source: 10.96.250.0/24
out_interface: "{{ ansible_default_ipv4.interface }}"
jump: MASQUERADE
-1
View File
@@ -168,7 +168,6 @@
- name: Generate endpoints for workspace
hosts: localhost
gather_facts: false
vars:
_endpoints_path: "{{ workspace_path }}/group_vars/all/endpoints.yml"
# Input variables
+49
View File
@@ -0,0 +1,49 @@
# Copyright (c) 2024 VEXXHOST, Inc.
#
# 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 Infrastructure
hosts: controllers[0]
become: true
roles:
- role: cert_manager
tags:
- cert-manager
- role: cluster_issuer
tags:
- cluster-issuer
- role: ingress_nginx
tags:
- ingress-nginx
- role: rabbitmq_cluster_operator
tags:
- rabbitmq-cluster-operator
- role: percona_xtradb_cluster_operator
tags:
- percona-xtradb-cluster-operator
- role: percona_xtradb_cluster
tags:
- percona-xtradb-cluster
- role: keycloak
tags:
- keycloak
- role: keepalived
tags:
- keepalived
+41
View File
@@ -0,0 +1,41 @@
# Copyright (c) 2024 VEXXHOST, Inc.
#
# 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 Monitoring
hosts: controllers[0]
become: true
roles:
- role: node_feature_discovery
tags:
- node-feature-discovery
- role: kube_prometheus_stack
tags:
- kube-prometheus-stack
- role: loki
tags:
- loki
- role: vector
tags:
- vector
- role: ipmi_exporter
tags:
- ipmi-exporter
- role: prometheus_pushgateway
tags:
- prometheus-pushgateway
+2 -57
View File
@@ -12,65 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
- hosts: controllers[0]
- name: Deploy OpenStack
hosts: controllers[0]
become: true
roles:
- role: cert_manager
tags:
- cert-manager
- role: cluster_issuer
tags:
- cluster-issuer
- role: ingress_nginx
tags:
- ingress-nginx
- role: rabbitmq_cluster_operator
tags:
- rabbitmq-cluster-operator
- role: percona_xtradb_cluster_operator
tags:
- percona-xtradb-cluster-operator
- role: percona_xtradb_cluster
tags:
- percona-xtradb-cluster
- role: keycloak
tags:
- keycloak
- role: node_feature_discovery
tags:
- node-feature-discovery
- role: kube_prometheus_stack
tags:
- kube-prometheus-stack
- role: loki
tags:
- loki
- role: vector
tags:
- vector
- role: ipmi_exporter
tags:
- ipmi-exporter
- role: prometheus_pushgateway
tags:
- prometheus-pushgateway
- role: keepalived
tags:
- keepalived
- role: memcached
tags:
- memcached
+15 -3
View File
@@ -13,6 +13,18 @@
# under the License.
- import_playbook: vexxhost.ceph.site
- import_playbook: vexxhost.atmosphere.kubernetes
- import_playbook: vexxhost.atmosphere.csi
- import_playbook: vexxhost.atmosphere.openstack
- name: Install Kubernetes
import_playbook: vexxhost.atmosphere.kubernetes
- name: Install CSI
import_playbook: vexxhost.atmosphere.csi
- name: Deploy Infrastructure
ansible.builtin.import_playbook: vexxhost.atmosphere.infrastructure
- name: Deploy Monitoring
ansible.builtin.import_playbook: vexxhost.atmosphere.monitoring
- name: Deploy OpenStack
import_playbook: vexxhost.atmosphere.openstack
+1
View File
@@ -13,5 +13,6 @@
# under the License.
- name: Update CA certificates on host
changed_when: true
ansible.builtin.command:
cmd: update-ca-certificates
+1 -1
View File
@@ -192,7 +192,7 @@ _atmosphere_images:
staffeln_db_sync: ghcr.io/vexxhost/atmosphere/staffeln:v2.2.3@sha256:c09b73991d4ffa3b582e8d6c92888b6964f7023d69a84762de1a62678cad1777
staffeln_conductor: ghcr.io/vexxhost/atmosphere/staffeln:v2.2.3@sha256:c09b73991d4ffa3b582e8d6c92888b6964f7023d69a84762de1a62678cad1777
staffeln_api: ghcr.io/vexxhost/atmosphere/staffeln:v2.2.3@sha256:c09b73991d4ffa3b582e8d6c92888b6964f7023d69a84762de1a62678cad1777
tempest_run_tests: ghcr.io/vexxhost/atmosphere/tempest:master@sha256:82300000bc99670cc3f4be3ba0e8577a0e8e59ef9d58ca71d069a9a1928804f5
tempest_run_tests: ghcr.io/vexxhost/atmosphere/tempest:master@sha256:e60b44b4a181f04879db1aa364e9b29904e705243b7a06fb27ecf9ae002660d0
vector: docker.io/timberio/vector:0.27.0-debian@sha256:29f23dab76fa306b67b10eac3e9decdb01c906f8aa3b00a2f5b2e8ae088b84e0
atmosphere_images: '{{ _atmosphere_images | combine(atmosphere_image_overrides, recursive=True)
+1 -2
View File
@@ -26,8 +26,7 @@ galaxy_info:
dependencies:
- role: defaults
- role: openstack_helm_endpoints
vars:
openstack_helm_endpoints_list: ["oslo_db"]
openstack_helm_endpoints_list: ["oslo_db"]
- role: vexxhost.kubernetes.upload_helm_chart
vars:
upload_helm_chart_src: "{{ keycloak_helm_chart_path }}"
@@ -14,7 +14,6 @@
- name: Retrieve list of all the needed endpoints
ansible.builtin.set_fact:
# noqa: yaml[line-length]
openstack_helm_endpoints_list: |-
{{ lookup('ansible.builtin.file', '../../../charts/' ~ openstack_helm_endpoints_chart ~ '/values.yaml', split_lines=False) | from_yaml | community.general.json_query('keys(endpoints)') | difference(_openstack_helm_endpoints_ignore) }}
when:
+2 -2
View File
@@ -23,8 +23,8 @@ _staffeln_helm_values:
conf:
staffeln:
conductor:
backup_metadata_key: "{{staffeln_backup_metadata_key}}"
retention_metadata_key: "{{staffeln_retention_metadata_key}}"
backup_metadata_key: "{{ staffeln_backup_metadata_key }}"
retention_metadata_key: "{{ staffeln_retention_metadata_key }}"
manifests:
ingress_api: false
service_ingress_api: false
Loaded 100 of 102 files, more files were not shown because too many files have changed in this diff. Show more