Skip to content
Merged
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
10 changes: 6 additions & 4 deletions cluster-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ This project contains the current versions of Kubernetes that the Cloud Group wi
ansible-playbook prep_builder.yml --ask-become-pass
```

3. Update the date in the [common_vars.json](./common_vars.json#L12) file for `image_name`

## Rate Limiting

You may run into GitHub rate limiting issues when building images. To avoid this, you can set the following environment variable:
Expand Down Expand Up @@ -108,12 +106,16 @@ Addtionally, you will need to specify the cloud name in your session by exportin
## Update an image for release
1. Check the image you are working with before you make any changes
```shell
openstack image show <image-name>
openstack image show <image-id>
```
2. Build a cluster with the new image [here](https://stfc.atlassian.net/wiki/spaces/CLOUDKB/pages/211878034/Cluster+API+Setup) and check it builds successfully
3. Set image to public
```shell
openstack image set --public <image-name>
openstack image set --public <image-id>
```
4. If this is the last supported patch version append `-eol` to the end of the image name
```shell
openstack image set --name capi-ubuntu-2204-kube-v1.33.4-eol <image-id>
```

### Developer Notes
Expand Down
2 changes: 1 addition & 1 deletion cluster-api/common_vars.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"image_disk_format": "",
"floating_ip_network": "",
"goss_inspect_mode": "true",
"image_name": "capi-{{user `build_name`}}-kube-{{user `kubernetes_semver`}}-YYYY-MM-DD",
"image_name": "capi-{{user `build_name`}}-kube-{{user `kubernetes_semver`}}",
"image_visibility": "private"
}
2 changes: 1 addition & 1 deletion scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# Specify dev or prod OpenStack
./scripts/build-all.sh <env>
```
3. This will build all new images and upload them to OpenStack in the form `ubuntu-2204-kube-<k8s_semver>
3. This will build all new images and upload them to OpenStack in the form `capi-ubuntu-2204-kube-<k8s_semver>`
6 changes: 0 additions & 6 deletions scripts/build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ CUSTOM_ROLE_PATH="${REPO_ROOT}/cluster-api/${env}_vars.json"

# Update the image name in vars file to include date
COMMON_VARS_PATH="${REPO_ROOT}/cluster-api/common_vars.json"
if grep -E "YYYY-MM-DD" "${COMMON_VARS_PATH}"; then
sed -i -E "s/YYYY-MM-DD/$(date +%F)/" "${COMMON_VARS_PATH}"
else
echo "Date not found in common_vars.json"
exit 1
fi

# ... and make sure Ansible knows where to find on this machine
export ANSIBLE_ROLES_PATH="${REPO_ROOT}/os_builders/roles:${REPO_ROOT}/cluster-api/roles"
Expand Down