Skip to content

Latest commit

 

History

History
129 lines (75 loc) · 6.43 KB

File metadata and controls

129 lines (75 loc) · 6.43 KB

Configure Object Storage

A variety of Deis components rely on an object storage system to do their work. These components are:

These components are flexible and can work out of the box with almost any system that is compatible with the S3 API.

Minio

Additionally, Deis ships with a Minio component. 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.

Configuring the Deis Components

Every Deis component that relies on object storage relies on the following two inputs for configuration:

  • One or more environment variables with host and port to describe where the object storage system is
  • One or more files to provide access credentials for the object storage system.

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

Environment Variables

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.

  • DEIS_OUTSIDE_STORAGE - The external S3-compatible object storage system. Commonly used URLs:
    • s3.amazonaws.com for Amazon S3's us-east-1a region
    • storage.googleapis.com for Google Cloud Storage
  • DEIS_MINIO_SERVICE_HOST and DEIS_MINIO_SERVICE_PORT - The in-cluster Minio service. Additional notes about these variables:
    • They are set automatically by Kubernetes if you run Minio as a service in the cluster
    • The Helm chart for Deis installs Minio by default, so the Builder will use Minio by default.

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

Credentials

The builder reads credentials from the below locations on the filesystem.

  • Key: /var/run/secrets/object/store/access-key-id
  • Secret /var/run/secrets/object/store/access-key-secret

A Note on Google Cloud Storage

As you may know, Google Cloud Storage (GCS) can interoperate with the S3 API, and, if you choose to use Google Cloud Storage for object storage, you'll have to turn on this interoperability mode.

If you choose to use Google Cloud Storage, set your DEIS_OUTSIDE_STORAGE environment variable to storage.googleapis.com, and follow these instructions 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.

Environment Variables

The slugbuilder looks for the below environment variables to determine where to download code from and upload slugs to.

  • TAR_URL - The location of the .tar archive (which it will build)
  • put_url - The location this component will upload the finished slug to

Credentials

The slugbuilder reads credentials from the below locations on the filesystem.

  • Key: /var/run/secrets/object/store/access-key-id
  • Secret /var/run/secrets/object/store/access-key-secret

Environment Variables

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

Credentials

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

  • Key: /var/run/secrets/object/store/access-key-id
  • Secret: /var/run/secrets/object/store/access-key-secret

Environment Variables

TODO

Credentials

The registry reads credentials from the below locations on the filesystem.

  • Key: /var/run/secrets/deis/registry/creds/accesskey
  • Secret: /var/run/secrets/deis/registry/creds/secretkey

The database is configured slightly differently from the other components. It looks for an environment variable which it then uses as a key to look up the object storage configuration in a config file.

Environment Variables

The database looks for the DATABASE_STORAGE environment variable to determine what object storage system to use. Valid values are listed below and the Helm chart for Deis defaults to minio:

  • filesystem: Store persistent data on ephemeral disk
  • s3: Store persistent data in AWS S3 (configure in S3 section)
  • azure: Store persistent data in Azure's object storage
  • gcs: Store persistent data in Google Cloud Storage
  • minio: Store persistent data on in-cluster Minio server

(TODO: is this correct?)

Credentials

The database reads credentials from the below locations on the filesystem.

  • Key: /etc/wal-e.d/env/access-key-id
  • Secret: /etc/wal-e.d/env/access-key-secret

(TODO: is this still correct?)

Limitations

Below is a list of known limitations of our components' ability to interact with object storage systems.

  • The Deis registry component 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 and is planned for our beta release.