Category Archives: Continuous Delivery Integration

A quick review on DevOps Practices for DevOps Engineers/Practitioners

Watch this video.

DevOps Patterns
devops-process
  1. DevOps is a terminology used to refer to a set of principles and practices to emphasize the collaboration and communication of Information Technology [IT] professionals in a software project organization, while automating the process of software delivery and infrastructure using Continuous Delivery Integration[CDI] methods.
  2. The DevOps is also connecting the teams of Development and Operations together to work collaboratively to deliver the Software to the customers in an iterative development model by adopting Continuous Delivery Integration [CDI] concepts. The software delivery happens  in small pieces at different delivery intervals. Sometimes these intervals can be accelerated depends on the customer demand.
  3. The DevOps is a new practice globally adopted by many companies and its importance and implementation is accelerating by maintaining constant speed.  So every IT professional need to learn the concepts of DevOps and its Continuous Delivery Integration [CDI] methods. To know the typical DevOps activities by role just watch the video: https://youtu.be/vpgi5zZd6bs, it is pasted below in videos.
  4. Even a college graduate or freshers also need to have this knowledge or practices to work closely with their new project teams in a company. If a fresher attends this course he/she can get into the project shoes faster to cope up with the  experienced teams.
  5. Another way; The DevOps is an extension practice of Agile and continuous delivery. To merge into this career; the IT professionals  need to learn the Agile concepts, Software configuration management, Release management, deployment management and  different DevOps principles and practices to implement the CDI patterns. The relevant tools for these practices integration. There are various tool vendors in the market. Also open source tools are very famous. Using these tools the DevOps practices can be integrated to maintain the speed for CDI.
  6. There  are tools related with version control and CDI automation. One need to learn the process steps related to these areas by attending a course. Then the tools can be understood easily.  If one understands these CDI automation practices and later on learning the tools process is very easy by self also depends on their work environment.
  7. As mentioned in the above; Every IT company or IT services company need to adopt the DevOps practices for their customers competent service delivery in global IT industry. When these companies adopt these practices, their resources also need to be with thorough knowledge of DevOps practices to serve to the customers. The companies can get more benefit by having these knowledged resources. At the same time the new joinees in any company either experienced or fresher professional if they have this knowledge, their CTC in view of perks will be offered more or with competent offer they may be invited to join in that company.
  8. Let us know if you need  DevOps training  from  the IT industry experienced people; which includes the above practice areas to boost you in the IT industry.

Training will be given by 3 decades of Global IT experienced  professional(s):

https://www.linkedin.com/in/vskumaritpractices

For DevOps roles and activities watch my video:

Folks, I also run the DevOps Practices Group: https://www.facebook.com/groups/1911594275816833/?ref=bookmarks

There are many Learning units I am creating with basics. If you are not yet a member, please apply to utilize them. Read and follow the rules before you click your mouse.

For contact/course details please visit:

https://vskumarblogs.wordpress.com/2016/12/23/devops-training-on-principles-and-best-practices/

Advertising3

How to Create a Learning Organization during DevOps Practices implementation ?

Create Learning-DevOps organization.png

If you are keen in learning DevOps Practices as on latest, you can apply to join in my group: https://www.facebook.com/groups/1911594275816833/

Please note there are rules to follow.

For DevOps roles and activities watch my video:

For contact/course details please visit:

https://vskumarblogs.wordpress.com/2016/12/23/devops-training-on-principles-and-best-practices/

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.

Watch the below 50 minutes video for the above analysis:

How a DevOps Architect role is different from A Cloud Architect ?

Many people might feel the Cloud Architect and DevOps Architect can play dual roles. As per my observation yes, many small and medium level organizations are utilizing the IT Professionals in the same manner. I wrote a blog for these roles segregation with their main Activities. I felt this might help to some of the practitioners.

With reference to my previous blog on Cloud Architect role comparison with DevOps, there were questions on DevOps architect role comparison.

https://vskumar.blog/2018/11/21/how-a-cloud-architect-is-different-from-devops-role/

Basically, A DevOps architect need to work on:

  1. Identifying the Sprint cycles for different projects.
  2. Identifying the different environments needs including the different test levels requirements.
  3. Plan/design the environment specifications to build Infrastructure As A Code [IAC] and guide the DevOps Engineers.
  4. At the same time he/she need to collaborate with the Cloud Architect to seek the permissions/approvals to utilize the cloud environment on these environmental requirements/setup.
  5. Both these architects need to measure the cost of this Infrastructure to estimate and get approval from the management.
  6. The DevOps Architect is also responsible to plan for different production deployments. He/She need to work together with the Cloud Architect to establish this setup.
  7. In the current trend the containerization is accelerating with Cloud technology. Both these architects need to keep working on these areas to reduce the Virtual Machines cost by replacing with containers. At the same time these two people need to think on converting the applications into Microservices slowly with the Agile methods. This will have easy maintenance in future and also the further cost can be reduced in view of infrastructure and the man power. And their guidelines need to submit to management as a proposal. These two people are also responsible to upgrade their teams skills on the new trends in Cloud technology.
  8. If you ask me the question who are the team members for these roles;
  9. DevOps Engineers will report to DevOps Architect.
  10. Cloud/system engineer reports to Cloud Architect.

So these architects need to manage their teams well in view of their skills augmentation and the tasks rolling as per the DevOps Speed/Velocity concepts.

What kind of IT Professionals can be converted into DevOps Architect ?

Basically, the DevOps activities are related to more on Practices and Culture. If your background is related to the below areas in the past, your profile might suit to convert by learning the above mentioned skills.

  • You might have worked on Deployment areas
  • Worked in release management
  • Worked in Development processes implementation areas.
  • You should be savvy in implementing the Agile/Scrum/Lean practices.
  • You should have worked as a Servant leadership role also. [Even as a Scrum master]. In many cases this role is responsible to mentor the teams on different practices implementation by gearing up the teams to follow DevOps Velocity.
  • You should have worked in Identifying the retrospective issues very well and implemented the improvements in different Sprint cycles.
  • He/she should be savvy in learning new technology and transform the knowledge to the teams well. This knowledge should be very simple on the tools features related areas and how they can utilize them in their setup ? How they can reduce the efforts and cost to the company with a ROI Demonstration. They need to prove it to management with a POC.
  • This person is responsible to show some ROI as Cloud Architect does it on DevOps New practices implementation.
  • The DevOps Architect reports to the DevOps Practices head or CIO or CTO. Where as the Cloud Architect reports to CIO or CTO. Depends on the size of the organization, there can be Chief Cloud architect also, where all the Cloud architects report to this position.

https://vskumar.blog/2019/02/14/what-will-be-the-size-of-cloud-market-in-it-by-2022/

Note:

The DevOps Architect need not put his fingers into low level command scripts. It is the responsibility of the DevOps Engineers.

Hope this blog clarifies for many people.

