Category Archives: Agile Practices

DevOps Practices & FAQs -1

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

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

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

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

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

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

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

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

 

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

 

DevOps Movement

 

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

Visit for series of Agile interview questions:

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

 

Also, Look into some more FAQs:

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

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

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

Docker-logo

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

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

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

Use the below command:

sudo docker run -it hello-world

$docker history hello-world

You can run this image and see:

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

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

[sudo]

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

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

Check the current docker information:

sudo docker info |more

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

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

vskumar@ubuntu:~$

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

Now, let us work on the Docker images operations:

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

you can run an Ubuntu container with:

$ sudo docker run -it ubuntu bash

you can run an Ubuntu container with:

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

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

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

Now, let us apply some Linux commands as below:

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

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

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

root@10ffea6140f9:/var/log#

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

WE have seen this container like a Linux machine only.

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

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

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

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

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

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

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

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

$sudo service docker status

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

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

docker.service – Docker Application Container Engine

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

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

Docs: https://docs.docker.com

Main PID: 1224 (dockerd)

Tasks: 18

Memory: 255.2M

CPU: 35.334s

CGroup: /system.slice/docker.service

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

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

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

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

Vcard-Shanthi Kumar V-v3

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

Docker-logo.png

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

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

$ sudo service docker restart

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

$ sudo service docker restart 
 
Install Docker on Unbuntu:

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

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

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

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

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

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

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

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

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

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

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

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

We will do the below steps:

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

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

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

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

$ sudo service docker restart

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

Vcard-Shanthi Kumar V-v3

 

 

 

 

 

 

 

 

 

 

Did you check the Agile entry criteria before your initiation ?

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

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

I support the organizations globally.

slide1

 

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

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

If you are DevOps practices:

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