Category Archives: Agile Practices

Learn freely Basics of Agile/DevOps/AWS

Folks, Greetings and welcome to this Group.

Through this group you can learn the following by self/free [there are several videos from the past sessions of IT working professionals]:

https://www.facebook.com/groups/817762795246646/announcements/

1. The concepts of Agile/Scrum
2. The concepts of DevOps
3. Git/Jenkins/Docker Installation/operation
4. AWS Basics.
1. Apart from the above learning, if you want to try the latest Cloud/DevOps positions in the global market these are not enough in the current global IT market for Cloud/DevOps Role.
2. You need to learn the complete Infrastructure design activities and its implementation. After that you need to learn the IAC Code writing. 3. Then you need to learn the Cloud related DevOps processes/tools towards deployment. You also need to learn the Kubernetes [K8] which is there for Containers Orchestration and for cluster management in Cloud and this is future focus to save the infra/deployment cost in IT. 4. All these will be coached in my advanced Course. 5. To know these details, please visit the blogs/video in URL: https://vskumar.blog/…/the-goals-for-cloud-and-devops-arch…/.
6. Interested people can contact me to join the course after studying the blogs/video in depth.
7. Please note; this is not a typical training. You will be working as a project team member to do the project tasks and give a demonstration.
8. We also evaluate the people on their keen learning/hardwork/grasping power/flexibility/adoptability/self learning.
9. This course will go upto 6 months on a weekly 4-6 hours of my sessions duration and your 10+ of self practice efforts on project tasks.
10. You will be delivering weekly some POCs along with the other members.

The above points were presented in a video also:

Good luck in your Cloud/DevOps Journey.

DevOps: What are the Differences between containers and VMs ?

What are the Differences between containers and VMs ?

During Deployment activity phase the environment building is part of the DevOps practices.

In traditional method we used to spend lot of time for this task. But when it came with VMs and containers, it is easy and in minutes the environments can be prepared using the IAC.

The containers became very popular for building the test environments. Let us say you want to build a MYSQL server, the solutions is; simply try to understand its environment and pull one Docker image which has the MYSQL. Then use it in that network environment.

When we talk about the VMs and Containers one need to understand their differences. I have made a video for learners:

If you are a Docker learner, then try to build the MYSQL container from the below specifications:

DevOps: Advanced DevOps Practices/Processes-2 [DevSecOps]

In continuation of my previous blog on; DevOps:Advanced DevOps Practices/Processes-1:
Following are the some of the DevOps concepts, a Practitioner need to practice.

What is the goal of DevSecOps?

The goal of DevSecOps is to decrease time to market while cutting the costs of development and remediation, while improving overall application security.

How it can be performed ?:

If the appropriate, automated security vulnerability and configuration scanning tools are deployed, developers with varying skill sets and experience can find and fix security problems as they occur.

How to motivate developers?:

Teaching developers on secure coding practices is still essential,  as it is monitoring and protecting the production environment.

How to achieve it?:

By integrating automated application security testing as part of the moving into DevSecOps practices, teams can complete a DevOps security checking that addresses the challenges associated with developing secure applications in agile environments.

How to apply checkpoints?:

There are tools to verify the above checks.

I have discussed some of the relevant points on this subject in the below video session:

DevOps: Advanced DevOps Practices/Processes-1

DevOps:Advanced DevOps Practices/Processes-1:
Following are more than the DevOps concepts, a Practitioner need to practice. So we can call them as part of Advanced DevOps practices also.

I have made a material and a discussion video which answers the below questions topic wise.

  1. What are the DevOps Loop activities ?
  2. What are the DevOps Patterns and Practices as per the Gartner ?
  3. What are the processes ?
  4. What is Culture in DevOps ?
  5. What is Technology ?
  6. Who are the People ?
  7. What are the bodies of Knowledge in DevOps in view of Agile and Scrum ?
  8. How the IT service management [ITSM] can be aligned with DevOps/Agile ?
  9. How the Quality Management Systems [QMS] can be connected with DevOps ?
  10. How the Automated testing life cycle can be connected ?
  11. How the Cloud Security is connected with DevOps ?
  12. How the Microservices and SOA are connected with DevOps ?
  13. What is Site Reliability Engineering [SRE] and how it is connected with DevOps ?
  14. What is Continuous Delivery Matrix Index [CDI] in DevOps ?
  15. How the CDI is connected with 5 maturity levels during practices ?

The attached Video has the discussions on the above topics.

 

For course:

  1. This is for OPTs and the Indian colleges fresh graduates who came/passed out in 2019.

  2. who are self driven and try for jobs with the given skills learning without getting into somebody shoes, come and get trained.

  3. A new batch is planned in a cost effective way. Contact in the given FB links from the blog. Good luck in your job search and in IT profession.

For specimen sessions you can watch the below videos:

  1. Agile: What are Agile manifesto Principles & How they can be used for SW ?
    https://www.facebook.com/328906801086961/videos/617149372179077/
  2. Agile: What are the phases of Agile Project ?
    https://www.facebook.com/328906801086961/videos/183496779674097/
  3. Agile: What is Disciplined Agile Delivery[DAD] ?
    https://www.facebook.com/328906801086961/videos/184822556096397/
  4. Agile: What is Model Storming ?
    https://www.facebook.com/328906801086961/videos/493982721500147/
  5. Agile: What is Scrum Framework and its roles ?
    https://www.facebook.com/328906801086961/videos/878197645967794/

Free-orientation-for Freshers-2019

Join in the below group to follow the above guidelines:

https://www.facebook.com/groups/817762795246646/

This group is meant only for freshers/OPTs coaching on the topics mentioned in the group Logo. You can forward to your circles who all came out from college for 2019. They need to provide evidences as they are from 2019 batch only. The FB ID need to have photo with profile details. With these specs only they are allowed in this group.

For course: This is for OPTs and the Indian college graduate who came/passed out in 2019. who are self driven and try for jobs with the given skills learning without getting into somebody shoes, come and get trained. A new batch is planned in a cost effective way. Contact in the given FB links from the blog. Good luck in your job search and in IT profession.

https://www.linkedin.com/jobs/aws-jobs/

DevOps: What is the feedback analysis?

What is the feedback analysis? When it can be done?

As per the agile principles the stakeholder collaboration is an ongoing activity. At any time the stakeholder can give informal or formal feedback for any software items or in any approach followed by agile teams.

In agile model many times informal feedback can happen during the discussion. At the same time the scheduled reviews also can happen. During the review the feedback can be given by the reviewers.

Even a test result can come into a feedback category. All these feedback items need to be analyzed for delivering a working software by the teams as per the principles. 

Sometimes the feedback analysis outcome can come into process improvements areas for the next iteration and these should be considered for Retrospective items.

Hence the feedback analysis is a mandated activity at every task completion stage in  Agile project.

 

Do you want to know the difference between AWS Solution Architect Associate?

The DevOps Engineer Professional certification what Amazon conduct ?

Why do you need AWS Architect solutions experience to do this certification ?

Contact for AWS DevOps Engineer – Professional certification. Very few people globally covering the complete syllabus like I have explained from the AWS Exam guide. If interested please ping me in FB with your profile URL. Please note I coach only the global working IT Professionals. Hence Profile URL is mandated to know your background.

=== You can see the following content also ====>

Why DevOps and What are its phases and Activities ?

Why DevOps and What are its phases and Activities ?
From this Discussion video, you can learn the below items:
Before Devops:
1. What were the typical issues with IT operations ?
2. How was it; the performance of IT operations ?
3. What was the typical traditional IT operation with roles?
With DevOps:
4. Where it started the DevOps movement ?
5. Why the DevOps became part of Agile?
6. What are the Practices and Culture in DevOps ?
7. How the Agile SDLC with DevOps can be seen under its practices ?
8. How we can see; before DevOps and after DevOps the people and organizations ?
9. How the DevOps imporved the organization Culture ?
10. What are the business benefits with DevOps ?
11. What the industry reports say with DevOps movement ?
12. What are the phases of DevOps Loop ?
13. What are the activities of each DevOps phase ?
14. How the automated installations and deployments can be implemented with DevOps ?

Contact for AWS Certified DevOps Engineer Professional Exam coaching.

Visit the above page for some more DevOps videos.

To know the DevOps  Practices and Patterns in a discussion  I got the below video link:

<—– FINAL NOTE FOR YOU ——-> 

Please note this is going to be methodical coaching with lot of process related scenarios for each sub-topics as per the AWS Certification course contents. Hence we have our USP to differentiate with many others on this coaching. We consider very limited/selective people. Hence sharing you linkedin profile is mandatory. You can connect me there.  Before coming please watch all the videos on this webpage and also on youtube channel [Shanthi Kumar V]. We take care of each IT working professional for their career growth well in this competent world to beat the fake profiles well during the job/client interviews. This is the unique services provided by us well in this IT training/coaching industry. We want the existing IT Professionals to continue their ladder climbing.

————————————————————->

Ping me on FB  msg:

https://www.facebook.com/shanthikumar.vemulapalli

AWS-SAA-coaching for Test Analysts

In the below video I have explained on the activities and tasks of DevOps roles. I have explained in it why that task should be done by that role. How the Developers, Test engineers, DevOps Engineers, Users and Ops Engineers are connected to work together as a team, as per Agile manifesto. One can get clear idea on DevOps implementation. To automate these tasks DevOps tools are very much required. Hence now the DevOps market is running behind the tools.

Below image can denote the transition of IT development cycles till DevOps practice with continuous operation [automated]:

 

DevOps Movement

Visit for next series of DevOps FAQs: https://wordpress.com/post/vskumar.blog/1684

Visit for series of Agile interview questions:

https://vskumar.blog/2017/09/04/sdlc-agile-interview-questions-for-freshers-1/

 

Also, Look into some more FAQs:

https://vskumar.blog/2018/12/29/devops-practices-faqs-2-devops-practices-faqs/

https://vskumar.blog/2019/02/01/devops-practices-faqs-3-domain-area/

DevOps: What is DevOps security ?

You will be able to learn the below FAQs from this video lesson:

  1. What is DevOps security ? 
  2. Why do you need it ?
  3. Why do you need to declare IAC as security policy ?
  4. How to instill the separate roles for secuirty in DevOps ?
  5. How to Focus on Flow and Velocity ?
  6. How the CI/CD helps ?
  7. How the Kanban systems helps ?
  8. How to de-construct applications into Microservices towards security ?
  9. How to treat security as a 1st Class Citizen in DevOps ?
  10. How to automate DevOps Security ?
  11. How to embrace new technologies through existing platforms ?

Do you want to know the difference between AWS Solution Architect Associate? and The DevOps Engineer Professional certification what Amazon conduct ?

Why do you need AWS Architect solutions experience to do this certification ?

Contact for AWS DevOps Engineer – Professional certification. Very few people globally covering the complete syllabus like I have explained from the AWS Exam guide. If interested please ping me in FB with your profile URL. Please note I coach only the global working IT Professionals. Hence Profile URL is mandated to know your background.

=== You can see the following content also ====>

Why DevOps and What are its phases and Activities ?

Why DevOps and What are its phases and Activities ?
From this Discussion video, you can learn the below items:
Before Devops:
1. What were the typical issues with IT operations ?
2. How was it; the performance of IT operations ?
3. What was the typical traditional IT operation with roles?
With DevOps:
4. Where it started the DevOps movement ?
5. Why the DevOps became part of Agile?
6. What are the Practices and Culture in DevOps ?
7. How the Agile SDLC with DevOps can be seen under its practices ?
8. How we can see; before DevOps and after DevOps the people and organizations ?
9. How the DevOps imporved the organization Culture ?
10. What are the business benefits with DevOps ?
11. What the industry reports say with DevOps movement ?
12. What are the phases of DevOps Loop ?
13. What are the activities of each DevOps phase ?
14. How the automated installations and deployments can be implemented with DevOps ?

Contact for AWS Certified DevOps Engineer Professional Exam coaching.

Visit the above page for some more DevOps videos.

To know the DevOps  Practices and Patterns in a discussion  I got the below video link:

<—– FINAL NOTE FOR YOU ——-> 

Please note this is going to be methodical coaching with lot of process related scenarios for each sub-topics as per the AWS Certification course contents. Hence we have our USP to differentiate with many others on this coaching. We consider very limited/selective people. Hence sharing you linkedin profile is mandatory. You can connect me there.  Before coming please watch all the videos on this webpage and also on youtube channel [Shanthi Kumar V]. We take care of each IT working professional for their career growth well in this competent world to beat the fake profiles well during the job/client interviews. This is the unique services provided by us well in this IT training/coaching industry. We want the existing IT Professionals to continue their ladder climbing.

————————————————————->

Ping me on FB  msg:

https://www.facebook.com/shanthikumar.vemulapalli

AWS-SAA-coaching for Test Analysts

In the below video I have explained on the activities and tasks of DevOps roles. I have explained in it why that task should be done by that role. How the Developers, Test engineers, DevOps Engineers, Users and Ops Engineers are connected to work together as a team, as per Agile manifesto. One can get clear idea on DevOps implementation. To automate these tasks DevOps tools are very much required. Hence now the DevOps market is running behind the tools.

Below image can denote the transition of IT development cycles till DevOps practice with continuous operation [automated]:

DevOps Movement

Visit for next series of DevOps FAQs: https://wordpress.com/post/vskumar.blog/1684

Visit for series of Agile interview questions:

https://vskumar.blog/2017/09/04/sdlc-agile-interview-questions-for-freshers-1/

Also, Look into some more FAQs:

https://vskumar.blog/2018/12/29/devops-practices-faqs-2-devops-practices-faqs/

https://vskumar.blog/2019/02/01/devops-practices-faqs-3-domain-area/

AWS Certified DevOps Engineer – Professional course

Folks, Greetings; I am starting a new batch – coaching for “AWS Certified DevOps Engineer – Professional” if you are interested please contact privately. Please note your Linkedin profile share is mandated for my coaching to know you better. In the 1st instance don’t ask—> impractical question “How much is the fees ?” instead of seeing the available stuff !  and coming to a call.
See the quality of the coaching from my Blogs/Videos, etc.. and come to a call. Thanks for understanding. I appreciate the guys who all joined for my classes and I say good luck in their professional growth.
 
Go to my youtube channel [Shanthi Kumar V] and blog site [vskumar.blog] also for DevOps. I want the people to see 1st my videos/blogs and if they satisfied only, I will have call with them. I don’t pressure them for my course… like sales guys!! Hope you got it!

Watch the Course Curriculum discussion as AWS defined:

It has the answers for the below questions;

Do you want to know the difference between AWS Solution Architect Associate?

The DevOps Engineer Professional certification what Amazon conduct ?

Why do you need AWS Architect solutions experience to do this certification ?

Contact for AWS DevOps Engineer – Professional certification. Very few people globally covering the complete syllabus like I have explained from the AWS Exam guide. If interested please ping me in FB with your profile URL. Please note I coach only the global working IT Professionals. Hence Profile URL is mandated to know your background.

=== You can see the following content also ====>

Why DevOps and What are its phases and Activities ?

Why DevOps and What are its phases and Activities ?
From this Discussion video, you can learn the below items:
Before Devops:
1. What were the typical issues with IT operations ?
2. How was the performance of IT operations ?
3. What was the typical traditional IT operation with roles?
With DevOps:
4. Where it started the DevOps movement ?
5. Why the DevOps became part of Agile?
6. What are the Practices and Culture in DevOps ?
7. How the Agile SDLC with DevOps can be seen under its practices ?
8. How we can see; before DevOps and after DevOps the people and organizations ?
9. How the DevOps improved the organization Culture ?
10. What are the business benefits with DevOps ?
11. What the industry reports say with DevOps movement ?
12. What are the phases of DevOps Loop ?
13. What are the activities of each DevOps phase ?
14. How the automated installations and deployments can be implemented with DevOps ?

Contact for AWS Certified DevOps Engineer Professional Exam coaching.

Visit the above page for some more DevOps videos.

To know the DevOps  Practices and Patterns in a discussion  I got the below video link:

<—– FINAL NOTE FOR YOU ——-> 

Please note this is going to be methodical coaching with lot of process related scenarios for each sub-topics as per the AWS Certification course contents. Hence we have our USP to differentiate with many others on this coaching. We consider very limited/selective people. Hence sharing you linkedin profile is mandatory. You can connect me there.  Before coming please watch all the videos on this webpage and also on youtube channel [Shanthi Kumar V]. We take care of each IT working professional for their career growth well in this competent world to beat the fake profiles well during the job/client interviews. This is the unique services provided by us well in this IT training/coaching industry. We want the existing IT Professionals to continue their ladder climbing.

————————————————————->

Ping me on FB  msg:

https://www.facebook.com/shanthikumar.vemulapalli

AWS-SAA-coaching for Test Analysts

In the below video I have explained on the activities and tasks of DevOps roles. I have explained in it why that task should be done by that role. How the Developers, Test engineers, DevOps Engineers, Users and Ops Engineers are connected to work together as a team, as per Agile manifesto. One can get clear idea on DevOps implementation. To automate these tasks DevOps tools are very much required. Hence now the DevOps market is running behind the tools.

Below image can denote the transition of IT development cycles till DevOps practice with continuous operation [automated]:

DevOps Movement

Visit for next series of DevOps FAQs: https://wordpress.com/post/vskumar.blog/1684

Visit for series of Agile interview questions:

https://vskumar.blog/2017/09/04/sdlc-agile-interview-questions-for-freshers-1/

Also, Look into some more FAQs:

https://vskumar.blog/2018/12/29/devops-practices-faqs-2-devops-practices-faqs/

https://vskumar.blog/2019/02/01/devops-practices-faqs-3-domain-area/

Why DevOps and What are its phases and Activities ?

Why DevOps and What are its phases and Activities ?

Why DevOps and What are its phases and Activities ?
From this Discussion video, you can learn the below items:
Before Devops:
1. What were the typical issues with IT operations ?
2. How was it; the performance of IT operations ?
3. What was the typical traditional IT operation with roles?
With DevOps:
4. Where it started the DevOps movement ?
5. Why the DevOps became part of Agile?
6. What are the Practices and Culture in DevOps ?
7. How the Agile SDLC with DevOps can be seen under its practices ?
8. How we can see; before DevOps and after DevOps the people and organizations ?
9. How the DevOps imporved the organization Culture ?
10. What are the business benefits with DevOps ?
11. What the industry reports say with DevOps movement ?
12. What are the phases of DevOps Loop ?
13. What are the activities of each DevOps phase ?
14. How the automated installations and deployments can be implemented with DevOps ?

Contact for AWS Certified DevOps Engineer Professional Exam coaching.

Ping me on FB  msg:

https://www.facebook.com/shanthikumar.vemulapalli

AWS-SAA-coaching for Test Analysts

In the below video I have explained on the activities and tasks of DevOps roles. I have explained in it why that task should be done by that role. How the Developers, Test engineers, DevOps Engineers, Users and Ops Engineers are connected to work together as a team, as per Agile manifesto. One can get clear idea on DevOps implementation. To automate these tasks DevOps tools are very much required. Hence now the DevOps market is running behind the tools.

Below image can denote the transition of IT development cycles till DevOps practice with continuous operation [automated]:

 

DevOps Movement

Visit for next series of DevOps FAQs: https://wordpress.com/post/vskumar.blog/1684

Visit for series of Agile interview questions:

https://vskumar.blog/2017/09/04/sdlc-agile-interview-questions-for-freshers-1/

Also, Look into some more FAQs:

https://vskumar.blog/2018/12/29/devops-practices-faqs-2-devops-practices-faqs/

https://vskumar.blog/2019/02/01/devops-practices-faqs-3-domain-area/

DevOps Practices & FAQs -4[ for DevOps and Test Engineers]

During DevOps, you will have Test engineer and DevOps engineer roles. Typically these two roles need to work collaboratively to identify and classify the issues.

How the Test Engineers need to monitor the activities or tasks ?

How the DevOps engineer can catch the IAC issues ? [Those are the environmental issues].

To get the answers; both of these roles need to understand the Test monitoring activities in depth.

The attached video talks on those tasks.

 

Note:

Just I pulled my ISTQB Advanced Test Analyst class video to educate the DevOps Group.

If some of you do not know these two roles tasks during DevOps, please visit the below video:

in this video I have explained on the activities and tasks of DevOps roles. I have explained in it why that task should be done by that role. How the Developers, Test engineers, DevOps Engineers, Users and Ops Engineers are connected to work together as a team, as per Agile manifesto. One can get clear idea on DevOps implementation. To automate these tasks DevOps tools are very much required. Hence now the DevOps market is running behind the tools.

Contact for AWS Certified DevOps Engineer Professional Exam coaching.

 

Below image can denote the transition of IT development cycles till DevOps practice with continuous operation [automated]:

 

DevOps Movement

 

Visit for next series of DevOps FAQs: https://wordpress.com/post/vskumar.blog/1684

Visit for series of Agile interview questions:

https://vskumar.blog/2017/09/04/sdlc-agile-interview-questions-for-freshers-1/

 

Also, Look into some more FAQs:

https://vskumar.blog/2018/12/29/devops-practices-faqs-2-devops-practices-faqs/

https://vskumar.blog/2019/02/01/devops-practices-faqs-3-domain-area/

DevOps Practices & FAQs -3 [Domain area]

For your DevOps job interviews coaching contact in FB.

Please note pre-requisites:
You should have attended/practiced tools sessions already.

 

Please read the previous FAQs series also: Devops-practices-faqs-1

https://vskumar.blog/2018/12/29/devops-practices-faqs-2-devops-practices-faqs/

faqs-devops-eng-network-knowedge

Visit for free concepts learning:

To join DevOps Practices group visit:

https://www.facebook.com/groups/1911594275816833/about/

