-
Notifications
You must be signed in to change notification settings - Fork 2
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
Craft the juju model-config for suppressing fan-config #22
Open
addyess
wants to merge
6
commits into
main
Choose a base branch
from
KU-2727/prevent-fan-networking
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c79e1b7
Craft the juju model-config for suppressing fan-config
addyess 5f37e6f
Improve documentation around Terrform modules
addyess 08f76b1
Update github action tests
addyess 6913b05
Improve commentary around dropping model-config settings
addyess d6d4f78
Reference main branch of applications
addyess 53bd484
Restore cloud_integration
addyess File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,19 +9,32 @@ charm configuration. | |
## TODO | ||
- [ ] Set outputs for each charm deployed | ||
- [ ] Add COS integration | ||
- [ ] Find a home for this module | ||
- [ ] Add required subordinate (Landscape, NTP, etc..) see [This private Terraform Plan for details](https://git.launchpad.net/canonical-terraform-modules/tree/services/compute/canonical_k8s_cluster/main.tf#n214) | ||
- [ ] Add required subordinate (Landscape, NTP, etc..) see [This private Terraform Plan for details][private-details] | ||
|
||
## Applications | ||
* [k8s](https://charmhub.io/k8s) | ||
* [k8s-worker](https://charmhub.io/k8s-worker) | ||
|
||
## Inputs | ||
| Name | Type | Description | Required | | ||
| - | - | - | - | | ||
| `manifest_yaml` | string | Absolute path to the manifest yaml for the deployment | True | | ||
| `model` | string | Name of the Juju model to deploy into | True | | ||
| `cloud_integration` | string | Selection of a cloud integration | False | | ||
| Name | Type | Description | Required | | ||
| --- | --- | --- | --- | | ||
| `manifest_yaml` | string | Absolute path to the manifest yaml for the deployment | True | | ||
| `model` | object | Juju model attributes | True | | ||
| `cloud_integration` | bool | Enablement of a cloud integration | False | | ||
|
||
### Model Input: | ||
Juju Model resource definition borrows its schema from [Juju Model Resource]. | ||
|
||
The schema requires only: | ||
- **name**: Name of the model | ||
- **cloud**: Cloud name | ||
|
||
Default fields are: | ||
- **region**: Region name (optional) | ||
- **config**: Configuration map (optional) | ||
- **constraints**: Constraints string (optional) | ||
- **credential**: Credential name (optional) | ||
|
||
|
||
## Outputs | ||
TODO | ||
|
@@ -30,29 +43,32 @@ TODO | |
|
||
Add the following to your main.tf for the canonical k8s solution: | ||
|
||
``` | ||
```hcl | ||
module "k8s" { | ||
source = "git::https://github.com/canonical/k8s-bundles//terraform?ref=main" | ||
model = "my-canonical-k8s" | ||
model = { | ||
name = "my-canonical-k8s" | ||
cloud = "openstack" | ||
} | ||
manifest_yaml = "/path/to/manifest.yaml" | ||
} | ||
``` | ||
|
||
Define your manifest.yaml based on the requirements for your deployment. Specific configuration | ||
options can be found under the charm URLs linked above. | ||
Define your manifest.yaml based on the requirements for your deployment. Specific configuration options can be found under the charm URLs linked above. | ||
|
||
``` | ||
```yaml | ||
k8s: | ||
units: 2 | ||
units: 3 | ||
base: [email protected] | ||
constraints: arch=amd64 cores=2 mem=4096M root-disk=16384M | ||
channel: 1.31/beta | ||
channel: 1.32/stable | ||
k8s_worker: | ||
units: 2 | ||
base: [email protected] | ||
constraints: arch=amd64 cores=2 mem=8192M root-disk=16384M | ||
channel: 1.31/beta | ||
channel: 1.32/stable | ||
``` | ||
|
||
|
||
|
||
<!--LINKS --> | ||
[Juju Model Resource]: https://registry.terraform.io/providers/juju/juju/0.16.0/docs/resources/model | ||
[private-details]: https://git.launchpad.net/canonical-terraform-modules/tree/services/compute/canonical_k8s_cluster/main.tf#n214 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
k8s: | ||
units: 3 | ||
base: [email protected] | ||
constraints: arch=amd64 cores=2 mem=8G root-disk=16G | ||
constraints: arch=amd64 cores=2 mem=8192M root-disk=16384M | ||
channel: latest/edge | ||
k8s_worker: | ||
units: 3 | ||
base: [email protected] | ||
constraints: arch=amd64 cores=2 mem=8G root-disk=16G | ||
constraints: arch=amd64 cores=2 mem=8192M root-disk=16384M | ||
channel: latest/edge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I feel like 'cloud_integration=' was more intuitive than this, especially since we now need to set both "cloud" and "cloud_integration". Can we not just read the cloud from the variable and then set it in the model internally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, there may be cases you want to deploy on a cloud -- but without the cloud-integrations. Juju requires the
cloud
value. So, I switchedcloud_integration
to betrue/false
to engage the cloud integration. But yeah -- i likedcloud_integration=<cloud>
better too...I wasn't sure how else to model this better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok @bschimke95 i was won over by a powerful argument --
cloud
in juju parlance is the name of a particular cloud instance. So i might have an openstack cloud instance namedmy-openstack-instance
but i still want theopenstack
cloud-integration. So I think i've put it back to the way it was before i changed it