Skip to content

Commit 6a79ad4

Browse files
authored
Merge pull request #579 from cloudfoundry/merge-jammy
Merge jammy into noble
2 parents 1843d83 + b517d60 commit 6a79ad4

8 files changed

Lines changed: 58 additions & 33 deletions

File tree

.github/pull_request_template.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
NOTE: this repository uses a "Merge Forward" strategy
2+
3+
Changes should be made in the earliest applicable branch, and
4+
merged forward through subsequent branches.
5+
1. Create a PR into the oldest branch (`ubuntu-<short_name>`)
6+
2. After this PR has been merged create a `merge-to-<next_short_name>` branch
7+
3. Merge `ubuntu-<short_name>` into `merge-to-<next_short_name>`
8+
4. Create a PR to merge `merge-to-<next_short_name>` into `ubuntu-<next_short_name>`
9+
5. Repeat as needed for subsequent branches

README.md

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -296,19 +296,21 @@ Concourse publishes its artifacts to GCS.
296296
#### Create Buckets
297297

298298
```shell
299-
gsutil mb -l europe-west4 gs://bosh-aws-light-stemcells
300-
gsutil mb -l europe-west4 gs://bosh-aws-light-stemcells-candidate
299+
export gcp_region="europe-west4"
301300

302-
gsutil mb -l europe-west4 gs://bosh-gce-light-stemcell-ci-terraform-state
301+
gsutil mb -l "${gcp_region}" gs://bosh-aws-light-stemcells
302+
gsutil mb -l "${gcp_region}" gs://bosh-aws-light-stemcells-candidate
303303

304-
gsutil mb -l europe-west4 gs://bosh-gce-light-stemcells
305-
gsutil mb -l europe-west4 gs://bosh-gce-light-stemcells-candidate
306-
gsutil mb -l europe-west4 gs://bosh-gce-raw-stemcells-new
304+
gsutil mb -l "${gcp_region}" gs://bosh-gce-light-stemcell-ci-terraform-state
307305

308-
gsutil mb -l europe-west4 gs://bosh-core-stemcells
309-
gsutil mb -l europe-west4 gs://bosh-core-stemcells-candidate
310-
gsutil mb -l europe-west4 gs://bosh-os-images
311-
gsutil mb -l europe-west4 gs://bosh-stemcell-triggers
306+
gsutil mb -l "${gcp_region}" gs://bosh-gce-light-stemcells
307+
gsutil mb -l "${gcp_region}" gs://bosh-gce-light-stemcells-candidate
308+
gsutil mb -l "${gcp_region}" gs://bosh-gce-raw-stemcells-new
309+
310+
gsutil mb -l "${gcp_region}" gs://bosh-core-stemcells
311+
gsutil mb -l "${gcp_region}" gs://bosh-core-stemcells-candidate
312+
gsutil mb -l "${gcp_region}" gs://bosh-os-images
313+
gsutil mb -l "${gcp_region}" gs://bosh-stemcell-triggers
312314
```
313315

314316
#### Make Buckets Publicly Readable
@@ -343,18 +345,28 @@ gcloud compute firewall-rules update default-allow-internal --source-ranges 10.0
343345

344346
#### Create Integration Networks
345347

346-
Create the bosh-integration networks for tests and BATs tests. Each stemcell
347-
line should get its own subnet corresponding to its `subnet_int`.
348+
Create a `stemcell-builder-integration-${subnet_int}` subnetworks need by BATs tests.
349+
Each stemcell line should get its own subnet corresponding to its `subnet_int` equal to
350+
the two digit release year. For example release year 2010 would have `subnet_int="10"`.
348351

349-
Example:
352+
Example per [ci/pipelines/vars.yml](ci/pipelines/vars.yml):
350353

351-
- subnet_id=44
352-
- subnet_range=10.100.44.0/24
353-
- subnet_name=bosh-integration-44
354+
```yaml
355+
---
356+
stemcell_details:
357+
# ... snip
358+
subnet_int: "10" #! use last two digits of release year: ex 2010 -> 10
359+
# ... snip
360+
```
361+
362+
Would mean creating the following subnet in GCP:
354363

355364
```shell
356365
# branch: ubuntu-${short_name}
357-
gcloud compute networks subnets create --network default --range 10.100.0.0/24 bosh-integration-0
366+
export subnet_int="10"
367+
368+
gcloud compute networks subnets create --network default \
369+
--range "10.100.${subnet_int}.0/24" "stemcell-builder-integration-${subnet_int}"
358370
```
359371

360372
### AWS

bosh-stemcell/spec/assets/dpkg-list-ubuntu-azure-additions.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ linux-cloud-tools-6.8
44
linux-cloud-tools-6.8-generic
55
linux-cloud-tools-common
66
linux-cloud-tools-generic
7+
netplan-generator
78
netplan.io
89
python-is-python3
910
python3-attr
1011
python3-certifi
1112
python3-chardet
1213
python3-configobj
1314
python3-debconf
15+
python3-netplan
1416
python3-idna
1517
python3-jinja2
1618
python3-json-pointer

