Mount SAMBA share on ubuntu

sudo apt-get install samba cifs-utils
sudo nano /home/<USERNAME>/.smbcredentials

username=guest # or whatever account credentials are required
password=guest # or whatever account credentials are required

sudo nano /etc/fstab

//<SERVER_IP>/<SHARE1>/ /mnt/nas/<SHARE1>/ cifs credentials=/home/<USERNAME)/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777 0 0

//<SERVER_IP>/<SHARE2>/ /mnt/nas/<SHARE2>/ cifs credentials=/home/<USERNAME)/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777 0 0

sudo mkdir /mnt/nas/<SAHRE1>
sudo mkdir /mnt/nas/<SHARE2>
sudo mount -a

docker-compose.yaml examples

##########
# System #
##########
version: "3.6"
services:
############
# Test/Dev #
############
##############
# ZoneMinder #
##############
  zoneminder:
    image: linuxserver/zoneminder
    container_name: zoneminder
    hostname: zoneminder
    restart: always
    depends_on:
      - mariadb
    shm_size: 4096M
    ports:
      - "8083:80"
    volumes:
      - ${USERDIR}/docker/zoneminder/config:/config
      - ${USERDIR}/docker/zoneminder/database:/data/database
      - /mnt/nas/media/CCTV/events:/data/zoneminder/events
      - /etc/localtime:/etc/localtime:ro
    environment:
      - TZ=Europe/London
      - PHP_TZ=Europe/London
      - PUID=${PUID}
      - PGID=${PGID}
##################
#  HomeAssistant #
##################
  homeassistant:
    image: homeassistant/home-assistant
    container_name: homeassistant
    hostname: hass
    restart: always
    depends_on:
      - mosquitto
      - influxdb
      - grafana
      - appdaemon
#      - nodered
#      - tasmoadmin
    devices:
      - /dev/ttyUSB0:/dev/ttyUSB0
      - /dev/ttyUSB1:/dev/ttyUSB1
      - /dev/ttyACM0:/dev/ttyACM0
    volumes:
      - ${USERDIR}/docker/homeassistant:/config
      - /etc/localtime:/etc/localtime:ro
      - ${USERDIR}/docker/shared:/shared
    ports:
      - "8123:8123"
    privileged: true
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
############
# MQTT #
############
  mosquitto:
    image: eclipse-mosquitto
    container_name: mosquitto
    restart: always
    ports:
      - "1883:1883/tcp"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/ssl:/etc/ssl:ro
      - /etc/ca-certificates:/usr/share/ca-certificates:ro
      - ${USERDIR}/docker/mosquitto-config:/mosquitto/config
      - ${USERDIR}/docker/mosquitto-data:/mosquitto/data

##############
# TasmoAdmin #
##############
#  tasmoamdin:
#    image_name:
#    container_name: tasmoadmin
#    restart: always

###########
# NodeRED #
###########
#  nodered:
#    image_name:
#    container_name: nodered
#    restart: always

############
# InfluxDB #
############
  influxdb:
    image: influxdb:latest
    container_name: influxdb
    restart: always
    volumes:
      - ${USERDIR}/docker/influxdb:/var/lib/influxdb

###########
# Grafana #
###########
  grafana:
    image: grafana/grafana:latest
    container_name: grafana
    restart: always
    depends_on:
      - influxdb
    volumes:
      - ${USERDIR}/docker/grafana:/var/lib/grafana
      - /etc/localtime:/etc/localtime:ro
    ports:
      - 3001:3000/tcp

#############
# AppDaemon #
#############
  appdaemon:
    image: acockburn/appdaemon:latest
    container_name: appdaemon
    restart: always
    ports:
      - 5050:5050
    volumes:
      - ${USERDIR}/docker/appdaemon:/conf

###############
# LetsEncrypt #
###############
#  letsencrypt:
#    image_name:
#    container_name: letsencrypt
#    restart: always

#########
# NGINX #
#########
#  nginx:
#    image: nginx:latest
#    container_name: nginx
#    restart: always
#    volumes:
#      - ${USERDIR}/docker/nginx/nginx.conf:/etc/nginx/nginx.conf
#    ports:
#      - 80:80
#      - 443:443

##########
# Active #
##########
###########
# mariadb #
###########
  mariadb:
    image: linuxserver/mariadb:latest
    container_name: mariadb
    hostname: mariadb
    restart: always
    network_mode: host
    volumes:
      - ${USERDIR}/docker/mariadb:/config
    ports:
      - "3306:3306"
    environment:
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
#############
# Portainer #
#############
  portainer:
    image: portainer/portainer:latest
    container_name: portainer
    hostname: portainer
    restart: always
    command: -H unix:///var/run/docker.sock
    ports:
      - "9000:9000"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ${USERDIR}/docker/portainer/data:/data
      - ${USERDIR}/docker/shared:/shared
    environment:
      - TZ=${TZ}
