-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: gatici <[email protected]>
- Loading branch information
Showing
12 changed files
with
182 additions
and
73 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
name: Bug report | ||
about: Create a bug report to help us improve | ||
title: "" | ||
labels: ["bug"] | ||
assignees: '' | ||
--- | ||
|
||
#### Describe the bug | ||
<!-- A clear and concise description of what the bug is. --> | ||
|
||
#### To Reproduce | ||
<!-- Steps that can be taken to reproduce the behaviour --> | ||
|
||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
#### Expected behavior | ||
<!-- A clear and concise description of what you expected to happen. --> | ||
|
||
#### Screenshots | ||
<!-- If applicable, add screenshots to help explain your problem. --> | ||
|
||
#### Logs | ||
<!-- If applicable, add logs to help explain your problem. --> | ||
|
||
#### Environment | ||
|
||
- Charm / library version (if relevant): <!-- e.g. 1.2 --> | ||
- Juju version (output from `juju --version`): | ||
- Cloud Environment: <!-- e.g. GKE --> | ||
- Kubernetes version (output from `kubectl version --short`): | ||
- Terraform version (output from `terraform version`): | ||
|
||
#### Additional context | ||
|
||
<!-- Add any other context about the problem here. --> |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Description | ||
|
||
Please include a summary of the change. Please also include relevant motivation and context. List any dependencies that are required for this change. | ||
|
||
# Checklist: | ||
|
||
- [ ] My code follows the [style guidelines](/CONTRIBUTING.md) of this project | ||
- [ ] 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 |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Sync Issues to JIRA | ||
|
||
on: | ||
issues: | ||
types: [opened, reopened, closed] | ||
|
||
jobs: | ||
update: | ||
name: Update Issue | ||
uses: canonical/sdcore-github-workflows/.github/workflows/issues.yaml@main | ||
secrets: inherit |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: "Lint PR" | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
permissions: | ||
pull-requests: read | ||
|
||
jobs: | ||
main: | ||
name: Validate PR title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Pull Request | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '**.tf' | ||
|
||
jobs: | ||
build: | ||
name: Terraform Checks and Plans | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository to the runner | ||
uses: actions/checkout@v3 | ||
|
||
- name: HashiCorp - Setup Terraform | ||
uses: hashicorp/setup-terraform@v3 | ||
|
||
- name: Terraform Format | ||
id: fmt | ||
run: terraform fmt -recursive -check | ||
continue-on-error: true | ||
|
||
- name: Terraform Init | ||
id: init | ||
run: terraform init | ||
|
||
- name: Terraform Validate | ||
id: validate | ||
run: terraform validate -no-color |
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# SD-Core Control Plane Terraform Module | ||
|
||
This SD-Core Control Plane Terraform module aims to deploy the [sdcore-control-plane-k8s bundle](https://charmhub.io/sdcore-control-plane-k8s) via Terraform. | ||
|
||
## Getting Started | ||
|
||
### Prerequisites | ||
|
||
The following software and tools needs to be installed and should be running in the local environment. | ||
|
||
- `microk8s` | ||
- `juju 3.x` | ||
- `terrafom` | ||
|
||
### Deploy the sdcore-control-plane-k8s bundle using Terraform | ||
|
||
Make sure that `storage`, `multus` and `metallb` plugins are enabled for Microk8s: | ||
|
||
```console | ||
sudo microk8s enable hostpath-storage multus | ||
sudo microk8s enable metallb:10.0.0.2-10.0.0.4 | ||
``` | ||
|
||
Initialise the provider: | ||
|
||
```console | ||
terraform init | ||
``` | ||
|
||
Customize the configuration inputs under `terraform.tfvars` file according to requirement. | ||
|
||
Replace the values in the `terraform.tfvars` file. The provided model-name is not expected to pre-exist and will be created by Juju Terraform Provider. | ||
|
||
```yaml | ||
# Mandatory Config Options | ||
model_name = "put your model-name here" | ||
``` | ||
|
||
Run Terraform Plan by providing var-file: | ||
|
||
```console | ||
terraform plan -var-file="terraform.tfvars" | ||
``` | ||
|
||
Deploy the resources, skip the approval: | ||
|
||
```console | ||
terraform apply -auto-approve | ||
``` | ||
|
||
### Check the Output | ||
|
||
Run `juju switch <juju model>` to switch to the target Juju model and observe the status of the applications. | ||
|
||
```console | ||
juju status --relations | ||
``` | ||
|
||
### Clean up | ||
|
||
Remove the applications: | ||
|
||
```console | ||
terraform destroy -auto-approve | ||
``` |
File renamed without changes.
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
File renamed without changes.
This file was deleted.
Oops, something went wrong.