Skip to content

Commit 2f92f53

Browse files
committed
Merge pull request #104 from arschles/obj-storage-secrets
doc(object-storage): add sections on configuring secrets for the helm chart
2 parents a6cf4b0 + 2455465 commit 2f92f53

1 file changed

Lines changed: 84 additions & 0 deletions

File tree

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

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@ The builder reads credentials from the below locations on the filesystem.
5454
- Key: `/var/run/secrets/object/store/access-key-id`
5555
- Secret `/var/run/secrets/object/store/access-key-secret`
5656

57+
### Helm Chart
58+
59+
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.
60+
61+
Note - to base64 encode your credentials, you can use the `base64` tool on most systems. Here's an example usage:
62+
63+
```console
64+
echo $MY_ACCESS_KEY | base64
65+
```
66+
5767
### A Note on Google Cloud Storage
5868

5969
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.
@@ -78,20 +88,59 @@ The slugbuilder reads credentials from the below locations on the filesystem.
7888
- Key: `/var/run/secrets/object/store/access-key-id`
7989
- Secret `/var/run/secrets/object/store/access-key-secret`
8090

91+
### Helm Chart
92+
93+
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.
94+
95+
Note - to base64 encode your credentials, you can use the `base64` tool on most systems. Here's an example usage:
96+
97+
```console
98+
echo $MY_ACCESS_KEY | base64
99+
```
81100

82101
## [deis/slugrunner](https://github.com/deis/slugrunner)
83102

84103
### Environment Variables
85104

86105
The slugrunner uses the `SLUG_URL` environment variable to determine where to download the slug (that it will run) from.
87106

107+
Note that if you are using slugrunner inside a Deis cluster, the [controller](https://github.com/deis/controller) handles all configuration and lifecycle management for you. The remainder of this section only applies if you intend to run the slugrunner as a standalone component.
108+
88109
### Credentials
89110

90111
The slugrunner reads credentials from the below locations on the filesystem.
91112

92113
- Key: `/var/run/secrets/object/store/access-key-id`
93114
- Secret: `/var/run/secrets/object/store/access-key-secret`
94115

116+
### Helm Chart
117+
118+
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.
119+
120+
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:
121+
122+
Under the `spec.template.spec.volumes` section:
123+
124+
```yaml
125+
- name: minio-user
126+
secret:
127+
secretName: minio-user
128+
```
129+
130+
Under the `spec.template.spec.containers[0].volumeMounts` section:
131+
132+
```yaml
133+
- name: minio-user
134+
mountPath: /var/run/secrets/object/store
135+
readOnly: true
136+
```
137+
138+
Note - to base64 encode your credentials, you can use the `base64` tool on most systems. Here's an example usage:
139+
140+
```console
141+
echo $MY_ACCESS_KEY | base64
142+
```
143+
95144
## [deis/controller](https://github.com/deis/controller)
96145

97146
When the controller needs to launch or scale a new buildpack application, it uses a [replication controller](http://kubernetes.io/docs/user-guide/replication-controller/). Since the slugrunner needs to download the slug to run, it needs the object storage location of the slug and the object storage credentials.
@@ -106,6 +155,16 @@ Since the object storage location information comes from the builder, the contro
106155

107156
No paths need to be mounted into the pod. Simply ensure that the secret exists in your Kubernetes cluster with the correct credentials.
108157

158+
### Helm Chart
159+
160+
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.
161+
162+
Note - to base64 encode your credentials, you can use the `base64` tool on most systems. Here's an example usage:
163+
164+
```console
165+
echo $MY_ACCESS_KEY | base64
166+
```
167+
109168
## [deis/registry](https://github.com/deis/registry)
110169

111170
The registry is configured slightly differently from most of the other components. Read on for details.
@@ -118,6 +177,16 @@ The registry looks for a `REGISTRY_STORAGE` environment variable, which it then
118177

119178
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.
120179

180+
### Helm Chart
181+
182+
If you are using the [Helm Chart for Workflow][helm-chart], put your base64-encoded credentials in the [objectstorage.toml][objectstorage-toml] file before you run `helm generate`. For more information, see the [installation instructions][helm-install] for more details on using Helm.
183+
184+
Note - to base64 encode your credentials, you can use the `base64` tool on most systems. Here's an example usage:
185+
186+
```console
187+
echo $MY_ACCESS_KEY | base64
188+
```
189+
121190
## [deis/database](https://github.com/deis/postgres)
122191

123192
The database is configured slightly differently from the other components. Read the two sections below for details.
@@ -152,3 +221,18 @@ You'll also need to add two environment variables to the https://github.com/deis
152221
- name: DEIS_MINIO_SERVICE_PORT
153222
value: "443"
154223
```
224+
225+
### Helm Chart
226+
227+
If you are using the [Helm Chart for Workflow][helm-chart], put your base64-encoded credentials in the [objectstorage.toml][objectstorage-toml] file before you run `helm generate`. For more information, see the [installation instructions][helm-install] for more details on using Helm.
228+
229+
Note - to base64 encode your credentials, you can use the `base64` tool on most systems. Here's an example usage:
230+
231+
```console
232+
echo $MY_ACCESS_KEY | base64
233+
```
234+
235+
[helm-chart]: https://github.com/deis/charts/tree/master/workflow-dev
236+
[minio-user-secret]: https://github.com/deis/charts/blob/master/workflow-dev/manifests/deis-minio-secret-user.yaml
237+
[helm-install]: https://github.com/deis/workflow/blob/master/src/installing-workflow/installing-deis-workflow.md
238+
[objectstorage-toml]: https://github.com/deis/charts/blob/master/workflow-dev/tpl/objectstorage.toml

0 commit comments

Comments
 (0)