You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Cleanup terraform file
* Switch traefik with nginx for ingress
* small changes
* build charm through github action on this branch
* revert releasing charm in action as will do manually
* Bug fixes
* downgrade postgres to 14 cause lack of 15 charm
* Rename jobs to be clearer
* temporary make api docker image
* Revert "temporary make api docker image"
This reverts commit 3358ca2.
* frontend charm bug fix
* Remove unnecessary requirement to improve charm pack time
* Use staging host names
* pass tls secret name to nginx
* Some bug fixes for charms
* fix bugs with frontend charm
* Make terraform file work for multiple environments
* Ignore charm in docker
* Fix frontend not connecting to api in staging
* Use latest/edge instead of just edge channel for charms
* Add release charms actions
* Match staging environment tf provider version
* Remove unnecessary charm relation endpoint
* No need to release charms on local branch anymore
* Fix terraform config to include base url
* Remove unnecessary relation hostname
* Changes to tf file to work better in development
* Update readme
* Make charm upload wait for image upload
* Set application names so that tf doesn't error
* Remove old info on readme
* Readme improvements
Copy file name to clipboardexpand all lines: README.md
+33-65
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Observe the status and state of certification tests for various artefacts
4
4
5
-
## Prerequisites for developing and deploying locally
5
+
## Prerequisites for deploying locally
6
6
7
7
-`juju` 3.1 or later (`sudo snap install juju --channel=3.1/stable`)
8
8
-`microk8s` 1.27 or later (`sudo snap install microk8s --channel=1.27-strict/stable`) + [permission setup steps after install](https://juju.is/docs/sdk/set-up-your-development-environment#heading--install-microk8s)
@@ -22,25 +22,12 @@ mkdir -p ~/.local/share
22
22
Fist configure microk8s with the needed extensions:
23
23
24
24
```
25
-
sudo microk8s enable community # required for installing traefik
26
-
sudo microk8s enable dns hostpath-storage metallb traefik # metallb setup involves choosing a free IP range for the load balancer.
25
+
sudo microk8s enable dns hostpath-storage metallb ingress# metallb setup involves choosing a free IP range for the load balancer.
27
26
```
28
27
29
-
Then help microk8s work with an authorized (private) OCI image registry at ghcr.io:
30
-
31
-
1. Get a GitHub personal access token at https://github.com/settings/tokens/new with the `read:packages` permission.
32
-
2. Configure containerd in microk8s with the auth credentials needed to pull images from non-default, authorisation requiring OCI registries by appending the following to `/var/snap/microk8s/current/args/containerd-template.toml`:
@@ -65,7 +52,7 @@ At the time of writing, this will accomplish deploying the following:
65
52
- the backend API server
66
53
- the frontend served using nginx
67
54
- a postgresql database
68
-
-traefik as ingress
55
+
-nginx as ingress
69
56
- backend connected to frontend (the backend's public facing base URI passed to the frontend app)
70
57
- backend connected to database
71
58
- backend connected to load balancer
@@ -77,51 +64,46 @@ The terraform juju provider is documented over here: https://registry.terraform.
77
64
78
65
Terraform tracks its state with a .tfstate file which is created as a result of running `terraform apply` -- for production purposes this will be stored in an S3-like bucket remotely, and for local development purposes it sits in the `terraform` directory aftery you have done a `terraform apply`).
79
66
80
-
You can optionally get SSL certificates automatically managed for the ingress (in case you happen to have a DNS zone with Cloudflare DNS available):
67
+
After all is up, you can run `juju switch test-observer-development` to use the development juju model. Then `juju status --relations` should give you output to the direction of the following:
After all is up, you can run `juju switch test-observer-development` to use the development juju model. Then `juju status --relations` should give you output to the direction of the following (the acme-operator only there if `TF_VAR_cloudflare_acme` was passed in):
74
+
App Version Status Scale Charm Channel Rev Address Exposed Message
75
+
api active 1 test-observer-api latest/edge 15 10.152.183.182 no
76
+
db 14.7 active 1 postgresql-k8s 14/stable 73 10.152.183.172 no Primary
77
+
frontend active 1 test-observer-frontend latest/edge 8 10.152.183.79 no
78
+
ingress 25.3.0 active 1 nginx-ingress-integrator stable 59 10.152.183.103 no Ingress IP(s): 127.0.0.1, 127.0.0.1, Service IP(s): 10.152.183.72, 10.152.183.34
87
79
88
-
```bash
89
-
$ juju status --relations
90
-
Model Controller Cloud/Region Version SLA Timestamp
To test the application with the frontend and API server ports exposed, you need to create some aliases in `/etc/hosts` to the IP address that the ingress got from `metallb` (`juju status` above will find you the ingress IP). Let's assume you have a domain `mah-domain.com` that you want to expose service under, the backend and frontend will be present as subdomains `test-observer-frontend.mah-domain.com` and `test-observer-api.mah-domain.com`, respectively:
95
+
## Add /etc/hosts entries
96
+
97
+
To test the application, you need to create some aliases in `/etc/hosts` to the IP address that the ingress got from `metallb` (`juju status` above will find you the ingress IP). Let's assume you have a domain `mah-domain.com` that you want to expose service under, the backend and frontend will be present as subdomains `test-observer.mah-domain.com` and `test-observer-api.mah-domain.com`, respectively:
Note that without this step the frontend will fail to connect to api as it's trying to use `test-observer-api.mah-domain.com`
106
+
125
107
## Developing the charm
126
108
127
109
To develop and test updates to the backend and frontend charms, you would typically want to first complete the above steps to deploy a working system. Once you have done that, proceed with the following steps.
@@ -172,21 +154,7 @@ tox -e integration
172
154
173
155
## Releasing the charms
174
156
175
-
You can use [release-k8s-charm](https://github.com/mz2/release-k8s-charm) to release the charms to charmhub, until we ingroduce a GitHub action driven workflow for releasing them (the `upload-charm` action in [canonical/charming-actions](https://github.com/canonical/charming-actions) will be the longer term solution).
Charms are released through GitHub actions on push to main. If however you need to release charms on your branch before merging with main you could always just add your branch as a trigger to those same GitHub actions.
0 commit comments