Skip to content

refactor: adjust behaviour for bootstrap on public clouds#1829

Merged
kian99 merged 2 commits intocanonical:v3from
kian99:bootstrap-on-public-clouds
Jan 29, 2026
Merged

refactor: adjust behaviour for bootstrap on public clouds#1829
kian99 merged 2 commits intocanonical:v3from
kian99:bootstrap-on-public-clouds

Conversation

@kian99
Copy link
Contributor

@kian99 kian99 commented Jan 23, 2026

Description

This PR resolves some TODOs in the bootstrap and upgrade logic. Specifically the one that was targetted mentioned,

// TODO: Check if it is public cloud here and set PersonalCloud accordingly.
// For now, we're always setting it.

I checked whether our bootstrap logic supports bootstrapping onto public clouds. I was mostly able to successfully bootstrap to AWS with ./jaas bootstrap aws/us-east-1 my-test-controller 3.6.12. I say mostly because the machine was provisioned but the bootstrap failed near the end when the controller couldn't reach https://jimm.localhost/.well-known/jwks.json which was obviously only running locally. I'm not keen on deploying everything to AWS just to test this further as I was able to prove to myself this works and the code indicates the same.

Essentially the problem described in the TODO is that we shoudn't pass the cloud information to the StartBootstrap method if the cloud is a public cloud (i.e. AWS, Azure, etc). While it's not necessary to send the cloud info in these cases, it also doesn't do any harm, the bootstrap logic only writes these details to the filesystem if the cloud is not a public one. I did some renaming of the PersonalCloud field to just Cloud with some docstrings to hopefully make it clear (we pass these params around a lot so only some of the fields have docstrings).

In the end, the only substantial change I made was to the CLI, where we now skip sending the cloud information if it's a public cloud. This change is not required, since again, the server will decide whether it needs to use the cloud information. But I decided it was better to omit it if we know it's not needed.

I've also done some minor refactoring of the bootstrap command tests to accompany the above change.

Fixes JUJU-8932

Engineering checklist

  • Documentation updated
  • Covered by unit tests
  • Covered by integration tests

@kian99 kian99 requested a review from a team as a code owner January 23, 2026 13:53
@kian99 kian99 force-pushed the bootstrap-on-public-clouds branch from b909511 to 7682b8a Compare January 23, 2026 14:05
Copy link
Collaborator

@alesstimec alesstimec left a comment

Choose a reason for hiding this comment

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

LGTM

@kian99 kian99 force-pushed the bootstrap-on-public-clouds branch from 7682b8a to 0ddcc90 Compare January 27, 2026 12:14
@kian99 kian99 force-pushed the bootstrap-on-public-clouds branch from 0ddcc90 to 955500a Compare January 28, 2026 15:33
@kian99 kian99 merged commit 9a3c16e into canonical:v3 Jan 29, 2026
8 of 9 checks passed
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.

3 participants