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

Add pivot migration to move to 2020-07-07 repos #980

Merged
merged 2 commits into from
Jul 10, 2020

Conversation

tjkirch
Copy link
Contributor

@tjkirch tjkirch commented Jul 10, 2020

Issue number:

#961

Description of changes:

  • Allow migrations access to "os.*" settings
  • Add pivot migration for changing repo URL from 2020-02-02 to 2020-07-07

Testing done:

Local testing runs the migration OK:

Updating template and value of 'settings.updates.metadata-base-url' on upgrade
Changing template of 'settings.updates.metadata-base-url' from 'https://updates.bottlerocket.aws/2020-02-02/{{ os.variant_id }}/{{ os.arch }}/' to 'https://updates.bottlerocket.aws/2020-07-07/{{ os.variant_id }}/{{ os.arch }}/'
Changing value of 'settings.updates.metadata-base-url' from 'https://updates.bottlerocket.aws/2020-02-02/aws-k8s-1.15/x86_64/' to 'https://updates.bottlerocket.aws/2020-07-07/aws-k8s-1.15/x86_64/'

Instance testing also worked OK. Since we need to update to a test image to run the migrations, and the test image is obviously not in production repos, and because the migration requires that you're pointing at production repos, we needed a bit of a workaround -- rather than changing the metadata URL setting in the API, we changed updog's config file directly to point at our test repo. That way we could initiate the update and the migration could still see the production URL in the setting that it expects to change.

After doing so, we updated, reconnected, and saw that both v0.4.1 migrations ran successfully - this one, to change the metadata_base_url, and @etungsten's, adding version_lock and ignore_waves.

bash-5.0# cat /etc/updog.toml 
metadata_base_url = "https://updates.bottlerocket.aws/2020-07-07/aws-k8s-1.15/x86_64/"
targets_base_url = "https://updates.bottlerocket.aws/targets/"
seed = 1340
version_lock = "latest"
ignore_waves = false

Obviously, further usage of updog failed because it couldn't retrieve this new metadata URL yet; that will be put in place during the 0.4.1 release.

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.

@tjkirch tjkirch requested review from zmrow and etungsten July 10, 2020 00:58
Copy link
Contributor

@zmrow zmrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🖖

@tjkirch tjkirch merged commit 6939278 into bottlerocket-os:develop Jul 10, 2020
@tjkirch tjkirch deleted the pivot-repo-2020-07-07 branch July 10, 2020 16:53
@tjkirch tjkirch linked an issue Jul 10, 2020 that may be closed by this pull request
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.

v0.4.1 / v0.5.0 repo pivot migration
5 participants