You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These components are built flexibly, so they can work out of the box with almost any system that is compatible with the [S3 API](http://docs.aws.amazon.com/AmazonS3/latest/API/APIRest.html).
11
+
These components are flexible and can work out of the box with almost any system that is compatible with the [S3 API](http://docs.aws.amazon.com/AmazonS3/latest/API/APIRest.html).
11
12
12
13
# Minio
13
14
14
15
Additionally, Deis ships with a [Minio](http://minio.io)[component](https://github.com/deis/minio). This component runs as a Kubernetes service, and the components listed above are configured to automatically look for that service and use it as object storage if it's available.
15
16
16
-
# Telling Deis What to Use
17
+
# Configuring the Deis Components
17
18
18
-
The Deis components determine what object storage system to use via environment variables that you set up:
19
+
Every Deis component that relies on object storage relies on the following two inputs for configuration:
19
20
20
-
-`DEIS_MINIO_SERVICE_HOST` and `DEIS_MINIO_SERVICE_PORT` - The in-cluster Minio service
21
-
-`DEIS_OUTSIDE_STORAGE_HOST` and `DEIS_OUTSIDE_STORAGE_PORT` - The external S3-compatible object storage system
21
+
- One or more environment variables with host and port to describe where the object storage system is
22
+
- One or more files to provide access credentials for the object storage system.
23
+
- 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
24
+
- See [the deis-dev chart](https://github.com/deis/charts/tree/master/deis-dev) for examples of using and mounting secrets.
22
25
23
-
# Limitations
26
+
The subsections herein explain how to configure these two inputs for each applicable component.
24
27
25
-
The only currently known limitation is that [the Deis registry component](https://github.com/deis/registry) will not automatically look up the minio service, nor will it look for other storage env vars. That fix is being tracked in a [GitHub issue](https://github.com/deis/registry/issues/7) and is planned for our beta release.
The builder looks for the below environment variables to determine where the object storage system is.
33
+
34
+
-`DEIS_OUTSIDE_STORAGE` - The external S3-compatible object storage system. Commonly used URLs:
35
+
-`s3.amazonaws.com` for Amazon S3's `us-east-1a` region
36
+
-`storage.googleapis.com` for Google Cloud Storage
37
+
-`DEIS_MINIO_SERVICE_HOST` and `DEIS_MINIO_SERVICE_PORT` - The in-cluster Minio service. Additional notes about these variables:
38
+
- They are set automatically by Kubernetes if you run [Minio](http://minio.io) as a service in the cluster
39
+
- 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
+
41
+
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.
42
+
43
+
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
+
45
+
To do so, simply set the `BUCKET` environment variable to another value (`deis-builds`, for example).
46
+
47
+
### Credentials
48
+
49
+
The builder reads credentials from the below locations on the filesystem.
Google Cloud Storage (GCS) can interoperate with the S3 API using a feature called [interoperability](https://cloud.google.com/storage/docs/interoperability). If you choose to use GCS for object storage, you'll have to turn on this interoperability mode. In order to do so, please follow the steps at https://cloud.google.com/storage/docs/migrating?hl=en_US#migration-simple.
57
+
58
+
When you're done, please set the `DEIS_OUTSIDE_STORAGE` environment variable to `storage.googleapis.com`, and ensure the keys that you created (as part of the previous paragraph) are in the correct locations on the filesystem.
59
+
60
+
Reminder: We recommend storing these and all other credentials as Kubernetes secrets. See the "Configuring Deis Components" section above for more details and examples.
The registry is configured slightly differently from most of the other components. Read on for details.
95
+
96
+
### Environment Variables
97
+
98
+
The registry looks for a `REGISTRY_STORAGE` environment variable, which it then uses as a key to look up the object storage location and authentication information in a configuration file. See below for details on that file.
99
+
100
+
### Credentials
101
+
102
+
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.
The database is configured slightly differently from the other components. Read the two sections below for details.
107
+
108
+
### Environment Variables
109
+
110
+
The database looks for a `DATABASE_STORAGE` environment variable, which it then uses as a key to look up the object storage location and authentication information in a configuration file. See below for the details on that file.
111
+
112
+
## Credentials
113
+
114
+
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.
0 commit comments