AWS-SAA-Course

 

 

 

 

 

Also read the below blog on how the Costly Cloud Defects are getting created:

https://vskumar.blog/2019/10/14/how-the-cloud-professionals-can-create-the-costly-defects-and-the-reasons/

1. AWS:How to create and activate a new account in AWS ?

AWS Account-creation scrn

How to create and activate a new account in AWS ?:

In this blog, you will see the required steps for creating and activating your new AWS account. Once have the activated account, you can start your other lab practices as I discuss in the class timely.

The following are the main 4 steps process we need to follow:

STEP1: Creating your account. It consists of 2 steps: a) Providing a valid e-mail address and choosing a password. b) Providing your contact information and setting your preferences.

STEP2: Add a payment method Please note; you need to have a valid CC to give its details. Amazon verifies its transaction also with a tiny charge and with a credit back. If by mistaken given wrong data please note; your account registration process will not be activated. You will be intimated by mail. This way Amazon is authenticating/authorizing us for AWS usage.

STEP3: Verify your phone number. You need to Provide a phone number where you can be reached in next few minutes, while creating your account.

STEP4: Choose the AWS Support plans. Time to time the AWS plans will be published. You need to choose the plan from the currently available plans for your needs. The relevant URL is given in the detailed steps section in this blog.

As a consolidated process, we can understand from the below flow chart. Which is from the collection of AWS process charts.

AWS Account-creation flowchart

Note:

I am not copying the screens due to privacy.

Detailed steps

STEP1: Detailed steps for Creating your account.

a). You need to go to Amazon Web Services home page URL: https://aws.amazon.com/

b). Now, Choose Sign Up. Click on Create an AWS account. You can see new page with Create an AWS account. You need to enter the required details. E-mail id, Pwd, AWS Account name [you can give any name for this]. And choose continue to go to next page. Please note; The above steps are valid for the new users of AWS. If you enter your email address entered incorrectly, you might not be able to access your account or change your password in the future. So you need to be careful on your data entry part. Let us assume; if you’ve signed in to AWS recently, it might say Sign In to the Console. So you need to login into your existing Account.

c). Now in the current page, choose Professional or personal. These two areas will give equal services. Depends on your need You can choose one of the options.

d). From the above options choosed, type the requested company or personal information entries. Note; At this point, You need to go through the AWS Customer Agreement to know their policies and procedures to follow while operating.

e). Finally, you choose Create Account and Continue options in the bottom.

f). Please note; at this point you will receive an e-mail to confirm that your account is created. Now, you can sign in to your new account using the valid email address and valid password you have supplied earlier.

Please note; we have done the Step1 only, the activation process is not yet completed to use the AWS services. Still we need to follow 3 more steps.

STEP2: Add a payment method- Detailed steps:

At this point; On the Payment Information page,

a) Choose the payment method as per the payment gateway standards which is displayed.

b) Type the requested information associated with your payment method. Please make sure the address for your payment method is the same as the address you provided for your account. Note; If your billing address is different; then choose Use a new address, type the billing address for your payment method.

c) Now, choose Secure Submit.

STEP3: Verify your phone number.

Please keep a valid and handy phone number at this point.

a) On this Phone Verification page, type a phone number where can use to accept incoming phone calls.

b) Enter the code displayed in the captcha. When you’re ready to receive a call, choose Call me now option.

c) In a few moments, an automated system will call you to your given phone number. Even it might have SMS feature also, if you are outside North America region.

d) Type the provided PIN on your phone’s keypad of the AWS screen. e) After the process is complete, choose Continue.

STEP4: Choose the AWS Support plans.

a) At this point please visit the below URL: https://aws.amazon.com/premiumsupport/features/

You can select the AWS support plans from the given list.

b) After your selection of a Support plan, a confirmation page denotes that your account is being activated.

c) Please note; Accounts are usually activated within a few minutes, but the process might take up to 24 hours. This process includes the validation of Bank/CC account given there.

d) Hence keep looking for a mail on this subject from Amazon to start your AWS services usage.

Assuming everything went well, and your AWS account is activated now.  Congratulations!

We can look into next lab with reference to the class session.

2. AWS: WordPress[WP] infrastructure creation using a free tier account

https://wordpress.com/post/vskumar.blog/2884

 

If you are interested to learn Virtualization with Vagrant visit:

1. Vagrant/Virtual Box:How to create Virtual Machine[VM] on Windows 10?:

 

Note:

If you are not a student of my class, and looking for it please contact me by mail with your LinkedIn identity. And send a connection request with a message on your need. You can use the below contacts. Please note; I teach globally.

 

Vcard-Shanthi Kumar V-v3

31. DevOps: Jenkins-How to use Backup/Restore using thinbackup plugin ?

\]jenkins

Through this video I have demonstrated the below steps using Jenkins and its thinkbackup plugin process/usage.

=== Steps used in video ====>

How to take jenkins backup ?
1. You need to configure the thinbackup plugin.
2. Search for that plugin in
Manage Jenkins option.
3. Click on Available tab. It shows the locally
available plugins.
4. Then goto filter and type the plugin name as
thinbackup.
5. Now let us check it. You can see the icon,
it is installed.
6. Once you have this, you can explore it.
7. Please note you also need to configure
Restore.
8. Now, let us configure the backup.
After that we can use backupnow option to
take a backup. It stores on the given path.
So, we should use settings.
9. Now, let us test one backup …
10. Let us check the backup file…
11. Observe the created jobs are there…
12. Now, let me run a build..
13.Created 8th Build.
14. Now let me take the new backup…
15. Now, let me use restore to restore
the past build.
16.See the current build history …
17. I am picking up the 1st it was
made in the beginning…
18. Now, let us verify the jenkins
system jobs/builds.
19. It is overwritten on the existing jobs..
20. Let us delete some jobs and restore
the 8thbuild backup.
21. Let me try to restore the latest backup
which has the 8thbuild …
22. Let us restart the server to use the
latest restore …. Let me pause you …
23. It is ready to login … let us test it..
24. Please Note;
When restored it unzipped and kept the files.
When we restarted the jenkins server
it pickedup those files only.
We can see the 8th build is there.
25. From this exercise and trouble shoot,
we can conclude:
i) We need to use thinbackup plugin to
setup backup/restore process.
ii. Initially we use backup plugin and
later we can setup restore setup after
configuring the backup options.

iii. And when we restore a particular build
we need to restart the jenkins server.
That is all for this exercise..

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

 

Advt-course3rd page

26.DevOps:How to install Apache-Ant for Ubuntu ?:

Ant-Logo

 

 

In this blog, I would like to demonstrate the Apache-Ant installtion on Ubuntu.

What are the pre-requisites:
You need to have JDK 8/9 in your Ubuntu machine.
If you do not have it please visit my blog to get the installation instructions.
Please go through my JENKINS Instllation blog.
It has JDK installation procedure also.
URL: https://vskumar.blog/2017/11/25/1-devops-jenkins2-9-installation-with-java-9-on-windows-10/

