Docker Swarm – Start Stop Node Container

In my previous blog Docker Swarm – Beginning I've started a service called "web" in global mode which runs a single instance of container on all nodes in the swarm. Now lets try to stop container/node and check the behavior. Stop container - As you can see in the below screenshot stopping a container quickly … Continue reading Docker Swarm – Start Stop Node Container

Docker Swarm – Beginning

There is already good documentation from Docker on swarm - https://docs.docker.com/engine/swarm/ In simple terms - Docker swarm is an orchestration tool to manage docker containers running on nodes ( physical or virtual servers ). We mark nodes as two types - Manager node and worker node. Manager node which does cluster management and hand over the … Continue reading Docker Swarm – Beginning

Jenkins – AWS – Ansible – Rolling Update of AMI – Part 2

As we have configured Job1 - AMI lets move to Job2 - UpdateCF. The temporary file with the AMI Id should be injected in to Job2 so that it can update cloud formation stack with the new image. Now as we are going to use ansible I've placed the code in GitHub Repo. Now in … Continue reading Jenkins – AWS – Ansible – Rolling Update of AMI – Part 2

Jenkins – AWS – Ansible – Rolling Update of AMI – Part 1

Create/Update AMI of Instances through CF - https://linuxandevops.wordpress.com/2017/06/24/aws-update-ami-through-cf-template/ But this is manual as I need to take a snapshot of EC2 Instance and update CF stack with new AMI. It is time to automate the rolling update of AMI using Jenkins and Ansible. Jenkins install and configuration documented here - https://linuxandevops.wordpress.com/2017/07/10/jenkins-install-and-plugins/ Created two jobs - … Continue reading Jenkins – AWS – Ansible – Rolling Update of AMI – Part 1

Git – Rough Notes

 Revert multiple commits - GIT REVERT -> git revert 0522aefa66c630792b8c9a1b7ffc7ecb3cdf3fd2 db91a76b404be588008f58c2152d9dd6a8745bad 789a4496542b66db86d7572254d19f8190a43055 ac1fbd98e2fae29082c90ab7cfb5e32d274e5ddd 357a955e6353535e7803db2cba17 acdaf4d80cb4 692250fd5362698a1e47176572e52df001582d27 94e83838471548c617ad1bde0bc5abaaa340f6a9 3b0654778599fc1d384f998dae27cb39b1b02518 --no-commit -> git commit -m "REVERT INCIDENT" -> git push Run below command in GIT BASH to list all the GIT BRANCHES: -> for branch in `git branch -r | grep -v HEAD`;do echo -e `git show … Continue reading Git – Rough Notes

Git – Basic++ Commands

#git log - shows the commits done on the repository along with commit id, statement, user and timestamp. More on git log and the options documented : https://www.atlassian.com/git/tutorials/inspecting-a-repository#git-log #git revert <commit-id> - revert to old commit.. In the above screen shot there is "Delete pullrequestfile.txt" with commit-id "cc6ddb....." which I've committed after deleting the file. Now … Continue reading Git – Basic++ Commands

Git – Configuration and Basic Commands – Part 3

In Part 1  we looked at Git configuration and in Part 2 - creating and cloning repository, commit and push files. In this part lets discuss about "branches".. As soon as we create a new repository either in GitHub or locally or when we clone existing repository - "master" branch will be created by default. … Continue reading Git – Configuration and Basic Commands – Part 3