Building Docker Enterprise 2.1 Cluster Using Terraform

  • Build a Containers-as-a-Service platform using Docker Enterprise Edition 2.1 and,
  • Build that platform using Terraform.

Docker Enterprise Edition

  • Reliably support both Windows and Linux containers.
  • Be hosted in any cloud platform or on-premise Data Center.
  • Use both Docker Swarm and Kubernetes orchestration interchangeably.
  • Docker UCP — which gives a single-pane-of-glass across your cluster.
  • Docker Trusted Registry — to securely host your container images.

Terraform

Building the Docker Enterprise Cluster

Terraform Files Explained

Variables

Provider

Network and Security

  • Priority value for the security roles range from 1–100. Smaller the value, higher the priority
  • RDP, WinRM and SSH access are allowed only from a specific IP — your Public IP.
  • Kubernetes, Docker and application access are allowed from anywhere

Compute for Docker UCP Manager

  • internet_max_bandwidth_out attribute ensures a Public IP is assigned as part of VM creation.
  • This Public IP is used in the connection definition for file provisioner to copy the installation scripts and for remote-exec provisioner to run the setup automatically for Docker EE, UCP and DTR
  • ssh key pair for the UCP host and the linux worker node is defined in key-pair.tf

Compute for Docker Worker Nodes

  • Windows image instead of the Linux image.
  • password attribute instead of the key_name attribute used in Linux for ssh-key pair.
  • user-data attribute which is used for bootstrapping the VM, including configuration of WinRM, so further scripts can be executed using WinRM
  • Connection type is winRM instead of ssh used in Linux host.

Output

Scripts to Automate Build of Docker Components

  1. Change the default TLS version in powershell from 1.0. to 1.2
  2. Ignore the certificate errors when connecting to Docker API

Conclusion

Key References

--

--

--

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Deploy CI/CD infrastructure for DevOps Engineers

WhatsApp Features Updates: WhatsApp is preparing for a new feature, when it does this work, the…

WLSDM Scheduler: How to deploy an application to a WebLogic Server automatically and visualize the…

Building a Multi-Cloud Strategy

“Hi, it’s Mickey from Laracademy”

Let’s vote!! — You will create the MCH future-

Pooler is now Prosper

Improve your AWS Lambda Workflow with python-lambda

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

More from Medium

Deploying Prometheus Monitoring Stack with Cluster.dev

Create and Deploy a LAMP stack as a Helm Chart

Using Kyverno To Enforce AWS Load Balancer Annotations For Centralized Logging To S3

Terraform in Action