To join Cloud Practices group visit:

https://www.facebook.com/groups/585147288612549/about/

 

 

If you want to know the above knowledge visit the below class video:

 

 

https://www.facebook.com/groups/1911594275816833/about/

FB-DevOps-Practices Group-page

Following videos are made to elaborate on the need and advantages of thinking on conversion into DevOps Practices by IT Companies and the Professionals. Comparative reports have been incorporated.

 

 

Advertising3

DevOps Practices & FAQs -2

Please read the previous FAQs series also: Devops-practices-faqs-1

And the next one: https://vskumar.blog/2019/02/01/devops-practices-faqs-3-domain-area/

AWS-SAA-Course

1. Who can become DevOps Engineer ?

In traditional projects [Non Agile practiced projects] ; Build Engineers, Sys Admins, Release Engineers can convert their career into DevOps Engineer role through an Agile practiced IT organization.

In Agile projects we might have seen Build or Deployment Engineers; they can convert into DevOps Engineer roles.

2. What a desired ‘DevOps Engineer role professional’ need to learn ?

If somebody would like to convert their role into DevOps Engineer; they need to understand the following :

  1. Agile and Scrum or Lean practices
  2. DevOps Principles, practices and patterns
  3. Deployment, SCM  and Release management process
  4. Version control System tools [Ex: Git, SVN, etc..]
  5. Cloud setup and deployment [Ex: AWS, Azure,Google Cloud, Alibaba, etc..]
  6. Packaging process and tools [Ex: Maven, Gradle, etc.]
  7. Continuous Integration Tools [Ex: Jenkins, Teamcity,  etc.]
  8. Software Configuration Management [SCM]  tools [Ex: Ansible,  Chef, Puppet, etc.]
  9. Containerization [Docker]
  10. Some of the scripting languages [Ex: Shell, Bash, python, Ruby, Nodejs, etc.]
  11. Windows, Linux OS commands and operations.

They can learn incrementally also depends on the project need. Note all projects will not use the unique tools. Depends on the IT organization plans, practices and the environments they decide on choosing the vendor based or open source tools.

Note: Some of the famous tools only it has been mentioned. Hence one need to identify the customer project environment and their DevOps architecture also. If one understands the Basic process in their 1st learning phase, later on they can pickup faster.

If you want to learn DevOps Practices, join the below group:

https://www.facebook.com/groups/1911594275816833/about/

FB-DevOps-Practices Group-page

Following videos are made to elaborate on the need and advantages of thinking on conversion into DevOps Practices by IT Companies and the Professionals. Comparative reports have been incorporated.

 

 

Advertising3

 

Visit my current running facebook groups for IT Professionals with my valuable discussions/videos/blogs posted:

 

DevOps Practices Group:

https://www.facebook.com/groups/1911594275816833/about/

 

Cloud Practices Group:

https://www.facebook.com/groups/585147288612549/about/

 

Build Cloud Solution Architects [With some videos of the live students classes/feedback]

https://www.facebook.com/vskumarcloud/

 

 

MicroServices and Docker [For learning concepts of Microservices and Docker containers]

https://www.facebook.com/MicroServices-and-Docker-328906801086961/

DevOps Practices coaching

Coaching on DevOps Practices —–>

This coaching is meant for DevOps Managers and above positions only…

  1. Please walk-through the below chart for your DevOps practices implementation. These are nowhere connected with any specific DevOps tools. Just practices implementation only to show your velocity in DevOps complianced projects execution.  
  2. These are the best practices used by the DevOps successful implementation organizations.
  3. Who need to learn these?: If you are already working as DevOps professional, [Ex: DevOps engineer, Practitioner, Architect, Practice head, Related to DevOps implementation, etc.] and your organization is demanding/targeted to demonstrate its [DevOps implementation] velocity then you need to accelerate your speed in catching up the knowledge on several areas for  continuous improvements.
  4. Note; you also need to apply continuous learning or seek coaching to speedup your productivity through experienced professionals.

Visit for free concepts learning:

To join DevOps Practices group visit  [CONDITIONS APPLY]:

https://www.facebook.com/groups/1911594275816833/about/

To join Cloud Practices group visit [CONDITIONS APPLY]:

https://www.facebook.com/groups/585147288612549/about/

DevOps Patterns

Note:

Please note this course doesn’t contain Tools. Only Practices.

There is a separate topic “DevOps Automation”, you need to attend it.

If you are qualified you can join the below group also.

https://vskumar.blog/2018/10/17/join-devops-practices-group-on-fb/

If you are  new for DevOps, visit:

https://vskumar.blog/2017/10/22/why-the-devops-practice-is-mandatory-for-an-it-employee/

You can also visit:

https://vskumar.blog/2019/07/24/devops-advanced-devops-practices-processes-1/

19. DevOps:How to upload your docker image to your dockerhub account ?

Docker-logo

How to upload your docker image to your dockerhub account from Ubuntu  ?

In my previous session, we have created the MySQL docker image.

Now let us assume, we need to move into a private registry of dockerhub to save it.

In this exercise we will see:
1. How to use dockerid and tag the image ?
2. How to list the images with dockerid ?
3. How to login to dockerhub with your id ?
4. How to upload your docker image to your docker account and registry ?

Pre-requisites: You need to have your dockerid from https://hub.docker.com/

======>Current mysql images====>
vskumar@ubuntu:~$ sudo docker image ls mysql*
[sudo] password for vskumar:
REPOSITORY TAG IMAGE ID CREATED SIZE
mysql latest 5d4d51c57ea8 5 weeks ago 374MB
vskumar@ubuntu:~$
==================>

1. How to use dockerid and tag the image ?

My docker id is: vskumardocker
== Using docker id into local variable====>
vskumar@ubuntu:~$
vskumar@ubuntu:~$ export DOCKERID=vskumardocker
vskumar@ubuntu:~$ echo $DOCKERID
vskumardocker
vskumar@ubuntu:~$
==================>

= Tagging with dockerid ====>
vskumar@ubuntu:~$ sudo docker image build –tag $DOCKERID/mysql .
ERRO[0301] Can’t add file /home/vskumar/.gnupg/S.gpg-agent to tar: archive/tar: sockets not supported
ERRO[0324] Can’t add file /home/vskumar/.local/share/ubuntu-amazon-default/ubuntu-amazon-default/SingletonSocket to tar: archive/tar: sockets not supported
Sending build context to Docker daemon 808MB
Step 1/2 : FROM mysql
—> 5d4d51c57ea8
Step 2/2 : CMD [“echo”, “This is Mysql done by vskumar for a lab practice of dockerfile”]
—> Using cache
—> 659477c48f0a
Successfully built 659477c48f0a
Successfully tagged vskumardocker/mysql:latest
vskumar@ubuntu:~$
== Tagged mysql image =======>

=== Let us check it ===>
vskumar@ubuntu:~$ sudo docker image ls |more
REPOSITORY TAG IMAGE ID CREATED SIZE
vskumardocker/mysql latest 659477c48f0a 4 weeks ago 374MB
mysql latest 5d4d51c57ea8 5 weeks ago 374MB
== Newly tagged image is there ====>

2. How to list the images with dockerid ?

You can also list the images with dockerid assigned as below:

