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 [2019/09/17 13:50]
derek
esxi:docker_host [2024/09/22 19:51] (current)
Line 1: Line 1:
 =====Docker Host===== =====Docker Host=====
  
-Install Docker on Photon OS on ESXi+====Setup==== 
 +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 +
-    * 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 -d -p 8000:8000 -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer''+
  
-  * Open portainer at http://VM-url:9000+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:
     * Create account     * Create account
-    * Navigate to the only running container +    * Install the Unifi Controller:{{page>ubnt:unifi_controller#Setup&noheader&inline}}
-      * Rename it to Portainer +
-      * Set ''Restart policies'' to ''Always''+
  
-  * Install Unifi Controller +  * Shutdown, Save ''Configured'' snapshot, and start the VM again 
-    * Add new container +  Edit VM note to add the following: 
-    * Name > ''Unifi Controller'' +<code> 
-    Image ''jacobalberty/unifi:stable'' +Docker host
-    * Add network ports+Portainer
-      * 8080/tcp - Device command/control +8000/TCP, 9000/TCP http Web Interface 
-      * 8443/tcp - Web interface + API +http://<server.example.com>:9000 
-      * 8843/tcp - HTTPS portal +User<User>
-      * 8880/tcp - HTTP portal +
-      * 3478/udp - STUN service +
-      * 6789/tcp - Speed Test (unifi5 only) +
-      * 10001/udp - UBNT Discovery +
-    * Add Volume mapping: +
-      * ''container'' > ''/unifi'' +
-      * ''bind'' +
-      * ''host'' > ''/root/unifi'' +
-    * Add Environment variables: +
-      * ''JVM_MAX_THREAD_STACK_SIZE'' > ''1280k'' +
-      * ''TZ'' > ''<Timezone of server>'' +
-    * Restart policy > ''Unless stopped'' +
-    * Deploy the container +
-    * Access the controller at https://VM-url:8443 +
-    * [[esxi:Unifi Controller]]+
  
-  * ShutdownSave initial snapshotand start the VM again +Unifi Controller: 
-  * Edit VM note to indicate details/running applications+10001/udp3478/udp 
 +6789/tcp8080/tcp 
 +8443/tcp https Web Portal 
 +8843/tcp, 8880/tcp 
 +https://<server.example.com>:8443 
 +User: <User> 
 +</code>
   * FIXME: Add network mounts   * FIXME: Add network mounts
 +
 +====Update====
 +===Update the OS===
 +Run ''systemctl enable docker'' after updating to re-enable docker starting on boot
 +
 +{{page>esxi:photon_os#Update&noheader}}
 +
 +===Update Portainer===
 +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
 +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-ce
 +</code>
esxi/docker_host.1568728236.txt.gz · Last modified: 2024/09/22 19:51 (external edit)