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

feat: Deploy Mastering tutorial infrastructure using Terraform #95

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

Gmerold
Copy link
Contributor

@Gmerold Gmerold commented Feb 18, 2025

Description

Deploys Mastering tutorial infrastructure using Terraform.
This PR uses Microk8s community addons from my own fork due to a bug addressed in this PR

Please try running this on as many envs as you can and provide feedback in the PR. Thanks.

NOTES:

  • Please make sure your machine has at least 32 GB of RAM
  • On my laptop switching to Performance power plan fixed stability issues
  • This PR has been tested by @ghislainbourgeois and myself and it seems to work fine now

Checklist:

  • Documentation follows the Canonical Documentation Style Guide
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that validate the behaviour of the software
  • I validated that new and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have bumped the version of the library

@Gmerold Gmerold force-pushed the TELCO-1532-deploy-infra-with-tf branch from a67d01e to b70d16d Compare February 24, 2025 08:46
Copy link
Contributor

@gatici gatici left a comment

Choose a reason for hiding this comment

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

The review is not finished yet.

Copy link
Contributor

@gatici gatici left a comment

Choose a reason for hiding this comment

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

Looks good.
A few minor things are commented.

The ImagePullBackOff errors are appeared in the LXC VMs, but after waiting some time, the images are pulled successfully.

@@ -490,10 +133,10 @@ This host name must be resolvable by the gNB and the IP address must be reachabl
In the bootstrap step, we set the Control Plane MetalLB IP range, and that is what we use in the configuration.
Lastly, the module will expose the Software as a Service offer for the AMF.

Create Juju model for the SD-Core Control Plane:
Log in to the `juju-controller` VM:
Copy link
Collaborator

Choose a reason for hiding this comment

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

When running terraform init in the juju controller I get terraform: command not found. For whatever reason, after a couple of minutes, I re-ran terraform init and it worked. Not sure what happened here but maybe the TF plan is considered applied even when some snaps haven't finished installing (?) - I'm not sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a switch to fail the deployment if Terraform installation fails.
In any case, this shouldn't happen. Can you test one more time with the new switch, please?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I tried but now we're getting this error with self-signed certificates:

╷
│ Error: Client Error
│ 
│   with module.sdcore-control-plane.module.self-signed-certificates.juju_application.self-signed-certificates,
│   on .terraform/modules/sdcore-control-plane.self-signed-certificates/terraform/main.tf line 4, in resource "juju_application" "self-signed-certificates":
│    4: resource "juju_application" "self-signed-certificates" {
│ 
│ Unable to create application, got error: selecting releases: charm or bundle not found for channel "latest/stable",
│ base "amd64/ubuntu/24.04/stable"
│ available releases are:
│   channel "1/edge": available bases are: [email protected]
│   channel "latest/stable": available bases are: [email protected]
│   channel "latest/candidate": available bases are: [email protected]
│   channel "latest/beta": available bases are: [email protected]
│   channel "latest/edge": available bases are: [email protected]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

4 participants