Transition to Tox (#1617)
This commit is contained in:
1 parent
66bb947c97
commit
6080c9b28b
38 files changed
+199
-2490
No files matched your search
@@ -1,2 +0,0 @@
|
||||
[run]
|
||||
omit = atmosphere/tests/*
|
||||
@@ -40,18 +40,9 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y debootstrap qemu-utils
|
||||
pipx install diskimage-builder==3.28.0
|
||||
sudo apt-get install -y debootstrap tox qemu-utils
|
||||
pipx install python-swiftclient
|
||||
pipx inject python-swiftclient python-keystoneclient
|
||||
pipx install poetry
|
||||
poetry self add "poetry-dynamic-versioning[plugin]"
|
||||
|
||||
- name: Clone openstack/manila-image-elements
|
||||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
|
||||
with:
|
||||
repository: openstack/manila-image-elements
|
||||
path: manila-image-elements
|
||||
|
||||
- name: Cache DIB_IMAGE_CACHE
|
||||
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
|
||||
@@ -60,15 +51,13 @@ jobs:
|
||||
key: dib-image-cache
|
||||
|
||||
- name: Build image
|
||||
run: disk-image-create -o manila-$(poetry version --short).qcow2 vm manila-ubuntu-minimal dhcp-all-interfaces manila-ssh ubuntu-nfs ubuntu-cifs
|
||||
env:
|
||||
ELEMENTS_PATH: manila-image-elements/elements
|
||||
run: tox -ebuild-manila-image
|
||||
|
||||
- name: Publish image
|
||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'release'
|
||||
run: |
|
||||
swift post -r '.r:*,.rlistings' atmosphere-images
|
||||
swift upload atmosphere-images manila-$(poetry version --short).qcow2
|
||||
swift upload atmosphere-images manila-*.qcow2
|
||||
env:
|
||||
OS_AUTH_URL: https://auth.vexxhost.net/v3
|
||||
OS_REGION_NAME: ca-ymq-1
|
||||
|
||||
@@ -3,7 +3,6 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- stable/*
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.ref }}
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
name: publish
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
ansible-collection:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout project
|
||||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
|
||||
|
||||
- name: Build and publish collection
|
||||
uses: artis3n/ansible_galaxy_collection@3368f56529a2ef47ef0ac1ecfcda039f90d0174a # v2
|
||||
with:
|
||||
api_key: "${{ secrets.GALAXY_API_KEY }}"
|
||||
|
||||
- name: Get release
|
||||
uses: bruceadams/get-release@74c3d60f5a28f358ccf241a00c9021ea16f0569f # v1.3.2
|
||||
id: get_release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
- name: Get file name for collection
|
||||
id: get_filename
|
||||
run: echo ::set-output name=filename::$(ls *.tar.gz)
|
||||
|
||||
- name: Upload release asset
|
||||
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
asset_path: ./${{ steps.get_filename.outputs.filename }}
|
||||
asset_name: ${{ steps.get_filename.outputs.filename }}
|
||||
asset_content_type: application/gzip
|
||||
@@ -1,22 +0,0 @@
|
||||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
release-please:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout project
|
||||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
|
||||
|
||||
- name: Run "release-please"
|
||||
uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4
|
||||
with:
|
||||
command: manifest
|
||||
@@ -20,3 +20,5 @@ output
|
||||
.stestr
|
||||
.tox
|
||||
doc/build
|
||||
collections/
|
||||
*.egg-info
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ignores": [
|
||||
"docs/static/*.png",
|
||||
],
|
||||
"outputFormatters": [
|
||||
[ "markdownlint-cli2-formatter-junit", { "name": "junit.xml" } ],
|
||||
[ "markdownlint-cli2-formatter-default" ]
|
||||
]
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
MD007: false
|
||||
MD013: false
|
||||
MD046: false
|
||||
@@ -23,3 +23,9 @@ repos:
|
||||
rev: 5.13.2
|
||||
hooks:
|
||||
- id: isort
|
||||
args: ["--profile", "black", "--filter-files"]
|
||||
|
||||
- repo: https://github.com/ansible/ansible-lint.git
|
||||
rev: v24.7.0
|
||||
hooks:
|
||||
- id: ansible-lint
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
".": "1.10.4"
|
||||
}
|
||||
@@ -1,28 +1,5 @@
|
||||
VERSION --use-copy-link --try 0.8
|
||||
|
||||
lint:
|
||||
BUILD +lint.ansible-lint
|
||||
BUILD +lint.markdownlint
|
||||
|
||||
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
|
||||
|
||||
unit.go:
|
||||
FROM golang:1.21
|
||||
RUN go install github.com/jstemmer/go-junit-report/v2@latest
|
||||
@@ -36,41 +13,17 @@ unit.go:
|
||||
SAVE ARTIFACT /src/junit-go.xml AS LOCAL junit-go.xml
|
||||
END
|
||||
|
||||
builder:
|
||||
build.venv.runtime:
|
||||
FROM ubuntu:jammy
|
||||
RUN apt-get update -qq
|
||||
RUN \
|
||||
apt-get update -qq
|
||||
RUN \
|
||||
apt-get install -qq -y --no-install-recommends \
|
||||
build-essential git python3-dev python3-pip python3-venv
|
||||
ARG POETRY_VERSION=1.4.2
|
||||
RUN pip3 install --no-cache-dir poetry==${POETRY_VERSION}
|
||||
|
||||
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/
|
||||
|
||||
build.wheels:
|
||||
FROM +builder
|
||||
COPY pyproject.toml poetry.lock ./
|
||||
ARG --required only
|
||||
RUN poetry export --only=${only} -f requirements.txt --without-hashes > requirements.txt
|
||||
RUN pip wheel -r requirements.txt --wheel-dir=/wheels
|
||||
SAVE ARTIFACT requirements.txt
|
||||
SAVE ARTIFACT /wheels
|
||||
SAVE IMAGE --cache-hint
|
||||
|
||||
build.venv:
|
||||
ARG --required only
|
||||
FROM +build.wheels --only ${only}
|
||||
COPY requirements.txt ./
|
||||
RUN python3 -m venv /venv
|
||||
ENV PATH=/venv/bin:$PATH
|
||||
RUN pip install -r requirements.txt
|
||||
SAVE IMAGE --cache-hint
|
||||
|
||||
build.venv.runtime:
|
||||
FROM +build.venv --only main
|
||||
SAVE ARTIFACT /venv
|
||||
|
||||
build.collections:
|
||||
@@ -100,19 +53,3 @@ image:
|
||||
ARG tag=latest
|
||||
ARG REGISTRY=ghcr.io/vexxhost/atmosphere
|
||||
SAVE IMAGE --push ${REGISTRY}:${tag}
|
||||
|
||||
gh:
|
||||
FROM alpine:3
|
||||
RUN apk add --no-cache github-cli
|
||||
|
||||
trigger-image-sync:
|
||||
FROM +gh
|
||||
ARG --required project
|
||||
RUN --secret GITHUB_TOKEN gh workflow run --repo vexxhost/docker-openstack-${project} sync.yml
|
||||
|
||||
image-sync:
|
||||
FROM golang:1.19
|
||||
ARG --required project
|
||||
WORKDIR /src
|
||||
COPY . /src
|
||||
RUN --secret GITHUB_TOKEN go run ./cmd/atmosphere-ci image repo sync ${project}
|
||||
Vendored
-91
@@ -1,91 +0,0 @@
|
||||
pipeline {
|
||||
agent none
|
||||
|
||||
options {
|
||||
disableConcurrentBuilds(abortPrevious: true);
|
||||
}
|
||||
|
||||
// TODO: periodic multi-node jobs
|
||||
|
||||
environment {
|
||||
EARTHLY_CI = 'true'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('lint') {
|
||||
parallel {
|
||||
stage('ansible-lint') {
|
||||
agent {
|
||||
label 'earthly-2c-4g'
|
||||
}
|
||||
|
||||
steps {
|
||||
sh 'earthly --output +lint.ansible-lint'
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
junit testResults: 'ansible-lint.xml', allowEmptyResults: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('markdownlint') {
|
||||
agent {
|
||||
label 'earthly-2c-4g'
|
||||
}
|
||||
|
||||
steps {
|
||||
sh 'earthly --output +lint.markdownlint'
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
junit testResults: 'junit.xml', allowEmptyResults: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('unit') {
|
||||
agent {
|
||||
label 'earthly-2c-4g'
|
||||
}
|
||||
|
||||
steps {
|
||||
sh 'earthly --output +unit.go'
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
junit 'junit-go.xml'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('build') {
|
||||
parallel {
|
||||
stage('collection') {
|
||||
agent {
|
||||
label 'earthly-2c-4g'
|
||||
}
|
||||
|
||||
steps {
|
||||
sh 'earthly --output +build.collection'
|
||||
}
|
||||
|
||||
post {
|
||||
success {
|
||||
archiveArtifacts artifacts: 'dist/**'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// promote images
|
||||
// release?
|
||||
// todo: manual pin commit to main (avoiding loop)
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
# Atmosphere
|
||||
|
||||
- Documentation: https://vexxhost.github.io/atmosphere/
|
||||
|
||||
## 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.
|
||||
|
||||
## Contributing
|
||||
|
||||
You'll need to make sure that you have [`pre-commit`](https://pre-commit.com)
|
||||
setup and installed in your environment by running these commands:
|
||||
|
||||
```console
|
||||
pre-commit install --hook-type commit-msg
|
||||
````
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
Atmosphere
|
||||
==========
|
||||
|
||||
* Documentation: https://vexxhost.github.io/atmosphere/
|
||||
|
||||
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.
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
You'll need to make sure that you have `pre-commit <https://pre-commit.com>`_
|
||||
setup and installed in your environment by running these commands::
|
||||
|
||||
pre-commit install --hook-type commit-msg
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
# Copyright (c) 2024 VEXXHOST, Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -xe
|
||||
|
||||
ATMOSPHERE_VERSION=$(pbr info -s atmosphere)
|
||||
|
||||
# Create work directory
|
||||
TMPDIR=$(mktemp -d)
|
||||
trap "rm -rf $TMPDIR" EXIT
|
||||
|
||||
# Clone the openstack/manila-image-elements repository
|
||||
git clone https://opendev.org/openstack/manila-image-elements $TMPDIR
|
||||
|
||||
# Build image
|
||||
export ELEMENTS_PATH=$TMPDIR/elements
|
||||
disk-image-create -o manila-${ATMOSPHERE_VERSION}.qcow2 vm manila-ubuntu-minimal dhcp-all-interfaces manila-ssh ubuntu-nfs ubuntu-cifs
|
||||
@@ -1,5 +1,5 @@
|
||||
dunamai
|
||||
furo
|
||||
six
|
||||
sphinx
|
||||
sphinx-autobuild
|
||||
sphinx-copybutton
|
||||
+4
-4
@@ -12,17 +12,17 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from dunamai import Version
|
||||
|
||||
project = "Atmosphere"
|
||||
copyright = "2024, VEXXHOST, Inc."
|
||||
author = "VEXXHOST, Inc."
|
||||
release = Version.from_git().serialize()
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||
|
||||
extensions = ["sphinx_copybutton"]
|
||||
extensions = [
|
||||
"sphinx_copybutton",
|
||||
"pbr.sphinxext",
|
||||
]
|
||||
|
||||
templates_path = ["_templates"]
|
||||
exclude_patterns = []
|
||||
|
||||
+15
-16
@@ -57,8 +57,7 @@ You'll need to start all of the necessary dependencies first:
|
||||
.. code-block:: bash
|
||||
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install git python3-pip
|
||||
$ sudo pip install poetry
|
||||
$ sudo apt-get install git tox
|
||||
|
||||
Once done, you can clone the repository locally and switch to the
|
||||
``atmosphere`` directory:
|
||||
@@ -74,8 +73,14 @@ by running the following command:
|
||||
.. code-block:: bash
|
||||
|
||||
$ cd atmosphere
|
||||
$ sudo poetry install --with dev
|
||||
$ sudo poetry run molecule converge -s aio
|
||||
$ sudo tox -e molecule-aio-ovn
|
||||
|
||||
If you want to use the ML2/Open vSwitch plugin, you can run the following
|
||||
command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ sudo tox -e molecule-aio-openvswitch
|
||||
|
||||
Once the deployment is done, it will have a full deployment of all services
|
||||
inside the same host, so you can use the cloud from the same machine by
|
||||
@@ -122,7 +127,7 @@ system with `git` by running the following command:
|
||||
|
||||
$ git clone https://github.com/vexxhost/atmosphere
|
||||
|
||||
You will need ``poetry`` installed on your operating system. You will need to make
|
||||
You will need ``tox`` installed on your operating system. You will need to make
|
||||
sure that you have the appropriate OpenStack environment variables set (such
|
||||
as ``OS_CLOUD`` or ``OS_AUTH_URL``, etc.). You can also use the following
|
||||
environment variables to tweak the behaviour of the Heat stack that is created:
|
||||
@@ -161,18 +166,12 @@ environment variables to tweak the behaviour of the Heat stack that is created:
|
||||
generated by molecule. This way you can test your configs before you bring
|
||||
them to production.
|
||||
|
||||
Once you're ready to get started, you can run the following command to install
|
||||
poetry dependencies:
|
||||
Once you're ready to get started, you can run the following command to build
|
||||
the Heat stack:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ poetry install
|
||||
|
||||
Then you can run the following command to build the Heat stack:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ poetry run molecule converge
|
||||
$ tox -e molecule-venv -- converge
|
||||
|
||||
This will create a Heat stack with the name `atmosphere` and start deploying
|
||||
the cloud. Once it's complete, you can login to any of the systems by using
|
||||
@@ -181,7 +180,7 @@ you can run the following:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ poetry run molecule login -h ctl1
|
||||
$ tox -e molecule-venv -- login -h ctl1
|
||||
|
||||
At this point, you can proceed to the usage section to see how to interact
|
||||
with the cloud.
|
||||
@@ -191,7 +190,7 @@ use the `destroy` sub-command:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ poetry run molecule destroy
|
||||
$ tox -e molecule-venv -- destroy
|
||||
|
||||
For more information about the different commands used by Molecule, you can
|
||||
refer to the Molecule documentation.
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
kubernetes-helm
|
||||
nixpkgs-fmt
|
||||
patchutils
|
||||
poetry
|
||||
python311Packages.tox
|
||||
];
|
||||
};
|
||||
|
||||
@@ -53,6 +53,5 @@ build_ignore:
|
||||
- CHANGELOG.md
|
||||
- go.mod
|
||||
- go.sum
|
||||
- poetry.lock
|
||||
- pyproject.toml
|
||||
- release-please-config.json
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
---
|
||||
requires_ansible: ">=2.14.0"
|
||||
requires_ansible: ">=2.15.0"
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
site_name: Atmosphere
|
||||
theme:
|
||||
name: material
|
||||
features:
|
||||
- content.tabs.link
|
||||
- navigation.tracking
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
- def_list
|
||||
- pymdownx.details
|
||||
- pymdownx.superfences
|
||||
- pymdownx.tabbed:
|
||||
alternate_style: true
|
||||
plugins:
|
||||
- literate-nav:
|
||||
nav_file: SUMMARY.md
|
||||
copyright: Atmosphere is a community effort led by <a href="https://vexxhost.com">VEXXHOST, Inc.</a>
|
||||
Generated
-2067
File diff suppressed because it is too large.
Load diff
@@ -1,52 +0,0 @@
|
||||
[tool.poetry]
|
||||
name = "atmosphere"
|
||||
version = "1.10.4.post186.dev0+779cb921"
|
||||
description = ""
|
||||
authors = ["Mohammed Naser <mnaser@vexxhost.com>"]
|
||||
readme = "README.md"
|
||||
|
||||
[tool.poetry.scripts]
|
||||
atmosphere-operator = "atmosphere.cmd.operator:main"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.10"
|
||||
ansible-core = "^2.15.9"
|
||||
jmespath = "^1.0.1"
|
||||
openstacksdk = "<0.99.0"
|
||||
docker-image-py = "^0.1.12"
|
||||
rjsonnet = "^0.5.2"
|
||||
netaddr = "^0.8.0"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
flake8 = "^5.0.4"
|
||||
flake8-isort = "^4.2.0"
|
||||
molecule = "^6.0.3"
|
||||
molecule-plugins = {extras = ["docker"], version = "^23.5.0"}
|
||||
oslo-log = "^5.2.0"
|
||||
pytest = "^7.1.3"
|
||||
pytest-cov = "^3.0.0"
|
||||
pytest-forked = "^1.4.0"
|
||||
pytest-mock = "^3.8.2"
|
||||
pytest-xdist = "^3.1.0"
|
||||
ruyaml = "^0.91.0"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
|
||||
build-backend = "poetry_dynamic_versioning.backend"
|
||||
|
||||
[tool.poetry-dynamic-versioning]
|
||||
enable = false
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
addopts = ["--cov=atmosphere", "--cov-report=term-missing"]
|
||||
filterwarnings = [
|
||||
"ignore::DeprecationWarning",
|
||||
"ignore::schematics.deprecated.SchematicsDeprecationWarning",
|
||||
"ignore:The asyncore module is deprecated",
|
||||
]
|
||||
|
||||
[tool.vulture]
|
||||
paths = ["atmosphere"]
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"packages": {
|
||||
".": {
|
||||
"release-type": "python",
|
||||
"draft": true,
|
||||
"extra-files": [
|
||||
"roles/defaults/defaults/main.yml",
|
||||
"galaxy.yml"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
ansible-core>=2.15.9
|
||||
jmespath>=1.0.1
|
||||
openstacksdk<0.99.0
|
||||
docker-image-py>=0.1.12
|
||||
rjsonnet>=0.5.2
|
||||
netaddr>=0.8.0
|
||||
@@ -27,7 +27,7 @@ cluster_issuer_acme_http01_ingress_class: "{{ atmosphere_ingress_class_name }}"
|
||||
|
||||
cluster_issuer_acme_cloudflare_secret_name: cloudflare-api-token
|
||||
cluster_issuer_acme_cloudflare_email: "{{ cluster_issuer_acme_email }}"
|
||||
#cluster_issuer_acme_cloudflare_api_token: <CLOUDFLARE_API_TOKEN>
|
||||
# cluster_issuer_acme_cloudflare_api_token: <CLOUDFLARE_API_TOKEN>
|
||||
|
||||
cluster_issuer_venafi_secret_name: cert-manager-venafi-credentials
|
||||
# cluster_issuer_venafi_ca:
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
|
||||
|
||||
ingress_class_name: "{{ atmosphere_ingress_class_name }}"
|
||||
|
||||
# ingress_name: string
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
- name: Install the multipathd package
|
||||
ansible.builtin.package:
|
||||
name: multipath-tools
|
||||
state: latest
|
||||
state: latest # noqa: package-latest
|
||||
notify:
|
||||
- Restart "multipathd"
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
when: "'InitiatorName' not in portworx_iscsi_initiatorname.content | b64decode"
|
||||
block:
|
||||
- name: Generate a new InitiatorName
|
||||
ansible.builtin.shell:
|
||||
changed_when: true
|
||||
ansible.builtin.command:
|
||||
cmd: iscsi-iname
|
||||
register: portworx_iscsi_iname
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
[metadata]
|
||||
name = atmosphere
|
||||
summary = Simple & easy private cloud platform featuring VMs, Kubernetes & bare-metal
|
||||
description_file =
|
||||
README.rst
|
||||
author = VEXXHOST, Inc.
|
||||
author_email = support@vexxhost.com
|
||||
url = https://github.com/vexxhost/atmosphere
|
||||
project_urls =
|
||||
Bug Tracker = https://github.com/vexxhost/atmosphere/issues
|
||||
Documentation = https://vexxhost.github.io/atmosphere/
|
||||
Source Code = https://github.com/vexxhost/atmosphere
|
||||
python_requires = >=3.8
|
||||
classifiers =
|
||||
Development Status :: 5 - Production/Stable
|
||||
Environment :: OpenStack
|
||||
Intended Audience :: Information Technology
|
||||
Intended Audience :: System Administrators
|
||||
License :: OSI Approved :: Apache Software License
|
||||
Operating System :: POSIX :: Linux
|
||||
Programming Language :: Python
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3.8
|
||||
Programming Language :: Python :: 3.9
|
||||
Programming Language :: Python :: 3.10
|
||||
Programming Language :: Python :: 3.11
|
||||
Programming Language :: Python :: 3 :: Only
|
||||
Programming Language :: Python :: Implementation :: CPython
|
||||
@@ -0,0 +1,6 @@
|
||||
# Copyright (c) 2024 VEXXHOST, Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(setup_requires=["pbr>=2.0.0"], pbr=True)
|
||||
@@ -1,6 +0,0 @@
|
||||
kubernetes
|
||||
molecule
|
||||
molecule-plugins[docker]
|
||||
oslotest
|
||||
stestr
|
||||
testscenarios
|
||||
@@ -31,7 +31,7 @@ def defaults():
|
||||
"..",
|
||||
"roles",
|
||||
"defaults",
|
||||
"defaults",
|
||||
"vars",
|
||||
"main.yml",
|
||||
)
|
||||
|
||||
@@ -41,20 +41,20 @@ def defaults():
|
||||
|
||||
@pytest.fixture
|
||||
def atmosphere_images(defaults):
|
||||
return defaults["atmosphere_images"]
|
||||
return defaults["_atmosphere_images"]
|
||||
|
||||
|
||||
def test_openstack_helm_image_tags_for_magnum(atmosphere_images):
|
||||
assert openstack_helm_image_tags(atmosphere_images, "magnum") == {
|
||||
"bootstrap": "ghcr.io/vexxhost/atmosphere/heat:main",
|
||||
"db_drop": "ghcr.io/vexxhost/atmosphere/heat:main",
|
||||
"db_init": "ghcr.io/vexxhost/atmosphere/heat:main",
|
||||
"dep_check": "quay.io/vexxhost/kubernetes-entrypoint:latest",
|
||||
"ks_endpoints": "ghcr.io/vexxhost/atmosphere/heat:main",
|
||||
"ks_service": "ghcr.io/vexxhost/atmosphere/heat:main",
|
||||
"ks_user": "ghcr.io/vexxhost/atmosphere/heat:main",
|
||||
"magnum_api": "quay.io/vexxhost/magnum:main",
|
||||
"magnum_conductor": "quay.io/vexxhost/magnum:main",
|
||||
"magnum_db_sync": "quay.io/vexxhost/magnum:main",
|
||||
"rabbit_init": "docker.io/library/rabbitmq:3.10.2-management",
|
||||
"bootstrap": "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}",
|
||||
"db_drop": "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}",
|
||||
"db_init": "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}",
|
||||
"dep_check": "registry.atmosphere.dev/library/kubernetes-entrypoint:{{ atmosphere_release }}",
|
||||
"ks_endpoints": "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}",
|
||||
"ks_service": "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}",
|
||||
"ks_user": "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}",
|
||||
"magnum_api": "registry.atmosphere.dev/library/magnum:{{ atmosphere_release }}",
|
||||
"magnum_conductor": "registry.atmosphere.dev/library/magnum:{{ atmosphere_release }}",
|
||||
"magnum_db_sync": "registry.atmosphere.dev/library/magnum:{{ atmosphere_release }}",
|
||||
"rabbit_init": "docker.io/library/rabbitmq:3.13.3-management",
|
||||
}
|
||||
@@ -9,8 +9,6 @@ setenv =
|
||||
OS_STDERR_CAPTURE=1
|
||||
OS_TEST_TIMEOUT=160
|
||||
PYTHONDONTWRITEBYTECODE=1
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
passenv =
|
||||
KUBECONFIG
|
||||
|
||||
@@ -53,11 +51,29 @@ commands =
|
||||
python3 {toxinidir}/build/sync-charts.py --check
|
||||
python3 {toxinidir}/build/lint-jobs.py
|
||||
|
||||
[testenv:py3]
|
||||
deps =
|
||||
pytest-ansible
|
||||
commands =
|
||||
pytest tests/unit
|
||||
|
||||
[testenv:molecule-venv]
|
||||
passenv =
|
||||
ATMOSPHERE_NETWORK_BACKEND
|
||||
deps =
|
||||
molecule
|
||||
commands =
|
||||
molecule {posargs}
|
||||
|
||||
[testenv:molecule-keycloak]
|
||||
deps =
|
||||
{[testenv:molecule-venv]deps}
|
||||
commands =
|
||||
molecule test -s keycloak
|
||||
|
||||
[testenv:molecule-csi-{rbd,local-path-provisioner}]
|
||||
deps =
|
||||
{[testenv:molecule-venv]deps}
|
||||
setenv =
|
||||
rbd: MOLECULE_CSI_DRIVER = rbd
|
||||
local-path-provisioner: MOLECULE_CSI_DRIVER = local-path-provisioner
|
||||
@@ -65,6 +81,12 @@ commands =
|
||||
molecule test -s csi
|
||||
|
||||
[testenv:molecule-aio-{openvswitch,ovn}]
|
||||
deps =
|
||||
{[testenv:molecule-venv]deps}
|
||||
kubernetes
|
||||
oslotest
|
||||
stestr
|
||||
testscenarios
|
||||
setenv =
|
||||
ATMOSPHERE_DEBUG = false
|
||||
openvswitch: ATMOSPHERE_NETWORK_BACKEND = openvswitch
|
||||
@@ -89,3 +111,11 @@ allowlist_externals = {[testenv:docs]allowlist_externals}
|
||||
commands =
|
||||
rm -rf doc/build/html doc/build/doctrees
|
||||
sphinx-autobuild doc/source doc/build/html
|
||||
|
||||
[testenv:build-manila-image]
|
||||
deps =
|
||||
diskimage-builder==3.28.0
|
||||
allowlist_externals =
|
||||
bash
|
||||
commands =
|
||||
bash {toxinidir}/build/build-manila-image.sh
|
||||
@@ -3,6 +3,10 @@
|
||||
parent: tox-linters
|
||||
pre-run: zuul.d/playbooks/linters/pre.yml
|
||||
|
||||
- job:
|
||||
name: atmosphere-tox-py3
|
||||
parent: tox
|
||||
|
||||
- job:
|
||||
name: atmosphere-build-collection
|
||||
parent: build-ansible-collection
|
||||
|
||||
@@ -25,17 +25,16 @@
|
||||
args:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
|
||||
- name: Run molecule with exist branch
|
||||
- name: Run molecule with existing branch
|
||||
become: true
|
||||
ansible.builtin.shell: |
|
||||
pip install --ignore-installed poetry
|
||||
poetry install
|
||||
pip install -r test-requirements.txt
|
||||
poetry run molecule converge -s aio
|
||||
args:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
environment:
|
||||
ATMOSPHERE_NETWORK_BACKEND: "{{ network_backend }}"
|
||||
ansible.builtin.include_role:
|
||||
name: tox
|
||||
vars:
|
||||
tox_envlist: molecule-venv
|
||||
tox_extra_args: "-- converge -s aio"
|
||||
tox_environment:
|
||||
ATMOSPHERE_NETWORK_BACKEND: "{{ network_backend }}"
|
||||
zuul_work_dir: "{{ zuul.project.src_dir }}"
|
||||
|
||||
- name: Checkout to "{{ zuul.branch }}" branch
|
||||
become: true
|
||||
@@ -46,14 +45,24 @@
|
||||
args:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
|
||||
- name: Run molecule to upgrade
|
||||
- name: Upgrade cloud to "{{ zuul.branch }}"
|
||||
become: true
|
||||
ansible.builtin.shell: |
|
||||
poetry install
|
||||
pip install -r test-requirements.txt
|
||||
poetry run molecule converge -s aio
|
||||
poetry run molecule verify -s aio
|
||||
args:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
environment:
|
||||
ATMOSPHERE_NETWORK_BACKEND: "{{ network_backend }}"
|
||||
ansible.builtin.include_role:
|
||||
name: tox
|
||||
vars:
|
||||
tox_envlist: molecule-venv
|
||||
tox_extra_args: "-- converge -s aio"
|
||||
tox_environment:
|
||||
ATMOSPHERE_NETWORK_BACKEND: "{{ network_backend }}"
|
||||
zuul_work_dir: "{{ zuul.project.src_dir }}"
|
||||
|
||||
- name: Verify if upgrade was successful
|
||||
become: true
|
||||
ansible.builtin.include_role:
|
||||
name: tox
|
||||
vars:
|
||||
tox_envlist: molecule-venv
|
||||
tox_extra_args: "-- verify -s aio"
|
||||
tox_environment:
|
||||
ATMOSPHERE_NETWORK_BACKEND: "{{ network_backend }}"
|
||||
zuul_work_dir: "{{ zuul.project.src_dir }}"
|
||||
@@ -17,6 +17,7 @@
|
||||
check:
|
||||
jobs:
|
||||
- atmosphere-linters
|
||||
- atmosphere-tox-py3
|
||||
- atmosphere-build-collection:
|
||||
dependencies: &molecule_check_dependencies
|
||||
- name: atmosphere-build-container-image-barbican
|
||||
@@ -84,6 +85,7 @@
|
||||
gate:
|
||||
jobs:
|
||||
- atmosphere-linters
|
||||
- atmosphere-tox-py3
|
||||
- atmosphere-build-collection:
|
||||
dependencies: &molecule_gate_dependencies
|
||||
- name: atmosphere-upload-container-image-barbican
|
||||
|
||||
Reference in new issue
Block a user