WhiteHedge is New Jersey, US based company that is Docker certified consulting and training partner. WhiteHedge also has partnered with Chef and contributes to Chef OS.
Docker containers and Chef are very popular tools. Learn how to use Chef and Docker together for effective DevOps.
3. WhiteHedge
@thewhitehedgeinfo@WhiteHedge.comWhiteHedge.com/docker-microservices/
WhiteHedge
3
- HELLO
Shorten the path between Innovation and Value
WhiteHedge is an agile Product Development
company with deep experience in the Cloud
Automation, DevOps and Big Data Analytics.
Experience of building 50+ successful products across
the globe in various industries and the knowledge of
latest trends and technologies, make us stand out as
the best and the coolest software product
development company.
INTRODUCTION
4. WhiteHedge
@thewhitehedgeinfo@WhiteHedge.comWhiteHedge.com/docker-microservices/
WhiteHedge
4
WHITEHEDGE - AN OVERVIEW
Global Presence
Agile + Flexible
Thorough + Quick Learner
Competitive + Comprehensive
Honest + Transparent
Young + Mature
Innovative + Creative
More about us …
What defines us ?
California
New Jersey Rotterdam
Pune
EnvisionProducts|
Convertintobusinesses
100+employees|50+live
productsworld-wide
ThebestoftheTalentand
Infrastructure
Started2003|FocusedAgile
ProductDevelopment
Selffunded|Wellfunded|
Profitable
17. WhiteHedge
@thewhitehedgeinfo@WhiteHedge.comWhiteHedge.com/docker-microservices/
The Simple Steps
o git push to https://github.com/WHDevOpsDev/HelloScala
o Triggers a build on your CI server
• sbt docker
• docker push WHDevOpsDev/hello-scala
• knife ssh 'role:test' 'deploy.sh' -x ssh-user -i ssh-key -c knife.rb
o Build tools offer docker integration
o Eg: Maven has docker-maven-plugin
• https://github.com/spotify/docker-maven-plugin
• mvn clean package docker:build -DpushImage
18. WhiteHedge
@thewhitehedgeinfo@WhiteHedge.comWhiteHedge.com/docker-microservices/
~/github/HelloScala > sbt docker
[info] Loading project definition from
/Users/WHDevOpsDevphale/github/HelloScala/project
[info] Set current project to hello-scala (in build
file:/Users/WHDevOpsDevphale/github/HelloScala/)
[info] Creating docker image with name: 'WHDevOpsDev/hello-
scala'
:
[info] Sending build context to Docker daemon
[info] Step 0 : FROM dockerfile/java
[info] ---> 1126c85d8a06
[info] Step 1 : ADD /app/hello-scala_2.11-1.4-one-jar.jar /app/hello-
scala_2.11-1.4-one-jar.jar
[info] ---> Using cache
[info] ---> 61871958f108
[info] Step 2 : ENTRYPOINT java -jar /app/hello-scala_2.11-1.4-
one-jar.jar
[info] ---> Using cache
[info] ---> a8005b32ddc4
[info] Successfully built a8005b32ddc4
[info] Successfully built Docker image: WHDevOpsDev/hello-scala
[success] Total time: 1 s, completed Mar 3, 2015 2:10:04 PM
~/github/HelloScala > docker images | grep hello-scala
WHDevOpsDev/hello-scala latest a8005b32ddc4 12 hours
ago 715 MB
~/github/HelloScala > docker run WHDevOpsDev/hello-scala
Hello, world! #1
Hello, world! #2
Hello, world! #3
22. WhiteHedge
@thewhitehedgeinfo@WhiteHedge.comWhiteHedge.com/docker-microservices/
Push Jobs
oUse message bus (zeromq)
oClaims to attack the
scalability issue
oDeployment status is relayed
back
oNew born baby
oComplex at the moment,
ready with just the basic
foundation
Knife SSH
oParallel ssh
oSSH Protocol is slow and
CPU hungry at scale
oFeedback on deployment
status is not as easy
oBeen in the market for long
oEasy to use
How are Push Jobs different from knife-ssh?
24. WhiteHedge
@thewhitehedgeinfo@WhiteHedge.comWhiteHedge.com/docker-microservices/
Setup Workstation
o Install knife push plugin
• Gem install knife-jobs
o Knife cookbook site download push-jobs
o Extract and save to your cookbook path
o Edit the attributes file (push-jobs/attributes/default.rb)
• default['push_jobs']['package_url'] = 'https://opscode-private-
chef.s3.amazonaws.com/ubuntu/12.04/x86_64/opscode-push-jobs-client_1.1.5-
1_amd64.deb'
• default['push_jobs']['package_checksum'] =
o Upload the push-jobs cookbook to your ChefServer
36. WhiteHedge
@thewhitehedgeinfo@WhiteHedge.comWhiteHedge.com/docker-microservices/
Docker_image
# Build a docker image using docker_image resource
docker_image node['docker']['image'] do
tag node['docker']['image']['tag']
source '/var/docker'
action :build
end
# Push the image to docker registery
docker_image node['docker']['image'] do
action :push
end
# Delete the image from the machine
docker_image node['docker']['image'] do
action :remove
end