How to uninstall existing ant?:
Step1:
I have ant installed in my ubuntu VM.
1st let me remove it and restart the install process:
We need to use the below command:
sudo apt-get remove ant
===== Screen display =====>
vskumar@ubuntu:~$ sudo apt-get remove ant
[sudo] password for vskumar:
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
ant ant-optional
0 upgraded, 0 newly installed, 2 to remove and 4 not upgraded.
After this operation, 3,108 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database … 236912 files and directories currently installed.)
Removing ant-optional (1.9.6-1ubuntu1) …
Removing ant (1.9.6-1ubuntu1) …
Processing triggers for man-db (2.7.5-1) …
========= Ant is Removed ===>

Step2:
=== Checking Ant version ===>
vskumar@ubuntu:~$ ant -v
The program ‘ant’ is currently not installed. You can install it by typing:
sudo apt install ant
vskumar@ubuntu:~$ D
===Now there is no Ant setup ===>
Looks like; still the ant is existing.

Step3:
Also please let us note the following:
If we want to delete configuration and/or data files of ant from Ubuntu Xenial completely,
then the below command will work:
sudo apt-get purge ant
== Screen display ===>
vskumar@ubuntu:~$ sudo apt-get purge ant
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
ant* ant-optional*
0 upgraded, 0 newly installed, 2 to remove and 4 not upgraded.
After this operation, 3,108 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database … 236912 files and directories currently installed.)
Removing ant-optional (1.9.6-1ubuntu1) …
Removing ant (1.9.6-1ubuntu1) …
Processing triggers for man-db (2.7.5-1) …
vskumar@ubuntu:~$
======================>

Now, let us check it.
=== Check the version now also ===>
vskumar@ubuntu:~$
vskumar@ubuntu:~$ ant -v
bash: /usr/bin/ant: No such file or directory
vskumar@ubuntu:~$
=================================>

Still you if you feel ant older version is there, we can follow the below step also:
To delete configuration and/or data files of ant and it’s dependencies from Ubuntu Xenial
then we should execute the below command:
sudo apt-get purge –auto-remove ant

Now, we will see how to install, configure and compile ant latest version1.10.1 ?:

Step1:
We need to update the packages/repos in Ubuntu VM as below:
sudo apt-get update
==== Screen display ======>
vskumar@ubuntu:~$
vskumar@ubuntu:~$ sudo apt-get update
[sudo] password for vskumar:
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://ppa.launchpad.net/ansible/ansible/ubuntu xenial InRelease
Hit:3 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
Get:4 https://download.docker.com/linux/ubuntu xenial InRelease [65.8 kB]
Ign:5 https://apt.datadoghq.com stable InRelease
Get:6 https://apt.datadoghq.com stable Release [4,525 B]
Get:7 https://apt.datadoghq.com stable Release.gpg [819 B]
Ign:8 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial InRelease
Ign:9 https://pkg.jenkins.io/debian-stable binary/ InRelease
Ign:10 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial InRelease
Get:11 https://pkg.jenkins.io/debian-stable binary/ Release [2,042 B]
Get:12 https://pkg.jenkins.io/debian-stable binary/ Release.gpg [181 B]
Ign:13 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial Release
Ign:14 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial Release
Get:15 https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages [4,793 B]
Ign:15 https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
Ign:16 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 Packages
Ign:17 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 all Packages
Ign:18 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en_US
Ign:19 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en
Ign:20 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:21 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Ign:22 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 Packages
Get:23 https://apt.datadoghq.com stable/6 amd64 Packages [2,447 B]
Ign:24 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 all Packages
Get:15 https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages [4,521 B]
Ign:15 https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
Ign:25 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en_US
Ign:26 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en
Ign:27 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:28 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Ign:16 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 Packages
Ign:17 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 all Packages
Ign:18 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en_US
Ign:19 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en
Get:15 https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages [29.9 kB]
Ign:20 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:21 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Ign:22 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 Packages
Ign:24 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 all Packages
Ign:25 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en_US
Ign:26 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en
Get:29 https://pkg.jenkins.io/debian-stable binary/ Packages [12.7 kB]
Ign:29 https://pkg.jenkins.io/debian-stable binary/ Packages
Ign:27 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:28 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Ign:16 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 Packages
Ign:17 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 all Packages
Ign:18 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en_US
Ign:19 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en
Ign:20 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:21 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Get:29 https://pkg.jenkins.io/debian-stable binary/ Packages [11.9 kB]
Ign:22 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 Packages
Ign:24 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 all Packages
Ign:25 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en_US
Ign:26 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en
Ign:27 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:28 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Ign:16 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 Packages
Ign:17 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 all Packages
Ign:18 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en_US
Ign:19 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en
Ign:20 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:21 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Ign:22 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 Packages
Ign:24 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 all Packages
Ign:25 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en_US
Ign:26 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en
Ign:27 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:28 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Ign:16 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 Packages
Ign:17 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 all Packages
Ign:18 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en_US
Ign:19 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en
Ign:20 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:21 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Ign:22 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 Packages
Ign:24 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 all Packages
Ign:25 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en_US
Ign:26 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en
Ign:27 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:28 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Err:16 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 Packages
403 Forbidden
Ign:17 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 all Packages
Ign:18 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en_US
Ign:19 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en
Ign:20 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:21 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Err:22 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 Packages
403 Forbidden
Ign:24 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 all Packages
Ign:25 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en_US
Ign:26 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en
Ign:27 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:28 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Fetched 118 kB in 35s (3,328 B/s)
Reading package lists… Done
W: The repository ‘https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial Release’ does not have a Release file.
N: Data from such a repository can’t be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository ‘https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial Release’ does not have a Release file.
N: Data from such a repository can’t be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu/dists/xenial/test-17.06/binary-amd64/Packages 403 Forbidden
E: Failed to fetch https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu/dists/xenial/test-17.06/binary-amd64/Packages 403 Forbidden
E: Some index files failed to download. They have been ignored, or old ones used instead.
vskumar@ubuntu:~$
====================================>

Step2:
Now, We can get the install file of ant with the below command:
sudo apt-get install ant
==== Screen Display =====>
vskumar@ubuntu:~$
vskumar@ubuntu:~$ sudo apt-get install ant
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
ant-optional
Suggested packages:
ant-doc ant-gcj default-jdk | java-compiler | java-sdk ant-optional-gcj
antlr javacc jython libbcel-java libbsf-java libgnumail-java libjdepend-java
liboro-java libregexp-java
The following NEW packages will be installed:
ant ant-optional
0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/2,205 kB of archives.
After this operation, 3,108 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package ant.
(Reading database … 236678 files and directories currently installed.)
Preparing to unpack …/ant_1.9.6-1ubuntu1_all.deb …
Unpacking ant (1.9.6-1ubuntu1) …
Selecting previously unselected package ant-optional.
Preparing to unpack …/ant-optional_1.9.6-1ubuntu1_all.deb …
Unpacking ant-optional (1.9.6-1ubuntu1) …
Processing triggers for man-db (2.7.5-1) …
Setting up ant (1.9.6-1ubuntu1) …
Setting up ant-optional (1.9.6-1ubuntu1) …
vskumar@ubuntu:~$
==========================>

Step3:
Now let me check its version.
===== Version check ===>
vskumar@ubuntu:~$ ant -v
Apache Ant(TM) version 1.9.6 compiled on July 8 2015
Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed
vskumar@ubuntu:~$
====================>

Step4:
We need to Install Apache Ant on Ubuntu 16.04 using SDKMan.
SDKMAN is a tool which can be usd to manage parallel versions of multiple
Software Development Kits on most Unix based systems.
The same way, we can leverage SDKMAN to install Apache Ant on Ubuntu 16.04.
Using the below command:
sdk install ant
Before doing this I need to install SDK in my ubuntu VM.

===== Screen display =====>
vskumar@ubuntu:~$
vskumar@ubuntu:~$ curl -s “https://get.sdkman.io&#8221; | bash

-+syyyyyyys:
`/yho:` -yd.
`/yh/` +m.
.oho. hy .`
.sh/` :N` `-/o` `+dyyo:.
.yh:` `M- `-/osysoym :hs` `-+sys: hhyssssssssy+
.sh:` `N: ms/-“ yy.yh- -hy. `.N-““““+N.
`od/` `N- -/oM- ddd+` `sd: hNNm -N:
:do` .M. dMMM- `ms. /d+` `NMMs `do
.yy- :N` “`mMMM. – -hy. /MMM: yh
`+d+` `:/oo/` `-/osyh/ossssssdNMM` .sh: yMMN` /m.
-dh- :ymNMMMMy `-/shmNm-`:N/-.“ `.sN /N- `NMMy .m/
`oNs` -hysosmMMMMydmNmds+-.:ohm : sd` :MMM/ yy
.hN+ /d: -MMMmhs/-.` .MMMh .ss+- `yy` sMMN` :N.
:mN/ `N/ `o/-` :MMMo +MMMN- .` `ds mMMh do
/NN/ `N+….–:/+oooosooo+:sMMM: hMMMM: `my .m+ -MMM+ :N.
/NMo -+ooooo+/:-….`…:+hNMN. `NMMMd` .MM/ -m: oMMN. hs
-NMd` :mm -MMMm- .s/ -MMm. /m- mMMd -N.
`mMM/ .- /MMh. -dMo -MMMy od. .MMMs..—yh
+MMM. sNo`.sNMM+ :MMMM/ sh`+MMMNmNm+++-
mMMM- /–ohmMMM+ :MMMMm. `hyymmmdddo
MMMMh. ““ `-+yy/`yMMM/ :MMMMMy -sm:.“..-:-.`
dMMMMmo-.“““..-:/osyhddddho. `+shdh+. hMMM: :MmMMMM/ ./yy/` `:sys+/+sh/
.dMMMMMMmdddddmmNMMMNNNNNMMMMMs sNdo- dMMM- `-/yd/MMMMm-:sy+. :hs- /N`
`/ymNNNNNNNmmdys+/::—-/dMMm: +m- mMMM+ohmo/.` sMMMMdo- .om: `sh
`.—–+/.` `.-+hh/` `od. NMMNmds/ `mmy:` +mMy `:yy.
/moyso+//+ossso:. .yy` `dy+:` .. :MMMN+—/oys:
/+m: `.-:::-` /d+ +MMMMMMMNh:`
+MN/ -yh. `+hddhy+.
/MM+ .sh:
:NMo -sh/
-NMs `/yy:
.NMy `:sh+.
`mMm` ./yds-
`dMMMmyo:-.““.-:oymNy:`
+NMMMMMMMMMMMMMMMMms:`
-+shmNMMMNmdy+:`

Now attempting installation…

Looking for a previous installation of SDKMAN…
Looking for unzip…
Looking for zip…
Looking for curl…
Looking for sed…
Installing SDKMAN scripts…
Create distribution directories…
Getting available candidates…
Prime the config file…
Download script archive…
######################################################################## 100.0%
Extract script archive…
Install scripts…
Set version to 5.6.3+299 …
Attempt update of interactive bash profile on regular UNIX…
Added sdkman init snippet to /home/vskumar/.bashrc
Attempt update of zsh profile…
Updated existing /home/vskumar/.zshrc

All done!

Please open a new terminal, or run the following in the existing one:

source “/home/vskumar/.sdkman/bin/sdkman-init.sh”

Then issue the following command:

sdk help

Enjoy!!!
vskumar@ubuntu:~$
== SDK installed =====>
We need to use the below command:
=====>
vskumar@ubuntu:~$ source “$HOME/.sdkman/bin/sdkman-init.sh”
vskumar@ubuntu:~$
======>

Now, let us check SDK Version.
===== SDK Version checking ====>
vskumar@ubuntu:~$ sdk version
==== BROADCAST =================================================================
* 09/05/18: sbt 1.1.5 released on SDKMAN! #scala
* 09/05/18: Springboot 2.0.2.RELEASE released on SDKMAN! #springboot
* 09/05/18: Springboot 1.5.13.RELEASE released on SDKMAN! #springboot
================================================================================

SDKMAN 5.6.3+299
vskumar@ubuntu:~$
==========================>

Step5:

Now, let us use the below command:
sdk install ant

=== Screen display ==>
vskumar@ubuntu:~$
vskumar@ubuntu:~$ sdk install ant

 

Downloading: ant 1.10.1

In progress…

######################################################################## 100.0%

Installing: ant 1.10.1
Done installing!

 

Setting ant 1.10.1 as default.
vskumar@ubuntu:~$
vskumar@ubuntu:~$
=================>

Step6:
Now, let us check the ant’s latest version:

== Screen display ===>
vskumar@ubuntu:~$ ant -v
Apache Ant(TM) version 1.10.1 compiled on February 2 2017
Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed
vskumar@ubuntu:~$
== Now version change you can see after SDK usage ===>

Step7:
How to Create ANT_HOME Environment Variables?:

Create an ant.sh file at /etc/profile.d folder (you can use vi with below command)

== Let us see the files===>
vskumar@ubuntu:~$ pwd
/home/vskumar
vskumar@ubuntu:~$ ls /etc/profile.d
appmenu-qt5.sh bash_completion.sh vte-2.91.sh
apps-bin-path.sh cedilla-portuguese.sh
vskumar@ubuntu:~$
==========================>
There is no ant.sh file.

sudo vi /etc/profile.d/ant.sh
Enter the follow content to the file:

