Skip to content

Commit 238a71f

Browse files
author
Aaron Schlesinger
committed
doc(src/installing-deis/configuring-object-storage.md): splitting into multiple component-specific sections
1 parent 3b1eb4a commit 238a71f

1 file changed

Lines changed: 86 additions & 27 deletions

File tree

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

Lines changed: 86 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,51 +8,110 @@ A variety of Deis components rely on an object storage system to do their work.
88
- [registry](https://github.com/deis/registry)
99
- [database](https://github.com/deis/postgres)
1010

11-
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).
1212

1313
# Minio
1414

1515
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.
1616

17-
# Telling Deis What to Use
17+
# Configuring the Deis Components
1818

19-
The Deis components determine what object storage system to use via environment variables that you set up. The below list is the lookup order for all Deis components.
19+
Every Deis component that relies on object storage relies on the following two inputs for configuration:
20+
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.
25+
26+
The subsections herein explain how to configure these two inputs for each applicable component.
27+
28+
## [deis/builder](https://github.com/deis/builder)
29+
30+
### Environment Variables
31+
32+
The builder looks for the below environment variables to determine where the object storage system is. The builder looks in-order for these variables. If it finds two, the one higher in the list will be used.
2033

2134
- `DEIS_OUTSIDE_STORAGE` - The external S3-compatible object storage system. Commonly used URLs:
2235
- `s3.amazonaws.com` for Amazon S3's `us-east-1a` region
2336
- `storage.googleapis.com` for Google Cloud Storage
24-
- `DEIS_MINIO_SERVICE_HOST` and `DEIS_MINIO_SERVICE_PORT` - The in-cluster Minio service. Note that these will be set automatically by Kubernetes if you run [Minio](http://minio.io) as a service in the cluster. See [the Minio service from the Deis Minio Chart](https://github.com/deis/charts/blob/master/deis-dev/manifests/deis-minio-service.yaml) for an example service.
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.
2540

26-
## Specifying the Bucket
41+
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) don't have read and write access to it, you'll have to specify a different bucket. To do so, simply set the `BUCKET` environment variable to another value (`deis-builds`, for example).
2742

28-
[deis/builder](https://github.com/deis/builder) uses an additional environment variable, `BUCKET` to determine the name of the bucket (in the specified object storage system) to use. It uses `git` as the default bucket name, but if your credentials (see below) don't have read and write access to it, you'll have to specify a different bucket. To do so, simply set the `BUCKET` environment variable to another value (`deis-builds`, for example).
43+
### Credentials
2944

30-
# Storing Credentials
45+
The builder reads credentials from the below locations on the filesystem.
3146

32-
In the Deis V2 Beta release, all components read credentials from the filesystem, and we suggest that credentials are stored in [Kubernetes secrets](http://kubernetes.io/v1.1/docs/user-guide/secrets.html) and mounted to the appropriate location for the component. See the below list for the expected location for each component, and see [the deis-dev chart](https://github.com/deis/charts/tree/master/deis-dev) for examples of using and mounting secrets.
47+
- Key: `/var/run/secrets/object/store/access-key-id`
48+
- Secret `/var/run/secrets/object/store/access-key-secret`
3349

34-
- [builder](https://github.com/deis/builder)
35-
- Key: `/var/run/secrets/object/store/access-key-id`
36-
- Secret `/var/run/secrets/object/store/access-key-secret`
37-
- [slugbuilder](https://github.com/deis/slugbuilder)
38-
- Key: `/var/run/secrets/object/store/access-key-id`
39-
- Secret `/var/run/secrets/object/store/access-key-secret`
40-
- [slugrunner](https://github.com/deis/slugrunner)
41-
- Key: `/var/run/secrets/object/store/access-key-id`
42-
- Secret: `/var/run/secrets/object/store/access-key-secret`
43-
- [registry](https://github.com/deis/registry)
44-
- Key: `/var/run/secrets/deis/registry/creds/accesskey`
45-
- Secret: `/var/run/secrets/deis/registry/creds/secretkey`
46-
- [database](https://github.com/deis/postgres)
47-
- Key: `/etc/wal-e.d/env/access-key-id`
48-
- Secret: `/etc/wal-e.d/env/access-key-secret`
50+
### A Note on Google Cloud Storage
51+
52+
As you may know, Google Cloud Storage (GCS) can [interoperate with the S3 API](https://cloud.google.com/storage/docs/interoperability), and, if you choose to use Google Cloud Storage for object storage, you'll have to turn on this interoperability mode.
53+
54+
If you choose to use Google Cloud Storage, set your `DEIS_OUTSIDE_STORAGE` environment variable to `storage.googleapis.com`, and follow [these instructions](https://cloud.google.com/storage/docs/migrating?hl=en_US#keys) to generate an S3 compatible access key ID and access key secret. Store these credentials just as you would if they were AWS S3 or Minio credentials. As mentioned above, we recommend storing these as Kubernetes secrets. See the "Configuring Deis Components" section above for more details and examples.
55+
56+
## [deis/slugbuilder](https://github.com/deis/slugbuilder)
57+
58+
### Environment Variables
59+
60+
The slugbuilder looks for the below environment variables to determine where to download code from and upload slugs to.
61+
62+
- `TAR_URL` - The location of the `.tar` archive (which it will build)
63+
- `put_url` - The location this component will upload the finished slug to
64+
65+
### Credentials
66+
67+
The slugbuilder reads credentials from the below locations on the filesystem.
68+
69+
- Key: `/var/run/secrets/object/store/access-key-id`
70+
- Secret `/var/run/secrets/object/store/access-key-secret`
4971

50-
# A Note on Google Cloud Storage
5172

52-
As you may know Google Cloud Storage (GCS) can [interoperate with the S3 API](https://cloud.google.com/storage/docs/interoperability), and, if you choose to use Google Cloud Storage for object storage, you'll have to turn on this interoperability mode.
73+
## [deis/slugrunner](https://github.com/deis/slugrunner)
74+
75+
### Environment Variables
76+
77+
The slugrunner uses the `SLUG_URL` environment variable to determine where to download the slug (that it will run) from.
78+
79+
### Credentials
80+
81+
The slugrunner reads credentials from the below locations on the filesystem.
82+
83+
- Key: `/var/run/secrets/object/store/access-key-id`
84+
- Secret: `/var/run/secrets/object/store/access-key-secret`
85+
86+
## [deis/registry](https://github.com/deis/registry)
87+
88+
### Environment Variables
89+
90+
TODO
91+
92+
### Credentials
93+
94+
The registry reads credentials from the below locations on the filesystem.
95+
96+
- Key: `/var/run/secrets/deis/registry/creds/accesskey`
97+
- Secret: `/var/run/secrets/deis/registry/creds/secretkey`
98+
99+
## [deis/database](https://github.com/deis/postgres)
100+
101+
### Environment Variables
102+
103+
TODO
104+
105+
### Credentials
106+
107+
The database reads credentials from the below locations on the filesystem.
108+
109+
- Key: `/etc/wal-e.d/env/access-key-id`
110+
- Secret: `/etc/wal-e.d/env/access-key-secret`
53111

54-
If you choose to use Google Cloud Storage, set your `DEIS_OUTSIDE_STORAGE_HOST` environment variable to `storage.googleapis.com`, and follow [these instructions](https://cloud.google.com/storage/docs/migrating?hl=en_US#keys) to generate an S3 compatible access key ID and access key secret. Store these credentials just as you would if they were AWS S3 or Minio credentials (see the "Storing Credentials" section above).
55112

56113
# Limitations
57114

58-
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.
115+
Below is a list of known limitations of our components' ability to interact with object storage systems.
116+
117+
- [The Deis registry component](https://github.com/deis/registry) will not automatically look up the Kubernetes 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.

0 commit comments

Comments
 (0)