How can we help?




Follow

CoS Installation

Stewart -

 

PROBLEM

How can I install CoS (Class of Service)?

ENVIRONMENT

  • atmail CoS

CAUSE

Requirement to install CoS.

RESOLUTION

Installation

Pre-requests

Class of Service (Cos) servers need following dependencies.

  • Consul - For service discovery
  • Mysql - For CoS data storage
  • Redis - Communicate to storeman

Install Consul

To install the precompiled binary, download the appropriate package for your system. Consul is currently packaged as a zip file.

Once the zip is downloaded, unzip it into any directory. The consul binary inside is all that is necessary to run Consul. Any additional files, if any, aren't required to run Consul.

Place the binary in /usr/local/bin

For testing, quick start consul by run command consul agent -dev

Install CoS Services

For upgrading CoS from previous version, please refer to Upgrade CoS from v1.x to v2.x.

Download

Login to your pre-existing atmail customer portal account. Download the atmail CoS software packages from within the atmail client portal.

Install

Install downloaded package via yum.

yum install atmail-cosadm-<version>.x86_64.rpm -y -q

After yum install, edit config file /etc/atmail/cosd/cosadm.yaml. (Refer to Configuration section).

Start the service from command line.

#cosadm --config=/etc/atmail/cosd/cosadm.yaml

Update Database Schema

CoS shares it's database with mailserver. Please use CoS Database Schema v2.1.x to update mailserver database.

This step must be done after mail server rpm package has been installed/upgraded to 8.7.x+, otherwise the mailserver database may not ready yet to apply the patch.

Configure CoS

cosadm will load configuration from the file /etc/atmail/cosd/cosadm.yaml.

flag name
description
default value
mysql_dsn MySQL database DSN, format user:pass@tcp(host:port)/dbname  
verbose Verbose mode, force print debug level log false
syslog Force log to syslog fasle
auth Basic auth credential. format username:password  
listen Address and port for gPRC service :9002
listen_http Address and port for HTTP/REST service :9003
enable_cloud Enable cloud multi-tenant feature. For on-prem installatioin, this should set to false false
log_level Log Level (panic,fatal,error,warn,info,debug,trace) info

Below is a sample of this file.

mysql_dsn: root:changeme@tcp(localhost:3306)/mailserver
verbose: false
syslog: true
auth: admin:changeme
redis_addr: localhost:6379
listen: :9002
listen_http: :9003

Initialize Database

A virtual customer need be created before CoS can be used. To perform the initialization, please run below command from console:

# cosadm init-onprem
Above command should output `Initialization succeeded`

Start CoS Service

# systemctl restart atmail-cosadm

Configure Mail Server to Access CoS

Login to mail server admin panel, go to and check Settings > Global Settings: make sure COS API username/password match the settings in /etc/atmail/cosd/cosadm.yaml.

Have more questions? Submit a request

Comments


Contact our support team


+61 (7) 5357 6605       support@atmail.com