Skip to content

Commit

Permalink
Updated variable settings and troubleshooting info
Browse files Browse the repository at this point in the history
  • Loading branch information
jaapgorjup committed Jun 18, 2020
1 parent a55f8f8 commit 9bf8736
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 4 deletions.
38 changes: 34 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ Checkout this repository and go into `k8s/openstad-chart` directory.
Please ensure that the following is available:

- Ingress Controller : by default any controller can be used but it is tested using Nginx Ingress Controller including integration with Cert-Manager.
- Namespace : A namespace named 'openstad' is created automatically
- Namespace : A namespace named 'openstad' is created automatically if you add this to the install command, otherwise create it manually.

### Values file

You can adjust the `values.yaml` file to change setup or create a separate file with only the values that are changed.
This file is the high level configuration of the Helm chart.

The setup is created to add configuration and allow to switch on and off dependencies.
For instance if you already have a database installed, this can be skipped.
For instance if you already have a database installed, this can be adjusted.

```yaml
dependencies:
Expand All @@ -35,6 +35,25 @@ dependencies:
enabled: false
```
#### Configuration Variables
| Parameter | Description | Default |
|---|---|---|
| dependencies.mongodb.enabled | Install and configure MongoDB | true |
| mongodb.usePassword | Use a password to access MongoDB | false |
| | | |
| dependencies.mysql.enabled | Install and configure MySQL | true |
| mysql.db.user | | |
| mysql.db.password | | |
| mysql.db.password | database for API | |
| mysql.db.password | database for Auth | |
| mysql.db.password | database for Image | |
| | | |
| dependencies.cert-manager.enabled | Install Cert-Manager | false |
| | | |
| host.base | base address of the openstad environment | openstad.softwaredepartment.net |
| | | |
### Deployment
#### From Source
Expand Down Expand Up @@ -70,8 +89,19 @@ helm install --replace openstad openstad/openstad --namespace=openstad --create-
When using clusters with built-in catalogs you can add the repo catalog directory to the cluster using the UI.
For updating the Helm repository version see the description at [Helm Repository Update](docs/helm_repo_update.md).

## Additional
### Deletion and Reinstallation

Due to the way the MySQL install works the accounts created are part of the data stored in the Persistent Volume Claims.
When uninstalling the application, the secrets and database storage are still there. So when doing a fresh reinstall the system will use new passwords but old stored data which will clash.

Quick fix here is to delete the namespace and the left-over PVC which removes everything:

List of troubleshooting or customization items can be found in [Customization](docs/customization.md).
```bash
kubectl delete ns openstad
```

## Additional

List of customization items can be found in [Customization](docs/customization.md).
In order to check application issues check the [Troubleshooting document](docs/troubleshooting.md).
A description how to use internal Kubernetes API calls to update Ingress objects is in [Update Ingress](docs/update_ingress.md).
Empty file added base64
Empty file.
9 changes: 9 additions & 0 deletions docs/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ dependencies:
enabled: true
```
When settings this up separately you can define another ClusterIssuer email address for better maintainability.
```yaml
clusterIssuer:
enabled: false # Whether this issuer is created
acme: # Email used for requesting the certificates
email: [email protected]
```
> Default setting on LetsEncrypt is the staging environment which installs the fake certificate.
> Please use this wil setting up until you are satisfied with the result and then switch to the production environment.
> Update thew Helm chart with this value adjustment.
Expand Down
24 changes: 24 additions & 0 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Troubleshooting

In case of problems here are some ways to find out what happens and to access internal resources.
The example below assume that the application has been installed in the openstad namespace.

## Accessing MySQL

In order to be able to quickly work on the database, adminer has been added to the standard Chart but this is not made available publically.
You can make the Adminer interface locally available by using a port-forward construction:

```bash
kubectl port-forward -n openstad svc/openstad-adminer 8111:8080
```

After the command has started stating `Forwarding from 127.0.0.1:8111 -> 8080` you can open your browser to [http://localhost:8111/](http://localhost:8111/).
A login is requested after that for which you can find the settings in the `openstad-db-credentials` secret.

```bash
echo 'Hostname : '$(kubectl get secret -n openstad openstad-db-credentials -o=jsonpath='{.data.hostname}' | base64 -d)
echo 'Username : '$(kubectl get secret -n openstad openstad-db-credentials -o=jsonpath='{.data.username}' | base64 -d)
echo 'Password : '$(kubectl get secret -n openstad openstad-db-credentials -o=jsonpath='{.data.password}' | base64 -d)
```

After login you can enter the databases, view and edit the data when needed.

0 comments on commit 9bf8736

Please sign in to comment.