Shipyard R&D Series (1) - Shipyard Installation Guide

Docker's shipyard installation guide

1. Foreword: I recently researched shipyard's docker container management platform. During the research process, I found that I still have a certain lack of basic understanding of docker. In order to better understand docker, I will share my understanding of the shipyard project with docker enthusiasts. The system forms a research and development log. For details of dockerclub's shipyard R&D series, please visit

2. Introduction to the shipyard project: Shipyard is a system that integrates management of docker containers, images, and Registries. Its biggest highlight should be the integrated management of multiple nodes, which can dynamically load nodes and host containers under nodes. The details of the shipyard are not explained here for the time being, and the subsequent chapters will talk about his architecture.

3. Introduction to the installation and use of the shipyard. For the installation of the shipyard project, you can refer to the official website for step-by-step operations. Here are some solutions to the pits.

3.1 First Deployment Script

curl -sSL https://shipyard-project.com/deploy | bash -s
  • ACTION: Commands that can be used (deploy, upgrade, node, remove)

    1. DISCOVERY: The cluster system uses Swarm for collection and management (you can use 'node' in node management)

    2. IMAGE: Mirror, default to use shipyard's mirror

    3. PREFIX: the prefix of the container name

    4. SHIPYARD_ARGS: Common parameters for containers

    5. TLS_CERT_PATH: TLS certificate path

    6. PORT: the main program listening port (default port: 8080)

    7. PROXY_PORT: proxy port (default: 2375)

3.2 Script Options

  • If you want to customize the deployment, please refer to the following specifications

    1. deploy action: directive valid variable

    2. deploy: deploy a new shipyard instance

    3. upgrade: update an existing instance (note: you need to keep the same system environment and variables to deploy the same configuration)

    4. node: Add a new node using Swarm

    5. remove: remove an existing shipyard instance (container)

3.3 Mirror usage

  • You can take a canonical image to deploy the instance, such as the test version below, and you have done so

 curl -sSL https://shipyard-project.com/deploy | IMAGE=shipyard/shipyard:test bash -s

3.4 Prefix usage

  • You can define the prefix you want, like

 curl -sSL https://shipyard-project.com/deploy | PREFIX=shipyard-test bash -s

3.5 Parameter usage

  • Here are some additional shipyard run parameters that you can tune like this:

     curl -sSL https://shipyard-project.com/deploy | SHIPYARD_ARGS="--ldap-server=ldap.example.com --ldap-autocreate-users" bash -s

3.6 TLS certificate usage

  • Enable TLS to deploy components, including proxy (proxy), swarm cluster system, shipyard management platform configuration, this is a configuration specification. Certificates must use the following naming convention:

    1. ca.pem: security certificate

    2. server.pem: server certificate

    3. server-key.pem: server private certificate

    4. cert.pem: client certificate

    5. key.pem: the key of the client certificate

  • Note: The certificate will be placed in a docker container and shared among the various components. If you need debugging, you can connect this container to the debug container. The certificate prefixed with the data container name.

 docker run --rm \
    -v $(pwd)/certs:/certs \
    ehazlett/certm \
    -d /certs \
    bundle \
    generate \
    -o shipyard \
    --host proxy \
    --host 127.0.0.1
  • You can also deploy the system as follows

   curl -sSL https://shipyard-project.com/deploy | TLS_CERT_PATH=$(pwd)/certs bash -s

3.7 Add a deployment node

  • The shipyard node deployment script will automatically install the key/value storage system (etcd system). To add a node to the swarm cluster, you can use the following node deployment script

curl -sSL https://shipyard-project.com/deploy | ACTION=node  DISCOVERY=etcd://10.0.1.10:4001 bash -s
  • Note: You need to modify the ip address 10.0.1.10 to the host address of your initial shipyard system

3.8 Delete the shipyard system

 curl -sSL https://shipyard-project.com/deploy | ACTION=remove bash -s

3.9 Accessories:

  • The following is the effect of the author's deployment. If you encounter problems, you can leave me a message on the dockerclub.net Q&A community.

  1. Start interface

  2. Container Details

  3. mirror

  4. node

  5. https://segmentfault.com/a/1190000003995374

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326678291&siteId=291194637