Skip to content

Commit d46a0ad

Browse files
author
Matthew Fisher
committed
Merge pull request #100 from bacongobbler/update-database-objectstorage-docs
docs(installing-deis): add docs on database config
2 parents 22680e5 + 72946ee commit d46a0ad

1 file changed

Lines changed: 28 additions & 5 deletions

File tree

src/installing-workflow/configuring-object-storage.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Every Deis component that relies on object storage relies on the following two i
2222
- One or more environment variables with host and port to describe where the object storage system is
2323
- One or more files to provide access credentials for the object storage system.
2424
- We suggest storing these values in [Kubernetes secrets](http://kubernetes.io/v1.1/docs/user-guide/secrets.html) and mounting them as volumes to each pod
25-
- See [the deis-dev chart](https://github.com/deis/charts/tree/master/deis-dev) for examples of using and mounting secrets.
25+
- See [the workflow-dev chart](https://github.com/deis/charts/tree/master/workflow-dev) for examples of using and mounting secrets.
2626

2727
The subsections herein explain how to configure these two inputs for each applicable component.
2828

@@ -37,11 +37,11 @@ The builder looks for the below environment variables to determine where the obj
3737
- `storage.googleapis.com` for Google Cloud Storage
3838
- `DEIS_MINIO_SERVICE_HOST` and `DEIS_MINIO_SERVICE_PORT` - The in-cluster Minio service. Additional notes about these variables:
3939
- They are set automatically by Kubernetes if you run [Minio](http://minio.io) as a service in the cluster
40-
- The [Helm chart for Deis](https://github.com/deis/charts/tree/master/deis-dev) installs Minio by default, so the Builder will use Minio by default.
40+
- The [Helm chart for Deis](https://github.com/deis/charts/tree/master/workflow-dev) installs Minio by default, so the Builder will use Minio by default.
4141

4242
Note that if the builder finds a `DEIS_OUTSIDE_STORAGE_HOST` environment variable, it will ignore `DEIS_MINIO_SERVICE_HOST` and `DEIS_MINIO_SERVICE_PORT`. This behavior means that external object storage takes precedence over Minio.
4343

44-
The builder also uses an environment variable to determine the name of the bucket it should store build artifacts in. It uses `git` by default, but if your credentials (see below for how credentials are configured) don't have read and write access to that bucket, you'll have to specify a different one.
44+
The builder also uses an environment variable to determine the name of the bucket it should store build artifacts in. It uses `git` by default, but if your credentials (see below for how credentials are configured) don't have read and write access to that bucket, you'll have to specify a different one.
4545

4646
To do so, simply set the `BUCKET` environment variable to another value (`deis-builds`, for example).
4747

@@ -114,7 +114,7 @@ The registry looks for a `REGISTRY_STORAGE` environment variable, which it then
114114

115115
### Credentials
116116

117-
The registry reads the credential information from a `/var/run/secrets/deis/registry/creds/objectstorage-keyfile` file. This is generated automatically (as part of the `helm generate` command) based on the configuration options given in the https://github.com/deis/charts/blob/master/deis-dev/tpl/objectstorage.toml file.
117+
The registry reads the credential information from a `/var/run/secrets/deis/registry/creds/objectstorage-keyfile` file. This is generated automatically (as part of the `helm generate` command) based on the configuration options given in the https://github.com/deis/charts/blob/master/workflow-dev/tpl/objectstorage.toml file.
118118

119119
## [deis/database](https://github.com/deis/postgres)
120120

@@ -126,4 +126,27 @@ The database looks for a `DATABASE_STORAGE` environment variable, which it then
126126

127127
## Credentials
128128

129-
The database reads the credentials information from a `/var/run/secrets/deis/objectstore/creds/objectstorage-keyfile` file. This is generated automatically during helm generate based on the configuration options given in the https://github.com/deis/charts/blob/master/deis-dev/tpl/objectstorage.toml.
129+
Depending on the value of `DATABASE_STORAGE`, the database will either read the credentials from a generic objectstore secret or from a minio-user secret.in `/var/run/secrets/deis/objectstore/creds/` or from `/var/run/secrets/deis/database/creds/`. The following ways to configure the database are listed below.
130+
131+
### Minio
132+
133+
If the `DATABASE_STORAGE` backend is configured as anything else other than "s3", the database will receive its credentials from `/var/run/secrets/deis/database/creds/`. This is generated based on the configuration options given in the https://github.com/deis/charts/blob/master/workflow-dev/manifests/deis-minio-secret-user.yaml file. The access key and secret key must be `base64` encoded.
134+
135+
Connection details to minio are configured via `DEIS_MINIO_SERVICE_HOST` and `DEIS_MINIO_SERVICE_PORT`, both of which are provided by the `deis-minio` service.
136+
137+
### Amazon Simple Storage Service (S3)
138+
139+
If the `DATABASE_STORAGE` backend is configured as "s3", the database will receive its credentials from `/var/run/secrets/deis/objectstore/creds/`. This is generated automatically (as part of the `helm generate` command) based on the configuration options given in the https://github.com/deis/charts/blob/master/workflow-dev/tpl/objectstorage.toml file.
140+
141+
### Google Cloud Storage (S3 Compatibility Mode)
142+
143+
If the `DATABASE_STORAGE` backend is configured as "gcs", the database will receive its credentials from `/var/run/secrets/deis/database/creds/`. This is generated based on the configuration options given in the https://github.com/deis/charts/blob/master/workflow-dev/manifests/deis-minio-secret-user.yaml file. The access key and secret key must be `base64` encoded.
144+
145+
You'll also need to add two environment variables to the https://github.com/deis/charts/blob/master/workflow-dev/tpl/deis-database-rc.yaml file so the database can communicate with Google Cloud Storage instead of minio. Add these values to your `spec.template.spec.containers[0].env` section, then run `helm generate` for the settings to take effect the next time you install workflow:
146+
147+
```yaml
148+
- name: DEIS_MINIO_SERVICE_HOST
149+
value: storage.googleapis.com
150+
- name: DEIS_MINIO_SERVICE_PORT
151+
value: "443"
152+
```

0 commit comments

Comments
 (0)