Ashish Pandey
(Business Consultant)
@ashishapy
blog.ashishapy.com
One step towards microservices
Meet-up on 13th March 2016 @ Thoughtworks Pune
Services are small - fine-grained to perform a single function.
Services are easy to replace and deploy independently
One service fails, then the whole application does not have to fail
Services can be implemented using different programming languages, databases, hardware and software environment, depending on what fits best
Service
One service managed by two pizza team
Comes with complexity and new challenges
https://www.flickr.com/photos/psd/13109673843/
Microservices
Modeled around business concept
Small autonomous services
Culture of automation
Highly Observable
Isolate failure
Deploy independently
Decentralize all the things
Hide internal implementation details
Cultural change is the key
Chapter A:
Chapter B:
The Implementation Breakthrough:
Continuous Deployment, Microservices, and Containers
It's a quest to deploy often and fast, be fully automatic, accomplish zero-downtime, have the ability to rollback, provide constant reliability across environments, be able to scale effortlessly, and create self-healing systems able to recuperate from failures.
https://docs.docker.com/
Re-run commands:
Signup on hub.docker.com
Docker image hosting provider
docker images
https://www.docker.com/
docker commit command saves changes in a container as a new image.
docker commit [options] [container id] [repository:tag]
https://www.docker.com/
Pulls the image
Creates a new container
Allocates a filesystem and mounts a read-write layer
Allocates a network / bridge interface
Sets up an IP address
Executes a process that you specify
Captures and provides application output
https://www.docker.com/
Download Base Image (OS)
Install tools for the app
Download & Install the app
Expose container port to host
1
2
3
4
5
Container default command / Entry point
FROM node:argon
COPY . /usr/src/app & RUN npm install
EXPOSE 8080
1
2
3
4
5
CMD [ "npm", "start" ]
Dockerfile
A Dockerfile is a configuration file that contains instructions for building a Docker Image
We have our own image now!
Can we use it to quickly spin node-web-app?
docker run -p 80:8080 -d <username>/demo_dockerci-cd
Successfully completed Docker basics
Chapter A:
Chapter B:
Hub
Automated Workflow
Docker
Cloud
Hub
Automated Workflow
Docker
Cloud
Automated Workflow
Hub
Cloud
Docker
Automated Workflow
Hub
Cloud
Docker
Hub
Automated Workflow
Docker
Cloud
Hub
Automated Workflow
Docker
Cloud
Service
Node Cluster
Node
Node
Node
Node
Cloud VM
Cloud VM
Cloud VM
Cloud VM
cloud.docker.com
Everything have been taken care of by "Docker Cloud"
Check you should have one instance running, created by "Docker Cloud" -> "Node"
Open "Docker Cloud" "Service End Point" on browser
Push a change to Github, and monitor changes at every step.
Also check Kubernetes by Google and Apache Mesos to Manage a cluster of Linux containers
Docker on Windows
End of Virtual Machines and only Docker Containers. ex. Joyent Triton
Chip-level assists for Containers