This is an old revision of the document!
Setup Docker on Photon OS on ESXi, and install Portainer and Unifi Controller.
Install a Photon OS base, using a relevant hostname:
Setup minimal installed profile of PhotonOS
OVA with virtual hardware v15 from https://github.com/vmware/photon/wiki/Downloading-Photon-OSCreate/Register VM:Deploy a virtual machine from an OVF or OVA fileTarget DatastorePower on automaticallyFinishHost > Manage > System > Autostart:EnableStart earlier and Start later to set the desired orderVirtual Machines on the sidebar and click on the current VMActions > Edit Settings:Add other device > NVMe controllerHard Disk 1 > Controller location > NVMe controller 0Edit SettingsSCSI controller 0Hardware Configuration > Network adapter 1) and desired hostname# Login with root details from the VM note # Follow instructions to set new password # Remove docker related packages if not needed to save space and faster updates tdnf erase containerd docker docker-cli docker-engine # Update packages: tdnf upgrade tdnf clean all # Disable password expiry: chage -M -1 root # Set new hostname: hostnamectl set-hostname <hostname-as-set-in-router> # Set the timezone to Perth ln -sf /usr/share/zoneinfo/Australia/Perth /etc/localtime # Change the SSH port to 50001: sed -i "s/#Port 22/Port 50001/" /etc/ssh/sshd_config sed -i "s/-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT/-A INPUT -p tcp -m tcp --dport 50001 -m state --state NEW -j ACCEPT/" /etc/systemd/scripts/ip4save exit
Minimal installed profile of PhotonOS User: root Ports: 50001/tcp SSH
Base InstallThen set up Portainer and Unifi Controller:
# Enable Docker to run at startup: systemctl enable docker # Install Portainer: docker volume create portainer_data docker run --name Portainer --restart=always -d -p 8000:8000 -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer exit
local endpointUnifi Controllerjacobalberty/unifi:latestcontainer > /unifibindhost > /root/unifiJVM_MAX_THREAD_STACK_SIZE > 1280kTZ > <Timezone of server>Unless stoppedUnifi Controller entry to the IP address of the Unifi controller under the Services > DHCP Server > Details screen for any EdgeRouters that host Unifi devices that wish to be connected to the controller.
: Add more controller setupConfigured snapshot, and start the VM againDocker host: Portainer: 8000/TCP, 9000/TCP http Web Interface http://<server.example.com>:9000 User: <User> Unifi Controller: 10001/udp, 3478/udp 6789/tcp, 8080/tcp 8443/tcp https Web Portal 8843/tcp, 8880/tcp https://<server.example.com>:8443 User: <User>
: Add network mountstdnf upgrade
tdnf clean all
reboot # If desired/needed
Reconnect and run:
# For some reason I needed to re-enable docker starting on boot? systemctl enable docker # Update Portainer: docker pull portainer/portainer # If it responds with: # Status: Downloaded newer image for portainer/portainer:latest # then run the following to update the container docker stop Portainer docker rm Portainer docker run --name Portainer --restart=always -d -p 8000:8000 -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer