Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrations: default host containers container image versions #1939

Merged

Conversation

etungsten
Copy link
Contributor

@etungsten etungsten commented Feb 3, 2022

Issue number:
N/A

Description of changes:

Author: Erikson Tung <etung@amazon.com>
Date:   Wed Feb 2 16:46:34 2022 -0800

    host-containers: migrations for new admin and control versions
    
    Adds migrations for updating default host-container container image
    versions
    admin from v0.7.3 to v0.7.4
    control from v0.5.4 to v0.5.4

Author: Erikson Tung <etung@amazon.com>
Date:   Wed Feb 2 16:28:07 2022 -0800

    host-containers: update default host container image versions
    
    admin container to v0.7.4
    control container to v0.5.5

Testing done:
aws-k8s-1.21 migration test:

From v1.5.3:

bash-5.0# cat /etc/os-release 
NAME=Bottlerocket
ID=bottlerocket
VERSION="1.5.3 (aws-k8s-1.21)"
PRETTY_NAME="Bottlerocket OS 1.5.3 (aws-k8s-1.21)"
VARIANT_ID=aws-k8s-1.21
VERSION_ID=1.5.3
BUILD_ID=cd1b8e95
HOME_URL="https://github.com/bottlerocket-os/bottlerocket"
SUPPORT_URL="https://github.com/bottlerocket-os/bottlerocket/discussions"
BUG_REPORT_URL="https://github.com/bottlerocket-os/bottlerocket/issues"

bash-5.0# apiclient -u /settings?keys=settings.host-containers.admin.source
{"host-containers":{"admin":{"source":"328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-admin:v0.7.3"}}}

bash-5.0# apiclient -u /settings?keys=settings.host-containers.control.source
{"host-containers":{"control":{"source":"328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-control:v0.5.4"}}}

To v1.6.0 with the migrations:

bash-5.0# updog update -r -n
Starting update to 1.6.0
Cannot schedule shutdown without logind support, proceeding with immediate shutdown.
...

bash-5.0# cat /etc/os-release 
NAME=Bottlerocket
ID=bottlerocket
VERSION="1.6.0 (aws-k8s-1.21)"
PRETTY_NAME="Bottlerocket OS 1.6.0 (aws-k8s-1.21)"
VARIANT_ID=aws-k8s-1.21
VERSION_ID=1.6.0
BUILD_ID=f6aee431-dirty
HOME_URL="https://github.com/bottlerocket-os/bottlerocket"
SUPPORT_URL="https://github.com/bottlerocket-os/bottlerocket/discussions"
BUG_REPORT_URL="https://github.com/bottlerocket-os/bottlerocket/issues"
bash-5.0# apiclient -u /settings?keys=settings.host-containers.admin.source
{"host-containers":{"admin":{"source":"328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-admin:v0.7.4"}}}
bash-5.0# apiclient -u /settings?keys=settings.host-containers.control.source
{"host-containers":{"control":{"source":"328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-control:v0.5.5"}}}

Both host-container images got migrated successfully.

vmware-k8s-1.21 v1.5.3

bash-5.0# apiclient -u /settings?keys=settings.host-containers.admin.source
{"host-containers":{"admin":{"source":"public.ecr.aws/bottlerocket/bottlerocket-admin:v0.7.3"}}}
bash-5.0# apiclient -u /settings?keys=settings.host-containers.control.source
{"host-containers":{"control":{"source":"public.ecr.aws/bottlerocket/bottlerocket-control:v0.5.4"}}}
bash-5.0# updog update -r -n
Starting update to 1.6.0
...

After update to 1.6.0, the host-containers sources got updated:

{"host-containers":{"admin":{"source":"public.ecr.aws/bottlerocket/bottlerocket-admin:v0.7.4"}}}
bash-5.0# apiclient -u /settings?keys=settings.host-containers.control.source
{"host-containers":{"control":{"source":"public.ecr.aws/bottlerocket/bottlerocket-control:v0.5.5"}}}

Rolls back to older values when downgrading as expected

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

admin container to v0.7.4
control container to v0.5.5
@etungsten etungsten changed the title Migrate host containers 1.6.0 Migrate default host containers container image versions Feb 3, 2022
@etungsten etungsten requested review from jpculp, webern and zmrow and removed request for zmrow, jpculp and webern February 3, 2022 00:52
@etungsten etungsten force-pushed the migrate-host-containers-1.6.0 branch from 8a2ec42 to f6aee43 Compare February 3, 2022 01:14
Adds migrations for updating default host-container container image
versions
admin from v0.7.3 to v0.7.4
control from v0.5.4 to v0.5.4
@etungsten etungsten force-pushed the migrate-host-containers-1.6.0 branch from f6aee43 to aeb3095 Compare February 3, 2022 04:13
@etungsten etungsten marked this pull request as ready for review February 3, 2022 04:13
@etungsten etungsten changed the title Migrate default host containers container image versions migeations: default host containers container image versions Feb 3, 2022
@etungsten etungsten changed the title migeations: default host containers container image versions migrations: default host containers container image versions Feb 3, 2022
@etungsten etungsten merged commit 9737cda into bottlerocket-os:develop Feb 3, 2022
@etungsten etungsten deleted the migrate-host-containers-1.6.0 branch February 3, 2022 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants