Showing posts with label Docker. Show all posts
Showing posts with label Docker. Show all posts

Tuesday, 3 March 2015

Running opencds service on Docker (Boot2Docker)

Running opencds service on Docker (Boot2Docker)



TODO list

1- Download Boot2Docker from:
http://docs.docker.com/installation/windows/
Install

2.- Go to opencds docker repository and select opencds-opencds:
https://registry.hub.docker.com/repos/opencds/

3.- Click on Souce Project page

4.- Copy the git url

5.- Start Boot2Docker

6.- clone the repository using the git url, for example:
git clone https://bitbucket.org/opencds/opencds-docker.git

7.- Download the following files from opencds releases, to your C:\Users folder
link https://opencds.atlassian.net/wiki/display/OP/Releases
remove the version from the name of each file, you mush have the following:

- opencds-decision-support-service.war
- opencds-knowledge-repository-data.jar (rename the extention from zip to jar)

You must place these two files inside of opencds-docker folder
cp /c/Users/DockerShare/*.* opencds-docker/

8.- Build image and run container
go to opecde-docker folder:
cd opencds-docker/

build image:
sudo docker build -t="opencds/opencds:ubuntu" .

run container:
sudo docker run -d -p 8080:8080 --name opencds opencds/opencds:ubuntu

9.- Opencds service WSDL will be available on the following path:
localhost:8080/opencds-decision-support-service?wsdl


Tuesday, 3 February 2015

Docker notes

What is docker?
- "an open platform for developers and sysadmins to build, ship, and run distributed applications" https://www.docker.com/whatisdocker/
- analogous to shipping containers where the goods are loaded in standard containers and ship to different locations
- It leverages LXC (Linux Containers). 
- It uses Linux Kernel facilities such as cGroups, namaspaces and SElinux to provide isolation between containers

Advantages
- portable deployments
     - containers are portable
     - applications can be bundled into single units
     - applications can be deployed on different linux environments without making changes
- fast application delivery
     - easy for developers and admins to collaborate and deploy applications on production
     - standard container format (developers only worry about the applications)
     - admin only worry about deploying containers into the servers
     - building a containers takes seconds
     - containers can be deployed on cloud environments, physical servers, virtual machines, etc
- use of less resources
     - containers do not use a full operational system
     - resources are lesser as compared to virtual machines     

Difference between VM and containers




Docker components
- Images
     - e.g., ubuntu or centos and with some applications already installed.  It is a read-only template
- Registries 
     - repository for Docker images (e.g., Docker hub)
- Containers 
     - execution environment for applications
     - applications and services are packaged into containers
- Docker client and server

Supported platforms
- Mac and Windows requires special wrappers such as boot2Docker and vagrant can be used for Docker deployments
- Debian
- RHEL
- SUSE
- Microsoft Azure
- Gentoo
- Amazon EC2
- Google Cloud Platform
- Arch Linux
- Rackspace
- IBM Softlayer
- Digital ocean
- FrugalWare
- CRUX Linux
- Ubuntu

Docker architecture
- Docker daemon 
     - Runs on the host machine
- Docker client
     - user interface with docker

References

Evernote helps you remember everything and get organized effortlessly. Download Evernote.