ci/pipelines/builder.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ jobs:
446446

447447
#@ def build_stemcell(IAAS, HYPERVISOR, FIPS=""):
448448
name: build-(@= IAAS @)-(@= HYPERVISOR @)(@= FIPS @)
449+
serial: true
449450
plan:
450451
- in_parallel:
451452
- get: version
@@ -468,7 +469,6 @@ jobs:
468469
passed:
469470
- build-os-image
470471
- task: create-stemcell
471-
attempts: 3
472472
file: bosh-stemcells-ci/ci/tasks/build.yml
473473
image: os-image-stemcell-builder-registry-image
474474
params:
@@ -480,7 +480,7 @@ jobs:
480480
STEMCELL_BUCKET: bosh-core-stemcells-candidate(@= FIPS @)
481481
GIT_USER_EMAIL: *ci_bot_email
482482
GIT_USER_NAME: *ci_bot_name
483-
#! AGENT_SUFFIX: ""
483+
AGENT_SUFFIX: (@= data.values.stemcell_details.agent_suffix @)
484484
#@ if/end FIPS != "":
485485
UBUNTU_ADVANTAGE_TOKEN: ((ubuntu_advantage_token))
486486
privileged: true
@@ -577,7 +577,7 @@ jobs:
577577
file: bosh-stemcells-ci/ci/tasks/bats/iaas/gcp/prepare-bats-config.yml
578578
image: bosh-integration-image
579579
params:
580-
VARS_STEMCELL_NAME: bosh-google-kvm-ubuntu-(@= data.values.stemcell_details.os_short_name @)
580+
VARS_STEMCELL_NAME: bosh-google-kvm-ubuntu-(@= data.values.stemcell_details.os_short_name @)(@= data.values.stemcell_details.agent_suffix @)
581581
VARS_NETWORK_DEFAULT: bosh-concourse
582582
VARS_AVAILABILITY_ZONE: europe-north2-a
583583
VARS_MACHINE_TYPE: e2-standard-2
@@ -641,7 +641,7 @@ jobs:
641641
COMMIT_PREFIX: candidate
642642
COPY_KEYS:
643643
#@ for iaas in data.values.stemcell_details.include_fips_iaas:
644-
- (@= iaas.iaas @)/bosh-stemcell-%s-(@= iaas.iaas @)-(@= iaas.hypervisor @)-(@= data.values.stemcell_details.os_name @)-fips.tgz
644+
- (@= iaas.iaas @)/bosh-stemcell-%s-(@= iaas.iaas @)-(@= iaas.hypervisor @)-(@= data.values.stemcell_details.os_name @)-fips(@= data.values.stemcell_details.agent_suffix @).tgz
645645
#@ end
646646
FROM_BUCKET_NAME: bosh-core-stemcells-candidate-fips
647647
FROM_INDEX: dev
@@ -663,7 +663,7 @@ jobs:
663663
COMMIT_PREFIX: candidate
664664
COPY_KEYS:
665665
#@ for iaas in data.values.stemcell_details.include_iaas:
666-
- (@= iaas.iaas @)/bosh-stemcell-%s-(@= iaas.iaas @)-(@= iaas.hypervisor @)-(@= data.values.stemcell_details.os_name @).tgz
666+
- (@= iaas.iaas @)/bosh-stemcell-%s-(@= iaas.iaas @)-(@= iaas.hypervisor @)-(@= data.values.stemcell_details.os_name @)(@= data.values.stemcell_details.agent_suffix @).tgz
667667
#@ end
668668
FROM_BUCKET_NAME: bosh-core-stemcells-candidate
669669
FROM_INDEX: dev
@@ -916,7 +916,7 @@ resources:
916916
options:
917917
private_key: ((github_deploy_key_bosh-io-stemcells-core-index.private_key))
918918
filters:
919-
- repositorypath: "*/(@= IAAS @)-(@= HYPERVISOR @)(@= FIPS @).meta4"
919+
- repositorypath: "*/(@= IAAS @)-(@= HYPERVISOR @)(@= FIPS @)(@= data.values.stemcell_details.agent_suffix @).meta4"
920920
uri: git+ssh://git@github.com:cloudfoundry/bosh-io-stemcells-core-index.git//dev/(@= data.values.stemcell_details.os_name @)(@= FIPS @)/
921921
url_handlers:
922922
- include:

ci/pipelines/vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#@data/values
22
---
33
stemcell_details:
4+
agent_suffix: "" #! empty
45
branch: ubuntu-noble
56
major_version: 1
67
os_version: "24.04"

ci/tasks/build.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ check_param IAAS
2323
check_param HYPERVISOR
2424
check_param OS_NAME
2525
check_param OS_VERSION
26-
AGENT_SUFFIX="${AGENT_SUFFIX--go_agent}"
2726

2827
export CANDIDATE_BUILD_NUMBER=$( cat "${REPO_PARENT}/version/number" | sed 's/\.0$//;s/\.0$//' )
2928

