v2.0.0: Update helm chart packaging process in CI
What's Changed
- Allow all components to be enabled or disabled by @AlexGodbehere in #17
- Remove references to Minikube in the readme by @AlexGodbehere in #19
- Helm changes needed for the Edge Deployment operator by @amrc-benmorrow in #14
- Fix some invalid generated YAML. by @amrc-benmorrow in #21
- Update README.md by @AlexGodbehere in #20
- Remove code to conditionally apply CRDs by @AlexGodbehere in #26
- Fix versions in values.yaml. by @amrc-benmorrow in #28
- Add default value for identity.crossRealm to values.yaml by @AlexGodbehere in #22
- Add default value for identity.krbKeysOperator.namespaces to values.yaml by @AlexGodbehere in #23
- Remove excessive chomping on dumps by @AlexGodbehere in #29
- Grafana kerberos auth by @AlexGodbehere in #30
Full Changelog: v1.0.1...v2.0.0
Upgrade Guide from v1.x.x
ACS v2.0.0
is a breaking change and requires manual intervention via kubectl
before the upgrade is applied. This release:
- Upgrades the Traefik edge router chart, which needs some new CRDs deploying
- Properly integrates ACS authorisation into Grafana, which requires a re-initialisation of Grafana
- Improves the structure of data in InfluxDB, which fundamentally changes how it's stored
Because the edge-router is being upgraded, this upgrade will result in downtime.
1. Set Variables
Set the following variables, replacing the values with ones appropriate to your deployment.
# The name of your Helm deployment
ACS_NAME=acs
# Your deployment namespace
ACS_NAMESPACE=factory-plus
# Your ACS realm
ACS_REALM=FACTORYPLUS.MYORG.COM
# The path to your `values.yaml` file for your delpoyment
ACS_VALUES_FILE=values.yaml
# The `v2.x.x` version of ACS that you wish to install. See Releases or run `helm search repo acs` for a list of specific versions
ACS_VERSION=2.0.0
2. Prepare Grafana
There are two ways to do this depending on if you have already started to utilise the Grafana deployment in v1.x.x
.
If you have begun to use Grafana and don't want to lose your data then you can either backup your data and follow the below procedure or create the new resources manually. For the latter, simply create a user in Grafana with the username admin@$ACS_REALM
and grant them both Grafana admin rights and the admin
role to default organisation.
If you have not yet used Grafana in v1.x.x
then you can simply delete the PVC for the existing Grafana instance and the upgrade will provision the required resources.
# The following command may hang. It is safe to exit with `Cmd/Ctrl + c` and run the other commands
kubectl delete pvc $ACS_NAME-grafana --grace-period=0 --force -n $ACS_NAMESPACE
kubectl patch pvc $ACS_NAME-grafana -p '{"metadata":{"finalizers":null}}' -n $ACS_NAMESPACE
# Check that the grafana PVC has been deleted
kubectl get pvc -n $ACS_NAMESPACE
3. Prepare InfluxDB
There are two ways to do this depending on if you have already started to collect production data in deployment in v1.x.x
.
If you don't want to lose your captured data then you will need to export and backup the data from InfluxDB before following the below procedure.
If you do not have important data in v1.x.x
then you can simply delete the existing InfluxDB instance and the upgrade will provision the required resources.
kubectl delete statefulsets $ACS_NAME-influxdb2 -n $ACS_NAMESPACE
# The following command may hang. It is safe to exit with `Cmd/Ctrl + c` and run the other commands
kubectl delete pvc $ACS_NAME-influxdb2 --grace-period=0 --force -n $ACS_NAMESPACE
kubectl patch pvc $ACS_NAME-influxdb2 -p '{"metadata":{"finalizers":null}}' -n $ACS_NAMESPACE
# Check that the `influxdb2` PVC has been deleted
kubectl get pvc -n $ACS_NAMESPACE
4. Update Traefik CRDs
Run the following command to apply the new CRDs to the cluster and remove the existing Traefik deployment:
kubectl apply --server-side --force-conflicts -k https://github.com/traefik/traefik-helm-chart/traefik/crds/
kubectl delete deploy $ACS_NAME-traefik -n $ACS_NAMESPACE
5. Perform Upgrade
Your deployment is now in a state ready for upgrade. Run the following commands:
helm repo update
helm upgrade $ACS_NAME amrc-connectivity-stack/amrc-connectivity-stack -f=$ACS_VALUES_FILE --version $ACS_VERSION -n $ACS_NAMESPACE