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
Copy file name to clipboardExpand all lines: src/installing-workflow/configuring-object-storage.md
+16-84Lines changed: 16 additions & 84 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,27 +11,19 @@ A variety of Deis components rely on an object storage system to do their work.
11
11
12
12
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).
13
13
14
-
Note: object storage configuration has not been standardized across all components in our beta release. As such, configuration instructions differ for each component. We plan to remediate this problem in our next release. Please see [deis/deis#4966](https://github.com/deis/deis/issues/4966) for our progress on that work.
15
-
16
14
## Minio
17
15
18
16
Additionally, Deis ships with a [Minio](http://minio.io)[component](https://github.com/deis/minio) by default, which provides in-cluster, ephemeral object storage. This means that _if the Minio server crashes, all data will be lost_. Therefore, **Minio should be used for development or testing only**.
19
17
20
18
In our beta release, the components listed above are configured by default to automatically use the Minio [service][k8s-service] for object storage.
21
19
22
-
## Google Cloud Storage
23
-
24
-
[Google Cloud Storage](https://cloud.google.com/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 in the [GCS migration documentation](https://cloud.google.com/storage/docs/migrating?hl=en_US#migration-simple).
25
-
26
-
We recommend storing these and all other credentials as Kubernetes secrets. See the below sections for details on configuring each component for details.
27
-
28
20
# Configuring the Deis Components
29
21
30
22
Every Deis component that relies on object storage relies on the following two inputs for configuration:
31
23
32
-
-One or more environment variables that describe what object storage system to use
33
-
-One or more files to provide access credentials for the object storage system.
34
-
- We suggest storing the contents of these files in [Kubernetes secrets][k8s-secret] and mounting them as volumes to each pod
24
+
-An environment variable that describe what object storage system to use.
25
+
-A configuration file ([objectstorage.toml][objectstorage-toml]) to provide access credentials for the object storage system.
26
+
- We suggest storing the contents of these files in [Kubernetes secrets][k8s-secret] and mounting them as volumes to each pod.
35
27
- See [the workflow-dev chart](https://github.com/deis/charts/tree/master/workflow-dev) for examples of using and mounting secrets.
36
28
37
29
The subsections herein explain how to configure these two inputs for each applicable component.
@@ -40,37 +32,15 @@ The subsections herein explain how to configure these two inputs for each applic
40
32
41
33
### Environment Variables
42
34
43
-
The builder looks for the below environment variables to determine where the object storage system is.
44
-
45
-
-`DEIS_OUTSIDE_STORAGE` - The external S3-compatible object storage system. Commonly used URLs:
46
-
-`s3.amazonaws.com` for [Amazon S3](https://aws.amazon.com/s3/)
47
-
-`storage.googleapis.com` for [Google Cloud Storage](https://cloud.google.com/storage/)
48
-
-`DEIS_MINIO_SERVICE_HOST` and `DEIS_MINIO_SERVICE_PORT` - The in-cluster Minio service. Additional notes about these variables:
49
-
- They are set automatically by Kubernetes if you run [Minio](http://minio.io) as a service in the cluster
50
-
- 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.
51
-
52
-
A few additional notes:
53
-
54
-
- If the builder finds a `DEIS_OUTSIDE_STORAGE` 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.
55
-
- The builder only supports the default Amazon S3 region (`us-east-1a`) and the default Google Cloud Storage location (`us`). This is a known limitation that we plan to fix in an upcoming release
56
-
- The builder 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. To do so, simply set the `BUCKET` environment variable to another value (`deis-builds`, for example)
35
+
The builder looks for a `BUILDER_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.
57
36
58
37
### Credentials
59
38
60
-
The builder reads credentials from the below locations on the filesystem.
The builder reads the credential information from a `objectstorage-keyfile` secret. This is generated automatically (as part of the `helm generate` command) based on the configuration options given in the [objectstorage.toml file][objectstorage-toml] file.
64
40
65
41
### Helm Chart
66
42
67
-
If you are using the [Helm Chart for Workflow][helm-chart], put your base64-encoded credentials in the [`minio-user` secret][minio-user-secret] (under `access-key-id` and `access-secret-key`) before you `helm install`. For more information, see the [installation instructions][helm-install] for more details on using Helm.
68
-
69
-
Note - to base64 encode your credentials, you can use the `base64` tool on most systems. Here's an example usage:
70
-
71
-
```console
72
-
echo $MY_ACCESS_KEY | base64
73
-
```
43
+
If you are using the [Helm Chart for Workflow][helm-chart], put your credentials in the [objectstorage.toml][objectstorage-toml] file before you run `helm generate`. Note that you don't need to base64-encode the credentials, as Helm will do that for you. For more information, see the [installation instructions][helm-install] for more details on using Helm.
The slugbuilder reads the credential information from a `objectstorage-keyfile` secret. This is generated automatically (as part of the `helm generate` command) based on the configuration options given in the [objectstorage.toml file][objectstorage-toml] file.
94
61
95
62
### Helm Chart
96
63
97
64
The [Helm Chart for Workflow][helm-chart] contains no manifest for the slugbuilder. As noted above, the builder handles all configuration and lifecycle management for you.
98
65
99
-
If, however, you wish to run the slugbuilder as a standalone component, you can use the [`minio-user` secret][minio-user-secret] to easily provide your pods with the credentials information they need. To do so, put your base64-encoded credentials in the [`minio-user` secret][minio-user-secret] (under `access-key-id` and `access-secret-key`) before you `helm install`. For more information, see the [installation instructions][helm-install] for more details on using Helm.
100
-
101
-
Note - to base64 encode your credentials, you can use the `base64` tool on most systems. Here's an example usage:
102
-
103
-
```console
104
-
echo $MY_ACCESS_KEY | base64
105
-
```
66
+
If, however, you wish to run the slugbuilder as a standalone component, you can use the `objectstorage-keyfile` secret to easily provide your pods with the credentials information they need. This is generated automatically (as part of the `helm generate` command) based on the configuration options given in the [objectstorage.toml file][objectstorage-toml] file.
The slugrunner is configured and launched by the controller inside a Deis cluster, so this section only applies if you intend to run it as a standlone component.
70
+
The slugrunner is configured and launched by the controller inside a Deis cluster, so this section only applies if you intend to run it as a standalone component.
110
71
111
72
### Environment Variables
112
73
113
74
The slugrunner uses the `SLUG_URL` environment variable to determine where to download the slug (that it will run) from.
114
75
115
76
### Credentials
116
77
117
-
The slugrunner reads credentials from the below locations on the filesystem.
The slugrunner reads the credential information from a `objectstorage-keyfile` secret. This is generated automatically (as part of the `helm generate` command) based on the configuration options given in the [objectstorage.toml file][objectstorage-toml] file.
121
79
122
80
### Helm Chart
123
81
124
82
The [Helm Chart for Workflow][helm-chart] contains no manifest for the slugrunner. As noted above, the controller handles all configuration and lifecycle management for you.
125
83
126
-
If, however, you wish to run the slugrunner as a standalone component, you can use the [`minio-user` secret][minio-user-secret] to easily provide your pods with the credentials information they need. To do so, put your base64-encoded credentials information into the `access-key-id` and `access-secret-key` fields, and mount the secret like this:
127
-
128
-
Under the `spec.template.spec.volumes` section:
129
-
130
-
```yaml
131
-
- name: minio-user
132
-
secret:
133
-
secretName: minio-user
134
-
```
135
-
136
-
Under the `spec.template.spec.containers[0].volumeMounts` section:
137
-
138
-
```yaml
139
-
- name: minio-user
140
-
mountPath: /var/run/secrets/object/store
141
-
readOnly: true
142
-
```
143
-
144
-
Note - to base64 encode your credentials, you can use the `base64` tool on most systems. Here's an example usage:
145
-
146
-
```console
147
-
echo $MY_ACCESS_KEY | base64
148
-
```
84
+
If, however, you wish to run the slugrunner as a standalone component, you can use the `objectstorage-keyfile` secret to easily provide your pods with the credentials information they need. This is generated automatically (as part of the `helm generate` command) based on the configuration options given in the [objectstorage.toml file][objectstorage-toml] file.
@@ -163,13 +99,7 @@ No paths need to be mounted into the pod. Simply ensure that the secret exists i
163
99
164
100
### Helm Chart
165
101
166
-
If you are using the [Helm Chart for Workflow][helm-chart], put your base64-encoded credentials in the [`minio-user` secret][minio-user-secret] (under `access-key-id` and `access-secret-key`) before you `helm install`. For more information, see the [installation instructions][helm-install] for more details on using Helm.
167
-
168
-
Note - to base64 encode your credentials, you can use the `base64` tool on most systems. Here's an example usage:
169
-
170
-
```console
171
-
echo $MY_ACCESS_KEY | base64
172
-
```
102
+
If you are using the [Helm Chart for Workflow][helm-chart], put your credentials in the [objectstorage.toml][objectstorage-toml] file before you run `helm generate`. Note that you don't need to base64-encode the credentials, as Helm will do that for you. For more information, see the [installation instructions][helm-install] for more details on using Helm.
@@ -211,6 +141,8 @@ If the `DATABASE_STORAGE` backend is configured as "s3", the database will recei
211
141
212
142
### Google Cloud Storage (Interoperability Mode)
213
143
144
+
[Google Cloud Storage](https://cloud.google.com/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 for database, you'll have to turn on this interoperability mode. In order to do so, please follow the steps in the [GCS migration documentation](https://cloud.google.com/storage/docs/migrating?hl=en_US#migration-simple).
145
+
214
146
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.
215
147
216
148
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:
0 commit comments