Skip to content
This repository has been archived by the owner on Sep 27, 2020. It is now read-only.

frodenas/docker-registry-boshrelease

Repository files navigation

Docker Registry BOSH Release

This is a BOSH release for Docker Registry, a stateless, highly scalable server side application that stores and lets you distribute Docker images.

Disclaimer

This is NOT a production ready BOSH release. I created it for my own experimentation and it may not be supported in the future.

If you are looking for a supported Docker Registry BOSH release, please check the bosh.io releases page or the cloudfoundry-community github organization.

Table of Contents

Usage

Requirements

In order to use this BOSH release you will need:

Clone the repository

First, clone this repository into your workspace:

git clone https://github.com/frodenas/docker-registry-boshrelease
cd docker-registry-boshrelease
export BOSH_ENVIRONMENT=<name>

Basic deployment

To deploy a basic Docker Registry use the following command:

bosh -d docker-registry deploy manifests/docker-registry.yml \
  --vars-store tmp/deployment-vars.yml

Once deployed, look for the registry instance IP address:

bosh -d docker-registry instances

And the registry password (located at the tmp/deployment-vars.yml file or CredHub if it is enabled at your BOSH Director). Then login into your Docker Registry:

docker login -u admin -p <password> <registry instance IP address>:5000

NOTE: if you don't provide TLS certificates issued by a known CA (for example by letting BOSH generate self-signed certificates), then you will need to add the IP address of your Docker Registry to the insecure-registries setting of your Docker Engine (see Test an insecure registry documentation).

Operations files

Additional operations files are located at the manifests/operators directory. Those files includes a basic configuration, so extra ops files might be needed for additional configuration.

Please review the op files before deploying them to check the requeriments, dependencies and necessary variables.

File Description
enable-cf-route-registrar.yml Registers registry as a Cloud Foundry route (under your system domain)
enable-nginx.yml Enables nginx as a proxy in front of your Docker Registry instances
enable-redis-cache.yml Enables Redis as a cache for your Docker Registry instances
mirror-docker-hub.yml Configures your Docker Registry as a Docker Hub pull through cache
use-azure-storage.yml Uses Microsoft Azure Storage as the Docker Registry storage backend
use-gcs-storage.yml Uses Google Cloud Storage as the Docker Registry storage backend
use-oss-storage.yml Uses Aliyun Object Storage Service as the Docker Registry storage backend
use-s3-storage.yml Uses Amazon S3 as the Docker Registry storage backend
use-swift-storage.yml Uses OpenStack Swift as the Docker Registry storage backend

Deployment variables and the var-store

Some operators files requires additional information to provide environment-specific or sensitive configuration such as various credentials. To do this in the default configuration, we use the --vars-store. This flag takes the name of a yml file that it will read and write to. Where necessary credential values are not present, it will generate new values based on the type information stored at the different deployment files. Necessary variables that BOSH can't generate need to be supplied as well. See each particular op files you're using for any additional necessary variables.

See also the BOSH CLI documentation for more information about ways to supply such additional variables.

Contributing

Refer to CONTRIBUTING.md.

License

Apache License 2.0, see LICENSE.