VM Setup for Docker Dev Server
So previously I went over the hardware for building your own VMWare ESXi server then working through the installation and setup. Finally, we need to go over creating your VM’s and setting up a Docker host, if you don’t like the hardware stuff this is the fun bit people.
Protecting your investment is important. I bought a CyberPower 1500VA UPS to connect the server and networking equipment too. It’s not a huge UPS and won’t keep everything on for an extended outage but it’s important to ensure the RAID card performed all it’s writes and your VM’s shutdown before the battery dies. If there isn’t a USB A to B cable in the box (I can’t remember) just make sure you pick one up, that will be needed to connect the UPS to your VMWare ESXi server.
Once your UPS is all connected up you can check out this article on how to setup the CyberPower PowerPannel Business Edition Appliance [https://tinkertry.com/configure-automated-shutdown-homelab-datacenter-15-minutes]. It’s a free VMWare image download that you can import into your ESXi server.
Now it’s time to get to the Docker part of this process, selecting a server that will host your containers. You can select any OS you want from Windows to Linux. Here is a good overview of the Linux options and if your looking for a Windows flavor I would recommend Windows Server 2019 (currently in preview).
For this I’m going with VMWare’s Photon OS [https://vmware.github.io/photon/] as it’s a container-centric OS, with support for Kubernetes and optimized for VMWare. For Photon download the OVA (that’s the already setup VM image one) and from your VMWare ESXi web UI create a new VM.
Once you’ve created your new VM you will be able to power it on and click into the console on the web, this will open up an interactive window where you can perform operations against the VM just like you were sitting at it’s keyboard. Your default root password will be “changeme” but it could also be in the VM notes section if it’s different.
Once you’ve changed the root password you will have to start the docker service and ensure it’s running on startup with the following 2 commands
systemctl start docker
systemctl enable docker
Next I need some form a GUI, so I’m going with Portainer WebUI to allow management of my docker containers on my host. It itself is a docker container and I believe should be able to manage Linux and Windows servers so when I need to stand up my Windows Docker host (have to test both) I can use the same UI.
Installation of Portainer is a breeze, just 2 docker commands. Once they have completed, you can browse to port 9000 of your docker host to access the UI and finish the setup. In the setup Wizard you can setup your password and have it manage your local Docker service.
That’s it! We have our VM ESXi Server setup, we have a VM for our UPS and for our Linux Docker host and a Docker WebUI for us to hit to deploy and manage our containers.
If you’re a First Responder or part of a Disaster Response Org, or know someone who is, check out Resgrid which is a SaaS product utilizing Microsoft Azure, providing free logistics, management and communication tools to first responder organizations like volunteer fire departments, career fire departments, EMS, search & rescue, CERT, public safety, security and disaster relief organizations.