User Tools

Site Tools


esxi:docker_host

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
esxi:docker_host [2020/04/15 10:03]
derek
esxi:docker_host [2024/09/22 19:51] (current)
Line 4: Line 4:
 Setup Docker on Photon OS on ESXi, and install Portainer and Unifi Controller. Setup Docker on Photon OS on ESXi, and install Portainer and Unifi Controller.
  
-  * Download the Photon OS ''OVA with virtual hardware v13'' from [[https://github.com/vmware/photon/wiki/Downloading-Photon-OS]] +{{page>esxi:photon_os#Setup&noheader}}
-  * In ESXi: +
-    * ''Create/Register VM'' +
-    * ''Deploy a virtual machine from an OVF or OVA file'' +
-    * Name the VM +
-    * Upload the Photon OS OVA file +
-    * Specify the desired ''Target Datastore'' +
-    * Accept the License Agreement +
-    * Select Deployment Options +
-    * Confirm settings +
-    *  +
-    * ''Actions'' ''Edit Settings'' +
-    * Select appropriate VM settings depending on desired applications +
-    * Use NVMe Controller for the hard disk if using NVMe storage +
-    *  +
-    * Set desired autostart setting +
-    * Run VM +
-    * Login with root details from the VM note +
-    * Set new password +
-    * Disable password expiry: ''chage -M -1 root'' +
-    * Set new hostname: ''hostnamectl set-hostname <hostname>'' +
-    * Update packages: ''tdnf upgrade'' +
-    * Enable Docker to run at startup: ''systemctl enable docker'' +
-    * Shutdown, Save ''Initial'' snapshot, and start the VM again +
-    *  +
-    * 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''+
  
 +Then set up Portainer and Unifi Controller:
 +  * Power on the VM
 +  * Using a SSH client, connect to <hostname>:50001 then run:
 +<code bash>
 +# 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
 +</code>
   * Open portainer at http://docker.example.com:9000:   * Open portainer at http://docker.example.com:9000:
     * Create account     * Create account
-    * Install [[esxi:Unifi Controller]]+    * Install the Unifi Controller:{{page>ubnt:unifi_controller#Setup&noheader&inline}}
  
   * Shutdown, Save ''Configured'' snapshot, and start the VM again   * Shutdown, Save ''Configured'' snapshot, and start the VM again
-  * Edit VM note to indicate details/running applications, e.g.:+  * Edit VM note to add the following:
 <code> <code>
-Minimal installed profile of PhotonOS 
-User: root 
- 
 Docker host: Docker host:
 Portainer: Portainer:
Line 60: Line 41:
  
 ====Update==== ====Update====
-  * If desired, Log in to ESXi, navigate to the docker VM and create new snapshot +===Update the OS=== 
-  * Connect via ssh as root to the VM and run the following: +Run ''systemctl enable docker'' after updating to re-enable docker starting on boot
-<code> +
-# Update packages: +
-tdnf upgrade +
-tdnf clean all +
-systemctl enable docker  # For some reason I needed to re-enable docker starting on boot+
-reboot  # And reconnect+
  
-# Update Portainer: +{{page>esxi:photon_os#Update&noheader}} 
-docker pull portainer/portainer + 
-# If it responds with the following+===Update Portainer=== 
-# Status: Downloaded newer image for portainer/portainer:latest+Reconnect and run: 
 +<code> 
 +# Update the Portainer image
 +docker pull portainer/portainer-ce 
 +# If it responds with: 
 +# Status: Downloaded newer image for portainer/portainer-ce:latest
 # then run the following to update the container # then run the following to update the container
 docker stop Portainer docker stop Portainer
 docker rm 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+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-ce
 </code> </code>
esxi/docker_host.1586944985.txt.gz · Last modified: 2024/09/22 19:51 (external edit)