README.md 3.45 KB
Newer Older
1
2
3
4
5
## Introduction

This repo describes the applications that are deployed to a new OpenAppStack
instance. The `helmfile.d` directory contains information about which helm
charts need to be deployed. The `values` directory contains values.yml overrides
Varac's avatar
Varac committed
6
for these charts.
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

Use [helmfile](https://github.com/roboll/helmfile) to install these applications
to a cluster.

## Usage

The data in this repo is typically used by the Ansible playbooks in the
[bootstrap](https://code.greenhost.net/openappstack/bootstrap) project. Check
the tasks tagged `helmfile` to get more information.

If you have a cluster already, and do not want to use our bootstrap script to
install these applications, follow these steps:

### Prerequisites

Make sure you follow the installation instructions of
Varac's avatar
Varac committed
23
24
[helmfile](https://github.com/roboll/helmfile) before you try this! Also note
that helmfile requires `helm diff` to be installed. Install it by running
Maarten de Waard's avatar
Maarten de Waard committed
25
`helm plugin install https://github.com/databus23/helm-diff`
26
27
28

### Preparation

29
30
31
32
Do these three steps to prepare the installation process:

1. This repo requires some repositories to be checked out in specific directories:

Maarten de Waard's avatar
Maarten de Waard committed
33
34
   ```bash
   # Get the local-storage chart locally
35
36
37
38
39
   $ git clone https://code.greenhost.net/openappstack/local-storage ../local-storage
   ```

1. The repo assumes you have a configuration file called `local.yaml` in the
   following directory relative to this repo:
Maarten de Waard's avatar
Maarten de Waard committed
40
41
42
   `../../../config/values/local.yaml`. Use our template at
   https://code.greenhost.net/openappstack/bootstrap/blob/master/ansible/roles/configure_helmfile/templates/local.yaml.j2
   and fill in the variables.
43

Maarten de Waard's avatar
Maarten de Waard committed
44
45
1. You need to set some environment variables:
   - `$NEXTCLOUD_PASSWORD` to set the Nextcloud administrator password
46
   - `$COLLABORA_PASSWORD` to set the Collabora administrator password
Maarten de Waard's avatar
Maarten de Waard committed
47
   - `$NEXTCLOUD_MARIADB_ROOT_PASSWORD` for the MariaDB that NextCloud uses
48
   - `$GRAFANA_ADMIN_PASSWORD` for the admin password of grafana
49

Varac's avatar
Varac committed
50
51
1. OAS allows you to override the nginx configuration by setting variables in
   a file at `/oas/config/values/apps/nginx.yaml`. You can leave this file
Maarten de Waard's avatar
Maarten de Waard committed
52
53
   empty, but it *has* to exist.

Maarten de Waard's avatar
Maarten de Waard committed
54
55
56
57
58
59
60
1. The repo installs certmanager, 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
   ```

61
62
63
64
65
66
67
68
69
70
71
72
73
74
### 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
Maarten de Waard's avatar
Maarten de Waard committed
75
- `apply` syncs your kubernetes cluster state to the one desired by the files.
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94

**NOTE:** If you have installed this repo 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
```