Difference between revisions of "Docker"

From SME Server
Jump to navigationJump to search
Line 5: Line 5:
  
 
{{Note box| All info is based on SME Server 9 only.
 
{{Note box| All info is based on SME Server 9 only.
Your host server must have internet access.}}
+
Your host server must have internet access.
 +
All testing below has been done on a virtual SME9 under Virtualbox. Yes, Docker also run on VM's :-)}}
 
==About==
 
==About==
 
[[File:Docker_logo.png]]
 
[[File:Docker_logo.png]]

Revision as of 10:33, 8 September 2014

Warning.png Work in Progress:
This page is a Work in Progress. The contents off this page may be in flux, please have a look at this page history the to see list of changes.


Placeholder for anything to do with Docker (https://docker.com)

See: http://forums.contribs.org/index.php?topic=51095.new#new


Important.png Note:
All info is based on SME Server 9 only.

Your host server must have internet access. All testing below has been done on a virtual SME9 under Virtualbox. Yes, Docker also run on VM's :-)


About

Docker logo.png

Docker is an open-source project that automates the deployment of applications inside software containers, providing that way an additional layer of abstraction and automatization of operating system–level virtualization on Linux. Docker uses resource isolation features of the Linux kernel such as cgroups and kernel namespaces to allow independent "containers" to run within a single Linux instance, avoiding the overhead of starting virtual machines.


Considerations

  • Storage of image library
  • Storage of Docker application data
  • Networking e.g. bridged with host, new bridge with host or port mapping
  • Stand alone all-in-on docker or linked containers

Installation

We will 'abuse' SME Server as a host for Docker for now.

  • Enable the EPEL repository

yum install docker

yum install docker-io --enablerepo=epel
ln -s /etc/rc.d/init.d/e-smith-service /etc/rc7.d/S95docker
service docker start

and then

docker

to see the available command line options

Although we've linked the docker as service in runlevel 7, it will not pick up the config files /etc/sysconfig/docker. So Shipyard will not be able to connect to docker. Why?

Docker notes

For Shipyard to be able to connect to the Docker deamon, the file /etc/sysconfig/docker has to be adjusted to enable socket support and TCP.

Templated /etc/sysconfig/docker based on below db settings

/etc/sysconfig/docker:

other_args="-H tcp://127.0.0.1:4243 -H unix:///var/run/docker.sock"

127.0.0.1 (localhost) or 0.0.0.0 (public) based on db key shipyard Access

The restart the Docker deamon:

service docker restart

Loose notes:

docker=service
access=public
status=enabled

Shipyard

Shipyard is a separate GUI project hosted on Github. It will allow you to manage Docker instances and images from your browser. It is not required to use and run Docker containers, for all Docker commands can be issued from the command line.

For Shipyard to be able to manage (multiple) hosts, each and every hosts will need to have shipyard-agent installed.

Installation

Shipyard can be installed as a Docker application itself. We will use this way of installing Shipyard.

Issue the follwoing command as root:

docker run -i -t -v /var/run/docker.sock:/docker.sock shipyard/deploy setup

This will make Docker pull the various layers and images and combine it into fully functional webserver with the Shipyard application installed.


Loose notes:

shipyard=service
TCPPort=4243
access=public
status=enabled

Shipyard agent

Loose notes

shipyard-agent=service
TCPPort=8000;4500
access=public
status=enabled

Things to do