Skip to content

Commit c8a27e0

Browse files
committed
package understack-tests as container
1 parent 92aa4ed commit c8a27e0

File tree

8 files changed

+73
-0
lines changed

8 files changed

+73
-0
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./python/understack-tests/.venv/
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM python:3.12-slim
2+
ENV UV_PYTHON_DOWNLOADS=never
3+
ENV UV_COMPILE_BYTECODE=1
4+
ENV PATH="/code/.venv/bin:/code/.bin:$PATH"
5+
6+
WORKDIR /code
7+
8+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
9+
10+
COPY python/understack-tests/uv.lock python/understack-tests/pyproject.toml /code/
11+
RUN --mount=type=cache,target=/root/.cache/uv uv sync --verbose --locked --no-dev
12+
COPY python/understack-tests /code
13+
14+
RUN useradd --create-home app
15+
COPY --chown=app:app containers/understack-tests/rally.conf /home/app/.rally/rally.conf
16+
USER app
17+
RUN rally db create
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[openstack]
2+
nova_server_boot_timeout = 900
3+
4+
[database]
5+
connection = sqlite:////home/app/.rally/rally.sqlite
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
set -e
3+
rally db ensure
4+
rally deployment create --fromenv --name=main
5+
rally deployment check
6+
rally task start "$@"

python/understack-tests/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Integration tests
2+
3+
## Initial setup
4+
5+
## Usage
6+
7+
```shell
8+
docker run --rm --env-file dev.env ghcr.io/rackerlabs/understack-tests run-scenario build_a_single_server.yaml
9+
```
10+
11+
### Available scenarios
12+
13+
- `build_a_single_server.yaml` - boots a simple Ubuntu GP2.SMALL server with a plain networking setup. The network is automatically created and removed.
14+
- `floating_ips.yaml` - build a network, server, router and associate and dissociate floating IP
File renamed without changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
OS_AUTH_URL=https://keystone.dev.undercloud.rackspace.net/v3
2+
OS_USERNAME=your-rally-user
3+
OS_PASSWORD=testpassword
4+
OS_TENANT_NAME=your-rally
5+
OS_PROJECT_NAME=your-rally
6+
OS_REGION_NAME=RegionOne
7+
OS_ENDPOINT_TYPE=publicURL
8+
OS_INTERFACE=public
9+
OS_IDENTITY_API_VERSION=3
10+
OS_USER_DOMAIN_NAME=Default
11+
OS_PROJECT_DOMAIN_NAME=Default
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
title: Provision gp2.small Ubuntu, test floating IPs
3+
subtasks:
4+
- title: "Boot"
5+
workloads:
6+
- scenario:
7+
NovaServers.boot_server_associate_and_dissociate_floating_ip:
8+
flavor:
9+
name: gp2.small
10+
image:
11+
name: ^Ubuntu 24.*$
12+
floating_network: NET_DEV_69.20.94.128/28
13+
config_drive: true
14+
contexts:
15+
network:
16+
start_cidr: 192.168.91.0/24
17+
dns_nameservers: [8.8.8.8]
18+
router:
19+
external: true

0 commit comments

Comments
 (0)