export ANT_HOME=/usr/local/ant
export PATH=${ANT_HOME}/bin:${PATH}
Save the file.
====== ant.sh file creation ===>
vskumar@ubuntu:~$ sudo vim /etc/profile.d/ant.sh
vskumar@ubuntu:~$
vskumar@ubuntu:~$ sudo cat /etc/profile.d/ant.sh

export ANT_HOME=/usr/local/ant
export PATH=${ANT_HOME}/bin:${PATH}
vskumar@ubuntu:~$
vskumar@ubuntu:~$ ls /etc/profile.d
ant.sh apps-bin-path.sh cedilla-portuguese.sh
appmenu-qt5.sh bash_completion.sh vte-2.91.sh
vskumar@ubuntu:~$
============ Contents of ant.sh=====>

Step8:
We need to activate the above environment variables.
We can do that by log out and log in again or simply run below command:
source /etc/profile
==== Screen display ===>
vskumar@ubuntu:~$ source /etc/profile
vskumar@ubuntu:~$
=======================>

Now let us check the ant version after doing the above steps to observe the change:

==== Display ==>
vskumar@ubuntu:~$
vskumar@ubuntu:~$ ant -version
Apache Ant(TM) version 1.10.1 compiled on February 2 2017
vskumar@ubuntu:~$
== Now error now =====>

Finally, we have configured Apache Ant(TM) version 1.10.1 and compiled successfully.

For Ant installation on windows 10 visit my blog:

https://vskumar.blog/2018/05/12/24-devops-how-to-install-apache-ant-for-windows-10/

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

 

 

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

 

5. DevOps: How to work with Docker Images

Docker-logo

In  continuation of my previous blog on “4. DevOps: How to work with Docker Containers”, in this blog I would like to give some lab practice on Docker Images.

How to pull the docker public images ?:
Docker portal will have numerous images available  under public.
Now, there is a need for us to know the usage of docker pull command, which is the defacto command to download Docker images.

Now, in this section, we will use the busybox image, one of the smallest but a very handy Docker image, to dive deep into Docker image handling:
$sudo docker pull busybox
============= Output ============>
vskumar@ubuntu:/var/tmp$ sudo docker pull busybox
Using default tag: latest
latest: Pulling from library/busybox
0ffadd58f2a6: Pull complete
Digest: sha256:bbc3a03235220b170ba48a157dd097dd1379299370e1ed99ce976df0355d24f0
Status: Downloaded newer image for busybox:latest
vskumar@ubuntu:/var/tmp$
=================>
Sometimes it might reject this request. We need to keep on trying to get it. I tried 4 times at different timings to connect to it.
Please note now, we have three images as below through all of our so far exercises:
===================>
vskumar@ubuntu:/var/log$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest f2a91732366c 4 days ago 1.85kB
ubuntu latest 20c44cd7596f 7 days ago 123MB
busybox latest 6ad733544a63 3 weeks ago 1.13MB
vskumar@ubuntu:/var/log$
===============>
Now, let us stop the docker services and check the status as below:
=================>
vskumar@ubuntu:/var/log$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest f2a91732366c 4 days ago 1.85kB
ubuntu latest 20c44cd7596f 7 days ago 123MB
busybox latest 6ad733544a63 3 weeks ago 1.13MB
vskumar@ubuntu:/var/log$ sudo service docker stop
vskumar@ubuntu:/var/log$ sudo service docker status
● docker.service – Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: e
Active: inactive (dead) since Sat 2017-11-25 02:52:25 PST; 8s ago
Docs: https://docs.docker.com
Process: 1224 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=0/SUCCE
Main PID: 1224 (code=exited, status=0/SUCCESS)
Nov 25 02:21:42 ubuntu dockerd[1224]: time=”2017-11-25T02:21:42.863518710-08:00″
Nov 25 02:21:43 ubuntu dockerd[1224]: time=”2017-11-25T02:21:43-08:00″ level=inf
Nov 25 02:27:08 ubuntu dockerd[1224]: time=”2017-11-25T02:27:08.010096274-08:00″
Nov 25 02:27:08 ubuntu dockerd[1224]: time=”2017-11-25T02:27:08-08:00″ level=inf
Nov 25 02:27:08 ubuntu dockerd[1224]: time=”2017-11-25T02:27:08.199685599-08:00″
Nov 25 02:52:25 ubuntu dockerd[1224]: time=”2017-11-25T02:52:25.010875880-08:00″
Nov 25 02:52:25 ubuntu systemd[1]: Stopping Docker Application Container Engine.
Nov 25 02:52:25 ubuntu dockerd[1224]: time=”2017-11-25T02:52:25.081714537-08:00″
Nov 25 02:52:25 ubuntu systemd[1]: Stopped Docker Application Container Engine.
Nov 25 02:52:25 ubuntu systemd[1]: Stopped Docker Application Container Engine.
vskumar@ubuntu:/var/log$
====================>
You can see the inactive status of docker.
In such cases, restart the Docker service, as shown here:

$ sudo service docker restart
You can see the output as below:
==================>
vskumar@ubuntu:/var/log$ sudo service docker restart
vskumar@ubuntu:/var/log$ 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:54:42 PST; 6s ago
     Docs: https://docs.docker.com
 Main PID: 3769 (dockerd)
    Tasks: 18
   Memory: 24.6M
      CPU: 989ms
   CGroup: /system.slice/docker.service
           ├─3769 /usr/bin/dockerd -H fd://
           └─3778 docker-containerd --config /var/run/docker/containerd/containe

Nov 25 02:54:41 ubuntu dockerd[3769]: time="2017-11-25T02:54:41.159062708-08:00"
Nov 25 02:54:41 ubuntu dockerd[3769]: time="2017-11-25T02:54:41.159806997-08:00"
Nov 25 02:54:41 ubuntu dockerd[3769]: time="2017-11-25T02:54:41.163503112-08:00"
Nov 25 02:54:41 ubuntu dockerd[3769]: time="2017-11-25T02:54:41.743276580-08:00"
Nov 25 02:54:41 ubuntu dockerd[3769]: time="2017-11-25T02:54:41.955217284-08:00"
Nov 25 02:54:41 ubuntu dockerd[3769]: time="2017-11-25T02:54:41.975961283-08:00"
Nov 25 02:54:42 ubuntu dockerd[3769]: time="2017-11-25T02:54:42.092220161-08:00"
Nov 25 02:54:42 ubuntu dockerd[3769]: time="2017-11-25T02:54:42.094334663-08:00"
Nov 25 02:54:42 ubuntu systemd[1]: Started Docker Application Container Engine.
Nov 25 02:54:42 ubuntu dockerd[3769]: time="2017-11-25T02:54:42.190194886-08:00"

vskumar@ubuntu:/var/log$ 

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

Now, let us reconfirm the existing docker images as below:
================>