@@ -88,20 +87,20 @@ set -e
8887
cd "${REPO_PARENT}/bosh-linux-stemcell-builder"
8988
bundle install
9089
91-
if [[ -z "$OS_IMAGE" ]]; then
92-
bundle exec rake stemcell:build[$IAAS,$HYPERVISOR,$OS_NAME,$OS_VERSION,$CANDIDATE_BUILD_NUMBER]
90+
if [[ -z "${OS_IMAGE}" ]]; then
91+
bundle exec rake stemcell:build[${IAAS},${HYPERVISOR},${OS_NAME},${OS_VERSION},${CANDIDATE_BUILD_NUMBER}]
9392
rm -f ./tmp/base_os_image.tgz
9493
else
95-
bundle exec rake stemcell:build_with_local_os_image[$IAAS,$HYPERVISOR,$OS_NAME,$OS_VERSION,$OS_IMAGE,$CANDIDATE_BUILD_NUMBER]
94+
bundle exec rake stemcell:build_with_local_os_image[${IAAS},${HYPERVISOR},${OS_NAME},${OS_VERSION},${OS_IMAGE},${CANDIDATE_BUILD_NUMBER}]
9695
fi
9796
SUDO
9897

9998
#
10099
# Output and checksum the stemcell artifacts
101100
#
102101

103-
stemcell_name="bosh-stemcell-${CANDIDATE_BUILD_NUMBER}-$IAAS-$HYPERVISOR-$OS_NAME-$OS_VERSION${AGENT_SUFFIX}"
104-
meta4_path="${REPO_PARENT}/stemcells-index-output/dev/$OS_NAME-$OS_VERSION/${CANDIDATE_BUILD_NUMBER}/$IAAS-$HYPERVISOR${AGENT_SUFFIX}.meta4"
102+
stemcell_name="bosh-stemcell-${CANDIDATE_BUILD_NUMBER}-${IAAS}-${HYPERVISOR}-${OS_NAME}-${OS_VERSION}${AGENT_SUFFIX}"
103+
meta4_path="${REPO_PARENT}/stemcells-index-output/dev/${OS_NAME}-${OS_VERSION}/${CANDIDATE_BUILD_NUMBER}/${IAAS}-${HYPERVISOR}${AGENT_SUFFIX}.meta4"
105104

106105
echo "${CANDIDATE_BUILD_NUMBER}" > "${REPO_PARENT}/candidate-build-number/number"
107106
mkdir -p "$( dirname "$meta4_path" )"
@@ -137,4 +136,4 @@ cd "${REPO_PARENT}/stemcells-index-output"
137136
git add -A
138137
git config --global user.email "${GIT_USER_EMAIL}"
139138
git config --global user.name "${GIT_USER_NAME}"
140-
git commit -m "dev: ${OS_NAME}-${OS_VERSION}/${CANDIDATE_BUILD_NUMBER} ($IAAS-$HYPERVISOR)"
139+
git commit -m "dev: ${OS_NAME}-${OS_VERSION}/${CANDIDATE_BUILD_NUMBER} (${IAAS}-${HYPERVISOR})"

ci/tasks/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ params:
2727
STEMCELL_BUCKET: replace-me
2828
S3_API_ENDPOINT: s3.amazonaws.com
2929
ESM_TOKEN:
30-
AGENT_SUFFIX: -go_agent
30+
AGENT_SUFFIX:
3131
GIT_USER_EMAIL:
3232
GIT_USER_NAME:

scripts/stemcell-repack-debugger.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
set -e
44

5+
example_stemcell_tgz_path="path/to/bosh-linux-stemcell-builder/tmp/bosh-stemcell-VERSION-IAAS-HYPERVISOR-OS_NAME.tgz"
6+
57
show_help() {
68
echo "Usage: $0 [options]"
79
echo
@@ -22,7 +24,7 @@ show_help() {
2224
echo " TMPDIR Path with enough disk space to hold all temporary files for repacking *OPTIONAL*"
2325
echo
2426
echo "Example:"
25-
echo " export stemcell_tgz=\"/home/username/workspace/bosh/bosh-linux-stemcell-builder/tmp/bosh-stemcell-0.0.8-google-kvm-ubuntu-noble-go_agent.tgz\""
27+
echo " export stemcell_tgz=\"${example_stemcell_tgz_path}\""
2628
echo " export AGENT_BINARY=\"/path/to/bosh-agent\""
2729
echo " export AGENT_JSON=\"/path/to/agent.json\""
2830
echo " export BOSH_DEBUG_PUB_KEY=\"ssh-rsa AAA... user@hostname\""
@@ -74,7 +76,7 @@ fi
7476

7577

7678
if [ -z ${stemcell_tgz} ]; then
77-
echo "stemcell_tgz is not set. export stemcell_tgz="/home/username/workspace/bosh/bosh-linux-stemcell-builder/tmp/bosh-stemcell-0.0.8-google-kvm-ubuntu-noble-go_agent.tgz""
79+
echo "stemcell_tgz is not set. export stemcell_tgz=\"${example_stemcell_tgz_path}\""
7880
fi
7981

8082
# stemcell_tgz=/tmp/stemcell.tgz

0 commit comments

Comments
 (0)