Difference between revisions of "Server instance Setup"
m |
m (→Local SMTP e-mail server) |
||
Line 31: | Line 31: | ||
* Security configuration: SMTP servers are prone to unsolicited sending if not configured tightly, spamming en-masse using Host's resources and bandwidth. | * Security configuration: SMTP servers are prone to unsolicited sending if not configured tightly, spamming en-masse using Host's resources and bandwidth. | ||
− | Instead, we are going to | + | Instead, we are going to use an SMTP server surrogate, which will provide <code>sendmail</code> services on the Host using an external Email service with a standard mailbox access. Since there is actually no SMTP server, security aspect mentioned above does not apply, while SMTP configuration aspect is handled by the external service, in this case Office365.com. |
$ sudo nano /etc/ssmtp/ssmtp.conf | $ sudo nano /etc/ssmtp/ssmtp.conf | ||
Line 53: | Line 53: | ||
Manuel.Silva.Gallego@localhost=Manuel.Silva.Gallego@brussels.msf.org:smtp.office365.com:587 | Manuel.Silva.Gallego@localhost=Manuel.Silva.Gallego@brussels.msf.org:smtp.office365.com:587 | ||
</pre></blockquote> | </pre></blockquote> | ||
− | |||
== Install Docker engine == | == Install Docker engine == |
Revision as of 18:16, 5 January 2017
Contents
Install Ubuntu Xenial on the target hosting server
The installation can be absolutely minimal; a few software packages that are required on the hosting server itself will be configured along the way. In most cases, this step will be performed by your ICT department, Internet Service Provider or the Support specialist.
Firstly, add the *nano* editor:
$ sudo apt-get install nano
Name the server and set the timezone
$ sudo nano /etc/hostname
GATITUX
$ sudo nano /etc/hosts
127.0.0.1 localhost 192.168.50.117 GATITUX.MSF.ORG GATITUX 127.0.0.1 kobo.msf.org 127.0.0.1 kc.msf.org 127.0.0.1 ee.msf.org
$ sudo dpkg-reconfigure tzdata $ sudo apt-get install ntp
Update DNS resolver, if necessary
$ sudo nano /etc/resolve.conf
search MSF.ORG nameserver 8.8.8.8
Local SMTP e-mail server
Different services running on the Host will attempt sending emails. Our own kobo-backup script, for example, will email its output through cron handler. Unattended OS upgrades will also try to email notifications, etc. System-wide sendmail
service, which is a commonplace on Unix/Linux installation, is required.
A fully functional ESMTP server, like Postfix or Exim, can be installed on the Host. Configuring ESMTP server can be a daunting task even for a professional Unix admin, and is out of the scope of this manual. In short, challenges are
- SMTP configuration: message headers, including security info, are the deciding factor for successful delivery (i.e. avoiding blacklists, rejections and spam filters)
- Security configuration: SMTP servers are prone to unsolicited sending if not configured tightly, spamming en-masse using Host's resources and bandwidth.
Instead, we are going to use an SMTP server surrogate, which will provide sendmail
services on the Host using an external Email service with a standard mailbox access. Since there is actually no SMTP server, security aspect mentioned above does not apply, while SMTP configuration aspect is handled by the external service, in this case Office365.com.
$ sudo nano /etc/ssmtp/ssmtp.conf
Root=Kobo-OCB@brussels.msf.org UseTLS=YES UseStartTLS=YES AuthUser=Kobo-OCB@brussels.msf.org AuthPass=DertVzer98 AuthMethod=LOGIN rewriteDomain=brussels.msf.org hostname=GATITUX.MSF.ORG FromLineOverride=MO Debug=NO
$ sudo nano /etc/ssmtp/revaliases
root:Kobo-OCB@brussels.msf.org:smtp.office365.com:587 vladimir.maric@localhost=vladimir.maric@mreznisistemi.rs:smtp.office365.com:587 Francois-Xavier.Dosogne@localhost=Francois-Xavier.Dosogne@brussels.msf.org:smtp.office365.com:587 Manuel.Silva.Gallego@localhost=Manuel.Silva.Gallego@brussels.msf.org:smtp.office365.com:587
Install Docker engine
The process is exceptionally straigh-forward; just a few short commands to get to the first test: hello-world container doing what it does best. For additional information, please refer to official Installation Guide for Ubuntu.
$ sudo apt-get install apt-transport-https ca-certificates $ sudo apt-get install linux-image-extra-$(uname -r) $ sudo apt-get install apparmor git docker-engine $ sudo service docker start $ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world c04b14da8d14: Pull complete Digest: sha256:0256e8a36e2070f7bf2d0b0763dbabdd67798512411de4cdcf9431a1feb60fd9 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. ...
$ sudo curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose $ docker-compose --version