vskumar@ubuntu:/var/log$ ^C
vskumar@ubuntu:/var/log$ sudo docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
hello-world         latest              f2a91732366c        4 days ago          1.85kB
ubuntu              latest              20c44cd7596f        7 days ago          123MB
busybox             latest              6ad733544a63        3 weeks ago         1.13MB
vskumar@ubuntu:/var/log$ 
=======================>

By default, Docker always uses the image that is tagged as latest.

Each image variant can be directly identified by qualifying it with an appropriate tag.

An image can be tag-qualified by adding a colon (:) between the tag and the repository name (<repository>:<tag>). For demonstration, we will pull the 1.24 tagged version of busybox as shown here:

Now, For lab demonstration, we will pull the 1.24 tagged version of busybox as shown here:

$ sudo docker pull busybox:1.24

Now. You can see the total output before and after executing the above command:

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

vskumar@ubuntu:/var/log$ ^C

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

REPOSITORY TAG IMAGE ID CREATED SIZE

hello-world latest f2a91732366c 4 days ago 1.85kB

ubuntu latest 20c44cd7596f 7 days ago 123MB

busybox latest 6ad733544a63 3 weeks ago 1.13MB

vskumar@ubuntu:/var/log$ ^C

vskumar@ubuntu:/var/log$

vskumar@ubuntu:/var/log$

vskumar@ubuntu:/var/log$ sudo docker pull busybox:1.24

1.24: Pulling from library/busybox

385e281300cc: Pull complete

a3ed95caeb02: Pull complete

Digest: sha256:8ea3273d79b47a8b6d018be398c17590a4b5ec604515f416c5b797db9dde3ad8

Status: Downloaded newer image for busybox:1.24

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

REPOSITORY TAG IMAGE ID CREATED SIZE

hello-world latest f2a91732366c 4 days ago 1.85kB

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$

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

There are two busybox containers with different versions.

So, on the basis of TAG values the containers are being pulled.

How to Search Docker images:

So far we have pulled the known images from the docker-hub.

Let us identify some docker images by using a search option as below. We can search for Docker images in the Docker Hub Registry using the docker search subcommand, as shown in this example:

$ sudo docker search mysql

You can see the displayed output of mysql images from the Docker Hub Registry:

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

vskumar@ubuntu:/var/log$ sudo docker search mysql

NAME DESCRIPTION STARS OFFICIAL AUTOMATED

mysql MySQL is a widely used, open-source relation… 5278 [OK]

mariadb MariaDB is a community-developed fork of MyS… 1634 [OK]

mysql/mysql-server Optimized MySQL Server Docker images. Create… 368 [OK]

percona Percona Server is a fork of the MySQL relati… 303 [OK]

hypriot/rpi-mysql RPi-compatible Docker Image with Mysql 74

zabbix/zabbix-server-mysql Zabbix Server with MySQL database support 64 [OK]

centurylink/mysql Image containing mysql. Optimized to be link… 53 [OK]

sameersbn/mysql 48 [OK]

zabbix/zabbix-web-nginx-mysql Zabbix frontend based on Nginx web-server wi… 38 [OK]

tutum/mysql Base docker image to run a MySQL database se… 29

1and1internet/ubuntu-16-nginx-php-phpmyadmin-mysql-5 ubuntu-16-nginx-php-phpmyadmin-mysql-5 17 [OK]

