Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b3d9668
POC: Noble and cgroupsv2 support in acceptance tests
mike-jc Feb 26, 2026
9cd2347
POC: Noble and cgroupsv2, fixes
mike-jc Feb 27, 2026
85d1fed
POC: Noble and cgroupsv2, the latest Docker CPI image
mike-jc Mar 2, 2026
0305f8f
POC: Noble and cgroupsv2, pip fixes
mike-jc Mar 2, 2026
6d3f46a
POC: Noble and cgroupsv2, Bosh fixes
mike-jc Mar 2, 2026
536d4e0
POC: Noble and cgroupsv2, releases fixes
mike-jc Mar 2, 2026
a927bb5
POC: Noble and cgroupsv2, rollback changes
mike-jc Mar 2, 2026
d1af9d0
POC: Noble and cgroupsv2, rollback changes
mike-jc Mar 2, 2026
0492997
POC: Noble and cgroupsv2, rollback ops file
mike-jc Mar 2, 2026
8c41b5a
POC: Noble and cgroupsv2, workaround
mike-jc Mar 3, 2026
28e27a0
POC: Noble and cgroupsv2, fix
mike-jc Mar 3, 2026
1e33816
POC: Noble and cgroupsv2, watch without systemd
mike-jc Mar 3, 2026
30a5ca9
POC: Noble and cgroupsv2, fix watch scripts
mike-jc Mar 3, 2026
84f2a12
POC: Noble and cgroupsv2, fix DNS
mike-jc Mar 3, 2026
036113f
POC: Noble and cgroupsv2, fix DNS ops file
mike-jc Mar 3, 2026
6b27c22
POC: Noble and cgroupsv2, fix DNS ops file
mike-jc Mar 3, 2026
ae06706
POC: Noble and cgroupsv2, fix workaround
mike-jc Mar 3, 2026
7801541
POC: Noble and cgroupsv2, rollback change
mike-jc Mar 3, 2026
6e1d8ab
POC: Noble and cgroupsv2, scaling Bosh workers out
mike-jc Mar 3, 2026
11487a0
POC: Noble and cgroupsv2, fix
mike-jc Mar 3, 2026
aec0b1b
POC: Noble and cgroupsv2, give new Docker CPI release a try
mike-jc Mar 4, 2026
b6e80c1
POC: Noble and cgroupsv2, give new Docker CPI release a try
mike-jc Mar 4, 2026
0335588
POC: Noble and cgroupsv2, give new Docker CPI release a try
mike-jc Mar 4, 2026
1f32e94
POC: Noble and cgroupsv2, give new Docker CPI release a try
mike-jc Mar 4, 2026
411582f
POC: Noble and cgroupsv2 with new Docker CPI release
mike-jc Mar 4, 2026
b404255
POC: Noble and cgroupsv2 with new Docker CPI release, remove trash
mike-jc Mar 4, 2026
fbb2551
cleanup: removed unused code
mike-jc Mar 4, 2026
f7ed91d
refact: usage of link to the latest Noble stemcell
mike-jc Mar 4, 2026
4d62c66
Merge branch 'poc-noble-support-no-workarounds' into CFN-6544-noble-c…
mike-jc Mar 4, 2026
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ config/settings.yml
releases/*.tgz
releases/**/*.tgz
ci/scripts/stemcell/*.tgz
ci/scripts/stemcell-bionic/*.tgz
ci/scripts/stemcell-jammy/*.tgz
dev_releases
blobs/*
.blobs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ import (
. "github.com/onsi/ginkgo/v2"
)

var _ = Describe("Bionic", func() {
It("Correctly proxies HTTP requests when using the Bionic stemcell", func() {
var _ = Describe("Jammy", func() {
It("Correctly proxies HTTP requests when using the Jammy stemcell", func() {

opsfileBionic := `---
# Configure Bionic stemcell
opsfileJammy := `---
# Configure Jammy stemcell
- type: replace
path: /stemcells/alias=default/os
value: ubuntu-bionic
value: ubuntu-jammy
`

haproxyBackendPort := 12000
haproxyInfo, _ := deployHAProxy(baseManifestVars{
haproxyBackendPort: haproxyBackendPort,
haproxyBackendServers: []string{"127.0.0.1"},
deploymentName: deploymentNameForTestNode(),
}, []string{opsfileBionic}, map[string]interface{}{}, true)
}, []string{opsfileJammy}, map[string]interface{}{}, true)

closeLocalServer, localPort := startDefaultTestServer()
defer closeLocalServer()
Expand Down
41 changes: 15 additions & 26 deletions acceptance-tests/run-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,27 @@
set -eu
REPO_DIR="$(cd "$(dirname "$0")/.." && pwd)"
source "${REPO_DIR}/ci/scripts/functions-ci.sh"
FOCUS=""
PARALLELISM=""
KEEP_RUNNING=""

usage() {
echo -e "Usage: $0 [-F <ginkgo focus target>] [-k]
echo -e "Usage: $0 [-F <ginkgo focus target>] [-P <ginkgo nodes>] [-k]

-F Focus on a particular test. Expects a Ginkgo test name. Keep bosh running afterwards.
-P Set Ginkgo parallel node count. Default is '-p' (smart parallelism).
-k Keep bosh container running. Useful for debug." 1>&2; exit 1;
}

while getopts ":F:k" o; do
while getopts ":F:P:k" o; do
case "${o}" in
F)
FOCUS=${OPTARG}
KEEP_RUNNING=true
;;
P)
PARALLELISM=${OPTARG}
;;
k)
KEEP_RUNNING=true
;;
Expand All @@ -28,25 +34,11 @@ while getopts ":F:k" o; do
done
shift $((OPTIND-1))

docker_mac_check_cgroupsv1() {
# Force cgroups v1 on Docker for Mac
# inspired by https://github.com/docker/for-mac/issues/6073#issuecomment-1018793677

SETTINGS=~/Library/Group\ Containers/group.com.docker/settings.json

cgroupsV1Enabled=$(jq '.deprecatedCgroupv1' "$SETTINGS")
if [ "$cgroupsV1Enabled" != "true" ]; then
echo "deprecatedCgroupv1 should be enabled in $SETTINGS. Otherwise the acceptance tests will not run on Docker for Mac."
echo "Check in the README.md for a convenient script to set deprecatedCgroupv1 and restart Docker."
exit 1
fi
}

check_required_files() {
PIDS=""
REQUIRED_FILE_PATTERNS=(
ci/scripts/stemcell/bosh-stemcell-*-ubuntu-jammy-*.tgz!https://bosh.io/d/stemcells/bosh-warden-boshlite-ubuntu-jammy-go_agent
ci/scripts/stemcell-bionic/bosh-stemcell-*-ubuntu-bionic-*.tgz!https://bosh.io/d/stemcells/bosh-warden-boshlite-ubuntu-bionic-go_agent
ci/scripts/stemcell/bosh-stemcell-*-ubuntu-noble.tgz!https://bosh.io/d/stemcells/bosh-warden-boshlite-ubuntu-noble
ci/scripts/stemcell-jammy/bosh-stemcell-*-ubuntu-jammy-*.tgz!https://bosh.io/d/stemcells/bosh-warden-boshlite-ubuntu-jammy-go_agent
)

for entry in "${REQUIRED_FILE_PATTERNS[@]}"; do
Expand All @@ -63,9 +55,10 @@ check_required_files() {
fi

(
echo "$filepattern not found, downloading latest."
echo "$filepattern not found, downloading."
cd "$folder" && \
resolved=$(curl -s --write-out '\n%{redirect_url}' "$url" | tail -n1) && \
resolved=$(curl -s --write-out '\n%{redirect_url}' "$url" | tail -n1 | tr -d '\n') && \
echo "Resolved URL: $resolved" && \
curl -s --remote-name --remote-header-name --location "$resolved" && \
echo "Downloaded '$url' successfully." && \
ls -1lh "$folder/"$filepattern
Expand All @@ -81,10 +74,6 @@ check_required_files() {

check_required_files

if [ "$(uname)" == "Darwin" ]; then
docker_mac_check_cgroupsv1
fi

build_image "${REPO_DIR}/ci"
prepare_docker_scratch

Expand All @@ -93,9 +82,9 @@ if [ -n "$KEEP_RUNNING" ] ; then
echo
echo "*** KEEP_RUNNING enabled. Please clean up docker scratch after removing containers: ${DOCKER_SCRATCH}"
echo
docker run --privileged -v "$REPO_DIR":/repo -v "${DOCKER_SCRATCH}":/scratch/docker -e REPO_ROOT=/repo -e FOCUS="$FOCUS" -e KEEP_RUNNING="${KEEP_RUNNING}" haproxy-boshrelease-testflight bash -c "cd /repo/ci/scripts && ./acceptance-tests ; sleep infinity"
docker run --privileged -v "$REPO_DIR":/repo -v "${DOCKER_SCRATCH}":/scratch/docker -e REPO_ROOT=/repo -e FOCUS="${FOCUS}" -e PARALLELISM="${PARALLELISM}" -e KEEP_RUNNING="${KEEP_RUNNING}" haproxy-boshrelease-testflight bash -c "cd /repo/ci/scripts && ./acceptance-tests ; sleep infinity"
else
docker run --rm --privileged -v "$REPO_DIR":/repo -v "${DOCKER_SCRATCH}":/scratch/docker -e REPO_ROOT=/repo -e KEEP_RUNNING="" haproxy-boshrelease-testflight bash -c "cd /repo/ci/scripts && ./acceptance-tests"
docker run --rm --privileged -v "$REPO_DIR":/repo -v "${DOCKER_SCRATCH}":/scratch/docker -e REPO_ROOT=/repo -e KEEP_RUNNING="" -e PARALLELISM="${PARALLELISM}" haproxy-boshrelease-testflight bash -c "cd /repo/ci/scripts && ./acceptance-tests"
echo "Cleaning up docker scratch: ${DOCKER_SCRATCH}"
sudo rm -rf "${DOCKER_SCRATCH}"
fi
11 changes: 8 additions & 3 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
FROM bosh/docker-cpi:main
FROM ghcr.io/cloudfoundry/bosh/docker-cpi:latest

# Install all necessary tools for haproxy testflight and dependency autobump
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y wget jq git vim nano python3-pip && \
apt-get install -y wget jq git vim nano python3-pip python3-venv && \
apt-get clean

# Set bosh env at login
RUN echo "source /tmp/local-bosh/director/env" >> /root/.bashrc

# Copy ops files
COPY bosh-scaled-out.yml /usr/local/bosh-deployment/bosh-scaled-out.yml

# Install Python libraries needed for scripts
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:${PATH}"
COPY scripts/requirements.txt /requirements.txt
RUN /usr/bin/python3 -m pip install -r /requirements.txt
RUN pip install -r /requirements.txt

# Install go dependencies
ENV GOBIN=/usr/local/bin
Expand Down
3 changes: 3 additions & 0 deletions ci/bosh-scaled-out.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- type: replace
path: /instance_groups/name=bosh/properties/director/workers?
value: 12
14 changes: 7 additions & 7 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
- in_parallel:
- { get: git, trigger: true, passed: [unit-tests] }
- { get: stemcell }
- { get: stemcell-bionic }
- { get: stemcell-jammy }
- get: haproxy-boshrelease-testflight
- task: acceptance-tests
privileged: true
Expand All @@ -131,7 +131,7 @@ jobs:
inputs:
- { name: git }
- { name: stemcell }
- { name: stemcell-bionic }
- { name: stemcell-jammy }
run:
path: ./git/ci/scripts/acceptance-tests
args: []
Expand All @@ -152,7 +152,7 @@ jobs:
- do:
- { get: git-pull-requests, trigger: true, version: every }
- { get: stemcell }
- { get: stemcell-bionic }
- { get: stemcell-jammy }
- get: haproxy-boshrelease-testflight
- put: git-pull-requests
params:
Expand All @@ -169,7 +169,7 @@ jobs:
inputs:
- { name: git-pull-requests }
- { name: stemcell }
- { name: stemcell-bionic }
- { name: stemcell-jammy }
run:
path: ./git-pull-requests/ci/scripts/acceptance-tests
args: []
Expand Down Expand Up @@ -403,15 +403,15 @@ resources:
- "dependabot"
- "CFN-CI"

- name: stemcell-bionic
- name: stemcell-jammy
type: bosh-io-stemcell
source:
name: bosh-warden-boshlite-ubuntu-bionic-go_agent
name: bosh-warden-boshlite-ubuntu-jammy-go_agent

- name: stemcell
type: bosh-io-stemcell
source:
name: bosh-warden-boshlite-ubuntu-jammy-go_agent
name: bosh-warden-boshlite-ubuntu-noble-go_agent

- name: version
type: semver
Expand Down
12 changes: 10 additions & 2 deletions ci/scripts/acceptance-tests
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,18 @@ echo "----- Running tests"
export PATH=$PATH:$GOPATH/bin
ginkgo version

PARALLELISM="-p"
if [ -n "$FOCUS" ]; then
echo "------------------------------------------------------------------"
if [ -n "${FOCUS:-}" ]; then
PARALLELISM="--nodes=1"
echo "FOCUS is set, thus PARALLELISM is set to '$PARALLELISM'"
elif [ -n "${PARALLELISM:-}" ]; then
PARALLELISM="--nodes=$PARALLELISM"
echo "PARALLELISM is set. Will run ginkgo with '$PARALLELISM'"
else
PARALLELISM="-p"
echo "PARALLELISM is not set. Using default '$PARALLELISM'"
fi
echo "------------------------------------------------------------------"

ginkgo -v "$PARALLELISM" -r --trace --show-node-events --randomize-all --flake-attempts 5 "${ADDITIONAL_ARGS[@]}"

Expand Down
14 changes: 7 additions & 7 deletions ci/scripts/functions-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@ function bosh_release() {
}

function bosh_assets() {
stemcell_jammy_path="$START_DIR/stemcell/*.tgz"
stemcell_bionic_path="$START_DIR/stemcell-bionic/*.tgz"
stemcell_noble_path="$START_DIR/stemcell/*.tgz"
stemcell_jammy_path="$START_DIR/stemcell-jammy/*.tgz"

echo "----- Uploading Noble stemcell"
bosh -n upload-stemcell $stemcell_noble_path

echo "----- Uploading Jammy stemcell"
bosh -n upload-stemcell $stemcell_jammy_path

echo "----- Uploading Bionic stemcell"
bosh -n upload-stemcell $stemcell_bionic_path

echo "----- Uploading os-conf (used for tests only)"
bosh -n upload-release --sha1 386293038ae3d00813eaa475b4acf63f8da226ef \
https://bosh.io/d/github.com/cloudfoundry/os-conf-release?v=22.1.2
bosh -n upload-release --sha1 sha256:efcf30754ce4c5f308aedab3329d8d679f5967b2a4c3c453204c7cb10c7c5ed9 \
https://bosh.io/d/github.com/cloudfoundry/os-conf-release?v=23.0.0

export BOSH_PATH=$(command -v bosh)
export BASE_MANIFEST_PATH="$PWD/manifests/haproxy.yml"
Expand Down
Loading