Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,19 @@ jobs:
# hosted Github Actions runners don't offer much space. Clean up unused
# dependencies so that we don't run out of disk. Borrowed from
# https://carlosbecker.com/posts/github-actions-disk-space.
#
# Note: deleting these directories can be very slow, so we only remove
# enough to allow the build to complete. We'll drop this workaround and
# get better build times once we switch to self-hosted runners with
# persistent storage and more disk.
- name: "cleanup"
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
time du -sh /usr/share/dotnet
time du -sh /opt/hostedtoolcache/CodeQL

time sudo rm -rf /usr/share/dotnet
time sudo rm -rf /opt/hostedtoolcache/CodeQL

sudo docker image prune --all --force
sudo docker builder prune -a
- uses: actions/checkout@v5
Expand All @@ -57,11 +67,15 @@ jobs:
echo "$(pwd)/bin" >> $GITHUB_PATH
# Run simulated omicron in the background with docker compose.
# TODO(jmcarp): support tests against multiple omicron versions.
# TODO(jmcarp): publish this image for faster builds.
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: omicron-dev
working-directory: acctest
run: |
docker compose build
if ! docker compose up --wait --wait-timeout 1500; then
docker compose logs
exit 1
Expand Down
8 changes: 6 additions & 2 deletions acctest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ FROM rust

SHELL ["/bin/bash", "-c"]

ARG OMICRON_REF=main

RUN \
git clone https://github.com/oxidecomputer/omicron.git --branch main --depth 1 && \
git clone https://github.com/oxidecomputer/omicron.git && \
cd omicron && \
git checkout $OMICRON_REF && \
source env.sh && \
./tools/install_builder_prerequisites.sh -y -s
./tools/install_builder_prerequisites.sh -y -s && \
cargo xtask omicron-dev help

COPY nexus-config.toml omicron

Expand Down
2 changes: 1 addition & 1 deletion acctest/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
omicron-dev:
build: .
image: ghcr.io/oxidecomputer/omicron-acceptance-test:4449f0156baa80430eec3a98d53b3c1d8ed06c8d
command: /bin/bash -c 'source env.sh && cargo xtask omicron-dev run-all --nexus-config ./nexus-config.toml'
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:12220"]
Expand Down
7 changes: 5 additions & 2 deletions acctest/nexus-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,16 @@ metrics_producer_gc.period_secs = 60
external_endpoints.period_secs = 60
nat_cleanup.period_secs = 30
bfd_manager.period_secs = 30
# How frequently to check for a new inventory collection (made by any Nexus).
# This is cheap, so we should check frequently.
inventory.period_secs_load = 15
# How frequently to collect hardware/software inventory from the whole system
# (even if we don't have reason to believe anything has changed).
inventory.period_secs = 600
inventory.period_secs_collect = 600
# Maximum number of past collections to keep in the database
inventory.nkeep = 5
# Disable inventory collection altogether (for emergencies)
inventory.disable = false
inventory.disable_collect = false
phantom_disks.period_secs = 30
physical_disk_adoption.period_secs = 30
support_bundle_collector.period_secs = 30
Expand Down
Loading