Docker EE for IBM Cloud (Beta) Quick StartEstimated reading time: 6 minutes
Docker Enterprise Edition for IBM Cloud (Beta) Quick Start
Are you ready to orchestrate Docker Enterprise Edition swarm clusters that are enhanced with the full suite of secure IBM Cloud platform, infrastructure, and Watson services? Great! Let’s get you started.
To request access to the closed beta, email IBM.
Step 1: Get all your accounts in order
Set up your IBM Cloud account:
Get your IBM Cloud infrastructure credentials:
If you have not already, create an organization and space to use when using IBM Cloud services. You must be the account owner or administrator to complete this step.
Get the Docker EE URL associated with your subscription. Email IBM to get a trial subscription during the beta.
Set your environment variables to use your IBM Cloud infrastructure credentials and your Docker EE installation URL. For example:
export SOFTLAYER_USERNAME=user.name.1234567 export SOFTLAYER_API_KEY=api-key export D4IC_DOCKER_EE_URL=my_docker-ee-url
Now let’s download some Docker for IBM Cloud tools.
Step 2: Install the CLIs
Install the IBM Cloud CLI.
Install the Docker for IBM Cloud plug-in. The prefix for running commands is
$ bx plugin install docker-for-ibm-cloud -r Bluemix
Optional: To manage a private IBM Cloud Container Registry, install the plug-in. The prefix for running commands is
$ bx plugin install container-registry -r Bluemix
Verify that the plug-ins have been installed properly:
$ bx plugin list
Now we’re ready to get to the fun stuff: making a cluster!
Step 3: Create clusters
Create a Docker EE swarm cluster in IBM Cloud. During the beta, your cluster can have a maximum of 20 nodes, up to 14 of which can be worker nodes. If you need more nodes than this, work with your Docker representative to acquire an additional Docker EE license.
Log in to the IBM Cloud CLI. If you have a federated ID, use the
$ bx login [--sso]
Target the IBM Cloud org and space:
$ bx target --cf
Create the cluster. Use the
--swarm-nameflag to name your cluster, and fill in the credentials, SSH, and Docker EE installation URL variables with the information that you previously retrieved.
$ bx d4ic create --swarm-name my_swarm \ --sl-user user.name.1234567 \ --sl-api-key api_key \ --ssh-label my_ssh_label \ --ssh-key filepath_to_my_ssh_key \ --docker-ee-url my_docker-ee-url
Customize your cluster
You can customize your cluster by using other flags and options with
bx d4ic help create, but for now, we’ll just stick with a basic swarm.
Note the cluster Name and ID.
Congrats! Your Docker EE for IBM Cloud cluster is provisioning. First, the manager node is deployed. Then, the rest of the infrastructure resources are deployed, including the worker nodes, DTR nodes, load balancers, subnet, and NFS volume.
- To check manager node status:
docker logs cluster-name_ID.
- To check infrastructure resources:
bx d4ic show --swarm-name cluster-name --sl-user user.name.1234567 --sl-api-key api_key.
Step 4: Use UCP
Check it out: Docker for IBM Cloud uses Docker Universal Control Plane (UCP) to help you manage your cluster through a simple web UI!
Step 4a: Access UCP
Get your UCP password from the Docker logs Outputs:
$ docker logs cluster-name_ID ... ucp_password = UCP-password ...
Retrieve your cluster’s UCP URL:
$ bx d4ic list --sl-user user.name.1234567 --sl-api-key api_key
Copy the UCP URL for your swarm from the
bx d4ic listcommand, and in your browser navigate to it.
Log in to UCP. Your credentials are
adminand the UCP password from the
docker logscommand, or the credentials that your admin created for you.
We’re almost done! We just need to download the UCP certificate bundle so that you can create and deploy services from your local Docker client to the cluster.
Step 4b: Download client certificates
From the UCP GUI under your user name (for example, admin), click My Profile.
Click Client Bundles > New Client Bundle. A zip file is generated.
In the GUI, you are shown a labeland public key. You can edit the label by clicking the pencil icon and giving it a name, e.g., d4ic-ucp.
In a terminal, navigate and unzip the client bundle:
$ cd Downloads && unzip ucp-bundle-admin.zip
Keep your client bundle handy
Move the certificate environment variable directory to a safe and accessible location on your machine. You’ll use it a lot!
From the client bundle directory, update your
DOCKER_CERT_PATHenvironment variables by loading the
env.shscript contents into your environment.:
$ source env.sh
Set your environment to use Docker EE for IBM Cloud
Repeat this to set your environment variables each time you enter a new terminal session, or after you unset your variables, to connect to the Docker EE for IBM Cloud swarm.
That’s it! Your Docker EE for IBM Cloud cluster is provisioned, connected to UCP, and ready to go.
What’s next, you ask? Why not try to:
- Learn when to use UCP and the CLIs.
- Deploy an app.
- Scale your swarm cluster.
- Set up DTR to use IBM Cloud Object Storage.