docker and container technology []

Post on 19-Jan-2016

221 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Docker and Container Technology

[www.docker.com]

Docker• Docker is a container virtualization technology that offers the promise

of a more efficient, lightweight approach to application deployment.

• With a traditional virtualization hypervisor like VMware ESX, Microsoft Hyper-V or the open-source Xen and Kernel-based Virtual Machine (KVM) technologies, each virtual machine (VM) needs its own operating system

• Although Docker is a relatively new effort that got under way in March 2013, the project has matured quickly and the Docker 1.0 milestone was released on June 9,

• Docker initially code on python, later by “go” programming language developed by Google.

Docker ….• Docker Hub, which is a repository for what are known as

"dockerized" applications that can be deployed to any Docker host.

• Some of the world's largest technology vendors, including IBM, Microsoft, Google, Amazon and Red Hat, support Docker.

• Docker containers wrap up a piece of software in a complete filesystem that contains everything it needs to run: code, runtime, system tools, system libraries – anything you can install on a server.

Need of container

• Since a hypervisor or full virtualization mechanism emulates the hardware, you can run any operating system on top of any other, Windows on Linux.

• Both the guest operating system and the host operating system run with their own kernel and the communication of the guest system with the actual hardware is done through an abstracted layer of the hypervisor

Container Virtualization

• Hypervisor based virtualization is usually slower and incurs significant performance overhead due to the hardware emulation.

• To reduce this overhead, another level of virtualization called "operating system virtualization" or "container virtualization" was introduced which allows running multiple isolated user space instances on the same kernel.

What are containers• Containers are the products of operating system

virtualization.

• Provide a lightweight virtual environment that groups and isolates a set of processes and resources such as memory, CPU, disk, etc., from the host and any other containers.

• The isolation guarantees that any processes inside the container cannot see any processes or resources outside the container.

Container Virtualization• The difference between a container and a full-fledged

VM is that all containers share the same kernel of the host system.

• Each virtual machine includes the application, the necessary binaries and libraries and an entire guest operating system - all of which may be tens of GBs in size.

• This gives them the advantage of being very fast with almost performance overhead compared with VMs.

Container…• Containers include the application and all of its

dependencies, but share the kernel with other containers.

• They run as an isolated process in user space on the host operating system.

• They’re also not tied to any specific infrastructure – Docker containers run on any computer, on any infrastructure and in any cloud.

Docker installation steps, Ubuntu14.04 LTS

• http://www.liquidweb.com/kb/how-to-install-docker-on-ubuntu-14-04-lts/– sudo apt-get update– sudo apt-get install docker.io– sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker– sed -i '$acomplete -F _docker docker'

/etc/bash_completion.d/docker.io– update-rc.d docker.io defaults– docker pull ubuntu //download docker container– docker run -i -t ubuntu /bin/bash //run container

Container applications

• Run hello world on container– https://docs.docker.com/userguide/dockerizing/– docker run -t -i ubuntu:14.04 /bin/bash– docker run ubuntu:14.04 /bin/echo 'Hello world‘– docker run -d ubuntu:14.04 /bin/sh -c "while true; do

echo hello world; sleep 1; done“ >> daemonized– /bin/sh -c "while true; do echo hello world; sleep 1; done"

• Building simple apache web server on container– https://access.redhat.com/articles/1328953– http://slopjong.de/2014/09/17/install-and-run-a-web-ser

ver-in-a-docker-container/

Basic commands

• docker info• Docker search ubuntu• Docker images• Docker ps• docker start $ID //container id• Docker stop $ID• docker restart $ID• docker logs $ID //look logs of container• docker rm `docker ps -a -q` //delete all stoped container• See more details:

http://neependra.net/docker/rootconfWorkshop.html

Assessment

Assessment• Attempt Any Two Questions (Time: 40 Minutes)

1. What are the varieties of Client-Server Model? How is it differ from Peer-2-Peer model?

2. Discuss the working principle of HDFS for reading and writing a file.

3. What are the CORBA services? Explain the static and dynamic invocation of remote methods standardized in CORBA.

4. What are the principle differences between NTP and Cristain’s clock synchronization algorithm? How NTP works?

5. What is the purpose of state recording? How do you perform global state recording in the distributed environment?

top related