# Installation

Comonway Stacks are qualify for Linux environment, only supported solution for Comonway production grade. Our team has developed a Windows components only for development phasis.

Comonway Gate Installation needs an Internet connection for downloading sources.

Note: If you don't have an Internet connection, Comonway purpose Installation sources for manual mode.

# Provision machine

  1. Choose a Comonway offer from Edge to Cloud hosting

  2. Prepare your machine (edge computer, bare metal server or cloud server). Comonway only support last Ubuntu LTS version.

  3. For public Comonway, provision new DNS entries at your favorite DNS Provider

  • 1x A type for the new server
  • 1x CNAME type for main subdomain/domain (ex. example.comonway.com)
  • 1x CNAME type for sub-subdomains/subdomains wildcard (ex. *.example.comonway.com)

# Get Comonway Gate

  1. Ask for a Comonway Deploy Token with username and deploy_token

  2. Clone Gate from repository

$ git clone http://<username>:<deploy_token>@gitlab.com/eyxance/comonway-gate.git

or from a specific branch

$ git clone -b <branch_name> http://<username>:<deploy_token>@gitlab.com/eyxance/comonway-gate.git
  1. Go to Comonway folder
$ cd comonway-gate

# Initialize Comonway manager

  1. Initialize Comonway manager
$ bash comonway init

# Create a new Comonway edge

# Create a new workspace

  1. Create a new workspace from an explicit hostname
$ bash comonway create <hostname>
  1. Edit .env file present in hosts/<hostname>. See Configuration File section for details.

  2. Save file

  3. Configure the new host

$ bash comonway configure

You can use https://www.allkeysgenerator.com/ for choosing password and passphrase.

Important: Don't ignore key errors. You certainly specify a incorrect passphrase.

# Install on destination host

Install Comonway Gate components with command:

$ bash comonway install

After reboot, deploy all stacks

$ cd comonway-gate
$ bash comonway deploy all

or deploy selected stack or app

$ cd comonway-gate
$ bash comonway deploy <stack_name> [<app_name>]

# Configuration File

################################################################
# Comonway Gate stack configuration
################################################################

# Choose stacks to deploy
#
# Available stacks:
# - main:           autoheal bivac dnsmasq nats portainer telegraf traefik smtp
# - admin:          influxdb phpmyadmin pgadmin
# - iot:            node-red influxdb
# - remote:         guacamole connect openvpn
# - collaborative:  gitea wikijs minio rocketchat
#
STACKS="main admin iot remote collaborative"

# Custom stack
#
# Define your custom stack present in host deploy folder
# and add custom to STACKS list above
#
CUSTOM_STACK=""

################################################################
# Global configuration
################################################################

# Docker host address
# Permit user console accessing to DOCKER_HOST
#
# Default: localhost:2375
#
DOCKER_HOST=localhost:2375

# Domain name (i.e. comonway.com)
#
# Default: local
#
DOMAIN=local

# Service domain name (i.e. example.comonway.com)
#
# Default: comonway
#
SV_DOMAIN='comonway'.$DOMAIN

# Host name (i.e. gate001.comonway.com)
#
# Default: gate
#
HOST_NAME='gate'.$DOMAIN

# Host IP address (local IP address for name resolution)
#
# Default: 127.0.0.1
#
HOST_IP=127.0.0.1

# Comonway Gate Destination is either "private" or "public"
#
# Default: private
#
DESTINATION=private

# Administrator
# Note: Password is set on configuration
#
ADMIN_USER=admin
ADMIN_EMAIL=example@comonway.com

# Log level
#
# Default: info
#
LOG_LEVEL=info

################################################################
# TLS Certificate configuration
################################################################

CERT_COUNTRYNAME=
CERT_STATENAME=
CERT_LOCALITYNAME=
CERT_ORGNAME=
CERT_UNITNAME=
CERT_PASSPHRASE=
CERT_DAYS=1095

################################################################
# Volume backup configuration
################################################################

BIVAC_LOG_LEVEL=
BIVAC_TARGET_URL=
RESTIC_PASSWORD=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=

################################################################
# InfluxDB configuration
################################################################

INFLUXDB_SERVER_URL=
INFLUXDB_TOKEN=
INFLUXDB_ORGANIZATION=
INFLUXDB_BUCKET=

################################################################
# Minio configuration
################################################################

MINIO_ACCESS_KEY=
MINIO_SECRET_KEY=

################################################################
# Docker Registry configuration
################################################################

REGISTRY_SECRET=