= How to list the images with dockerid? ====>
vskumar@ubuntu:~$ sudo docker image ls -f reference=”$DOCKERID/*”
REPOSITORY TAG IMAGE ID CREATED SIZE
vskumardocker/mysql latest 659477c48f0a 4 weeks ago 374MB
vskumar@ubuntu:~$
=======>

3. How to login to dockerhub with your id ?

=== Login to dockerhub====>
vskumar@ubuntu:~$ sudo docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don’t have a Docker ID, head over to https://hub.docker.com to create one.
Username: vskumardocker
Password:
Login Succeeded
vskumar@ubuntu:~$
============>

4. How to upload your docker image to your docker account and registry ?

Now, let us use docker push command to push the image to dockerhub:

=== Pushing the image to dockerhub account registry ===>
vskumar@ubuntu:~$ sudo docker image push $DOCKERID/mysql:latest
The push refers to repository [docker.io/vskumardocker/mysql]
12ea28f10d69: Mounted from library/mysql
400836ab4664: Mounted from library/mysql
17d36ba94219: Mounted from library/mysql
d7758e0ab2b0: Mounted from library/mysql
921bf5c178ac: Mounted from library/mysql
3cf1630a511d: Mounted from library/mysql
b80c494a1fdc: Mounted from library/mysql
7b2001677ac9: Mounted from library/mysql
8b452d78b126: Mounted from library/mysql
292c1ee413d0: Mounted from library/mysql
014cf8bfcb2d: Mounted from library/mysql
latest: digest: sha256:09ebaab0035b1955a83646ea41f43a2cd870c934a2255da090918ff7ad37dd0f size: 2621
vskumar@ubuntu:~$
==Note, repository name, TAG should be there correctly ===>

Now, we can see this image on the web page of the docker account:
===== pushed Image onto dockerhub web page ====>
I found the image on the web page with the below name:
vskumardocker/mysql
public
=====================>

 

 

 

20. DevOps:How to Install docker for Windows 10 and use for containers creation ?

How to Install docker for Windows 10 and use for containers creation ?:

Docker-logo

 In this blog,  I have shown the steps for  docker installation on Windows10 OS.

To install the docker for windows 10 OS, you need to download the docker-install.exe from the below url:

https://github.com/boot2docker/windows-installer/releases/tag/v1.8.0

 I have copied all the screens below, while doing my installation.  

You can follow the same.

Docker-Win10-install-screens.jpg

Check on your desktop for boot2docker icon.

You can also install docker toolbox as below:

Dockertoolbox-steps.jpg

Now, go to your Boot2Dcoker icon on your desktop.

Double Click on it.

In the following screens you can see with its start process.

Start-Bootdocker-screens.jpg

You can use the below blogs for containers creation.

https://vskumar.blog/2017/11/27/4-devops-how-to-work-with-docker-containers/

https://vskumar.blog/2017/11/28/5-devops-how-to-work-with-docker-images/

https://vskumar.blog/2017/12/12/13-devops-working-with-dockerfile-to-build-apache2-container-2/

17. DevOps: How to identify the docker container ip?

Docker-logo

Please note, every docker container can have an ip once it is activated.

How to get ip of a container ?

We can check the activated container ips through below exercise:
Initially, you need to activate the container using run command.
Then the ip will be assigned from the docker default gateway bridge.

As below you need to do the lab session:

Step-1: Activate the container

vskumar@ubuntu:~$ sudo docker run -i -t ubuntu /bin/bash
root@2f71a66eabae:/# ps
PID TTY TIME CMD
1 pts/0 00:00:00 bash
9 pts/0 00:00:00 ps
root@2f71a66eabae:/# exit
exit
^[[Avskumar@ubuntu:~$ sudo docker run -i -t ubuntu ^C
vskumar@ubuntu:~$ sudo docker run ubuntu /bin/bash

Step-2: Let is check the docker containers:
vskumar@ubuntu:~$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
vskumar@ubuntu:~$ sudo docker ps -aq
74943dfce61c
2f71a66eabae
680a896d2c74
a65d0abcfea5

Step-3:Following shows the current docker networks:

vskumar@ubuntu:~$ sudo docker ps -aq
74943dfce61c
2f71a66eabae
680a896d2c74
a65d0abcfea5

vskumar@ubuntu:~$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
74943dfce61c ubuntu “/bin/bash” 34 minutes ago Exited (0) 34 minutes ago pedantic_haibt
2f71a66eabae ubuntu “/bin/bash” 34 minutes ago Exited (0) 34 minutes ago suspicious_kepler
680a896d2c74 ubuntu “/bin/bash” 8 hours ago Exited (0) 8 hours ago tender_ramanujan
a65d0abcfea5 ubuntu:16.04 “/bin/bash” 8 hours ago Exited (0) 8 hours ago competent_albattani

Step4: Making a container active:

The IP is assigned to a container with the below activation.
I named the container as container1.

vskumar@ubuntu:~$ sudo docker run -itd –name=container1 ubuntu:16.04
bfb319cdbfe366b369cb089731f614795677ab3ea4f614066596e9cccf17f57f

Step5: Now check the bridge status and the assigned ips of a default bridge to container1:

vskumar@ubuntu:~$ sudo docker network inspect bridge
[
{
“Name”: “bridge”,
“Id”: “c085bc6ae3691b9d8a43e9fc2a26bddc5809e51a4f3c16338143d4bae2d28151”,
“Created”: “2018-03-08T08:28:53.012490299-08:00”,
“Scope”: “local”,
“Driver”: “bridge”,
“EnableIPv6”: false,
“IPAM”: {
“Driver”: “default”,
“Options”: null,
“Config”: [
{
“Subnet”: “172.17.0.0/16”,
“Gateway”: “172.17.0.1”
}
]
},
“Internal”: false,
“Attachable”: false,
“Ingress”: false,
“ConfigFrom”: {
“Network”: “”
},
“ConfigOnly”: false,
“Containers”: {
“bfb319cdbfe366b369cb089731f614795677ab3ea4f614066596e9cccf17f57f”: {
“Name”: “container1”,
“EndpointID”: “9d5abe4df583946342ab36da0fc76a1d3d4c7a1fdaf2766d18b6dea7cd912eb7”,
“MacAddress”: “02:42:ac:11:00:02”,
“IPv4Address”: “172.17.0.2/16”,
“IPv6Address”: “”
}
},
“Options”: {
“com.docker.network.bridge.default_bridge”: “true”,
“com.docker.network.bridge.enable_icc”: “true”,
“com.docker.network.bridge.enable_ip_masquerade”: “true”,
“com.docker.network.bridge.host_binding_ipv4”: “0.0.0.0”,
“com.docker.network.bridge.name”: “docker0”,
“com.docker.network.driver.mtu”: “1500”
},
“Labels”: {}
}
]

vskumar@ubuntu:~$

Step6: Let us use another conatiner [testcontainer2] to active and get the ip:

sudo docker run -itd –name=testcontainer2 ubuntu:16.04

Step7: You can see the current container with the given names also:

vskumar@ubuntu:~$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d9ad288448ca ubuntu “/bin/bash” 3 minutes ago Up 3 minutes testcontainer1
bfb319cdbfe3 ubuntu:16.04 “/bin/bash” 9 minutes ago Exited (137) 5 minutes ago container1
74943dfce61c ubuntu “/bin/bash” 45 minutes ago Exited (0) 45 minutes ago pedantic_haibt
2f71a66eabae ubuntu “/bin/bash” About an hour ago Exited (0) 45 minutes ago suspicious_kepler
680a896d2c74 ubuntu “/bin/bash” 8 hours ago Exited (0) 8 hours ago tender_ramanujan
a65d0abcfea5 ubuntu:16.04 “/bin/bash” 8 hours ago Exited (0) 8 hours ago competent_albattani
vskumar@ubuntu:~$ clear

vskumar@ubuntu:~$

Step8: Let us check the its ip for the activated container as below:

vskumar@ubuntu:~$ sudo docker inspect -f “{{ .NetworkSettings.IPAddress }}” d9ad288448ca
172.17.0.2

You can see the ip:172.17.0.2

vskumar@ubuntu:~$ sudo docker ps -a^C
vskumar@ubuntu:~$ sudo docker inspect -f “{{ .NetworkSettings.IPAddress }}” d9ad288448ca^C
vskumar@ubuntu:~$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d9ad288448ca ubuntu “/bin/bash” 5 minutes ago Up 5 minutes testcontainer1
bfb319cdbfe3 ubuntu:16.04 “/bin/bash” 11 minutes ago Exited (137) 7 minutes ago container1
74943dfce61c ubuntu “/bin/bash” About an hour ago Exited (0) About an hour ago pedantic_haibt
2f71a66eabae ubuntu “/bin/bash” About an hour ago Exited (0) About an hour ago suspicious_kepler
680a896d2c74 ubuntu “/bin/bash” 8 hours ago Exited (0) 8 hours ago tender_ramanujan
a65d0abcfea5 ubuntu:16.04 “/bin/bash” 8 hours ago Exited (0) 8 hours ago competent_albattani

Step9: Now let us use a third container and verify the ip:

vskumar@ubuntu:~$ sudo docker run -itd –name=testcontainer2 ubuntu:16.04
ee5b7978894bc844ae97d7ea893f1c76b99049a4bb71bedfa01d6e9c55e57867

vskumar@ubuntu:~$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ee5b7978894b ubuntu:16.04 “/bin/bash” 15 seconds ago Up 13 seconds testcontainer2
d9ad288448ca ubuntu “/bin/bash” 9 minutes ago Up 9 minutes testcontainer1
bfb319cdbfe3 ubuntu:16.04 “/bin/bash” 15 minutes ago Exited (137) 10 minutes ago container1
74943dfce61c ubuntu “/bin/bash” About an hour ago Exited (0) About an hour ago pedantic_haibt
2f71a66eabae ubuntu “/bin/bash” About an hour ago Exited (0) About an hour ago suspicious_kepler
680a896d2c74 ubuntu “/bin/bash” 8 hours ago Exited (0) 8 hours ago tender_ramanujan
a65d0abcfea5 ubuntu:16.04 “/bin/bash” 8 hours ago Exited (0) 8 hours ago competent_albattani

vskumar@ubuntu:~$ sudo docker inspect -f “{{ .NetworkSettings.IPAddress }}” ee5b7978894b
172.17.0.3
vskumar@ubuntu:~$

Step10: Now you can run the inspect command to check the ip for the latest activated container.

This way you will have the ips for the running container.
Please note as long as you keep running these conatiners these ips are valid.
Now if you want to use them for any micro services setup you can do after this procedure.
The docker network will have them shown through the VM browser also.

 

12. DevOps: How to build docker images using dockerfile ? -1

 

Docker-logo

In continuation of my  previous session on :”11. DevOps: How to Launch a container as a daemon ?”, in this session I would like to demonstrate the exercises on:

“How to build docker images using dockerfile ?:”

These images are basic operating environments, such as ubuntu.
We found these while doing the other lab exercises.
The docker images can craft advanced application stacks for the enterprise and cloud IT environments.
Currently let us craft an image manually by launching a container from a base image.
A best practices is, we can build an automated approach of crafting the images using Dockerfile.
The dockerfile is a a text-based build script which contains special instructions in a sequence for building the correct and the relevant images from the base images.

Please note; we will explore all these combinations in different sessions.

Now, let us understand this automated approach from the below steps:
1. The sequential instructions inside Dockerfile can include selecting the base image as 1st statement.
2. And in the later statements; installing the required application, adding the configuration and the data files, and automatically running the services as well as exposing those services to the external world.

This way the dockerfile based automated build approach has simplified the image building process.

It also offers a great deal of flexibility in organizing the build instructions and in visualizing the complete build process, while running the script instructions.

The Docker Engine tightly integrates this build process with the help of the docker ‘build’ subcommand.

This process involes the below steps:
1. Let us imagine; in the client server scenario of Docker, the Docker server (or daemon) is responsible towards complete build process.
2. And the Docker command-line interface is responsible for transferring the build context, including transferring Dockerfile to the daemon.
Now, let us list our existing images as below, in continuation of previous exercise:
=============>
vskumar@ubuntu:~$
vskumar@ubuntu:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker-exercise/ubuntu-wgetinstall latest e34304119838 7 days ago 169MB
<none> <none> fc7e4564eb92 7 days ago 169MB
hello-world latest f2a91732366c 12 days ago 1.85kB
ubuntu 16.04 20c44cd7596f 2 weeks ago 123MB
ubuntu latest 20c44cd7596f 2 weeks ago 123MB
busybox latest 6ad733544a63 4 weeks ago 1.13MB
busybox 1.24 47bcc53f74dc 20 months ago 1.11MB
vskumar@ubuntu:~$
====================>
Now,  let us create a simple container from the ubuntu base image.
To create it, we can create ‘dockerfile’ without extension using vi in the current pwd.

Please note we do not have vim utility in this Ubuntu base image.
=================>
vskumar@ubuntu:~$ pwd
/home/vskumar
vskumar@ubuntu:~$ vi dockerfile
============>
Now, let us cat the dockerfile as below:
=============>
vskumar@ubuntu:~$ ls -l
total 48
drwxr-xr-x 3 vskumar vskumar 4096 Nov 24 23:32 Desktop
-rw-rw-r– 1 vskumar vskumar 86 Dec 3 04:29 dockerfile
drwxr-xr-x 2 vskumar vskumar 4096 Nov 22 21:23 Documents
drwxr-xr-x 2 vskumar vskumar 4096 Nov 25 06:33 Downloads
-rw-r–r– 1 vskumar vskumar 8980 Nov 22 21:03 examples.desktop
drwxr-xr-x 2 vskumar vskumar 4096 Nov 22 21:23 Music
drwxr-xr-x 2 vskumar vskumar 4096 Nov 25 06:02 Pictures
drwxr-xr-x 2 vskumar vskumar 4096 Nov 22 21:23 Public
drwxr-xr-x 2 vskumar vskumar 4096 Nov 22 21:23 Templates
drwxr-xr-x 2 vskumar vskumar 4096 Nov 22 21:23 Videos
vskumar@ubuntu:~$
vskumar@ubuntu:~$ cat dockerfile
FROM ubuntu
CMD [“echo”, “This is done by vskumar for a lab practice of dockerfile”]
vskumar@ubuntu:~$
================>
From the above dockerfile contents:
1st line FROM ubuntu – denotes it is using the buntu as the base image to create the container.
2nd line: CMD [“echo”, “This is done by vskumar for a lab practice of dockerfile”]
denotes using CMD echo command is executed to print the message “This is done by vskumar for a lab practice of dockerfile”.
Now let us run this file through the below command:
$ sudo docker build .
We can see the output as below:
===============>
vskumar@ubuntu:~$ sudo docker build .
Sending build context to Docker daemon 112MB
Step 1/2 : FROM ubuntu
—> 20c44cd7596f
Step 2/2 : CMD [“echo”, “This is done by vskumar for a lab practice of dockerfile”]
—> Running in 1de59a4799fa
Removing intermediate container 1de59a4799fa
—> 8de083612fef
Successfully built 8de083612fef
vskumar@ubuntu:~$
===================>
Now, let us list the images:
==================>
vskumar@ubuntu:~$
vskumar@ubuntu:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> 8de083612fef About a minute ago 123MB
docker-exercise/ubuntu-wgetinstall latest e34304119838 7 days ago 169MB
<none> <none> fc7e4564eb92 7 days ago 169MB
hello-world latest f2a91732366c 12 days ago 1.85kB
ubuntu 16.04 20c44cd7596f 2 weeks ago 123MB
ubuntu latest 20c44cd7596f 2 weeks ago 123MB
busybox latest 6ad733544a63 4 weeks ago 1.13MB
busybox 1.24 47bcc53f74dc 20 months ago 1.11MB
vskumar@ubuntu:~$
==========================>
We can see Imgae id: 8de083612fef is created just now.
Look into that line there is no tag given.
Now let us tag it as below:
$ sudo docker tag 8de083612fef ubuntu-testbox1
================>
vskumar@ubuntu:~$
vskumar@ubuntu:~$ sudo docker tag 8de083612fef ubuntu-testbox1
vskumar@ubuntu:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu-testbox1 latest 8de083612fef 4 minutes ago 123MB
docker-exercise/ubuntu-wgetinstall latest e34304119838 7 days ago 169MB
<none> <none> fc7e4564eb92 7 days ago 169MB
hello-world latest f2a91732366c 12 days ago 1.85kB
ubuntu 16.04 20c44cd7596f 2 weeks ago 123MB
ubuntu latest 20c44cd7596f 2 weeks ago 123MB
busybox latest 6ad733544a63 4 weeks ago 1.13MB
busybox 1.24 47bcc53f74dc 20 months ago 1.11MB
vskumar@ubuntu:~$
====================>
Now, let us do some housekeeping on these containers.
Let us list the containers using ps -a command
====================>
vskumar@ubuntu:~$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0fe495fc93ed ubuntu “/bin/bash -c ‘while…” 8 hours ago Exited (137) 4 hours ago hungry_engelbart
10ffea6140f9 ubuntu “bash” 7 days ago Exited (0) 7 days ago quizzical_lalande
b2a79f8d2fe6 ubuntu “/bin/bash -c ‘while…” 7 days ago Exited (255) 7 days ago goofy_borg
155f4b0764b1 ubuntu:16.04 “/bin/bash” 7 days ago Exited (0) 7 days ago zen_volhard
vskumar@ubuntu:~$
=====================>
I want to remove all of them. We can recreate with the dockerfile as an exercise.
$ Sudo docker containers prune
=======================================>
vskumar@ubuntu:~$ sudo docker ps -aq
0fe495fc93ed
10ffea6140f9
b2a79f8d2fe6
155f4b0764b1
vskumar@ubuntu:~$ sudo docker container prune
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] y
Deleted Containers:
0fe495fc93edee3aaadc7fc0fbf21997f0ca3cde4d7e563aa8c61352a43957dd
10ffea6140f9c93b37bad2f9d159ad53aa121c0de69a9d145f07cc12f9591324
b2a79f8d2fe65453fce19f00d7adf03ed6dcced69ae68fba94ad0c416545263e
155f4b0764b16f1c8776a101cced6ea95c55eeabe69aeab8520cbe925bedc456

Total reclaimed space: 186B
vskumar@ubuntu:~$ sudo docker ps -aq
vskumar@ubuntu:~$
============== so now there are no containers =========>
Let us build the container.
Before building let us check the available images:
==================>
vskumar@ubuntu:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu-testbox1 latest 8de083612fef 24 minutes ago 123MB
docker-exercise/ubuntu-wgetinstall latest e34304119838 7 days ago 169MB
<none> <none> fc7e4564eb92 7 days ago 169MB
hello-world latest f2a91732366c 12 days ago 1.85kB
ubuntu 16.04 20c44cd7596f 2 weeks ago 123MB
ubuntu latest 20c44cd7596f 2 weeks ago 123MB
busybox latest 6ad733544a63 4 weeks ago 1.13MB
busybox 1.24 47bcc53f74dc 20 months ago 1.11MB
vskumar@ubuntu:~$
====================>
Let us remove some more images also.
We need to use the below commands:
=========== Let us try one image removal =========>
vskumar@ubuntu:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu-testbox1 latest 8de083612fef 33 minutes ago 123MB
docker-exercise/ubuntu-wgetinstall latest e34304119838 7 days ago 169MB
<none> <none> fc7e4564eb92 7 days ago 169MB
hello-world latest f2a91732366c 12 days ago 1.85kB
ubuntu 16.04 20c44cd7596f 2 weeks ago 123MB
ubuntu latest 20c44cd7596f 2 weeks ago 123MB
busybox latest 6ad733544a63 4 weeks ago 1.13MB
busybox 1.24 47bcc53f74dc 20 months ago 1.11MB
vskumar@ubuntu:~$ sudo docker rmi image 47bcc53f74dc
Untagged: busybox:1.24
Untagged: busybox@sha256:8ea3273d79b47a8b6d018be398c17590a4b5ec604515f416c5b797db9dde3ad8
Deleted: sha256:47bcc53f74dc94b1920f0b34f6036096526296767650f223433fe65c35f149eb
Deleted: sha256:f6075681a244e9df4ab126bce921292673c9f37f71b20f6be1dd3bb99b4fdd72
Deleted: sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6
Error: No such image: image
vskumar@ubuntu:~$
=================================>
So, by using :
sudo docker rmi image [image id], we can remove the image.

Now, further continuation of our dockerfile exercise;
We can create a container from ubuntu base image and install vim package on it with the help of dockerfile.
To do this we need to have following dockerfile script.
——————>
FROM ubuntu
RUN apt-get update
RUN apt-get -y install vim
CMD [“echo”, “This is done by vskumar for a lab demo on dockerfile”]
—————–>
Before doing it, let me do some housekeeping.
I have removed the below image:
==================>
vskumar@ubuntu:~$
vskumar@ubuntu:~$ sudo docker rmi image 6ad733544a63
Untagged: busybox:latest
Untagged: busybox@sha256:bbc3a03235220b170ba48a157dd097dd1379299370e1ed99ce976df0355d24f0
Deleted: sha256:6ad733544a6317992a6fac4eb19fe1df577d4dec7529efec28a5bd0edad0fd30
Deleted: sha256:0271b8eebde3fa9a6126b1f2335e170f902731ab4942f9f1914e77016540c7bb
Error: No such image: image
=====================>
See the current status:
===================>
vskumar@ubuntu:~$ ls
Desktop dockerfile Documents Downloads examples.desktop Music Pictures Public Templates Videos
vskumar@ubuntu:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu-testbox1 latest 8de083612fef About an hour ago 123MB
docker-exercise/ubuntu-wgetinstall latest e34304119838 7 days ago 169MB
<none> <none> fc7e4564eb92 7 days ago 169MB
hello-world latest f2a91732366c 12 days ago 1.85kB
ubuntu 16.04 20c44cd7596f 2 weeks ago 123MB
vskumar@ubuntu:~$
======================>
Now let me update the dockerfile through vi and cat that file:
====================>
vskumar@ubuntu:~$
vskumar@ubuntu:~$ pwd
/home/vskumar
vskumar@ubuntu:~$ vi dockerfile
vskumar@ubuntu:~$ cat dockerfile
FROM ubuntu
RUN apt-get update
RUN apt-get -y install vim
CMD [“echo”, “This is done by vskumar for a lab practice of dockerfile”]
vskumar@ubuntu:~$
====================>
Now let me run the below command:
$ sudo docker build -t ubuntu-vmbox .
This time; I have added the tag name as ‘ ubuntu-vmbox’.
We need to understand; there are below tasks it involves:
1. Updating the ubuntu libraries – it takes some time by displaying lot of output.
2. Installing vim utility. — This also takes some time.
3. Displaying the message.
We can see this large size output:
=========== Update the packages and install the vim in a conatiner ==========>
vskumar@ubuntu:~$ pwd
/home/vskumar
vskumar@ubuntu:~$ sudo docker build -t ubuntu-vmbox .
Sending build context to Docker daemon 112MB
Step 1/4 : FROM ubuntu
latest: Pulling from library/ubuntu
Digest: sha256:7c67a2206d3c04703e5c23518707bdd4916c057562dd51c74b99b2ba26af0f79
Status: Downloaded newer image for ubuntu:latest
—> 20c44cd7596f
Step 2/4 : RUN apt-get update
—> Running in df81eaef9437
Get:1 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial/universe Sources [9802 kB]
Get:6 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [53.1 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources [231 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [866 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [13.7 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [719 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [18.5 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [5174 B]
Get:17 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [7150 B]
Get:18 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [505 kB]
Get:19 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [12.9 kB]
Get:20 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [229 kB]
Get:21 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3479 B]
Fetched 24.6 MB in 2min 5s (196 kB/s)
Reading package lists…
Removing intermediate container df81eaef9437
—> 13cd766374bc
Step 3/4 : RUN apt-get -y install vim
—> Running in d37783a8cb7d
Reading package lists…
Building dependency tree…
Reading state information…
The following additional packages will be installed:
file libexpat1 libgpm2 libmagic1 libmpdec2 libpython3.5 libpython3.5-minimal
libpython3.5-stdlib libsqlite3-0 libssl1.0.0 mime-support vim-common
vim-runtime
Suggested packages:
gpm ctags vim-doc vim-scripts vim-gnome-py2 | vim-gtk-py2 | vim-gtk3-py2
| vim-athena-py2 | vim-nox-py2
The following NEW packages will be installed:
file libexpat1 libgpm2 libmagic1 libmpdec2 libpython3.5 libpython3.5-minimal
libpython3.5-stdlib libsqlite3-0 libssl1.0.0 mime-support vim vim-common
vim-runtime
0 upgraded, 14 newly installed, 0 to remove and 2 not upgraded.
Need to get 12.2 MB of archives.
After this operation, 58.3 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 libgpm2 amd64 1.20.4-6.1 [16.5 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 libmagic1 amd64 1:5.25-2ubuntu1 [216 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 file amd64 1:5.25-2ubuntu1 [21.2 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libexpat1 amd64 2.1.0-7ubuntu0.16.04.3 [71.2 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial/main amd64 libmpdec2 amd64 2.4.2-1 [82.6 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libssl1.0.0 amd64 1.0.2g-1ubuntu4.9 [1085 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython3.5-minimal amd64 3.5.2-2ubuntu0~16.04.4 [523 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial/main amd64 mime-support all 3.59ubuntu1 [31.0 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial/main amd64 libsqlite3-0 amd64 3.11.0-1ubuntu1 [396 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython3.5-stdlib amd64 3.5.2-2ubuntu0~16.04.4 [2132 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 vim-common amd64 2:7.4.1689-3ubuntu1.2 [103 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython3.5 amd64 3.5.2-2ubuntu0~16.04.4 [1360 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 vim-runtime all 2:7.4.1689-3ubuntu1.2 [5164 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 vim amd64 2:7.4.1689-3ubuntu1.2 [1036 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 12.2 MB in 12s (949 kB/s)
Selecting previously unselected package libgpm2:amd64.
(Reading database … 4768 files and directories currently installed.)
Preparing to unpack …/libgpm2_1.20.4-6.1_amd64.deb …
Unpacking libgpm2:amd64 (1.20.4-6.1) …
Selecting previously unselected package libmagic1:amd64.
Preparing to unpack …/libmagic1_1%3a5.25-2ubuntu1_amd64.deb …
Unpacking libmagic1:amd64 (1:5.25-2ubuntu1) …
Selecting previously unselected package file.
Preparing to unpack …/file_1%3a5.25-2ubuntu1_amd64.deb …
Unpacking file (1:5.25-2ubuntu1) …
Selecting previously unselected package libexpat1:amd64.
Preparing to unpack …/libexpat1_2.1.0-7ubuntu0.16.04.3_amd64.deb …
Unpacking libexpat1:amd64 (2.1.0-7ubuntu0.16.04.3) …
Selecting previously unselected package libmpdec2:amd64.
Preparing to unpack …/libmpdec2_2.4.2-1_amd64.deb …
Unpacking libmpdec2:amd64 (2.4.2-1) …
Selecting previously unselected package libssl1.0.0:amd64.
Preparing to unpack …/libssl1.0.0_1.0.2g-1ubuntu4.9_amd64.deb …
Unpacking libssl1.0.0:amd64 (1.0.2g-1ubuntu4.9) …
Selecting previously unselected package libpython3.5-minimal:amd64.
Preparing to unpack …/libpython3.5-minimal_3.5.2-2ubuntu0~16.04.4_amd64.deb …
Unpacking libpython3.5-minimal:amd64 (3.5.2-2ubuntu0~16.04.4) …
Selecting previously unselected package mime-support.
Preparing to unpack …/mime-support_3.59ubuntu1_all.deb …
Unpacking mime-support (3.59ubuntu1) …
Selecting previously unselected package libsqlite3-0:amd64.
Preparing to unpack …/libsqlite3-0_3.11.0-1ubuntu1_amd64.deb …
Unpacking libsqlite3-0:amd64 (3.11.0-1ubuntu1) …
Selecting previously unselected package libpython3.5-stdlib:amd64.
Preparing to unpack …/libpython3.5-stdlib_3.5.2-2ubuntu0~16.04.4_amd64.deb …
Unpacking libpython3.5-stdlib:amd64 (3.5.2-2ubuntu0~16.04.4) …
Selecting previously unselected package vim-common.
Preparing to unpack …/vim-common_2%3a7.4.1689-3ubuntu1.2_amd64.deb …
Unpacking vim-common (2:7.4.1689-3ubuntu1.2) …
Selecting previously unselected package libpython3.5:amd64.
Preparing to unpack …/libpython3.5_3.5.2-2ubuntu0~16.04.4_amd64.deb …
Unpacking libpython3.5:amd64 (3.5.2-2ubuntu0~16.04.4) …
Selecting previously unselected package vim-runtime.
Preparing to unpack …/vim-runtime_2%3a7.4.1689-3ubuntu1.2_all.deb …
Adding ‘diversion of /usr/share/vim/vim74/doc/help.txt to /usr/share/vim/vim74/doc/help.txt.vim-tiny by vim-runtime’
Adding ‘diversion of /usr/share/vim/vim74/doc/tags to /usr/share/vim/vim74/doc/tags.vim-tiny by vim-runtime’
Unpacking vim-runtime (2:7.4.1689-3ubuntu1.2) …
Selecting previously unselected package vim.
Preparing to unpack …/vim_2%3a7.4.1689-3ubuntu1.2_amd64.deb …
Unpacking vim (2:7.4.1689-3ubuntu1.2) …
Processing triggers for libc-bin (2.23-0ubuntu9) …
Setting up libgpm2:amd64 (1.20.4-6.1) …
Setting up libmagic1:amd64 (1:5.25-2ubuntu1) …
Setting up file (1:5.25-2ubuntu1) …
Setting up libexpat1:amd64 (2.1.0-7ubuntu0.16.04.3) …
Setting up libmpdec2:amd64 (2.4.2-1) …
Setting up libssl1.0.0:amd64 (1.0.2g-1ubuntu4.9) …
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can’t locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up libpython3.5-minimal:amd64 (3.5.2-2ubuntu0~16.04.4) …
Setting up mime-support (3.59ubuntu1) …
Setting up libsqlite3-0:amd64 (3.11.0-1ubuntu1) …
Setting up libpython3.5-stdlib:amd64 (3.5.2-2ubuntu0~16.04.4) …
Setting up vim-common (2:7.4.1689-3ubuntu1.2) …
Setting up libpython3.5:amd64 (3.5.2-2ubuntu0~16.04.4) …
Setting up vim-runtime (2:7.4.1689-3ubuntu1.2) …
Setting up vim (2:7.4.1689-3ubuntu1.2) …
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in auto mode
Processing triggers for libc-bin (2.23-0ubuntu9) …
Removing intermediate container d37783a8cb7d
—> c07c6f2d2c65
Step 4/4 : CMD [“echo”, “This is done by vskumar for a lab practice of dockerfile”]
—> Running in f7e85f87b578
Removing intermediate container f7e85f87b578
—> f6675f4738b7
Successfully built f6675f4738b7
Successfully tagged ubuntu-vmbox:latest
vskumar@ubuntu:~$
=== Finally you can see the ‘ubuntu-vmbox’ tagged conatiner ======>
We can see the latest image from the below images:
===== Current images list =====>
vskumar@ubuntu:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu-vmbox latest f6675f4738b7 3 minutes ago 220MB
ubuntu-testbox1 latest 8de083612fef About an hour ago 123MB
docker-exercise/ubuntu-wgetinstall latest e34304119838 7 days ago 169MB
<none> <none> fc7e4564eb92 7 days ago 169MB
hello-world latest f2a91732366c 12 days ago 1.85kB
ubuntu 16.04 20c44cd7596f 2 weeks ago 123MB
ubuntu latest 20c44cd7596f 2 weeks ago 123MB
vskumar@ubuntu:~$
=======================>
Now, I want to work with this newly created container. Please recollect my blog “https://vskumar.blog/2017/11/29/6-devops-how-to-work-with-interactive-docker-containers/”.
As we did practice in it; we can use the below command to work with this new container:

sudo docker run -i -t ubuntu-vmbox /bin/bash
I want to test the vim is working on it. See the below output:
==================>
vskumar@ubuntu:~$ sudo docker run -i -t ubuntu-vmbox /bin/bash

root@1169bb1285cf:/#
root@1169bb1285cf:/# pwd
/
root@1169bb1285cf:/# ls
bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
root@1169bb1285cf:/# vim test1
===== I have created the file with vim successfully ====>
Now let me use cat command and see its output:

================>
root@1169bb1285cf:/#
root@1169bb1285cf:/# ls
bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys test1 tmp usr var
root@1169bb1285cf:/# cat test1
testing this vim box……
root@1169bb1285cf:/#
=================>

So, in this exercise we have updated the ubuntu libraries and installed vim utility.
And tested the container for vim usage by using interactive mode.

=========== Now let me exit and check the list of images =====>
root@1169bb1285cf:/#
root@1169bb1285cf:/# exit
exit
vskumar@ubuntu:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu-vmbox latest f6675f4738b7 13 minutes ago 220MB
ubuntu-testbox1 latest 8de083612fef About an hour ago 123MB
docker-exercise/ubuntu-wgetinstall latest e34304119838 7 days ago 169MB
<none> <none> fc7e4564eb92 7 days ago 169MB
hello-world latest f2a91732366c 12 days ago 1.85kB
ubuntu 16.04 20c44cd7596f 2 weeks ago 123MB
ubuntu latest 20c44cd7596f 2 weeks ago 123MB
vskumar@ubuntu:~$
=============================>
So, the new container ‘ubuntu-vmbox’ is existing.

Now, I want to remove some images:
sudo docker rmi 20c44cd7596f
================>
vskumar@ubuntu:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu-vmbox latest f6675f4738b7 18 minutes ago 220MB
ubuntu-testbox1 latest 8de083612fef About an hour ago 123MB
docker-exercise/ubuntu-wgetinstall latest e34304119838 7 days ago 169MB
<none> <none> fc7e4564eb92 7 days ago 169MB
hello-world latest f2a91732366c 12 days ago 1.85kB
ubuntu 16.04 20c44cd7596f 2 weeks ago 123MB
ubuntu latest 20c44cd7596f 2 weeks ago 123MB
vskumar@ubuntu:~$ sudo docker rmi 20c44cd7596f
Error response from daemon: conflict: unable to delete 20c44cd7596f (cannot be forced) – image has dependent child images
vskumar@ubuntu:~$
== Please note the last image was the base to build the top tow containers ===>
Hence it has the child and parent relationship.
First we need to remove the child images and later the parent need to be removed.
=== You can see the removal of child one and one more image=====>
vskumar@ubuntu:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu-vmbox latest f6675f4738b7 20 minutes ago 220MB
ubuntu-testbox1 latest 8de083612fef 2 hours ago 123MB
docker-exercise/ubuntu-wgetinstall latest e34304119838 7 days ago 169MB
<none> <none> fc7e4564eb92 7 days ago 169MB
hello-world latest f2a91732366c 12 days ago 1.85kB
ubuntu 16.04 20c44cd7596f 2 weeks ago 123MB
ubuntu latest 20c44cd7596f 2 weeks ago 123MB
vskumar@ubuntu:~$ sudo docker rmi 8de083612fef
Untagged: ubuntu-testbox1:latest
Deleted: sha256:8de083612fefbf9723913748f7db4aba4154b17adc500d011f44df356736f06c
vskumar@ubuntu:~$ sudo docker rmi e34304119838
Untagged: docker-exercise/ubuntu-wgetinstall:latest
Deleted: sha256:e34304119838d79da60e12776529106c350b1972cd517648e8ab90311fad7b1a
vskumar@ubuntu:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu-vmbox latest f6675f4738b7 21 minutes ago 220MB
<none> <none> fc7e4564eb92 7 days ago 169MB
hello-world latest f2a91732366c 12 days ago 1.85kB
ubuntu 16.04 20c44cd7596f 2 weeks ago 123MB
ubuntu latest 20c44cd7596f 2 weeks ago 123MB
vskumar@ubuntu:~$
=================>
Let me do some more exercises on housekeeping.
I would like to present some more dependency issues for the above images. You can clearly see the output:
========= Dependencies =======>
vskumar@ubuntu:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu-vmbox latest f6675f4738b7 22 minutes ago 220MB
<none> <none> fc7e4564eb92 7 days ago 169MB
hello-world latest f2a91732366c 12 days ago 1.85kB
ubuntu 16.04 20c44cd7596f 2 weeks ago 123MB
ubuntu latest 20c44cd7596f 2 weeks ago 123MB
vskumar@ubuntu:~$ sudo docker rmi fc7e4564eb92
Deleted: sha256:fc7e4564eb928ccfe068c789f0d650967e8d5dc42d4e8d92409aab6614364075
Deleted: sha256:b16d78406b12e6dbc174f4e71bedb7b9edc0593cad10458ddf042738694c06db
vskumar@ubuntu:~$ sudo docker rmi 20c44cd7596f
Error response from daemon: conflict: unable to delete 20c44cd7596f (cannot be forced) – image has dependent child images
vskumar@ubuntu:~$ sudo docker rmi f6675f4738b7
Error response from daemon: conflict: unable to delete f6675f4738b7 (must be forced) – image is being used by stopped container 1169bb1285cf
vskumar@ubuntu:~$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1169bb1285cf ubuntu-vmbox “/bin/bash” 15 minutes ago Exited (0) 11 minutes ago heuristic_mayer
vskumar@ubuntu:~$
====================>
It means the container “1169bb1285cf ubuntu-vmbox” is the child to image id:f6675f4738b7.
===========>
vskumar@ubuntu:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu-vmbox latest f6675f4738b7 27 minutes ago 220MB
hello-world latest f2a91732366c 12 days ago 1.85kB
ubuntu 16.04 20c44cd7596f 2 weeks ago 123MB
ubuntu latest 20c44cd7596f 2 weeks ago 123MB
vskumar@ubuntu:~$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1169bb1285cf ubuntu-vmbox “/bin/bash” 19 minutes ago Exited (0) 14 minutes ago heuristic_mayer
vskumar@ubuntu:~$
==============>
So if I want to remove Image id: f6675f4738b7, I need to remove the container id:1169bb1285cf , and later I need to remove this image.
$ sudo docker rm container 1169bb1285cf
And later image removal command need to be used as below.
======================>
vskumar@ubuntu:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu-vmbox latest f6675f4738b7 31 minutes ago 220MB
hello-world latest f2a91732366c 12 days ago 1.85kB
ubuntu 16.04 20c44cd7596f 2 weeks ago 123MB
ubuntu latest 20c44cd7596f 2 weeks ago 123MB
vskumar@ubuntu:~$ sudo docker rmi f6675f4738b7
Untagged: ubuntu-vmbox:latest
Deleted: sha256:f6675f4738b721780721f345906a0c78c13a67ee8239a16f071504b217f41658
Deleted: sha256:c07c6f2d2c651dd406977d42d5504c941d7f975a84c8547abaf3869b50942820
Deleted: sha256:4855cfb7ae6f84279bbbfe87e7691377531a541785c613014f64909e6e0f4528
Deleted: sha256:13cd766374bcb31cc0e8cac971e82754bb8e1bc66780abaff264f847e00a94b2
Deleted: sha256:dc6fab8a33a18a8c840e19612253657c4610ab865a26de5a31260f71bcef5f76
vskumar@ubuntu:~$
========================>
So we have the below images only now:
==== Current images ======>
vskumar@ubuntu:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest f2a91732366c 12 days ago 1.85kB
ubuntu 16.04 20c44cd7596f 2 weeks ago 123MB
ubuntu latest 20c44cd7596f 2 weeks ago 123MB
vskumar@ubuntu:~$
==========================>
We can try to remove the above images:
========= See it is declined due to it is base image ===========>
vskumar@ubuntu:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest f2a91732366c 12 days ago 1.85kB
ubuntu 16.04 20c44cd7596f 2 weeks ago 123MB
ubuntu latest 20c44cd7596f 2 weeks ago 123MB
vskumar@ubuntu:~$ sudo docker rmi 20c44cd7596f
Error response from daemon: conflict: unable to delete 20c44cd7596f (must be forced) – image is referenced in multiple repositories
vskumar@ubuntu:~$
=========================>
Both ubuntu images are interlinked and they can not be removed as the base docker engine is working on top of their OS.

We will stop this session at this time.

We will continue some more sessions on “dockerfile”.

 

Vcard-Shanthi Kumar V-v3

11. DevOps: How to Launch a container as a daemon ?

Docker-logo

In continuation of my previous blog on “10. DevOps: How to Build images from Docker containers?”, I am continuing my lab exercises. In this session we can see ”

How to Launch a container as a daemon ?:

Note: If you want to recollect the docker commands to be used during your current lab practice, visit my blog link:

https://vskumarblogs.wordpress.com/2017/12/13/some-useful-docker-commands-for-handling-images-and-containers/

 

Let us recap the past exercises; So far we have experimented with an interactive container, tracked the changes that were made to the containers., created images from the containers, and then gained insights in the containerization scenarios.

Now, let us see the container usage in a detached mode.

When we run the container in a detached mode it runs under a daemon process.

I want to use the “ubuntu” image and run detached mode command.

First, let me check my current docker images:

==================>

vskumar@ubuntu:~$

vskumar@ubuntu:~$ sudo docker images

[sudo] password for vskumar:

REPOSITORY TAG IMAGE ID CREATED SIZE

docker-exercise/ubuntu-wgetinstall latest e34304119838 7 days ago 169MB

<none> <none> fc7e4564eb92 7 days ago 169MB

hello-world latest f2a91732366c 12 days ago 1.85kB

ubuntu 16.04 20c44cd7596f 2 weeks ago 123MB

ubuntu latest 20c44cd7596f 2 weeks ago 123MB

busybox latest 6ad733544a63 4 weeks ago 1.13MB

busybox 1.24 47bcc53f74dc 20 months ago 1.11MB

vskumar@ubuntu:~$

===================>

You can see my previous image with ‘docker-exercise/ubuntu-wgetinstall ‘. This was created in the previous exercise.

As per our plan in this session I am using the below commands to run the ubuntu image as below:

sudo docker run -d ubuntu \

    /bin/bash -c "while true; do date; sleep 5; done";

========== Output ======>
vskumar@ubuntu:~$  sudo docker run -d ubuntu \
>     /bin/bash -c "while true; do date; sleep 5; done";
0fe495fc93edee3aaadc7fc0fbf21997f0ca3cde4d7e563aa8c61352a43957dd
vskumar@ubuntu:~$ $ 
=======================>

Now, to view the docker logs I want to run the docker logs subcommand on image id: ‘ 0fe495fc93edee3aaadc7fc0fbf21997f0ca3cde4d7e563aa8c61352a43957dd’

$ sudo docker logs 0fe495fc93edee3aaadc7fc0fbf21997f0ca3cde4d7e563aa8c61352a43957dd;

=====See the output of the Daemon process running with the ubuntu image ===============>

vskumar@ubuntu:~$ sudo docker logs 0fe495fc93edee3aaadc7fc0fbf21997f0ca3cde4d7e563aa8c61352a43957dd;

Sun Dec 3 05:11:57 UTC 2017

Sun Dec 3 05:12:02 UTC 2017

Sun Dec 3 05:12:07 UTC 2017

Sun Dec 3 05:12:12 UTC 2017

Sun Dec 3 05:12:17 UTC 2017

Sun Dec 3 05:12:22 UTC 2017

Sun Dec 3 05:12:27 UTC 2017

Sun Dec 3 05:12:32 UTC 2017

Sun Dec 3 05:12:37 UTC 2017

Sun Dec 3 05:12:42 UTC 2017

Sun Dec 3 05:12:48 UTC 2017

Sun Dec 3 05:12:53 UTC 2017

Sun Dec 3 05:12:58 UTC 2017

Sun Dec 3 05:13:03 UTC 2017

Sun Dec 3 05:13:08 UTC 2017

Sun Dec 3 05:13:13 UTC 2017

Sun Dec 3 05:13:18 UTC 2017

Sun Dec 3 05:13:23 UTC 2017

Sun Dec 3 05:13:28 UTC 2017

Sun Dec 3 05:13:33 UTC 2017

Sun Dec 3 05:13:38 UTC 2017

Sun Dec 3 05:13:43 UTC 2017

Sun Dec 3 05:13:48 UTC 2017

Sun Dec 3 05:13:53 UTC 2017

Sun Dec 3 05:13:58 UTC 2017

Sun Dec 3 05:14:03 UTC 2017

Sun Dec 3 05:14:08 UTC 2017

Sun Dec 3 05:14:13 UTC 2017

Sun Dec 3 05:14:18 UTC 2017

Sun Dec 3 05:14:23 UTC 2017

Sun Dec 3 05:14:28 UTC 2017

Sun Dec 3 05:14:33 UTC 2017

Sun Dec 3 05:14:38 UTC 2017

Sun Dec 3 05:14:43 UTC 2017

Sun Dec 3 05:14:48 UTC 2017

Sun Dec 3 05:14:53 UTC 2017

Sun Dec 3 05:14:58 UTC 2017

Sun Dec 3 05:15:03 UTC 2017

Sun Dec 3 05:15:08 UTC 2017

Sun Dec 3 05:15:13 UTC 2017

Sun Dec 3 05:15:18 UTC 2017

Sun Dec 3 05:15:23 UTC 2017

vskumar@ubuntu:~$

=================You can see the output for every few seconds listed =======>

It means the container is running as a daemon.

Now, let us use ps -eaf command to check the processed running in linux by using :

$ ps -eaf | grep ‘daemon’

========= See the output of daemon processes ==========>

vskumar@ubuntu:~$

vskumar@ubuntu:~$ ps -eaf | grep ‘daemon’

message+ 837 1 0 20:26 ? 00:00:05 /usr/bin/dbus-daemon –system –address=systemd: –nofork –nopidfile –systemd-activation

root 871 1 0 20:26 ? 00:00:03 /usr/sbin/NetworkManager –no-daemon

avahi 873 1 0 20:26 ? 00:00:00 avahi-daemon: running [ubuntu.local]

root 876 1 0 20:26 ? 00:00:01 /usr/lib/accountsservice/accounts-daemon

avahi 893 873 0 20:26 ? 00:00:00 avahi-daemon: chroot helper

rtkit 1370 1 0 20:28 ? 00:00:00 /usr/lib/rtkit/rtkit-daemon

vskumar 2426 1 0 20:55 ? 00:00:00 /usr/bin/gnome-keyring-daemon –daemonize –login

vskumar 2508 2428 0 20:55 ? 00:00:00 upstart-udev-bridge –daemon –user

vskumar 2515 2428 0 20:55 ? 00:00:04 dbus-daemon –fork –session –address=unix:abstract=/tmp/dbus-nPaV5rWlQc

vskumar 2570 2428 0 20:55 ? 00:00:03 /usr/lib/x86_64-linux-gnu/bamf/bamfdaemon

vskumar 2572 2428 0 20:55 ? 00:00:04 /usr/bin/ibus-daemon –daemonize –xim –address unix:tmpdir=/tmp/ibus

vskumar 2575 2428 0 20:55 ? 00:00:00 upstart-file-bridge –daemon –user

vskumar 2579 2428 0 20:55 ? 00:00:00 upstart-dbus-bridge –daemon –system –user –bus-name system

vskumar 2582 2428 0 20:55 ? 00:00:00 upstart-dbus-bridge –daemon –session –user –bus-name session

vskumar 2605 2428 0 20:55 ? 00:00:00 /usr/lib/ibus/ibus-x11 –kill-daemon

vskumar 2630 2428 0 20:56 ? 00:00:00 gpg-agent –homedir /home/vskumar/.gnupg –use-standard-socket –daemon

vskumar 2645 2428 0 20:56 ? 00:00:02 /usr/lib/unity-settings-daemon/unity-settings-daemon

vskumar 2664 2653 0 20:56 ? 00:00:00 /usr/bin/dbus-daemon –config-file=/etc/at-spi2/accessibility.conf –nofork –print-address 3

vskumar 2851 2654 0 20:56 ? 00:00:01 /usr/lib/unity-settings-daemon/unity-fallback-mount-helper

vskumar 2914 2428 0 20:57 ? 00:00:00 /bin/sh -c /usr/lib/x86_64-linux-gnu/zeitgeist/zeitgeist-maybe-vacuum; /usr/bin/zeitgeist-daemon

vskumar 2920 2914 0 20:57 ? 00:00:00 /usr/bin/zeitgeist-daemon

vskumar 3094 2428 0 21:00 ? 00:00:01 /usr/lib/x86_64-linux-gnu/unity-lens-files/unity-files-daemon

root 4148 1253 0 21:11 ? 00:00:00 docker-containerd-shim –namespace moby –workdir /var/lib/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/0fe495fc93edee3aaadc7fc0fbf21997f0ca3cde4d7e563aa8c61352a43957dd –address /var/run/docker/containerd/docker-containerd.sock –runtime-root /var/run/docker/runtime-runc

vskumar 4480 3206 0 21:19 pts/19 00:00:00 grep –color=auto daemon

vskumar@ubuntu:~$

======== You can see the list of processes running currently ========>

So we are successful! to run a container in a detached mode [not in an interactive mode!] using the command: ‘ sudo docker run -d ubuntu’

You can think in an application architecture having multiple servers or SOA running with different services.

You can simulate the same services using the docker containers, by setting up as images by configuring the required services and connect them to the architecture.

This way the advantages of containers can be utilized well. Where different companies are using and implementing their applications into containers architecture by saving lot of infrastructure cost. No hardware or physical servers are required. Lot of space also can be saved. The microservices architecture leads to the same way.

At this point, I would like to stop this session and in the next blog we will see other exercises.

Vcard-Shanthi Kumar V-v3

 

 

10. DevOps: How to Build images from Docker containers?

Docker-logo

This is in continuation of my last blog “9. DevOps: How to do Containers housekeeping ?”. In this blog I would like to demonstrate on:

How to Build images from docker containers?:

Note: If you want to recollect the docker commands to be used during your current lab practice, visit my blog link:

https://vskumarblogs.wordpress.com/2017/12/13/some-useful-docker-commands-for-handling-images-and-containers/

So far we have built the containers and operated them through the previous exercises. Now, let us see how  can we add  software to our base image on a running container and then convert that container into an image for future usage.

Let’s take ubuntu:16.04 as our base image, install the wget application, and then convert the running container to an image with the below steps:

To make ubuntu:16.04 container is our base image, we need to install the wget application, and then convert it as the running container to a docker image by using the below steps:

  1. Launch an ubuntu:16.04 container using the docker run subcommand, as shown below:
      $ sudo docker run -i -t ubuntu:16.04 /bin/bash
========================>
vskumar@ubuntu:~$ sudo docker ps -aq
155f4b0764b1
vskumar@ubuntu:~$ sudo docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
155f4b0764b1        ubuntu:16.04        "/bin/bash"         2 hours ago         Up 11 minutes                           zen_volhard
vskumar@ubuntu:~$ sudo docker run -i -t ubuntu:16.04 /bin/bash
root@3484664d454a:/# 
=========================>
2. Now, let's  verify is wget  available for this image or not.
============== the display shows there is no wget in this image =========>

root@3484664d454a:/# ls
bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
root@3484664d454a:/# which wget
root@3484664d454a:/# 

      root@472c96295678:/# apt-get update
==================>
As we know that it is a brand new ubuntu container we built it, before installing wget we must synchronize it with the Ubuntu package repository, as shown below:
====================>
root@3484664d454a:/# apt-get update
Get:1 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]         
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]                                                                      
Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]                                                                    
Get:5 http://archive.ubuntu.com/ubuntu xenial/universe Sources [9802 kB]                                                                      
Get:6 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [53.1 kB]                                                            
Get:7 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [504 kB]                                                          
Get:8 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [12.9 kB]                                                   
Get:9 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [229 kB]                                                      
Get:10 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3479 B]                                                   
Get:11 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB]                                                                  
Get:12 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB]                                                            
Get:13 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB]                                                              
Get:14 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB]                                                             
Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources [228 kB]                                                              
Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [864 kB]                                                           
Get:17 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [13.7 kB]                                                    
Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [711 kB]                                                       
Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [18.5 kB]                                                    
Get:20 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [5174 B]                                                         
Get:21 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [7135 B]                                                     
Fetched 24.6 MB in 59s (412 kB/s)                                                                                                             
Reading package lists... Done
root@3484664d454a:/# 
================================>
Now, we can install wget as below:
=========== Output of wget installation on container ===========>

root@3484664d454a:/# 
root@3484664d454a:/# apt-get install -y wget
Reading package lists... Done
Building dependency tree        
Reading state information... Done
The following additional packages will be installed:
  ca-certificates libidn11 libssl1.0.0 openssl
The following NEW packages will be installed:
  ca-certificates libidn11 libssl1.0.0 openssl wget
0 upgraded, 5 newly installed, 0 to remove and 1 not upgraded.
Need to get 2089 kB of archives.
After this operation, 6027 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libidn11 amd64 1.32-3ubuntu1.2 [46.5 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libssl1.0.0 amd64 1.0.2g-1ubuntu4.9 [1085 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 openssl amd64 1.0.2g-1ubuntu4.9 [492 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 ca-certificates all 20170717~16.04.1 [168 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 wget amd64 1.17.1-1ubuntu1.3 [299 kB]
Fetched 2089 kB in 4s (421 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libidn11:amd64.
(Reading database ... 4768 files and directories currently installed.)
Preparing to unpack .../libidn11_1.32-3ubuntu1.2_amd64.deb ...
Unpacking libidn11:amd64 (1.32-3ubuntu1.2) ...
Selecting previously unselected package libssl1.0.0:amd64.
Preparing to unpack .../libssl1.0.0_1.0.2g-1ubuntu4.9_amd64.deb ...
Unpacking libssl1.0.0:amd64 (1.0.2g-1ubuntu4.9) ...
Selecting previously unselected package openssl.
Preparing to unpack .../openssl_1.0.2g-1ubuntu4.9_amd64.deb ...
Unpacking openssl (1.0.2g-1ubuntu4.9) ...
Selecting previously unselected package ca-certificates.
Preparing to unpack .../ca-certificates_20170717~16.04.1_all.deb ...
Unpacking ca-certificates (20170717~16.04.1) ...
Selecting previously unselected package wget.
Preparing to unpack .../wget_1.17.1-1ubuntu1.3_amd64.deb ...
Unpacking wget (1.17.1-1ubuntu1.3) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Setting up libidn11:amd64 (1.32-3ubuntu1.2) ...
Setting up libssl1.0.0:amd64 (1.0.2g-1ubuntu4.9) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up openssl (1.0.2g-1ubuntu4.9) ...
Setting up ca-certificates (20170717~16.04.1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up wget (1.17.1-1ubuntu1.3) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for ca-certificates (20170717~16.04.1) ...
Updating certificates in /etc/ssl/certs...
148 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
root@3484664d454a:/# 
=========================== End of installation ===========>
Now, we can verify with  'which wget ' command
============>
root@3484664d454a:/# which wget
/usr/bin/wget
root@3484664d454a:/# 
============>
Please let us recollect; installation of any software would alter the Dockwer base image composition. In which, we can also trace using the docker diff subcommand as we did in the previous exercises. 
I will open a second Terminal/screen, the docker diff subcommand can be issued from it, as below:
      $ sudo docker diff 472c96295678
===============>
vskumar@ubuntu:~$  
vskumar@ubuntu:~$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
3484664d454a        ubuntu:16.04        "/bin/bash"         15 minutes ago      Up 15 minutes                           jolly_cray
155f4b0764b1        ubuntu:16.04        "/bin/bash"         2 hours ago         Up 40 minutes                           zen_volhard
vskumar@ubuntu:~$ sudo docker diff 155f4b0764b1
C /root
A /root/.bash_history
vskumar@ubuntu:~$ 
============>

How to save this container ?:
The docker commit subcommand can be performed on a running or a stopped container. When a commit is performed on a running container, the Docker Engine pauses the container during the commit operation in order to avoid any data inconsistency. 
Now we can stop our running container.
We can commit a container to an image with the docker commit subcommand, as shown here:
      $ sudo docker commit 

================== Using commit for container ============>

root@3484664d454a:/# 
root@3484664d454a:/# exit
exit
vskumar@ubuntu:~$ sudo docker commit 3484664d454a
[sudo] password for vskumar: 
Sorry, try again.
[sudo] password for vskumar: 
sha256:fc7e4564eb928ccfe068c789f0d650967e8d5dc42d4e8d92409aab6614364075
vskumar@ubuntu:~$ 
=======================>
You can see the container id from the above output.

=========== We can also give a message to the commit command as below ===>
vskumar@ubuntu:~$ sudo docker commit 3484664d454a  Docker-exercise/ubuntu-wgetinstall
invalid reference format: repository name must be lowercase
vskumar@ubuntu:~$ sudo docker commit 3484664d454a  docker-exercise/ubuntu-wgetinstall
sha256:e34304119838d79da60e12776529106c350b1972cd517648e8ab90311fad7b1a
vskumar@ubuntu:~$ sudo docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                       PORTS               NAMES
3484664d454a        ubuntu:16.04        "/bin/bash"         24 minutes ago      Exited (130) 6 minutes ago                       jolly_cray
155f4b0764b1        ubuntu:16.04        "/bin/bash"         2 hours ago         Up About an hour                                 zen_volhard
vskumar@ubuntu:~$ 
===================== Note there are two containers created  ====>
Now, I want to remove one container :
==========>

vskumar@ubuntu:~$ sudo docker rm 3484664d454a
3484664d454a
vskumar@ubuntu:~$ sudo docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
155f4b0764b1        ubuntu:16.04        "/bin/bash"         3 hours ago         Up About an hour                        zen_volhard
vskumar@ubuntu:~$ 
========================>

Now let us check the docker images how many we have in our store :
=========== List of images ==========>
vskumar@ubuntu:~$ 
vskumar@ubuntu:~$ sudo docker images
REPOSITORY                           TAG                 IMAGE ID            CREATED             SIZE
docker-exercise/ubuntu-wgetinstall   latest              e34304119838        5 minutes ago       169MB
<none>                               <none>              fc7e4564eb92        7 minutes ago       169MB
hello-world                          latest              f2a91732366c        5 days ago          1.85kB
ubuntu                               16.04               20c44cd7596f        8 days ago          123MB
ubuntu                               latest              20c44cd7596f        8 days ago          123MB
busybox                              latest              6ad733544a63        3 weeks ago         1.13MB
busybox                              1.24                47bcc53f74dc        20 months ago       1.11MB
vskumar@ubuntu:~$ 

==============================>
How to remove images:

by using :

sudo docker rmi image [image id], we can remove the image. For example; if you want to remove the image id:
47bcc53f74dc
you can use: $ sudo docker rmi image 47bcc53f74dc
=================>
vskumar@ubuntu:~$ sudo docker rmi image 47bcc53f74dc
Untagged: busybox:1.24
Untagged: busybox@sha256:8ea3273d79b47a8b6d018be398c17590a4b5ec604515f416c5b797db9dde3ad8
Deleted: sha256:47bcc53f74dc94b1920f0b34f6036096526296767650f223433fe65c35f149eb
Deleted: sha256:f6075681a244e9df4ab126bce921292673c9f37f71b20f6be1dd3bb99b4fdd72
Deleted: sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6
Error: No such image: image
vskumar@ubuntu:~$ 
=================>
 

So by using :

sudo docker rmi image [image id], we can remove the image.  Just recollect the difference between the image removal and container removal. For containers removal refer to my blog on "Housekeeping containers". Now we have learned how to create an image from containers using a few easy steps by installing the wget application. You can also add some other software applications to the same or different container(s) in the similar way.

You can use this method for testing also.  Let us say, you want to test a set of java programs. Then you need to install jdk and copy your programs. Write a shell script to compile and execute the programs by piping their output into a text file in a Linux background. So this way, you will be using the container as a test environment also.

The most easy and recommended way of creating an image is to use the Dockerfile method.

Within dockerfile we can mention the setup required to build a container through different steps. Then dockerfile creates the required setup for a container, under docker’s building activity.

We will see it in future exercises.

Please leave your feedback!

Vcard-Shanthi Kumar V-v39. DevOps: How to do Containers housekeeping ?

9. DevOps: How to do Containers housekeeping ?

Docker-logo

In  continuation of my previous blog on “8. DevOps:How to control and operate docker containers”, in this blog I would like to show some lab practice on “docker Containers housekeeping”.

From the previous lab sessions, we have seen many containers when we used ps -a option.

We have used two containers most of the times.

Others are not required. This time we will see how to remove a container physically.

Let us consider the below containers to remove using rm command:

32bc16b508d4        ubuntu 
a744246ffb8e        hello-world
1dd55efde43f        hello-world

$sudo docker rm 1dd55efde43f 
$sudo docker rm a744246ffb8e 
$sudo docker rm 32bc16b508d4 
================ You can see the above three containers are removed =========>
vskumar@ubuntu:~$ sudo docker rm 1dd55efde43f 
1dd55efde43f
vskumar@ubuntu:~$ sudo docker rm a744246ffb8e 
a744246ffb8e
vskumar@ubuntu:~$ sudo docker rm 32bc16b508d4 
32bc16b508d4
vskumar@ubuntu:~$ sudo docker ps -a |more
CONTAINER ID        IMAGE               COMMAND                 CREATED         
    STATUS                         PORTS               NAMES
f123dbd09116        ubuntu:16.04        "/bin/bash"             18 minutes ago  
    Exited (0) 18 minutes ago                          elastic_nightingale
3cfdea29ce6e        ubuntu              "bash"                  27 minutes ago  
    Exited (0) 26 minutes ago                          gallant_nobel
155f4b0764b1        ubuntu:16.04        "/bin/bash"             About an hour ag
o   Exited (0) 12 minutes ago                          zen_volhard
11e293722c64        ubuntu:16.04        "/bin/bash"             About an hour ag
o   Exited (0) About an hour ago                       dreamy_bassi
d10ad2bd62f7        ubuntu:16.04        "/bin/bash"             About an hour ag
o   Exited (0) About an hour ago                       cranky_dijkstra
cb1ff260d48e        ubuntu              "ls /usr/src"           11 hours ago    
    Exited (0) 11 hours ago                            wonderful_hawking
b20691fd8fb5        ubuntu              "ls /usr"               11 hours ago    
    Exited (0) 11 hours ago                            friendly_mirzakhani
431ba4c53028        ubuntu              "ls"                    11 hours ago    
    Exited (0) 28 minutes ago                          affectionate_nobel
2c31684bb1f4        ubuntu              "ls -la"                11 hours ago    
    Exited (0) 11 hours ago                            zealous_meitner
fe2e3b449daf        ubuntu              "ls -la /home/."        11 hours ago    
    Exited (0) 11 hours ago                            dreamy_shirley
c44bdd05b94d        ubuntu              "ls -la home."          11 hours ago    
    Exited (2) 11 hours ago                            elastic_pasteur
8b8afa82859a        ubuntu              "ls -la"                11 hours ago    
    Exited (0) 11 hours ago                            festive_panini
2811eb37af61        ubuntu              "ls -la 604831dbce2a"   11 hours ago    
    Exited (2) 11 hours ago                            jolly_swartz
604831dbce2a        ubuntu:16.04        "/bin/bash"             11 hours ago    
    Exited (0) 11 hours ago                            vibrant_ride
718636415a7f        ubuntu:16.04        "/bin/bash"             12 hours ago    
    Exited (0) 12 hours ago                            reverent_noyce
53a7751d4673        ubuntu:16.04        "/bin/bash"             13 hours ago    
    Exited (0) 13 hours ago                            musing_chandrasekhar
1ba71598b7b8        hello-world         "/hello"                16 hours ago    
    Exited (0) 16 hours ago                            musing_kare
vskumar@ubuntu:~$  
==============>
Now let us consider some more examples  as below:
3cfdea29ce6e        ubuntu 
cb1ff260d48e        ubuntu 
b20691fd8fb5        ubuntu 
431ba4c53028        ubuntu 
c31684bb1f4        ubuntu 
2c31684bb1f4        ubuntu 
fe2e3b449daf        ubuntu
c44bdd05b94d        ubuntu 
2811eb37af61        ubuntu
Now, let us use the below rm commands:
$sudo docker rm 3cfdea29ce6e
$sudo docker rm cb1ff260d48e
$sudo docker rm b20691fd8fb5 
$sudo docker rm 431ba4c53028 
$sudo docker rm 2c31684bb1f4
$sudo docker rm fe2e3b449daf 
$sudo docker rm c44bdd05b94d
$sudo docker rm 2811eb37af61
=================>
See the below output also:
 ================== Container removal ==========>
vskumar@ubuntu:~$ clear

vskumar@ubuntu:~$ sudo docker rm 3cfdea29ce6e
3cfdea29ce6e
vskumar@ubuntu:~$ sudo docker rm cb1ff260d48e
cb1ff260d48e
vskumar@ubuntu:~$ sudo docker rm b20691fd8fb5
b20691fd8fb5
vskumar@ubuntu:~$ sudo docker rm 431ba4c53028
431ba4c53028
vskumar@ubuntu:~$ sudo docker rm 2c31684bb1f4
2c31684bb1f4
vskumar@ubuntu:~$ sudo docker rm fe2e3b449daf
fe2e3b449daf
vskumar@ubuntu:~$ sudo docker rm fc44bdd05b94d
Error: No such container: fc44bdd05b94d
vskumar@ubuntu:~$ sudo docker rm c44bdd05b94d
c44bdd05b94d
vskumar@ubuntu:~$ sudo docker rm 2811eb37af61
2811eb37af61
vskumar@ubuntu:~$ 
==========================>
Now we can see the list of available containers:
============= List of latest containers ==============>
vskumar@ubuntu:~$ sudo docker ps -a |more
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                         PORTS               NAMES
f123dbd09116        ubuntu:16.04        "/bin/bash"         28 minutes ago      Exited (0) 28 minutes ago                          elastic_nigh
tingale
155f4b0764b1        ubuntu:16.04        "/bin/bash"         About an hour ago   Exited (0) 22 minutes ago                          zen_volhard
11e293722c64        ubuntu:16.04        "/bin/bash"         About an hour ago   Exited (0) About an hour ago                       dreamy_bassi
d10ad2bd62f7        ubuntu:16.04        "/bin/bash"         2 hours ago         Exited (0) About an hour ago                       cranky_dijks
tra
8b8afa82859a        ubuntu              "ls -la"            11 hours ago        Exited (0) 11 hours ago                            festive_pani
ni
604831dbce2a        ubuntu:16.04        "/bin/bash"         12 hours ago        Exited (0) 11 hours ago                            vibrant_ride
718636415a7f        ubuntu:16.04        "/bin/bash"         12 hours ago        Exited (0) 12 hours ago                            reverent_noy
ce
53a7751d4673        ubuntu:16.04        "/bin/bash"         13 hours ago        Exited (0) 13 hours ago                            musing_chand
rasekhar
1ba71598b7b8        hello-world         "/hello"            16 hours ago        Exited (0) 16 hours ago                            musing_kare
vskumar@ubuntu:~$ 
===========================>
Now, I wan to keep very few containers only and remove the below containers:

604831dbce2a        ubuntu:16.04
718636415a7f        ubuntu:16.04 
53a7751d4673        ubuntu:16.04
8b8afa82859a        ubuntu 
I want to use the below  commands to remove  the above containers:
$sudo docker rm 604831dbce2a
$sudo docker rm 718636415a7f
$sudo docker rm 53a7751d4673
$sudo docker rm 8b8afa82859a

========================= We can see the latest/limited containers =======>
vskumar@ubuntu:~$ sudo docker rm 604831dbce2a
604831dbce2a
vskumar@ubuntu:~$ sudo docker rm 718636415a7f
718636415a7f
vskumar@ubuntu:~$ sudo docker rm 53a7751d4673
53a7751d4673
vskumar@ubuntu:~$ sudo docker rm 8b8afa82859a
8b8afa82859a
vskumar@ubuntu:~$ sudo docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                         PORTS               NAMES
f123dbd09116        ubuntu:16.04        "/bin/bash"         36 minutes ago      Exited (0) 36 minutes ago                          elastic_nightingale
155f4b0764b1        ubuntu:16.04        "/bin/bash"         About an hour ago   Exited (0) 30 minutes ago                          zen_volhard
11e293722c64        ubuntu:16.04        "/bin/bash"         About an hour ago   Exited (0) About an hour ago                       dreamy_bassi
d10ad2bd62f7        ubuntu:16.04        "/bin/bash"         2 hours ago         Exited (0) About an hour ago                       cranky_dijkstra
1ba71598b7b8        hello-world         "/hello"            16 hours ago        Exited (0) 16 hours ago                            musing_kare
vskumar@ubuntu:~$ sudo docker ps 
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
vskumar@ubuntu:~$ 
================================>
We can also see the current container ids as below:
========== Listing containers ids ===============>
vskumar@ubuntu:~$ sudo docker ps -aq
f123dbd09116
155f4b0764b1
11e293722c64
d10ad2bd62f7
1ba71598b7b8
vskumar@ubuntu:~$ 
===============================>
To remove the inactive containers there is a prune command. Let us try with it.
Before doing it I want to make a container active and try this prune command on it:
================= I have made one container Active ======>
vskumar@ubuntu:~$ sudo docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                         PORTS               NAMES
f123dbd09116        ubuntu:16.04        "/bin/bash"         About an hour ago   Exited (0) About an hour ago                       elastic_nightingale
155f4b0764b1        ubuntu:16.04        "/bin/bash"         2 hours ago         Exited (0) 40 minutes ago                          zen_volhard
11e293722c64        ubuntu:16.04        "/bin/bash"         2 hours ago         Exited (0) 2 hours ago                             dreamy_bassi
d10ad2bd62f7        ubuntu:16.04        "/bin/bash"         2 hours ago         Exited (0) 2 hours ago                             cranky_dijkstra
1ba71598b7b8        hello-world         "/hello"            17 hours ago        Exited (0) 17 hours ago                            musing_kare
vskumar@ubuntu:~$ sudo docker start 155f4b0764b1
155f4b0764b1
vskumar@ubuntu:~$ sudo docker ps 
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
155f4b0764b1        ubuntu:16.04        "/bin/bash"         2 hours ago         Up 6 seconds                            zen_volhard
vskumar@ubuntu:~$ 
========================>
To use prune , below format should be used:
$ sudo docker container prune
=========== The usage of prune command =======>
vskumar@ubuntu:~$ 
vskumar@ubuntu:~$ sudo docker container prune
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] y
Deleted Containers:
f123dbd09116561a042e12060f449daa9a36d9a59034b1dd1b96846e66ead14d
11e293722c646a0def7a8a1f2cdf85a47654eb62ef7701bd2d7221c7e69a943f
d10ad2bd62f7a8de379272f21dfccec89c0e5829b3a58ce01927530b6b44ea01
1ba71598b7b8d97fcbd3a589a6665238690be99936b6782647b5040eeb82aafa
Total reclaimed space: 844B
vskumar@ubuntu:~$ 
========== You can see the removed container ids =============>
You can see the existing  containers:
====== Available containers after Housekeeping is done =========>
vskumar@ubuntu:~$ 
vskumar@ubuntu:~$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
155f4b0764b1        ubuntu:16.04        "/bin/bash"         2 hours ago         Up 6 minutes                            zen_volhard
vskumar@ubuntu:~$ sudo docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
155f4b0764b1        ubuntu:16.04        "/bin/bash"         2 hours ago         Up 6 minutes                            zen_volhard
vskumar@ubuntu:~$ sudo docker ps -aq
155f4b0764b1
vskumar@ubuntu:~$
===================>
In this exercise we have seen the housekeeping of containers well.
Please note if you have deleted all the containers by mistake, you need to install the containers again. 
Follow the containers creation exercise.

I would like to break this session at this point. In the next blog I would like to present the lab practice on:

 “How to Build images from Docker containers?

Vcard-Shanthi Kumar V


					

8. DevOps:How to control and operate docker containers

Docker-logo

In  continuation of my previous blog on “7. DevOps: How to track changes in a container”, in this blog I would like to show some lab practice “How to control and operate docker containers”.

Controlling/operating Docker container:

In this exercise initially, we can see on how to start/stop/restart the containers.

The Docker Engine enables us to start, stop, and restart a container with a set of docker subcommands.

Let me display the docker images:

=======================>

vskumar@ubuntu:~$ sudo service docker status

docker.service – Docker Application Container Engine

Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: e

Active: active (running) since Sat 2017-11-25 15:09:35 PST; 2min 24s ago

Docs: https://docs.docker.com

Main PID: 1356 (dockerd)

Tasks: 30

Memory: 95.2M

CPU: 3.998s

=========================>

vskumar@ubuntu:~$ sudo docker images

REPOSITORY TAG IMAGE ID CREATED SIZE

hello-world latest f2a91732366c 4 days ago 1.85kB

ubuntu 16.04 20c44cd7596f 8 days ago 123MB

ubuntu latest 20c44cd7596f 8 days ago 123MB

busybox latest 6ad733544a63 3 weeks ago 1.13MB

busybox 1.24 47bcc53f74dc 20 months ago 1.11MB

vskumar@ubuntu:~$

=======================>

Now, I want to launch our container ubuntu 16.04 with start subcommand and experiment with the docker stop subcommand, as given below:

$ sudo docker run -i -t ubuntu:16.04 /bin/bash

======================>
vskumar@ubuntu:~$ 
vskumar@ubuntu:~$ sudo docker run -i -t ubuntu:16.04 /bin/bash
root@d10ad2bd62f7:/# 
======================>
Now, we are with this container in interactive mode.
Let us apply some linux commands as below:
========================>
root@d10ad2bd62f7:/# pwd
/
root@d10ad2bd62f7:/# ls
bin   dev  home  lib64  mnt  proc  run   srv  tmp  var
boot  etc  lib   media  opt  root  sbin  sys  usr
root@d10ad2bd62f7:/# cd home
root@d10ad2bd62f7:/home# ls
root@d10ad2bd62f7:/home# cd ../var
root@d10ad2bd62f7:/var# ls
backups  cache  lib  local  lock  log  mail  opt  run  spool  tmp
root@d10ad2bd62f7:/var# cd tmp
root@d10ad2bd62f7:/var/tmp# pwd
/var/tmp
root@d10ad2bd62f7:/var/tmp# ls
root@d10ad2bd62f7:/var/tmp# cd ../lib
root@d10ad2bd62f7:/var/lib# ls
apt  dpkg  initscripts  insserv  misc  pam  systemd  update-rc.d  urandom
root@d10ad2bd62f7:/var/lib# 
================================>

Now I want to create a file as below in this container:
==================>

root@d10ad2bd62f7:/var/lib# pwd
/var/lib
root@d10ad2bd62f7:/var/lib# cd ../../home
root@d10ad2bd62f7:/home# ls
root@d10ad2bd62f7:/home# touch file1.txt
===================>

Let me add some text into this file as below:
==========>
root@d10ad2bd62f7:/home# echo " Testing containers " > file1.txt
root@d10ad2bd62f7:/home# echo " Applying stop command on containers " > file1.txt
root@d10ad2bd62f7:/home# cat file1.txt
 Applying stop command on containers 
root@d10ad2bd62f7:/home# echo " Testing containers " > file1.txtroot@d10ad2bd62f7:/home# echo " Applying stop command on containers " >> file1.txt
root@d10ad2bd62f7:/home# ls
file1.txt
root@d10ad2bd62f7:/home# ls -l
total 4
-rw-r--r-- 1 root root 59 Nov 25 23:20 file1.txt
root@d10ad2bd62f7:/home# cat file1.txt 
Testing containers 
Applying stop command on containers 
root@d10ad2bd62f7:/home# 
===============>

I have applied some more linux file operations on this container as below:
=================>
root@d10ad2bd62f7:/home#      
root@d10ad2bd62f7:/home# cat file1.txt >> file2.txt
root@d10ad2bd62f7:/home# ls
file1.txt  file2.txt
root@d10ad2bd62f7:/home# ls -l
total 8
-rw-r--r-- 1 root root 59 Nov 25 23:20 file1.txt
-rw-r--r-- 1 root root 59 Nov 25 23:22 file2.txt
root@d10ad2bd62f7:/home# diff file1.txt file2.txt
root@d10ad2bd62f7:/home# echo " Applying restart command also on containers " >> file1.txt
root@d10ad2bd62f7:/home# ls -l
total 8
-rw-r--r-- 1 root root 105 Nov 25 23:23 file1.txt
-rw-r--r-- 1 root root  59 Nov 25 23:22 file2.txt
root@d10ad2bd62f7:/home# diff file1.txt file2.txt3d2
<  Applying restart command also on containers 
root@d10ad2bd62f7:/home# 
====================>
Now, let me apply a stop command on this container and see as 
below by using exit to come out and stop:
=====================>
root@155f4b0764b1:/# 
root@155f4b0764b1:/# exit
exit
vskumar@ubuntu:~$ sudo docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
hello-world         latest              f2a91732366c        4 days ago          1.85kB
ubuntu              16.04               20c44cd7596f        8 days ago          123MB
ubuntu              latest              20c44cd7596f        8 days ago          123MB
busybox             latest              6ad733544a63        3 weeks ago         1.13MB
busybox             1.24                47bcc53f74dc        20 months ago       1.11MB
vskumar@ubuntu:~$ sudo docker stop  d10ad2bd62f7
d10ad2bd62f7
vskumar@ubuntu:~$ 
=============>
Now, I want to check the containers status using ps -a command as below:
==============>
vskumar@ubuntu:~$ sudo docker ps -a
CONTAINER ID        IMAGE               COMMAND                 CREATED             STATUS                     PORTS               NAMES
155f4b0764b1        ubuntu:16.04        "/bin/bash"             2 minutes ago       Exited (0) 2 minutes ago                       zen_volhard
cb1ff260d48e        ubuntu              "ls /usr/src"           10 hours ago        Exited (0) 10 hours ago                        wonderful_hawking
b20691fd8fb5        ubuntu              "ls /usr"               10 hours ago        Exited (0) 10 hours ago                        friendly_mirzakhani
431ba4c53028        ubuntu              "ls"                    10 hours ago        Exited (0) 10 hours ago                        affectionate_nobel
2c31684bb1f4        ubuntu              "ls -la"                10 hours ago        Exited (0) 10 hours ago                        zealous_meitner
fe2e3b449daf        ubuntu              "ls -la /home/."        10 hours ago        Exited (0) 10 hours ago                        dreamy_shirley
c44bdd05b94d        ubuntu              "ls -la home."          10 hours ago        Exited (2) 10 hours ago                        elastic_pasteur
8b8afa82859a        ubuntu              "ls -la"                10 hours ago        Exited (0) 10 hours ago                        festive_panini
2811eb37af61        ubuntu              "ls -la 604831dbce2a"   10 hours ago        Exited (2) 10 hours ago                        jolly_swartz
604831dbce2a        ubuntu:16.04        "/bin/bash"             10 hours ago        Exited (0) 10 hours ago                        vibrant_ride
718636415a7f        ubuntu:16.04        "/bin/bash"             11 hours ago        Exited (0) 10 hours ago                        reverent_noyce
53a7751d4673        ubuntu:16.04        "/bin/bash"             12 hours ago        Exited (0) 12 hours ago                        musing_chandrasekhar
32bc16b508d4        ubuntu              "bash"                  13 hours ago        Exited (0) 13 hours ago                        eager_goldberg
1dd55efde43f        hello-world         "/hello"                13 hours ago        Exited (0) 13 hours ago                        peaceful_pasteur
a744246ffb8e        hello-world         "/hello"                15 hours ago        Exited (0) 15 hours ago                        naughty_wing
1ba71598b7b8        hello-world         "/hello"                15 hours ago        Exited (0) 15 hours ago                        musing_kare
vskumar@ubuntu:~$ 
===================>
you can see the latest status of our container;
155f4b0764b1        ubuntu:16.04        "/bin/bash"             2 minutes ago       Exited (0) 2 minutes ago                       zen_volhard
It means Docker  maintains in the logs on the usage of containers also.
Now, I want to start the previously stopped container using the docker start subcommand 
by specifying the container ID as an argument, as follows:
$ sudo docker start 155f4b0764b1
===============>
vskumar@ubuntu:~$ sudo docker start 155f4b0764b1
155f4b0764b1
vskumar@ubuntu:~$ 
===============>
Let us check the images status also as below:
==================> Copied the 1st two lines only ----->
vskumar@ubuntu:~$ sudo docker ps -a |more
CONTAINER ID        IMAGE               COMMAND                 CREATED         
    STATUS                      PORTS               NAMES
155f4b0764b1        ubuntu:16.04        "/bin/bash"             10 minutes ago  
    Up About a minute                               zen_volhard
11e293722c64        ubuntu:16.04        "/bin/bash"             12 minutes ago  
    Exited (0) 12 minutes ago  
====================>
It means it shows the current status of the container id:155f4b0764b1 
We need to notice one thing here.

By default, the docker start subcommand will not attach to the container.

We can attach it to the container either using the -a option in the docker start subcommand or by explicitly using the docker attach subcommand.

Now let us try these options.

We will see attach command

$ sudo docker attach 155f4b0764b1
=================>
vskumar@ubuntu:~$ 
vskumar@ubuntu:~$ sudo docker attach 155f4b0764b1
root@155f4b0764b1:/# 
root@155f4b0764b1:/#
=================>
So the attach command brought the container into interactive mode.
Now let me exit it and try the -a option with docker start command:
==================>
root@155f4b0764b1:/home# 
root@155f4b0764b1:/home# exit
exit
===============>
with start -a option:
=============>
vskumar@ubuntu:~$ sudo docker start -a 155f4b0764b1
root@155f4b0764b1:/# 
=================>
After exit, I have tried ps command:
=====================>
vskumar@ubuntu:~$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
155f4b0764b1        ubuntu:16.04        "/bin/bash"         21 minutes ago      Up 3 minutes                            zen_volhard
vskumar@ubuntu:~$ 
======================>
From the above display you can see that its start and current status.
It means the container is active and running.
Now, I want to make another [below] container active.
1dd55efde43f        hello-world         "/hello"                13 hours ago Exited (0) 13 hours ago                        peaceful_pasteur
Let us see the ps command after these 2 containers are in active state.
I want to use the below command:
$ sudo docker start -a 1dd55efde43f
===================>
vskumar@ubuntu:~$ sudo docker start -a 1dd55efde43f

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

Let us  try something more ambitious, we can run an Ubuntu container with:
 $ docker run -it ubuntu bash

If you want to;
Share images, automate workflows, and more with a free Docker ID:
visit: https://cloud.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/

vskumar@ubuntu:~$ 
===================>
Please note the above container doesn't have a any os related process to 
keep running continuously. 
Just it displays the message only. Hence 
in the list it will not appear. 
Now, let me list the current processes using docker ps command:
===========>
vskumar@ubuntu:~$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
155f4b0764b1        ubuntu:16.04        "/bin/bash"         32 minutes ago      Up 14 minutes                           zen_volhard
vskumar@ubuntu:~$ 
==============>
So as on now one container is running.

The next set of container controlling subcommands are docker pause and docker unpause.

The docker pause subcommand will freeze the execution of all the processes within the container.

The docker unpause subcommand will unfreeze the execution of all the processes within the container and resume the execution from the point where it was frozen.

Let us try the below command 
$sudo docker pause 155f4b0764b1
========================>
vskumar@ubuntu:~$ 
vskumar@ubuntu:~$ sudo docker pause 155f4b0764b1
155f4b0764b1
vskumar@ubuntu:~$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                   PORTS               NAMES
155f4b0764b1        ubuntu:16.04        "/bin/bash"         About an hour ago   Up 30 minutes (Paused)                       zen_volhard
vskumar@ubuntu:~$ 
==========================>
You can see the current status as Paused.
Now let me try unpause command also.
$ sudo docker unpause 155f4b0764b1
You can see the total output of this container with pause and unpause statuses:
===================>
vskumar@ubuntu:~$ 
vskumar@ubuntu:~$ sudo docker pause 155f4b0764b1
155f4b0764b1
vskumar@ubuntu:~$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                   PORTS               NAMES
155f4b0764b1        ubuntu:16.04        "/bin/bash"         About an hour ago   Up 30 minutes (Paused)                       zen_volhard
vskumar@ubuntu:~$ ^C
vskumar@ubuntu:~$ sudo docker unpause 155f4b0764b1
155f4b0764b1
vskumar@ubuntu:~$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
155f4b0764b1        ubuntu:16.04        "/bin/bash"         About an hour ago   Up 32 minutes                           zen_volhard
vskumar@ubuntu:~$ 
======================>
Now, in this lab session finally we will use the stop command:

The container and the script running within it can be stopped using the docker stop subcommand, as shown below:

$ sudo docker stop 155f4b0764b1
=====================> 
vskumar@ubuntu:~$ sudo docker stop 155f4b0764b1
155f4b0764b1
vskumar@ubuntu:~$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED STATUS              PORTS               NAMES
=============== It shows there is no active container =============>
Now, let me try with -a and more options.
=========== Partial display is shown here upto the container ===========>
vskumar@ubuntu:~$ sudo docker ps -a |more
CONTAINER ID        IMAGE               COMMAND                 CREATED         
    STATUS                         PORTS               NAMES
f123dbd09116        ubuntu:16.04        "/bin/bash"             6 minutes ago   
    Exited (0) 5 minutes ago                           elastic_nightingale
3cfdea29ce6e        ubuntu              "bash"                  14 minutes ago  
    Exited (0) 14 minutes ago                          gallant_nobel
155f4b0764b1        ubuntu:16.04        "/bin/bash"             About an hour ag
o   Exited (0) 17 seconds ago  
================================>

So far in this lab session, we have seen the differences of different commands to operate and control the containers. I would like to break this session for now. In the next blog we will see on how to manage “Housekeeping containers“.

 Vcard-Shanthi Kumar V

 

DevOps Practices & FAQs -1

Do you think Agile practices are mandatory to implement DevOps Practices ?

Yes, Agile practices bring Continuous delivery [CD] of business requirements through SPRINT. Then these will be converted into different software code and infrastructure. These will be verified and deployed into the production systems.

Fundamental process of SPRINT is; if user gives a requirement to product owner; it will

be decomposed into small chunks of requirements and they will be considered into different SPRINTs [a set of Small technical requirements, where these can be fixed or enhanced in few hours; ex: include or update a formula] and will be presented for verification.

When the DevOps practices are getting implemented; these SPRINTs can be considered to deploy into different technical environments for validating the build and in turn they will be qualified to move into production. This  is an ongoing process by following Continuous Delivery integration [CDI] of Agile. If many developers are there in a Business unit there can be many builds and the users do not need to wait for all of them to complete. The CD can happen. So whichever is completed first it should be delivered. During the CDI the DevOps engineers role is to package the software code and deploy the builds for verification and later on to production. In their activity journey  many tasks can be repeatable. This repeatable activity can be automated with the So called DevOps tools to save manual efforts. This can reduce the deployment cycle time and at the same time total SPRINT delivery time reduction can happen. So the business benefit can be achieved, by pushing the build of specific user requirement faster.

With all the above, without having Agile practices, you can not jump into DevOps practices right away. The people practices on Agile is also very essential.

So if your organization is not having Agile practices in place there is no point of thinking DevOps practices. This can come under old IT tradition.

Look into the below videos on the importance and advantages of DevOps conversion to an IT Company:

 

Below image can denote the transition of IT development cycles till DevOps practice with continuous operation [automated]:

 

DevOps Movement

 

Visit for next series of DevOps FAQs: https://wordpress.com/post/vskumar.blog/1684

Visit for series of Agile interview questions:

https://vskumar.blog/2017/09/04/sdlc-agile-interview-questions-for-freshers-1/

 

Also, Look into some more FAQs:

https://vskumar.blog/2018/12/29/devops-practices-faqs-2-devops-practices-faqs/

https://vskumar.blog/2019/02/01/devops-practices-faqs-3-domain-area/

7. DevOps: How to track changes in a container

Docker-logo

In  continuation of my previous blog on “6. DevOps: How to work with interactive docker containers”, in this blog I would like to show some lab practice “How to track changes in a container”.

Tracking changes inside containers:

Now, let us see the container operations and tracking them.

Let’s launch a container in interactive mode, as we have done in previous session, we can use the below command.

$ sudo docker run -i -t ubuntu:16.04 /bin/bash 
=================>
vskumar@ubuntu:/var/log$ sudo docker run -i -t ubuntu:16.04 /bin/bash  
root@718636415a7f:/# ps
   PID TTY          TIME CMD
     1 pts/0    00:00:00 bash
     9 pts/0    00:00:00 ps
root@718636415a7f:/# ps -ef
UID         PID   PPID  C STIME TTY          TIME CMD
root          1      0  0 12:39 pts/0    00:00:00 /bin/bash
root         10      1  0 12:53 pts/0    00:00:00 ps -ef
root@718636415a7f:/# ls
bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
root@718636415a7f:/# 
======================>
Now, let us go to home directory:
========>
root@718636415a7f:/# pwd
/
root@718636415a7f:/# cd home
root@718636415a7f:/home# pwd
/home
root@718636415a7f:/home# ls
root@718636415a7f:/home# 
==============>
Now, as a standalone machine of this docker container, 
I want to create 4 text files using touch command as below:
==============>
root@718636415a7f:/home# ls
root@718636415a7f:/home# ls -l
total 0
root@718636415a7f:/home# touch {vsk1,vsk2,vsk3,vsk4}
root@718636415a7f:/home# ls -l
total 0
-rw-r--r-- 1 root root 0 Nov 25 12:57 vsk1
-rw-r--r-- 1 root root 0 Nov 25 12:57 vsk2
-rw-r--r-- 1 root root 0 Nov 25 12:57 vsk3
-rw-r--r-- 1 root root 0 Nov 25 12:57 vsk4
root@718636415a7f:/home# 
======================>

I am adding some text to each of them as below:

====================>

root@718636415a7f:/home# pwd

/home

root@718636415a7f:/home# echo ‘Testing vsk1’ > vsk1

root@718636415a7f:/home# ls -l

total 4

-rw-r–r– 1 root root 13 Nov 25 13:02 vsk1

-rw-r–r– 1 root root 0 Nov 25 12:57 vsk2

-rw-r–r– 1 root root 0 Nov 25 12:57 vsk3

-rw-r–r– 1 root root 0 Nov 25 12:57 vsk4

root@718636415a7f:/home# echo ‘Testing vsk2’ > vsk2

root@718636415a7f:/home# echo ‘Testing vsk3’ > vsk3

root@718636415a7f:/home# echo ‘NOT Testing vsk4’ > vsk4

root@718636415a7f:/home# ls -l

total 16

-rw-r–r– 1 root root 13 Nov 25 13:02 vsk1

-rw-r–r– 1 root root 13 Nov 25 13:02 vsk2

-rw-r–r– 1 root root 13 Nov 25 13:02 vsk3

-rw-r–r– 1 root root 17 Nov 25 13:02 vsk4

root@718636415a7f:/home#

=====================>

I have created 4 files and added some text into them.

Now, I want to execute a diff command on them:

==========================>

root@718636415a7f:/home# diff vsk1 vsk2

1c1

< Testing vsk1

> Testing vsk2

root@718636415a7f:/home# diff vsk2 vsk3

1c1

< Testing vsk2

> Testing vsk3

root@718636415a7f:/home# echo ‘NOT Testing vsk4’ > vsk1

root@718636415a7f:/home# diff vsk1 vsk4

root@718636415a7f:/home# diff vsk2 vsk4

1c1

< Testing vsk2

> NOT Testing vsk4

root@718636415a7f:/home#

===========================>

Now, I want to exit this container and go back to docker host.

I have detached it using exit.

And back to docker host.

Now, I want to use the diff command as below from host machine to the container:

===========================>

root@718636415a7f:/home# ls -l

total 16

-rw-r–r– 1 root root 17 Nov 25 13:05 vsk1

-rw-r–r– 1 root root 13 Nov 25 13:02 vsk2

-rw-r–r– 1 root root 13 Nov 25 13:02 vsk3

-rw-r–r– 1 root root 17 Nov 25 13:02 vsk4

root@718636415a7f:/home# exit

exit

vskumar@ubuntu:/var/log$ sudo docker diff 718636415a7f

[sudo] password for vskumar:

C /home

A /home/vsk1

A /home/vsk2

A /home/vsk3

A /home/vsk4

C /root

A /root/.bash_history

vskumar@ubuntu:/var/log$

=====================>

The 1st line ‘C /home’ shows; the home directory is modified by showing ‘C’ as changed.

The ‘A’ shows;  before each line denotes the file is added.

If you have a deleted file, it can show as ‘D’ before the file.

Also please let us note here on how docker engine picks up the image with the below priority;

When we work with an image and if we don’t specify that image name, then the latest image (recently generated) will be identified and used by the Docker Engine.

We can check the status of the containers as below using ps -a:

You can see a detailed output from this command from the below display:

==================================>

vskumar@ubuntu:/var/log$ ls

alternatives.log bootstrap.log dmesg fsck kern.log speech-dispatcher unattended-upgrades wtmp

apport.log btmp dpkg.log gpu-manager.log lastlog syslog upstart Xorg.0.log

apt cups faillog hp lightdm syslog.1 vmware Xorg.0.log.old

auth.log dist-upgrade fontconfig.log installer samba syslog.2.gz vmware-vmsvc.log

vskumar@ubuntu:/var/log$ sudo docker ps -a

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

cb1ff260d48e ubuntu “ls /usr/src” 3 minutes ago Exited (0) 3 minutes ago wonderful_hawking

b20691fd8fb5 ubuntu “ls /usr” 3 minutes ago Exited (0) 3 minutes ago friendly_mirzakhani

431ba4c53028 ubuntu “ls” 3 minutes ago Exited (0) 3 minutes ago affectionate_nobel

2c31684bb1f4 ubuntu “ls -la” 3 minutes ago Exited (0) 3 minutes ago zealous_meitner

fe2e3b449daf ubuntu “ls -la /home/.” 4 minutes ago Exited (0) 4 minutes ago dreamy_shirley

c44bdd05b94d ubuntu “ls -la home.” 4 minutes ago Exited (2) 4 minutes ago elastic_pasteur

8b8afa82859a ubuntu “ls -la” 4 minutes ago Exited (0) 4 minutes ago festive_panini

2811eb37af61 ubuntu “ls -la 604831dbce2a” 4 minutes ago Exited (2) 4 minutes ago jolly_swartz

604831dbce2a ubuntu:16.04 “/bin/bash” 8 minutes ago Exited (0) 6 minutes ago vibrant_ride

718636415a7f ubuntu:16.04 “/bin/bash” 45 minutes ago Exited (0) 18 minutes ago reverent_noyce

53a7751d4673 ubuntu:16.04 “/bin/bash” 2 hours ago Exited (0) 2 hours ago musing_chandrasekhar

32bc16b508d4 ubuntu “bash” 3 hours ago Exited (0) 3 hours ago eager_goldberg

1dd55efde43f hello-world “/hello” 3 hours ago Exited (0) 3 hours ago peaceful_pasteur

a744246ffb8e hello-world “/hello” 5 hours ago Exited (0) 5 hours ago naughty_wing

1ba71598b7b8 hello-world “/hello” 5 hours ago Exited (0) 5 hours ago musing_kare

vskumar@ubuntu:/var/log$

============================>

I would like to terminate the session at this point. In the next blog I would like to present “How to control and operate docker containers”.

Vcard-Shanthi Kumar V-v3

6. DevOps: How to work with interactive Docker containers

Docker-logo

In  continuation of my previous blog on “5. DevOps: How to work with Docker Images”, in this blog I would like to show some lab practice on Interactive Docker containers.

Working with an interactive Docker container:

In the previous lab session, we worked with first Hello World container. And we came to know how the containerization works. Now, we are going to run a container in interactive mode.

What is docker run command ?:

The docker run subcommand takes an image as an input and launches it as a container.

What flags we need to use ?:

We have to pass the -t and -i flags to the docker run subcommand in order to make the container interactive.

The -i flag is the key driver, it makes the container interactive by grabbing the standard input (STDIN) of the container into the terminal.

The -t flag allocates a pseudo-TTY or a pseudo Terminal (Terminal emulator) and then assigns that to the container.

Note: Please note in the earlier session we have executed a container on unbuntu name.

But now, we will explore completely the interactive container operations.

In the below example, we are going to launch an interactive container using the ubuntu:16.04 image and /bin/bash as the command:

$ sudo docker run -i -t ubuntu:16.04 /bin/bash 

=========== Output ============>

vskumar@ubuntu:/var/log$ sudo docker run -i -t ubuntu:16.04 /bin/bash

Unable to find image ‘ubuntu:16.04’ locally

16.04: Pulling from library/ubuntu

Digest: sha256:7c67a2206d3c04703e5c23518707bdd4916c057562dd51c74b99b2ba26af0f79

Status: Downloaded newer image for ubuntu:16.04

root@53a7751d4673:/#

===================>

Why the error messages [Unable to find image] appear ?:

As the ubuntu 16.04 image is not downloaded yet, we get the above message and with the docker run command it will start pulling the ubuntu 16.04 image automatically with following message:

Unable to find image 'ubuntu:16.04' locally
16.04: Pulling from library/ubuntu

When the download is completed, the container will get launched along with the ubuntu:16.04 image.

It will also launch a Bash shell within the container, because we have specified /bin/bash as the command to be executed. This landed us in a Bash prompt, as shown below:

root@53a7751d4673:/#

What is ’53a7751d4673′?:

It is the hostname of the container. In Docker, the hostname is the same as the container ID.

Now, let us run a few commands interactively and confirm what we mentioned about the prompt is correct, as shown below:

To check the hostname below commands need to be executed:

root@53a7751d4673:/# hostname

root@53a7751d4673:/# id

root@53a7751d4673:/# echo $PS1

When we execute them, can see the below output:

==============>

root@53a7751d4673:/#

root@53a7751d4673:/# hostname

53a7751d4673

root@53a7751d4673:/# id

uid=0(root) gid=0(root) groups=0(root)

root@53a7751d4673:/# echo $PS1

\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$

root@53a7751d4673:/#

=====================>

So, we have seen the Host name as ’53a7751d4673′.

Id as ‘root ‘

Using ‘PS1’, —>Displays username, hostname and current working directory in the prompt.

PS1 in this example displays the following three information in the prompt:

\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$

  • \u – Username
  • \h – Hostname
  • \w – Full path of the current working directory

==============>

root@53a7751d4673:/# pwd

/

root@53a7751d4673:/#

==========>

Note, we are within the ubuntu 16.04 container and it works as Linux machine. So we can try some Linux commands also:

===============>

root@53a7751d4673:/# ps

PID TTY TIME CMD

1 pts/0 00:00:00 bash

26 pts/0 00:00:00 ps

root@53a7751d4673:/# ps -ef

UID PID PPID C STIME TTY TIME CMD

root 1 0 0 11:28 pts/0 00:00:00 /bin/bash

root 27 1 0 11:48 pts/0 00:00:00 ps -ef

root@53a7751d4673:/#

root@53a7751d4673:/# ls

bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var

root@53a7751d4673:/# ls -l

total 64

drwxr-xr-x 2 root root 4096 Nov 14 13:49 bin

drwxr-xr-x 2 root root 4096 Apr 12 2016 boot

drwxr-xr-x 5 root root 360 Nov 25 11:28 dev

drwxr-xr-x 45 root root 4096 Nov 25 11:28 etc

drwxr-xr-x 2 root root 4096 Apr 12 2016 home

drwxr-xr-x 8 root root 4096 Sep 13 2015 lib

drwxr-xr-x 2 root root 4096 Nov 14 13:49 lib64

drwxr-xr-x 2 root root 4096 Nov 14 13:48 media

drwxr-xr-x 2 root root 4096 Nov 14 13:48 mnt

drwxr-xr-x 2 root root 4096 Nov 14 13:48 opt

dr-xr-xr-x 250 root root 0 Nov 25 11:28 proc

drwx—— 2 root root 4096 Nov 14 13:49 root

drwxr-xr-x 6 root root 4096 Nov 14 13:49 run

drwxr-xr-x 2 root root 4096 Nov 17 21:59 sbin

drwxr-xr-x 2 root root 4096 Nov 14 13:48 srv

dr-xr-xr-x 13 root root 0 Nov 25 11:28 sys

drwxrwxrwt 2 root root 4096 Nov 14 13:49 tmp

drwxr-xr-x 11 root root 4096 Nov 14 13:48 usr

drwxr-xr-x 13 root root 4096 Nov 14 13:49 var

root@53a7751d4673:/#

================>

So, ubuntu 16.04 container is nothing but a linux machine and we executed the above commands.

Now, I want to change the root permissions as below:

==============>

root@53a7751d4673:/# chmod +777 root

root@53a7751d4673:/# ls -l

total 64

drwxr-xr-x 2 root root 4096 Nov 14 13:49 bin

drwxr-xr-x 2 root root 4096 Apr 12 2016 boot

drwxr-xr-x 5 root root 360 Nov 25 11:28 dev

drwxr-xr-x 45 root root 4096 Nov 25 11:28 etc

drwxr-xr-x 2 root root 4096 Apr 12 2016 home

drwxr-xr-x 8 root root 4096 Sep 13 2015 lib

drwxr-xr-x 2 root root 4096 Nov 14 13:49 lib64

drwxr-xr-x 2 root root 4096 Nov 14 13:48 media

drwxr-xr-x 2 root root 4096 Nov 14 13:48 mnt

drwxr-xr-x 2 root root 4096 Nov 14 13:48 opt

dr-xr-xr-x 255 root root 0 Nov 25 11:28 proc

drwxrwxrwx 2 root root 4096 Nov 14 13:49 root

drwxr-xr-x 6 root root 4096 Nov 14 13:49 run

drwxr-xr-x 2 root root 4096 Nov 17 21:59 sbin

drwxr-xr-x 2 root root 4096 Nov 14 13:48 srv

dr-xr-xr-x 13 root root 0 Nov 25 11:48 sys

drwxrwxrwt 2 root root 4096 Nov 14 13:49 tmp

drwxr-xr-x 11 root root 4096 Nov 14 13:48 usr

drwxr-xr-x 13 root root 4096 Nov 14 13:49 var

root@53a7751d4673:/#

================>

Now, I want to exit from container and come back to host machine.

==================>

root@53a7751d4673:/#

root@53a7751d4673:/# exit

exit

vskumar@ubuntu:/var/log$

===============>

Whenever the Bash exit command is used in the interactive container, it will terminate the Bash shell process.

In turn it will stop the container and returns to the docker host machine.

As a result, we can see the Docker host’s prompt $


You can see the status of docker images as below when I used ‘sudo docker images’ :

==================>

vskumar@ubuntu:/var/log$

vskumar@ubuntu:/var/log$ sudo docker images

REPOSITORY TAG IMAGE ID CREATED SIZE

hello-world latest f2a91732366c 4 days ago 1.85kB

ubuntu 16.04 20c44cd7596f 7 days ago 123MB

ubuntu latest 20c44cd7596f 7 days ago 123MB

busybox latest 6ad733544a63 3 weeks ago 1.13MB

busybox 1.24 47bcc53f74dc 20 months ago 1.11MB

vskumar@ubuntu:/var/log$

=====================>

You can see whatever containers; we have have used in the past exercises.

At this point, I would like to stop this lab session. And in the next blog we can see on “How to track changes in a container?”.

 

Vcard-Shanthi Kumar V

 

 

4. DevOps: How to create and work with Docker Containers

Docker-logo

In continuation of my previous blog on 2. DevOps: How to install Docker 17.03.0 community edition and start working with it on Ubuntu 16.x VM [https://vskumar.blog/2017/11/25/2-devops-how-to-install-docker-17-03-0-community-edition-and-start-working-with-it-on-ubuntu-16-x-vm/], in this blog I would like to cover the lab practice on Docker containers.

Assuming you have the same setup as we did in the previous lab session,

using the below subcommand, you can view the current image hello-world

Use the below command:

sudo docker run -it hello-world

$docker history hello-world

You can run this image and see:

======================>

vskumar@ubuntu:~$ sudo docker history hello-world

[sudo]

password for vskumar:
IMAGE CREATED CREATED BY SIZE COMMENT
f2a91732366c 5 days ago /bin/sh -c #(nop) CMD [“/hello”] 0B
<missing> 5 days ago /bin/sh -c #(nop) COPY file:f3dac9d5b1b0307f… 1.85kB
vskumar@ubuntu:~$

======================>

Check the current docker information:

sudo docker info |more

======================================>

vskumar@ubuntu:~$ sudo docker info |more
Containers: 2
Running: 1
Paused: 0
Stopped: 1
Images: 6
Server Version: 17.11.0-ce
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 14
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 992280e8e265f491f7a624ab82f3e238be086e49
runc version: 0351df1c5a66838d0c392b4ac4cf9450de844e2d
–More–WARNING: No swap limit support
init version: 949e6fa
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.10.0-40-generic
Operating System: Ubuntu 16.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.933GiB
Name: ubuntu
ID: KH7E:PWA2:EJGE:MZCA:3RVJ:LU2W:BA7S:DTIQ:32HP:XXO7:RXBR:4XQI
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

vskumar@ubuntu:~$

=============================>

Now, let us work on the Docker images operations:

In the previous session, we demonstrated the typical Hello World example using the
hello-world image.

you can run an Ubuntu container with:

$ sudo docker run -it ubuntu bash

you can run an Ubuntu container with:

======= We are in Docker container =====>

vskumar@ubuntu:~$ sudo docker run -it ubuntu bash
root@10ffea6140f9:/#

============>

Now, let us apply some Linux commands as below:

==================>

root@10ffea6140f9:/# ls
bin dev home lib64 mnt proc run srv tmp var
boot etc lib media opt root sbin sys usr
root@10ffea6140f9:/# ps -a
PID TTY TIME CMD
11 pts/0 00:00:00 ps
root@10ffea6140f9:/# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 05:36 pts/0 00:00:00 bash
root 12 1 0 05:38 pts/0 00:00:00 ps -ef
root@10ffea6140f9:/# cd lib
root@10ffea6140f9:/lib# ls
init lsb systemd terminfo udev x86_64-linux-gnu
root@10ffea6140f9:/lib# cd ..
root@10ffea6140f9:/# cd var
root@10ffea6140f9:/var# pwd
/var
root@10ffea6140f9:/var# ls
backups cache lib local lock log mail opt run spool tmp
root@10ffea6140f9:/var# cd log
root@10ffea6140f9:/var/log# ls
alternatives.log bootstrap.log dmesg faillog lastlog
apt btmp dpkg.log fsck wtmp

root@10ffea6140f9:/var/log# cat dpkg.log |more
2017-11-14 13:48:30 startup archives install
2017-11-14 13:48:30 install base-passwd:amd64 <none> 3.5.39
2017-11-14 13:48:30 status half-installed base-passwd:amd64 3.5.39
2017-11-14 13:48:30 status unpacked base-passwd:amd64 3.5.39
2017-11-14 13:48:30 status unpacked base-passwd:amd64 3.5.39
2017-11-14 13:48:30 configure base-passwd:amd64 3.5.39 3.5.39
2017-11-14 13:48:30 status unpacked base-passwd:amd64 3.5.39
2017-11-14 13:48:30 status half-configured base-passwd:amd64 3.5.39
2017-11-14 13:48:30 status installed base-passwd:amd64 3.5.39
2017-11-14 13:48:30 startup archives install
2017-11-14 13:48:30 install base-files:amd64 <none> 9.4ubuntu4
2017-11-14 13:48:30 status half-installed base-files:amd64 9.4ubuntu4
2017-11-14 13:48:30 status unpacked base-files:amd64 9.4ubuntu4
2017-11-14 13:48:30 status unpacked base-files:amd64 9.4ubuntu4
2017-11-14 13:48:30 configure base-files:amd64 9.4ubuntu4 9.4ubuntu4
2017-11-14 13:48:30 status unpacked base-files:amd64 9.4ubuntu4
2017-11-14 13:48:30 status unpacked base-files:amd64 9.4ubuntu4
2017-11-14 13:48:30 status unpacked base-files:amd64 9.4ubuntu4
2017-11-14 13:48:30 status unpacked base-files:amd64 9.4ubuntu4
2017-11-14 13:48:30 status unpacked base-files:amd64 9.4ubuntu4
2017-11-14 13:48:30 status unpacked base-files:amd64 9.4ubuntu4
2017-11-14 13:48:30 status unpacked base-files:amd64 9.4ubuntu4
2017-11-14 13:48:30 status unpacked base-files:amd64 9.4ubuntu4

root@10ffea6140f9:/var/log#

==================================>

WE have seen this container like a Linux machine only.

Now, to come out into Docker use ‘exit’ command.

====================>

root@10ffea6140f9:/var/log#
root@10ffea6140f9:/var/log# exit
exit
vskumar@ubuntu:~$

vskumar@ubuntu:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker-exercise/ubuntu-wgetinstall latest e34304119838 4 hours ago 169MB
<none> <none> fc7e4564eb92 4 hours ago 169MB
hello-world latest f2a91732366c 5 days ago 1.85kB
ubuntu 16.04 20c44cd7596f 8 days ago 123MB
ubuntu latest 20c44cd7596f 8 days ago 123MB
busybox latest 6ad733544a63 3 weeks ago 1.13MB
busybox 1.24 47bcc53f74dc 20 months ago 1.11MB
vskumar@ubuntu:~$

======================>

It means earlier when we run the command ‘$ sudo docker run -it ubuntu bash’ it went into terminal interactive mode of unbuntu container. When we applied ‘exit’ it came out from that container to ‘docker’ . Now through docker we have seen the list of docker images.

So, we have seen from the above session the container usage and the docker images.

Now, let us check the docker services status as below:

$sudo service docker status

vskumar@ubuntu:/var/tmp$ sudo service docker status

================================>

docker.service – Docker Application Container Engine

Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: e

Active: active (running) since Sat 2017-11-25 02:07:54 PST; 25min ago

Docs: https://docs.docker.com

Main PID: 1224 (dockerd)

Tasks: 18

Memory: 255.2M

CPU: 35.334s

CGroup: /system.slice/docker.service

├─1224 /usr/bin/dockerd -H fd://

└─1415 docker-containerd –config /var/run/docker/containerd/containe

================================>

Now, we will stop this session at this point in the next block we will learn how to download public docker image and work with images and containers.

Vcard-Shanthi Kumar V-v3

2. DevOps: How to install Docker 17.03.0 community edition and start working with it on Ubuntu 16.x VM

Docker-logo.png

In this blog, I would like to demonstrate the Docker 17.03.0  CE edition installation on Ubuntu 16.0.4 VM machine. And later on little practice can be shown  using containers in a series of blogs. Please keep visiting for weekly new blogs or subscribe it. If you are interested to follow this site blogs, please send e-mail [with your linkedin message ] to approve with authentication.

Assume you have an unbuntu machine or a Virtual machine [VM] configured. And in this blog you can see on how to install the Docker 17.03.0  CE [as on this blog’s date] with screen display outputs:

$ sudo service docker restart

However, if the Active column shows inactive or maintenance as the status, your Docker service is not running. In such cases, restart the Docker service, as shown here:

$ sudo service docker restart 
 
Install Docker on Unbuntu:

1.Add the Docker package repository path for Ubuntu 16.04 to your APT sources, as shown below:
 $ sudo sh -c "echo deb https://apt.dockerproject.org/repo \
 ubuntu-xenial main > /etc/apt/sources.list.d/docker.list"

2.Add the GNU Privacy Guard (GPG) key by  running the following command:
 $ sudo apt-key adv --keyserver \
 hkp://p80.pool.sks-keyservers.net:80 --recv-keys \ 
 
If the above format is expired; you can try as below:
==== Alternate method with screen output ====>
$sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

Executing: /tmp/apt-key-gpghome.YU0Rk7y5kX/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
gpg: key F76221572C52609D: 7 signatures not checked due to missing keys
gpg: key F76221572C52609D: public key "Docker Release Tool (releasedocker) <docker@docker.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
=========================================>
The above format should work. Even if that is not working, please google the same keys for the latest validated keys.

3.Resynchronize with the package repository using the below command:
 $ sudo apt-get update
Now docker software is in your unbuntu machine.

4. Now, you can Install Docker and start  Docker service:
 $ sudo apt-get install -y docker-engine

5.Now you have  installed the Docker Engine, we need to  verify our installation by running docker --version as shown below:
 $ docker --version

We have successfully installed Docker version 17.03.0 community edition.
Other options is; in a single script by avoiding the above steps you can install it:

If you are working on Ubuntu, follow the below command:

==================== Screen output ==========>
vskumar@ubuntu:/var/log$ sudo wget -qO- https://get.docker.io/ | sh |more
[sudo] password for vskumar: 
# Executing docker install script, commit: 11aa13e
Warning: the "docker" command appears to already exist on this system.
If you already have  installed Docker, this script can cause trouble, which is
why we're displaying this warning and provide the opportunity to cancel the
installation.
If you installed the current Docker package using this script and are using it
again to update Docker, you can safely ignore this message.
You may press Ctrl+C now to abort this script.
+ sleep 20
+ sudo -E sh -c apt-get update -qq >/dev/null
============== Since I have already installed, I have breaked this process ====>
But, if you try this script; it takes some time to download and install docker for the whole process. 
Be patient to see the final result.  Later check the docker version to reconfirm. Using the below command.
$docker --version

It is very easy to install docker with the above step(s) in your Ubuntu machine.

Assuming you have studied the theory part of docker usage I am moving forward to lab practice.

Now, let us do some practice with docker images/containers.

We will do the below steps:

1. Downloading the first Docker image:
we will download a sample hello-world docker image using the following command:
$ sudo docker pull hello-world

2. Once the image is downloaded, 
they can be verified using the docker images subcommand, as given below:
To check the image run the below command:
$sudo docker run hello-world
It displays the message “Hello from Docker!”
You have set up your first Docker container and it is running now.

3. How to Troubleshoot with Docker containers?:
If you want to troubleshoot with container, the first step is  to check the Docker's running status by using the below command:
$ sudo service docker status 
It displays the status and shows as Docker 'Active running' message on the screen along with other messages.
Press ctrl+C to come out from the display.

=========== Partial content from the above command =====>
vskumar@ubuntu:/var/log$ sudo service docker status 
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2017-11-25 02:54:42 PST; 3h 56min ago
Docs: https://docs.docker.com
Main PID: 3769 (dockerd)
Tasks: 19
Memory: 43.6M
CPU: 1min 21.184s
CGroup: /system.slice/docker.service
├─3769 /usr/bin/dockerd -H fd://
└─3778 docker-containerd --config /var/run/docker/containerd/containerd.toml
===============================>
For some reasons, if the Active column shows inactive or maintenance as the status, it means your Docker service is not running. 
In that case to restart the Docker service, use the below command:

$ sudo service docker restart

We will see in the next blog, some more exercises on Docker containers and images.

Vcard-Shanthi Kumar V-v3

 

 

 

 

 

 

 

 

 

 

Did you check the Agile entry criteria before your initiation ?

Agile Entry Critera - Check-Page1 Agile Entry Critera-Code refactor-simulation-chart-Page2Agile Entry Critera - Check-Page3 I have made videos on this blog and  posted in the below youtube  channel URL with further elaboration: http://www.youtube.com/channel/UCR1qBu2xUiypGDa2UaNQr8A/videos

If you are keen in getting my support on these practices implementation for your Agile programmes/projects/teams, please contact me.

I support the organizations globally.

slide1

 

Advertising3.pngFor Intended DevOps Engineers: We also train freshers [limited people] on Agile & Scrum concepts to till DevOps practices and  CDI automation [with tools]. Interested candidates can contact by e-mail/phone to join or book your seat in Bangalore.

For Employers: If you are planning to accelerate your DevOps practices from Agile & Scrum onwards, we can do resourcing for you [in Bangalore]. Please contact for details.

If you are DevOps practices:

https://vskumar.blog/2018/10/17/join-devops-practices-group-on-fb/

 

 

Management Practice-1: Some helpful tips for new Scrum masters under Servant leadership role

Agile-Scrum image-add1

In continuation of my previous blogs on SDLC/Agile/Scrum, this blog can give some tips to Scrum Masters.

As per the Agile manifesto and Scrum principles, the Scrum Master need to work as a servant leader. The typical servant leader how he/she should have characteristics to bring the team alignment for right delivery with CDI speed, I have drafted in  the below content. This can be useful as TIPS to new Scrum master on Agile projects.

What characteristics a Servant Leader should have in the organization ?

Creating the right leadership roles is very important and challenging to any organization with the current trend of the rapid technology or business transformation.  

They need to look into the person’s characteristics very deeply.  At the end of the day these leaders only drive the key aspects of the organization to achieve the results.

There are different leadership roles taken by coaches. One of them and very famous and with value added is;  Servant leadership.

The servant leadership denotes as ‘a philosophy and practice’ of leadership. This concept has been appearing from the prehistoric.  I would like to give a brief introduction of this role in this article, which can help the professionals who would be pursuing into the leadership roles.

When we move forward on analyzing this role, our mindset might have the following questions:

1. What is servant leadership means?

2. How they can thrive the teams in organizations?

3. How they can improve the corporate culture?

4. What is the significance they can create?

5. How this leader can drive high loyalty of the customers?

6. How this leader can build empowered teams to the organization?

7. How the teams can feel being with this leader?

8. Does the organization get the opportunity to drive long term goals with this role?

9. How the organization work culture can be changed timely with this role?

10. How this leadership role can help the organization with accelerated ROI?

 

In any organization servant leaders accomplish the results while reaching to the targets. These leaders give preferences to the needs of their contemporaries. By thumb rule, these leaders are being seen as humble stewards in their organizational resources like; human, financial and physical.

Focus on teams: A servant leader focuses on his/her team members needs towards scaling them into higher levels in their organization by helping them to resolve their issues and promotes their personality development also. These leaders feel it’s a management philosophy which can be applied to in the view of quality of people, work and community spirit.

We can see in many organizations there are several leaders’ supports their employees in the above mentioned areas to ascend them further. Every growing organization needs this kind of leaders to achieve their targets. Without these leaders and their characteristics it would have not been possible many companies rapid growth in the relevant industries.

Servant leader’s characteristics: When we think of their characteristics, certainly the following can come into our mind with leadership analysis thought process.

  •  Listening
  •  Empathy
  •  Healing
  •  Awareness
  •  Persuasion
  •  Conceptualization
  •  Foresight
  •  Stewardship
  •  Commitment to the growth of people
  •  Building community

Understanding people closely: A servant leader attempts to understand and empathize with the team. This leader would not consider them as employees. Their individual respect and appreciation on their personal development would be awarded by the leader. As a manager or leader you can consider any team members tasks, look into its complexity, and support the team member to achieve its result. And you can apply your servant leadership compassion.  The team members would not have realized you earlier, when you applied these leadership techniques to achieve their targets.

Effective management of people and their skills: The servant leaders don’t use their power in getting the things done by the people. Instead they manage the tasks and people through effective discussions. This way the team member also can understand on how their manager is giving the importance and respect to their individual concerns. Their hidden or unused skills or power can be utilized to complete any complex tasks with easy ways. For the future tasks, the minimal discussion time can be taken place to convince the team members, while having built the relationship empathetically.

Focus on operating targets and objectives: The servant leadership also plays to focus on long term operating goals also, rather than short term benefits.  In view of this kind of thought process they derive specific goals towards implementing strategies for the benefits of the organization as well as tuning the teams towards working on the strategic plans and their execution.

Serving with Openness and persuasion: These leaders would have dedication to help and serve others. With their openness and persuasion their leadership qualities can be demonstrates in the organization to achieve any complex activities also with simple.

Vcard-Shanthi Kumar V

 

To know some of the basics of Agile/Scum practices, visit the below video:

1. Agile: What are Agile manifesto Principles & How they can be used ?

https://www.facebook.com/MicroServices-and-Docker-328906801086961/

And learn many like this, you can join in my DevOps Practices Group:

https://www.facebook.com/groups/1911594275816833/

Advt-course3rd page

Data migration Projects and the best practices

 

The data migration is a critical activity for any business. Unless one uses the best practices acceleration it can not be done successfully. 

Also this can help you on how the Agile practices implementation can be useful in several ways in theses projects.

The critical data migration projects can have the below major activities.

During data discovery phase:

  1. Identifying the Business scenario based data.
  2. Identifying the relevant data schemas.
  3. Identifying the tables/queries/SPs, etc. on each of the Data schemas.
  4. Planning for each of the Data schemas extraction, Transformation and loading to target applications.
  5. Verifying the source and target data flows for business operation continuity.

If you are looking for the details, on the request of users an e-book has been published by me under the below title. Click on this link to visit its page: https://www.amazon.com/dp/B018EP9MO2https://www.amazon.com/dp/B018EP9MO2

 

Cover April 2016

 

Vcard-Shanthi Kumar V

 

 

SDLC & Agile – Interview questions for Freshers -5

In continuation of my previous blog  on this subject following questions and answers are continued:

1. What is retrospective in agile and where it can be useful?

Ans: During agile development model in each iteration different requirements are considered to design, develop and construct the code. While performing these tasks there can be different issues identified and resolved by the teams at each stage. The teams need to maintain knowledge information against to each issue as lessons learnt. These issues resolution mechanism processes are going to be considered for any process improvements  for next iteration. During the retrospective [after completing iteration] the team is going to discuss the lessons learnt  from the completed  iteration and the best practices  identified for next iteration. The retrospective is a mandatory activity for every iteration of Agile projects. And this need to be conducted before starting the next iteration.

 

2.   What is continuous stream of development in agile model?

Ans: As per the agile concept continuous software delivery need to  happen by following iterative development. Let us assume the development team consider the four days for development and fifth day it need to go for release and deployment, fifth day onwards developer considered as other iteration/SPRINT as their continuous development activity. The developers are picking up one  by one SPRINT items for their construction activity this is called as continuous stream of development. When the testing activity is ongoing the developer can pickup other workable items from the SPRINT to do construction activity.

 

3. What is Continuous Delivery[CD] in Agile ?

Ans: As per the agile concepts and principles, the developer need to get small chunk of workable item only which can be delivered in hours or few days.  When this kind of continuous development is happening through the agile developers there will be builds for continuous testing and deployments. Obviously then the agile project leads to have continuous  delivery [CD] of software into production with small chunks of functionality or fixes.

Example: Many technology companies consider each SPRINT item to complete in hours only to speed up their ongoing software deployments for their daily business needs. This kind of concept is called as Continuous Delivery [CD] in Agile.

 

4.  What is transition activity and their tasks involved in  agile project?

Ans:  Transition activity is start with deploying software release into production. Once the software construction phase is signed off the transition activity need to be started, typically transition activity contains following tasks.

i) Active stakeholder participation

ii) Final system testing

iii) Final acceptance testing

iv) Finalize documentation

v) Final testing of the release

vi) Train end users

vii) Train production staff

viii) Deploy into production.

All the above tasks are performed in the sequential order.

 

5.  What is final system testing during transition stage?

Ans: Once software can be deployed  internally, the planned system testing need to be conducted by testing team for a specific iteration. Once system testing is passed or certified the  acceptance testing need to be started.

 

 6.  When can you conduct final acceptance testing in agile model?

Ans:  In any agile project developers need to conduct a skeleton software demo to the users. Depends on the design requirement once users approved it, the Construction phase need to be  started. Once the software is constructed and  it can be deployed internally for various levels of testing during the transition stage of agile project. At this stage the software release is deployed in test environment. Then the  system testing is conducted and signed off.  The final acceptance testing is conducted on the software to be delivered to the users in production. Once the final acceptance is signed off the remaining tasks are being performed during transition phase, as mentioned in the list of tasks.

 

7. When can the pilot testing  happen and who all will perform it?

Ans: During the transition stage once the acceptance test is signed off , and final document is done, the software build is executed under a pilot test in a preproduction test or in a production environment depends on the organization policy. The pilot test is attended by the business users and testers or nominated coordinator along with the development team and operations[ops] team.

 

8.  During the transition stage who all need to be trained?

Ans:  Once the pilot test is done software end users and the production staff (ops team) needs to be trained to operate the product in live [production] for business operations.

 

9.  When can you deploy the system into production?

Ans: During transition stage once the pilot test is signed off, end users and production staff will be trained on software system and then it is deployed into production.

 

10. How a  prototype can be designed ?

Ans: When the business user give some requirements which consists of user interface and some data processing to provide output, there are two ways we can design prototype software; a) Prototype model  b) Design and developing the complete software.

a) Prototype model: During prototype model developer design and develop the critical requirements of the users and demonstrate those things as the skeleton software. The skeleton software will not have the complete software operations. It will have an user interface to get an idea by the user on the software to be delivered by the development in future. Once user approved skeleton model, developer can design complete model through Agile SDLC. Note; the prototype model or process can be applied  for one or more SPRINT cycles or iterations.

b) Design and developing the complete software: This kind of software happens in a regular Agile project process from collection of user story onwards. All the agile phases and their tasks will be applied for execution. If the team agreed to a demo [for prototype], the user demos can also happen as and when required for each SPRINT during construction phase.

Keep watching this site for further updates.

Contact for any guidance/coaching.

 Vcard-Shanthi Kumar V

 

Continuous test automation planning during Agile iterations

Continuous test automation planning during Agile iterations

Please refer to my blog and videos on Agile practices and the importance of Re-usable code libraries for cycle time reduction.

During the reusable code usage and the iterations or sprint planning, the test automation also can be planned, designed and implemented.

This blog eloborates on  the easy processes can be used to implement it and demonstrate the cycle time reduction. Please note atleast after passing the two cycles of tests on the selected manual scripts need to be planned for test automation.

I am trying to elaborate on the process of the Automation of unit testing and component or module integration test automation. Please note the test automation is also a development project. Hence some of the phases are similar to SDLC. The pictorial chart elaborates the detailed steps involved in these test phases automation. Module (Unit) or Component Development in Agile: The below contents and the chart narrates the relationship of automation Development process and the Testing process under each development phase. Development and Testing process Relationship table:

Phase Development Process Test Process
Module (Unit) or component Development Design module from requirements Perform test planning and test environment set up.
  Code module Create test design and develop test data.
  Debug module Write test scripts or record test scenario using module.
  Unit test module Debug automated test script by running against module. Also, tools that support unit testing [Purify, etc] can be used.
  Correct defects Rerun automated test script to regression test as defects are corrected.
  Conduct Performance Testing Verify system is scaleable and will meet the performance requirements. This is the entry criteria for Integration test automation.
Integration
Build system by connecting modules.Conduct Integration test with connected modules.Review trouble reports. Combine unit test scripts and add new scripts that demonstrate module inter-connectivity. Use test tool to support automated integration testing.
  Correct defects and update defect status. Rerun automated test script as part of regression test, as defects are corrected.
  Continued Performance Testing Activities At this point, Verifying system is scaleable and will meet performance requirements with the integrated modules. If this passes then the system test or VVT entry can be considered.

Below chart demsontrates the process steps to be used for test automation of unit test and integration testing:

UT&IT

The acronyms used in the chart: TC–>Test case, TD–>Test data, TR–> Test requirement, UT–>Unit test, IT–> Integration test.

All the automated test scripts and test data  need to be preserved under configuration management tools.

Choosing the right tools for test automation comes under tools evaluation process. Once the tools are identified, the above processes can be planned and adopted for regular practice on the Agile projects.

 

 

Vcard-Shanthi Kumar V-v3

SDLC & Agile – Interview questions for Freshers -4

Agile Cirlce1

In continuation of my previous blog [https://wordpress.com/post/vskumar.blog/1944]

on this subject following questions and answers are continued:

 

1.  What is a collaborative development approach in  agile development model ?

Ans: In any agile project as per the Agile manifesto principles the team need to pull up the ideas through a prototype like;  either phased prototype or iterative prototype or rapid prototype. With these pulled ideas, the team need to work together by sharing knowledge among themselves and which is considered as a collaborative development approach. 

2.  What is model storming during construction phase of an agile development model?

Ans: When the initial requirements are envisioned they all are being transmitted into different iterations. A single team or multiple teams need to execute the iteration during software code construction. The requirements also can be changed or newly added by the stakeholders as per the agile principles at any stage of Agile project phases.  The team need to be brain stormed to execute the iterations correctly and completely as per the user’s desire. The iteration can be considered as a single agile model for construction phase and this model storming can happen within team for clear understanding of SPRINT by each developer. During the model storming; the requirements decomposition happens like; from user story to design specifications those can lead to SPRINT items, and from design to code specifications. Depends on the team planning; sometimes the outcome of model storming can also be a TDD [Test Driven Design]. [Please look into my youtube videos on Agile topic reusable code example]

 

3. What is Test Driven Design [TDD]?

Ans: Any requirement [story] need to be decomposed into design requirement. Each design requirement need to be converted into code through construction phase. When the code is visualized [before development] by the developer a test driven scenario need to be identified or visualized by the developer and it need to be documented into a test case with different test design steps. Once the developer feels this test case can be executed by using different code paths the developer can start the code writing, this concept is called Test Driven Design and using this TDD specification the development can be started.  Hence the Agile developers need to make TDD  1st ready and plan for code writing, review and unit testing. Sometimes the TDD  can be the outcome of the model storming also.

4. What is confirmatory testing?

Ans: In any software build there can be defects through different levels of testing. When the developer fixes one or more defects and deploy code in test environment, the test engineer need to retest it for confirming the software function with reference to the regression requirements or functionality and the fixes [if any]. For every fix confirmation test is mandatory.

 5.  What is evolving documentation?

Ans: As per the agile process when the code is constructed and tested the prepared documents need to be updated with reference to the tested and certified build. If any new requirement has to be incorporated into document, the documentation evolving is an ongoing activity for an iteration build till it goes to production.

 

6.  What is internally deploying software?

Ans: Once the construction is over for an iteration requirement, software can be unit tested and integration tested. If it is passed, it can be move to other test environments. As per the deployment process when we are moving software into the different environments [after test certification or confirmation] the build is known as internally deployable software.

 

7.  When can you finalize the documentation in agile model?

Ans: During the transition stage once the acceptance test is signed off users suggestions are considered to finalize the documentation.

 

8.  What are  tangible and intangible benefits for users?

Ans: In any business requirements there are direct benefits from business to incorporate software requirements into software system which is considered as tangible [direct] benefits. There are intangible [indirect benefits] also  by incorporating different requirements into software with a business usage.

Example: If  the system performance is increased by a technical design  in the software architecture, users can access the data faster which is intangible benefits. Then the  iteration can facilitate to perform the software with faster data access or the web pages appearance can be faster. Sometimes this kind of requirements can come into  technical areas rather than coming through a user story in Agile and those can be intangible benefit. Even we might consider an upgrade to database or OS or memory, etc.  then also the data access speed can be increased.

 

9.  What is the feedback analysis? When it can be done?

Ans: As per the agile principles the stakeholder collaboration is an ongoing activity. At any time the stakeholder can give informal or formal feedback for any software items or in any approach followed by agile teams. In agile model many times informal feedback can happen during the discussion. At the same time the scheduled reviews also can happen. During the review the feedback can be given by the reviewers. Even a test result can come into a feedback category. All these feedback items need to be analyzed for delivering a working software by the teams as per the principles.  Sometimes the feedback analysis outcome can come into process improvements areas for the next iteration and these should be considered for Retrospective items. Hence the feedback analysis is a mandated activity at every task completion stage in  Agile project.

 

10.  What is demo in agile model?

Ans: With reference to the rapid prototype approach agile teams are supposed to demonstrate skeleton design for a new module. it is a plan to demonstrate skeleton system to the stakeholder and to get the feedback for processing further SPRINT  or Iteration items. This demo is organized depends on the software or initial plan for a given iteration.

Keep watching this site for further updates.

Contact for any guidance/coaching.

 

Vcard-Shanthi Kumar V

SDLC & Agile – Interview questions for Freshers -2

Agile Cirlce1

In continuation of my previous questions blog [https://vskumar.blog/2017/09/04/sdlc-agile-interview-questions-for-freshers-1] on this topic these were made.

SDLC and Agile Model:

Questions on SDLC Phases:

1. How the agile methodology has been architected?

Ans: The agile methodology has been architected with 12 principles to govern the agile development approach.

2. What is highest priority during agile development model?

Ans: The highest priority is customer satisfaction and the early and continuous delivery of software which will work for the customer requirement.

3. Why the agile development models need to accept the request on irrespective of the development stage?

Ans: As per the  fundamental approach of agile development  it provides facility to the users towards inception of new or enhanced requirements before the delivery.

4. During agile development approach who all need to work together?

Ans: The business people and software developers need to work collaboratively and consistently throughout the project life cycle.

5. To get the right delivery what do we need to do during agile development model?

Ans: In agile project we need to have self motivated individuals at the same time we also need to supply the required human and nonhuman resources to get the job done.

6. When the life cycle of agile model ends?

Ans: The agile model continues till the retirement of the product or project. When the customer decides the retirement of the product then the project operation is terminated. 

7. Why do we need to have face to face conversation during agile development approach?

Ans: The agile principle guides to have face to face conversation among the project resources to have most efficient and effective method of communication.

8. How can you measure the progress and success of agile project?

Ans: The basic concept of agile is to deliver the working software of component.

9. How  the agile development process need to be promoted and to whom  all ?

Ans: Agile development process need to be promoted in a  sustainable development for continuous delivery to the sponsors, developers and users.

10. Why do we need technical excellence and good design project delivery?

Ans: The concept of the agile is for continuous delivery to the users as per the requirements in an iterative development approach. The team capacity needs to be accelerated towards the functions and processes to work on good software design.

Keep watching this site for further updates.

Contact for any guidance/coaching.

View my UrbanPro-profile

URL is : https://www.urbanpro.com/vskumar 

 

Vcard-Shanthi Kumar V

SDLC & Agile – Interview questions for Freshers -1

Agile Cirlce1

If you are a fresher for an IT  job trials this might be useful.

Please note as per the current global IT Industry trend most of the IT organizations have moved into Agile SDLC  and Continuous delivery cycles. Hence you, being fresher should be ready with this knowledge. I have made some of the below questions related to this topic.

[Also look into my old blog: https://vskumar.blog/2016/11/24/on-job-training-for-future-software-engineers-freshers-how-it-saves-their-career-time/]

SDLC AND Agile Model:

Questions on SDLC Phases:

1. What are the general phases for SDLC [Software Development Life Cycle] ?

Ans: In any development model  [SDLC] following are the different phases for software delivery : 

a) Requirements Investigation and analyzing

b) Design

c) Development

d) Implementation

e) Management

2. Where can you get requirement specifications in SDLC?

Ans: During the phase of Requirement investigation and analysis, the output will be Software Requirement Specifications. In every project during this phase user involvement is essential to get the business requirements to make the right software.

3. What is the procedure to derive the design specification?

Ans: During design phase the design specifications will be output of this activity. During this phase the final SRS is considered and it should be derived for design specification against each requirement. One requirement can have more than one design specifications. Basically you will be decomposed the software requirement into one or more design specification(s).

4. What is development or construction?

Ans: Once the design specifications have been baselined, the developer takes the design specifications to convert them into code. This activity is called constructing or developing code. The technology should be used for coding need to be  specified in the design documentation. Example: Let us assume you want to develop the code in Java, so the technology should be Java.

5. What is implementation in SDLC?

Ans: The implementation activity need to be started once the code construction is completed, the code construction involves coding, code review and unit testing, integration testing. Once these 3 tasks are completed the project is moved to next phase that is implementation. During implementation phase the relevant test environment is considered for deployment of software builds for test cycles. Depends on the SDLC model;  system testing and user acceptance testing can be performed, during the implementation software build can be deployed into live  once the user certify UAT [User Acceptance Testing]. The Live environment is also called production environment.

 

6. What is the meaning for  software management and retirement?

Ans: Once the software is deployed into production or live environment under first release there can be bug fixes  or software enhancements; those can occur under application management life cycle and which can be a software management also. With this concept software is being upgraded during its life time. When the new technology or business systems are considered towards   equivalent or more of the current software features then current software build should  be retired.

Example: A mainframe [COBOL/DB2/CICS] application can be converted into windows based with Java technology. Then the existing COBOL/DB2/CICS application can be planned for a retirement with the replacement of the newly planned application. The new application can also have some more software features or the same features can be implemented.

Questions on Agile:

7. How the agile development model pulls the ideas ?

Ans: Agile development model pulls the ideas in a phased manner in the following way, by using a) Prototyping   b) iterative development c) Rapid prototyping. During these phases the stakeholders or users involvement is mandatory. Their needs or suggestions also comes into the ideas for making the right software.

8. How the agile model champions the ideas?

Ans: By following various phases, different ideas are generated into the agile model. Using this approach it accelerates  the software engineering team to get the right results through different software delivery iterations.

9. Why traditional approach of SDLC is not suitable for agile development model?

Ans: During the traditional approach we do not have prototyping and iterative development in the SDLC. Using the prototyping the demo can be conducted on a conceptual model of the [new or existing] software. Then the  users can visualize these thoughts to extend the demo version into their live software. Then iterations comes into picture as  part by part to deliver  the working software in the agile development model.

To give you with some  more clarity;  Agile development model involves continuous construction and delivery using the phases of prototyping and iterative. For each iteration there can be prototype demonstration. Once the demo is approved the iteration will start for construction and implementation. In traditional model if we want to use for prototyping there is a phased prototype model and rapid prototype model are used, once they are approved by users the project team need to choose one of the traditional model SDLC. In this case there are two parts of delivery need to be considered where as in an agile model they are in-built for fast planning and iteration.

10. During agile model what kind of teams need to be formed to initiate the project?

Ans: To work in the agile development project we need the teams in small size, highly talented and responsive people.

11. During agile model how software requirements  are considered for delivery?

Ans: Agile team needs to consider the essential,  prioritized and deliverable requirements [within cycle time] from the users and construct the software in small increments those are called SPRINTS for delivery.

SW-Eng interviews

 

Next series of questions are continued……… in the below blog url:

https://vskumar.blog/2017/09/28/sdlc-agile-interview-questions-for-freshers-2/

You can look for my agile topic based videos:

https://www.youtube.com/edit?o=U&video_id=zCR6GP1ji60

 

https://www.youtube.com/edit?o=U&video_id=DiIhkCby0tU

 

 

If you are looking for any guidance please contact me and use the below Vcard:

Vcard-Shanthi Kumar V

  

 

 

 

 

How to Reduce Agile cycle time with reusable code ? [with Video lessons] # Kindle

Agile practices and the importance of Re-usable code libraries for cycle time reductionReusable code usage for Agile iterations planning by examples:

In many Agile transformation sessions the Agile practitioners or savvy’s discuss more on the process related activities rather than elaborating on the technical or software engineering process steps to reduce the cycle time.

At the same time prior to the Agile meetings, activity efforts need to be defined by the designers and the developers. Unless they identify the size of the reusable code components in the applications it is not worth for conducting the Release or Sprint planning meetings for planning of the iterations.

Hence it is the moral responsibility of the technical teams to apply this kind of practices ahead of Agile process or Scrum meetings.

If you are interested to know what reusable code with examples is, this E-Book can be useful. Using this technique, you can plan for code refractor and its cleaning also to get ROI on future Agile iterations. During Scrum meetings, these are the important topics where technical people need to discuss for customer’s ROI acceleration planning and also the cycle time reduction acceleration. The team’s technical capabilities also can be accelerated by following these practices regularly.

I have considered an application example of E-commerce site building for defining the Sprint planning and their iterations. Each iteration has been divided into different reusable code components design parts.

The relevant graphics have been designed and added into this E-book. The software configuration processes with Code Items process have been discussed also.

One can answer the following after understanding this E-Book content:
How to define the reusable code?
How the Iterations can be planned?
Is it possible to demonstrate the iterations cycle time reduction?
What are the entry criteria for Sprint planning?
What are the jumpstart activities required for designers before Agile release meeting?
How to manage the code components with configuration management process?
How to plan the efforts reduction for Sprint cycles?

The proposed or mandatory readers are:
Agile developers
Agile Designers
Agile PMS
Agile Product Owners
Agile teams
Who all intended to learn Agile Practices?

It is cheaper now, please visit: http://www.amazon.com/Technical-best-practices-reusable-iterations-ebook/dp/B012CHK20Q/ref=sr_1_10?ie=UTF8&qid=1452047932&sr=8-10&keywords=Shanthi+Vemulapalli

Reusable-code-Cover1-Pixels

 

 

 

 

 

Vcard-Shanthi Kumar V

Visit for Agile interview questions:

https://vskumar.blog/2017/09/04/sdlc-agile-interview-questions-for-freshers-1/

Visit for DevOps FAQs:

Devops-practices-faqs-1

 

https://vskumar.blog/2017/10/14/typical-devops-roles-and-activities/

My Kindle and Kobo books

Dear Regular reader!

Welcome!

Following  are my Kindle books.  

Click on the book image to go to its  page.

Cover-BI6

You can watch the video on:

https://www.youtube.com/watch?v=R-krH66K3xs

 

 

Cover-page-Test plan-create space

Cover-Control Cost-startup

Watch video on:

https://www.youtube.com/watch?v=

Book-Image-19th Jan 16

 

E-Book cover-SS-Startup

 

For other books visit:

http://www.amazon.com/s/ref=nb_sb_noss_2/187-7995104-7518315?url=search-alias%3Dstripbooks&field-keywords=Shanthi+Vemulapalli

You can also visit Kobo store for these books.

 

Data migration testing practice – A Kindle edition

 

 

 

Data Migration-image

Background on writing this book:

Most of the data migration projects can happen through the incremental data loading or if they have redesigned any of their business applications data migration need to be verified to give confidence level to the business users. Sometimes it is a critical activity and risk involved towards certification of the migrated data for business.

Many of these project timelines are getting extended or some failures are happening due to lack of; knowledge, best practices and the experiences or following right approach.

To overcome on the above situations and to be proved as best IT professionals in front of the business user community, we need a methodology and the right approach to conduct successful data migration testing and certify the data for business.

This book has been written with 10 plus years of testing experience on this kind of projects by suggesting the feasible approaches, practices and easy teams handling with right and ontime delivery by involving business users also. It also can reduce the risks while doing continuous planning improvements.

Different charts or diagrams can help the reader to understand the process faster also. One of the charts presented below:

Some of the Contents are:

Chapter 1: Introduction

Chapter 2: The scenarios of data migration

Chapter 3: Requirements Analysis

Chapter 4: Testing practices for data migration

Chapter 5: During data discovery phase

Chapter 6: Identifying the Business scenario based data

Chapter 7: Identifying the relevant data schemas

Chapter 8: Identifying the tables/queries/SPs, etc. on each of the Data schemas

Chapter 9: Planning for each Data schemas Extraction, Transformation and Loading to target Applications.

Chapter 10: Verifying the source and target data flows for business operation continuity.

Chapter 11: Conducting data verification and validation by QA/Testing team

Chapter 12: Planning

Chapter 13: The project approach

Now it is in cheaper price  look into it if you are on the same practice.

URL:http://www.amazon.com/Data-migration-testing-practice-incremental-ebook/dp/B018EP9MO2/ref=sr_1_2?ie=UTF8&qid=1452042282&sr=8-2&keywords=Shanthi+vemulapalli

If you feel these practices can be used by somebody please leave your comments after reading the book.

 

 

 

 

 

 

Coolpad Note 3 (White, 16GB)

Apple iPhone 4S (Black, 8GB)

Lenovo S850 (Dark Blue)

Kindle Voyage Wifi – 6″ High-Resolution Display (300 ppi) with Adaptive Built-in Light and PagePress Sensors