Newer
Older
This directory describes the applications that are deployed to a new OpenAppStack
instance. The `helmfile.d` subdirectory contains information about which helm
charts need to be deployed. The `values` subdirectory contains values.yml overrides
for these charts.
Use [helmfile](https://github.com/roboll/helmfile) to install these applications
to a cluster.
## Usage
The data in this directory is typically used by the Ansible playbooks located
in the `ansible/` top level directory. Check the tasks tagged `helmfile` to
get more information.
If you have a cluster already, and do not want to use our OpenAppStack
installation script to install these applications, follow these steps:
### Prerequisites
Make sure you follow the installation instructions of
[helmfile](https://github.com/roboll/helmfile) before you try this! Also note
that helmfile requires `helm diff` to be installed. Install it by running
`helm plugin install https://github.com/databus23/helm-diff`
### Preparation
Do these three steps to prepare the installation process:
$ git clone https://open.greenhost.net/openappstack/local-storage ../local-storage
1. You need to have a configuration file called `local.yaml` in the
following directory relative to this directory:

Maarten de Waard
committed
https://open.greenhost.net/openappstack/openappstack/blob/master/ansible/roles/configure_helmfile/templates/local.yaml.j2
and fill in the variables.
1. You need to set some environment variables:
- `$NEXTCLOUD_PASSWORD` to set the Nextcloud administrator password
- `$NEXTCLOUD_MARIADB_ROOT_PASSWORD` for the MariaDB that NextCloud uses
- `$GRAFANA_ADMIN_PASSWORD` for the admin password of grafana
1. OAS allows you to override the nginx configuration by setting variables in
a file at `/oas/config/values/apps/nginx.yaml` on the cluster. You can
leave this file empty, but it *has* to exist.
1. Certmanager will get installed, which uses some custom resource definitions.
You need to add these resource definitions like so:
```
kubectl apply -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.7/deploy/manifests/00-crds.yaml
```
### Installation
Install all the applications by running:
```
$ helmfile -e oas -f helmfile.d/ apply
```
Where:
- `-e oas` means that you are running this for the `oas` environment defined in
the files
- `-f helmfile.d` means you want to use the description in files in the local
`helmfile.d` directory
- `apply` syncs your kubernetes cluster state to the one desired by the files.
**NOTE:** If you have applied these helmfiles before, check if you still have
old `pvc`'s for mariadb lying around. They can mess up the installation process,
especially if you use different passwords than before.
For example:
```
$ kubectl get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
data-oas-test-files-mariadb-0 Bound pvc-2a0dfd8f-7176-11e9-8ea4-00160a765c00 512Mi RWO local 9m
```
The mariadb pvc can collide with your installation. Remove it (note, this also
removes all the data that was in that database!) by running:
```
kubectl delete pvc data-oas-test-files-mariadb-0
```