All Posts

Home Docker Server

As per the norm, I will skip the bumf and jump straight in to the process I used as you should know what you are doing, if not go off learn and come back

  1. Install Ubuntu Server 18.04 LTS:
    1. Download here: https://www.ubuntu.com
  2. If not installed during Setup, Install the following:
    1. OpenSSH Server: Instructions here
    2. Samba: Instructions here
    3. Standard Utilities: sudo apt-get install standard
    4. Udev (required for Plex & LiveTV: sudo apt-get install udev
  3. Install Docker:
    1. sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
    2. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo api-key add
    3. sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable”
    4. sudo apt-get update
    5. sudo apt-get install docker-ce
    6. sudo docker run hello-world
  4. Install Docker Compose:
    1. Check latest version here – https://github.com/docker/compose/releases and change version in next step
    2. sudo curl -L https://github.com/docker/compose/releases/download/1.24.0/docker-compose-‘uname -s’-‘uname -m’ -o /usr/local/bin/docker-compose
    3. sudo chmod +x /usr/local/bin/docker-compose
    4. sudo usermod -aG docker ${USER}
    5. type “id” hit enter and note the uid of your user & gid of docker
    6. type “cd ~ ; pwd” hit enter and note location of user directory
    7. sudo nano /etc/environment
    8. Replace/Configure “PUID” & “PGID” as listed above, “TZ” as listed here, “USERDIR” of the docker user & “MYSQL_ROOT_PASSWORD” for MariaDB and phpMyAdmin
PUID=1000
PGID=999
TZ="Europe/London"
USERDIR="/home/<USERNAME>"
MYSQL_ROOT_PASSWORD="password"
    1. Type “exit” hit enter and log back in
  1. Basic Docker & Docker Composer
    1. mkdir ~/docker
    2. sudo setfacl -Rdm g:docker:rwx ~/docker
    3. sudo chmod -R 775 ~/docker
  2. Create basic Docker Compose File
    1. nano ~/docker/docker-compose.yml
    2. Add the following:
version: "3.6"
services:

Why not check out my docker-compose.yaml here. I highly suggest installing the following:

      • Portainer – Container Management
      • Organizr – Tabbed web interface for all your container
      • NGINX – Reverse proxy
      • Watchtower – Automatic Container updating

You may also want to check out this article here on mounting external storage if you are using Plex, ZoneMinder etc

  1. Starting docker compose
    1. docker-compose -f ~/docker/docker-compose.yml up -d
Advertisements

Cannot enable post process deduplication

Event/Error: “post process deduplication cannot be enabled when the feature is disabled in the cluster.”

Run from any CVM in the cluster: ncli cluster edit-params enable-on-disk-dedup=true

Shutting down an AHV node in a Cluster

Before you begin

Shut down guest VMs that are running on the node, or move them to other nodes in the cluster.

Caution: You can only shut down one node for each cluster. If the cluster would have more than one node shut down, shut down the entire cluster.

  1. If the Controller VM is running, shut down the Controller VM.
    1. Log on to the Controller VM with SSH.
    2. Put the node into maintenance mode.
      nutanix@cvm$ acli host.enter_maintenance_mode host_ID [wait="{ true | false }" ]

      Replace host_ID with the host ID of the host.

      Specify wait=true to wait for the host evacuation attempt to finish.

    3. Shut down the Controller VM.
      nutanix@cvm$ cvm_shutdown -P now
  2. Log on to the Acropolis host with SSH.
  3. Shut down the host.
    root@ahv# shutdown -h now

Raspberry Pi3 WiFi setup

Edit /etc/network/interfaces

sudo nano /etc/network/interfaces

Add the following

auto lo
iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "ssid"
wpa-psk "password"

I was finding that my Pi running was seemingly going to “sleep” and would stop responding

Although the Pi itself doesn’t have a sleep mode, individual devices in Linux (including the network adapters) can

I ran the following to check the WiFI power save mode:

iw wlan0 get power_save

That confirmed power_save mode was indeed turned on for my WiFi so I did the following:

Edited /etc/network/interfaces

sudo nano /etc/network/interfaces

Added wireless-power off after iface wlan0 inet dhcp

Saved, exited and issued the following command

sudo ifdown wlan0 && sudo ifup wlan0

Since then, everything is fine and the network connection stays active, and I’m able to ssh into my Pi after it’s been idle for a while