schickling/mysql-backup-s3 Backup MySQL to S3 (supports periodic backup… 16 [OK]

centos/mysql-57-centos7 MySQL 5.7 SQL database server 15

linuxserver/mysql A Mysql container, brought to you by LinuxSe… 12

centos/mysql-56-centos7 MySQL 5.6 SQL database server 6

openshift/mysql-55-centos7 DEPRECATED: A Centos7 based MySQL v5.5 image… 6

frodenas/mysql A Docker Image for MySQL 3 [OK]

dsteinkopf/backup-all-mysql backup all DBs in a mysql server 3 [OK]

circleci/mysql MySQL is a widely used, open-source relation… 2

cloudfoundry/cf-mysql-ci Image used in CI of cf-mysql-release 0

cloudposse/mysql Improved `mysql` service with support for `m… 0 [OK]

ansibleplaybookbundle/rhscl-mysql-apb An APB which deploys RHSCL MySQL 0 [OK]

astronomerio/mysql-sink MySQL sink 0 [OK]

inferlink/landmark-mysql landmark-mysql 0 [OK]

astronomerio/mysql-source MySQL source 0 [OK]

vskumar@ubuntu:/var/log$ ^C

vskumar@ubuntu:/var/log$

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

You can get the top 5 images by suing head -5 linux command.

$sudo docker search mysql | head -5

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

vskumar@ubuntu:/var/log$ sudo docker search mysql | head -5

NAME DESCRIPTION STARS OFFICIAL AUTOMATED

mysql MySQL is a widely used, open-source relation… 5278 [OK]

mariadb MariaDB is a community-developed fork of MyS… 1634 [OK]

mysql/mysql-server Optimized MySQL Server Docker images. Create… 368 [OK]

percona Percona Server is a fork of the MySQL relati… 303 [OK]

vskumar@ubuntu:/var/log$

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

If you see the above list, The mysql image curated and hosted by Docker Inc has a 5278 star rating, which is indicated as this is the most popular mysql image and aslo as Official image to use it. For security reasons we should use the official and highly rated images only.

As we planned, in this blog we have worked with the Docker images.

At this point we can stop this session and in the next blog we can see on “How to work with interactive containers”.

Vcard-Shanthi Kumar V-v3

Feel free to Contact me :

 

3. DevOps – Jenkins[2.9]: How to create and build the job ?

jenkins

In continuation of my previous blog on Jenkins 2.9 installation [https://vskumar.blog/2017/11/25/1-devops-jenkins2-9-installation-with-java-9-on-windows-10], We have installed and retested it. In this blog we can see a simple job creation and running it in a build.

Now, Let us do some exercise:

Let us create a new job using Jenkins.

As you are aware of; with Jenkins any kind of manual tasks can be done.

For example:

  1. I want to compile a java program and run it.
  2. To do this 1st let us identify the manual steps.
  3. I need to go to the below directory: D:\JavaSamples\Javatest , where my java programs are available.
  4. I need to use the below command:

CD [to know the current directory.]

Assume, I am in the below dir:

D:\Jenkins\jenkins-2.90>cd

D:\Jenkins\jenkins-2.90

Then , I need to use cd \JavaSamples\Javatest

Now I need to check my current path using cd

Then see the hello*.java using

dir command.

Then I need to compile it using ‘javac HellowWorld.java’ command.

Then I need to check the files on hello*.* name

There should be one file as ‘HellowWorld.class’

It means my program has been compiled correctly without errors.

Now, I need to run the program using java command.

Now, I need to run this file as java HellowWorld

It should display the output.

I have executed all the steps in a command window to compile and test the program.

You can see the executed commands and the  output also from the below screen:

HelloWorld-compile&amp;execute-CMD

As we know these are the manual tasks we need to do repetetively to select a program, compile it and run it. Why don’t we use Jenkins to create a job which has these set of tasks.

Now, let us learn how to create a job in Jenkins?:

Now assuming you are on the below screen:

Jenkins-New Job Creation

Click on “create new jobs”

You will get the below screen:

Jenkins job creation-enter an item name scrn.png

I want to create a job with the name of “vskumar2017test1”.

Jenkins-Freestyle project-creation

I want to create a Freestyle project, as I do not work with any of the plugins for now.
Hence I need to select on the 1st option “ Freestyle project”. When I click on “OK” button, we can see the below screen:

Jenkins-Freestyle project-creation2

I have entered the project description as below, as per our activity plan:

Jenkins-Freestyle project-description

As you are aware we are using Jenkins for simple task in this exercise,

Now click on build options. You will get the below screen:

Jenkins-Freestyle project-Build.png

In this screen we need to use build option. So click on add build steps. Using this option, we will get the below features to use the command window and the commands:

Jenkins-Freestyle project-Build-Add build step

There are two different options we can see to use the commands execution. 1. Execute Windows batch command , 2. Execute shell. Currently e are working with windows only. Hence 1st option need to be selected.

You can see the below screen:

Jenkins-New Job-Build-window commands1

Now, whatever commands we tried using command prompt we need to enter those.

For example I used as below:

cd

cd \JavaSamples\Javatest

dir hellow*.java

javac HellowWorld.java

dir HellowWorld.*

java HellowWorld

Now, I am copying these commands into the window. You can see the partially displayed commands in the window. In reality it has all the commands.

Jenkins-Build-Windows-batch commands-entry1

Now, let us save this job.
We will get the below screen on the created job name:

Jenkins-Project-vskumar2017test1.png

How to run the created project ?:

We need to run the created project using the option “Build now”.

You can see the build history as the job running, Under build#1.

Now, How to see the executed job output ?:
To see the output we need to click on the down arrow mark ate the job#.
It displays the below:

We need to select the console output, It displays the output as below:

Jenkins-Project-vskumar2017test1-running-build1-consoleOuputIf we scroll down we can see the job status message:

Jenkins-Project-vskumar2017test1-running-build1-consoleOuput

It shows all the output for our commands along with the job status.

Now let us review and analyze the display messages and commands as below.

Started by user Vskumar2017
Building in workspace D:\Jenkins\Jenkins 2.9\workspace\vskumar2017test1
[vskumar2017test1] $ cmd /c call C:\WINDOWS\TEMP\jenkins5234154176626743505.bat

The above commands shows, Jenkins started the job with user id vskumar2017.N

And it displays the current path of the job where it is created.

And it invokes a .bat file to execute the command prompt commands what we entered. It means it stored the batch commands into a file and it is opened by a cmd command from a shell prompt.

Now, let us see the below commands:

D:\Jenkins\Jenkins 2.9\workspace\vskumar2017test1>cd
D:\Jenkins\Jenkins 2.9\workspace\vskumar2017test1

It denotes its current job/project directory. And executed the cd to show the path.

Through the below:

D:\Jenkins\Jenkins 2.9\workspace\vskumar2017test1>cd  \JavaSamples\Javatest 

D:\JavaSamples\Javatest>dir hellow*.java 
 Volume in drive D is New Volume
 Volume Serial Number is 5C67-6F04

 Directory of D:\JavaSamples\Javatest

04/16/2017  03:52 PM               234 HellowWorld.java
04/16/2017  03:53 PM               570 HellowWorld10.java
               2 File(s)            804 bytes
               0 Dir(s)  22,762,598,400 bytes free

It changed the directory where the java program is there.

And displayed the files.

Let us see the next output:

D:\JavaSamples\Javatest>javac HellowWorld.java 
'javac' is not recognized as an internal or external command,
operable program or batch file.

It shows error for java path. Jenkins is not recognizing the path. The javac [compiler application is in the below path: D:\Java\jdk-9.0.1\bin ]

Javac-path.png

Now, this need to be corrected in the project.
To correct this we need to goto option: “Configure”.

Open it into project window to update some more commands.

I have updated the command window with the below commands:
cd \JavaSamples\Javatest
dir hellow*.java
del HellowWorld.class
dir hellow*.java
D:\Java\jdk-9.0.1\bin\javac HellowWorld.java
dir HellowWorld.*
java HellowWorld

Now, let me run the job by using “Build now option”.

For debugging purpose, I have executed this job some more times. Hence history shows multiple builds on it.

Our current build is #5. And let us open it and see the console output:

Jenkins-Project-vskumar2017test1-buildsNow#5

The console output shows as below:

Jenkins-Project-vskumar2017test1-console#5

Now you can see the whole console output as below in text format:

Console Output
Started by user Vskumar2017
Building in workspace D:\Jenkins\Jenkins 2.9\workspace\vskumar2017test1
[vskumar2017test1] $ cmd /c call C:\WINDOWS\TEMP\jenkins1398066858541735603.bat

D:\Jenkins\Jenkins 2.9\workspace\vskumar2017test1>cd
D:\Jenkins\Jenkins 2.9\workspace\vskumar2017test1

D:\Jenkins\Jenkins 2.9\workspace\vskumar2017test1>cd \JavaSamples\Javatest

D:\JavaSamples\Javatest>dir hellow*.java
Volume in drive D is New Volume
Volume Serial Number is 5C67-6F04

Directory of D:\JavaSamples\Javatest

04/16/2017 03:52 PM 234 HellowWorld.java
04/16/2017 03:53 PM 570 HellowWorld10.java
2 File(s) 804 bytes
0 Dir(s) 22,761,955,328 bytes free

D:\JavaSamples\Javatest>del HellowWorld.class

D:\JavaSamples\Javatest>dir hellow*.java
Volume in drive D is New Volume
Volume Serial Number is 5C67-6F04

Directory of D:\JavaSamples\Javatest

04/16/2017 03:52 PM 234 HellowWorld.java
04/16/2017 03:53 PM 570 HellowWorld10.java
2 File(s) 804 bytes
0 Dir(s) 22,761,955,328 bytes free

D:\JavaSamples\Javatest>D:\Java\jdk-9.0.1\bin\javac HellowWorld.java

D:\JavaSamples\Javatest>dir HellowWorld.*
Volume in drive D is New Volume
Volume Serial Number is 5C67-6F04

Directory of D:\JavaSamples\Javatest

11/17/2017 12:3

9 PM 427 HellowWorld.class
04/16/2017 03:52 PM 234 HellowWorld.java
2 File(s) 661 bytes
0 Dir(s) 22,761,955,328 bytes free

D:\JavaSamples\Javatest>java HellowWorld
Hello World

D:\JavaSamples\Javatest>exit 0
Finished: SUCCESS

=======================>
Observe there was no error displayed as we have given the correct javac application path.

Now I have updated the commands as below to remove the existing HellowWorld.class file.
cd
cd \JavaSamples\Javatest
dir hellow*.*
echo ‘Assuming .class file is already there..”
del HellowWorld.class
dir hellow*.java
D:\Java\jdk-9.0.1\bin\javac HellowWorld.java
dir HellowWorld.*
java HellowWorld
=======================>
You can see the output under build#7:
========================>

Console Output
Started by user Vskumar2017
Building in workspace D:\Jenkins\Jenkins 2.9\workspace\vskumar2017test1
[vskumar2017test1] $ cmd /c call C:\WINDOWS\TEMP\jenkins7100481173282587024.bat

D:\Jenkins\Jenkins 2.9\workspace\vskumar2017test1>cd
D:\Jenkins\Jenkins 2.9\workspace\vskumar2017test1

D:\Jenkins\Jenkins 2.9\workspace\vskumar2017test1>cd \JavaSamples\Javatest

D:\JavaSamples\Javatest>dir hellow*.*
Volume in drive D is New Volume
Volume Serial Number is 5C67-6F04

Directory of D:\JavaSamples\Javatest

11/17/2017 12:45 PM 427 HellowWorld.class
04/16/2017 03:52 PM 234 HellowWorld.java
04/16/2017 03:53 PM 570 HellowWorld10.java
3 File(s) 1,231 bytes
0 Dir(s) 22,760,976,384 bytes free

D:\JavaSamples\Javatest>echo ‘Assuming .class file is already there..”
‘Assuming .class file is already there..”

D:\JavaSamples\Javatest>del HellowWorld.class

D:\JavaSamples\Javatest>dir hellow*.java
Volume in drive D is New Volume
Volume Serial Number is 5C67-6F04

Directory of D:\JavaSamples\Javatest

04/16/2017 03:52 PM 234 HellowWorld.java
04/16/2017 03:53 PM 570 HellowWorld10.java
2 File(s) 804 bytes
0 Dir(s) 22,760,976,384 bytes free

D:\JavaSamples\Javatest>D:\Java\jdk-9.0.1\bin\javac HellowWorld.java

D:\JavaSamples\Javatest>dir HellowWorld.*
Volume in drive D is New Volume
Volume Serial Number is 5C67-6F04

Directory of D:\JavaSamples\Javatest

11/17/2017 12:47 PM 427 HellowWorld.class
04/16/2017 03:52 PM 234 HellowWorld.java
2 File(s) 661 bytes
0 Dir(s) 22,760,976,384 bytes free

D:\JavaSamples\Javatest>java HellowWorld
Hello World

D:\JavaSamples\Javatest>exit 0
Finished: SUCCESS
=================================>
Now, you can see message display from echo command.
And the old class file is removed and the new file time stamp can be seen differently.

Now, how to make failure a job ?:

Please see the screen display with a failed job:

Jenkins-vskumar2017-success1

Now, let us see the console output:

Console-output-vskumar2017-3.png

In this example I have given a wrong file name to execute. Hence it is failed.
It checks the last commands results. You can change them and cross check as an exercise.
The failure error flag also it shows as “1”.
When the job was success the flag showed as “0”.

Hope you understand the difference between failure and success of Jenkins build.
So, we need to make sure the commands/script mentioned in the command window should be a debugged one. Then the jobs success can be seen.

Please note;
If it is not a recognized command as an internal or external command,
operable program or batch file. Jenkins will not count it as a failure.

Exercise:
Take a new Java program and create a job to compile and run it.

How to use My views:
You can see the build history in graphical format as below with My views option:

Jenkins-Job-Views

 

At this point with this blog I want to close now, with the above scenarios.

You can also see:

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

 

Feel free to contact for any support:

Vcard-Shanthi Kumar V-v3

 

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/

 

 

Why the DevOps Practice is mandatory for an IT Employee

DevOps Patterns
devops-process
  1. DevOps is a terminology used to refer to a set of principles and practices to emphasize the collaboration and communication of Information Technology [IT] professionals in a software project organization, while automating the process of software delivery and infrastructure using Continuous Delivery Integration[CDI] methods.
  2. The DevOps is also connecting the teams of Development and Operations together to work collaboratively to deliver the Software to the customers in an iterative development model by adopting Continuous Delivery Integration [CDI] concepts. The software delivery happens  in small pieces at different delivery intervals. Sometimes these intervals can be accelerated depends on the customer demand.
  3. The DevOps is a new practice globally adopted by many companies and its importance and implementation is accelerating by maintaining constant speed.  So every IT professional need to learn the concepts of DevOps and its Continuous Delivery Integration [CDI] methods. To know the typical DevOps activities by role just watch the video: https://youtu.be/vpgi5zZd6bs, it is pasted below in videos.
  4. Even a college graduate or freshers also need to have this knowledge or practices to work closely with their new project teams in a company. If a fresher attends this course he/she can get into the project shoes faster to cope up with the  experienced teams.
  5. Another way; The DevOps is an extension practice of Agile and continuous delivery. To merge into this career; the IT professionals  need to learn the Agile concepts, Software configuration management, Release management, deployment management and  different DevOps principles and practices to implement the CDI patterns. The relevant tools for these practices integration. There are various tool vendors in the market. Also open source tools are very famous. Using these tools the DevOps practices can be integrated to maintain the speed for CDI.
  6. There  are tools related with version control and CDI automation. One need to learn the process steps related to these areas by attending a course. Then the tools can be understood easily.  If one understands these CDI automation practices and later on learning the tools process is very easy by self also depends on their work environment.
  7. As mentioned in the above; Every IT company or IT services company need to adopt the DevOps practices for their customers competent service delivery in global IT industry. When these companies adopt these practices, their resources also need to be with thorough knowledge of DevOps practices to serve to the customers. The companies can get more benefit by having these knowledged resources. At the same time the new joinees in any company either experienced or fresher professional if they have this knowledge, their CTC in view of perks will be offered more or with competent offer they may be invited to join in that company.
  8. Let us know if you need  DevOps training  from  the IT industry experienced people; which includes the above practice areas to boost you in the IT industry.

Training will be given by 3 decades of Global IT experienced  professional(s):

https://www.linkedin.com/in/shanthi-kumar-v-itil%C2%AE-v3-expert-devops-istqb-752201a/

Watch the below videos on why the IT company need to shift to DevOps work culture and practices and what advantages the company can get and the employees can get :

For DevOps roles and activities watch my video:

Folks, I also run the DevOps Practices Group: https://www.facebook.com/groups/1911594275816833/?ref=bookmarks

There are many Learning units I am creating with basics. If you are not yet a member, please apply to utilize them. Read and follow the rules before you click your mouse.

For contact/course details please visit:

https://vskumarblogs.wordpress.com/2016/12/23/devops-training-on-principles-and-best-practices/

Advertising3
Vcard-Shanthi Kumar V-v3

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 -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

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/