##############
# watchtower #
##############
  watchtower:
    image: v2tec/watchtower
    container_name: watchtower
    hostname: watchtower
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: --schedule "0 0 23 * * SUN" --cleanup
############
# Organizr #
############
  organizr:
    image: lsiocommunity/organizr
    container_name: organizr
    hostname: organizr
    restart: always
    volumes:
      - ${USERDIR}/docker/organizr:/config
      - ${USERDIR}/docker/shared:/shared
    ports:
      - "80:80"
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
##############
# phpmyadmin #
##############
  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    container_name: phpmyadmin
    hostname: phpmyadmin:latest
    restart: always
    links:
      - mariadb:db
    ports:
      - 82:82
    environment:
      - PMA_HOST=mariadb
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
########################
# Tranmission with VPN #
########################
  transmission-vpn:
    image: haugene/transmission-openvpn
    container_name: transmission-vpn
    restart: always
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun
    ports:
    - "9091:9091"
    dns:
      - 8.8.8.8
      - 8.8.4.4
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ${USERDIR}/docker/transmission-vpn:/data
      - ${USERDIR}/docker/shared:/shared
      - /mnt/nas/temp/torrents/watch:/data/watch
      - /mnt/nas/temp/torrents/completed:/data/completed
      - /mnt/nas/temp/torrents/incomplete:/data/incomplete
    environment:
      - OPENVPN_PROVIDER=NORDVPN
      - OPENVPN_USERNAME=YourUsername
      - OPENVPN_PASSWORD=YourPassword
      - OPENVPN_OPTS=--inactive 3600 --ping 10 --ping-exit 60
      - NORDVPN_COUNTRY=uk
      - OPENVPN_CONFIG=uk737.nordvpn.com.udp
      - CREATE_TUN_DEVICE=true
      - LOCAL_NETWORK=172.16.1.0/24,172.16.2.0/24
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - TRANSMISSION_RPC_AUTHENTICATION_REQUIRED=false
      - TRANSMISSION_RPC_HOST_WHITELIST=127.0.0.1,172.16.1.*,172.16.2.*
      - TRANSMISSION_RPC_PASSWORD=YourPassword
      - TRANSMISSION_RPC_USERNAME=YourUsername
      - TRANSMISSION_UMASK=002
      - TRANSMISSION_RATIO_LIMIT=1.00
      - TRANSMISSION_RATIO_LIMIT_ENABLED=true
      - TRANSMISSION_WATCH_DIR=/data/watch
      - TRANSMISSION_WATCH_DIR_ENABLED=true
      - TRANSMISSION_INCOMPLETE_DIR=/data/incomplete
      - TRANSMISSION_INCOMPLETE_DIR_ENABLED=true
      - TRANSMISSION_DOWNLOAD_DIR=/data/completed
      - TRANSMISSION_SPEED_LIMIT_UP=25
      - TRANSMISSION_SPEED_LIMIT_UP_ENABLED=true
      - TRANSMISSION_TRASH_ORIGINAL_TORRENT_FILES=true
      - TRANSMISSION_START_ADDED_TORRENTS=true
###############
# couchpotato #
###############
  couchpotato:
    image: linuxserver/couchpotato:latest
    container_name: couchpotato
    hostname: couchpotato
    restart: always
    volumes:
      - ${USERDIR}/docker/couchpotato:/config
      - ${USERDIR}/Downloads/completed:/downloads
      - ${USERDIR}/media/movies:/movies
      - /mnt/nas/media:/mnt/nas/media
      - /mnt/nas/temp:/mnt/nas/temp
      - ${USERDIR}/docker/shared:/shared
    ports:
      - "8082:5050"
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - UMASK_SET=002
      - TZ=${TZ}
#############
# sickchill #
#############
  sickchill:
    image: linuxserver/sickchill:latest
    container_name: sickchill
    hostname: sickchill
    restart: always
    volumes:
      - ${USERDIR}/docker/sickchill:/config
      - ${USERDIR}/docker/shared:/shared
      - /mnt/nas/media:/mnt/nas/media
      - /mnt/nas/temp:/mnt/nas/temp
    ports:
      - "8081:8081"
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
############
# tautulli #
############
  tautulli:
    image: linuxserver/tautulli
    container_name: tautulli
    hostname: tautulli
    restart: always
    volumes:
      - ${USERDIR}/docker/tautulli/config:/config
      - ${USERDIR}/docker/tautulli/logs:/logs:ro
      - /mnt/nas/media:/mnt/nas/media
      - /mnt/nas/temp:/mnt/nas/temp
      - ${USERDIR}/docker/shared:/shared
    ports:
      - "8181:8181"
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
##########
# PlexMS #
##########
  plexms:
    image: plexinc/pms-docker:plexpass
    container_name: plexms
    hostname: plexms
    network_mode: host
    restart: always
    volumes:
      - ${USERDIR}/docker/plexms:/config
      - ${USERDIR}/Downloads/plex_tmp/transcode:/transcode
      - /mnt/nas/media:/mnt/nas/media
      - /mnt/nas/temp:/mnt/nas/temp
      - /mnt/nas/hidden:/mnt/nas/hidden
      - ${USERDIR}/docker/shared:/shared
    ports:
      - "32400:32400/tcp"
      - "3005:3005/tcp"
      - "8324:8324/tcp"
      - "32469:32469/tcp"
      - "1900:1900/udp"
      - "32410:32410/udp"
      - "32412:32412/udp"
      - "32413:32413/udp"
      - "32414:32414/udp"
    environment:
      - TZ=${TZ}
      - HOSTNAME="PorterPlex"
      - PLEX_CLAIM="claim-xxxxxxxxxxxxxxxxxxxxxxxx"
      - PLEX_UID=${PUID}
      - PLEX_GID=${PGID}

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 ubuntu-standard
    4. Udev (required for Plex & LiveTV: sudo apt-get install udev
  3. Update to ensure everything is the latest
    1. sudo apt-get update
    2. sudo apt-get upgrade

Continue reading “Home Docker Server”

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