Docker Interview Questions (Part 1)

  • What is Containerization

Containerization is an alternative to virtualization represented as a lightweight mechanism to encapsulate an application with its dependencies and OS in a container

  • What are the benefits of having Containerization

containerization_benefits

  • What is an image in a container world

Image is an executable package that includes all the components required to run an application like code, runtime, libraries, environment variables and configuration files

  • What is a Container

Container is the runtime instance of an image when executed having the state of the image and user processes

  • What is the difference between a Container and Virtual Machine

Container runs natively on Linux and shares the kernel of the host machine with other containers

Virtual Machine (VM) runs the whole OS with virtual access to host resources through hypervisor

  • What is Docker

Docker is a platform to develop, deploy and run applications with container

  • How do you check the Docker version
docker --version
  • How can you view details about Docker installation
docker info

  • How can you run a Docker image
docker run <image name>
  • How can you list docker image downloaded
docker image ls
  • How can you list docker containers which are still running
docker container ls --all
  • How does Containerization provide a seamless CI/CD process

container_cicd


Global Azure Boot Camp 2018, Austin TX

Here are the recorded sessions of GAB 2018. All sessions are recorded at UserGroup.tv which was founded by Shawn Weisfeld (Cloud Architect from Microsoft) in January 2011 with a mission to provide user group content online for free. Check out more at http://usergroup.tv/about-us

Azure in 60 minutes – by Shawn Weisfeld

//player.vimeo.com/video/266004703

Microservices , Containers, Devops and Kubernetes in Azure Cloud – by Eddie Vallalba

//player.vimeo.com/video/266009649

Azure SQL Database: Where Does My Data Belong? – by John Sterrett

//player.vimeo.com/video/266012922

An Introduction to Blockchain on Azure – by Sucharit Reddy

//player.vimeo.com/video/266017794

Getting Hands-on with Azure Logic Apps – by Stephen W.Thomas

//player.vimeo.com/video/266019212

The Domain Model of Continuous Delivery – by Jeffrey Palermo

//player.vimeo.com/video/266022140

Global Azure Boot Camp 2018–Austin TX

April 21, 2018 we have organized the Microsoft Global Azure Boot Camp 2018 at Austin, Texas. Here are some of the snapshots of the boot camp.

 

Shawn Weisfeld

Shawn Weisfeld – Cloud Solution Architect (Microsoft Corporation)

#GlobalAzureBootcamp2018 Shawn giving session on “Azure in 60 min” pic.twitter.com/hZ61uZHXDJ

— Joydeep Ghosh (@joydeep1977) April 22, 2018


Eddie Villalba-small

 

Eddie Vallalba – Azure Cloud Architect (Microsoft Corporation)

#GlobalAzureBootcamp2018 Eddie Vallalba giving session on “Microservices, Containers, Devops and Kubernetes in Azure Cloud” pic.twitter.com/otRUJQ77Wz

https://platform.twitter.com/widgets.js

John Sterrett

John Sterrett – CEO & Principal Consultant (Procure SQL LLC)

Sucharit Reddy - small

Sucharit Reddy – Cloud Solution Architect (Microsoft Corporation)

#GlobalAzureBootcamp2018 Sucharit Reddy giving session on “An Introduction to BlockChain in Azure” pic.twitter.com/XAcZSqM6Om

— Joydeep Ghosh (@joydeep1977) April 22, 2018

StephenWThomas-small

Stephen W. Thomas – BizTalk Server Guru, MVP & Pluralsight Author

#GlobalAzureBootcamp2018 Stephen W. Thomas giving session on “Getting hands on with Azure Logic Apps” pic.twitter.com/sFUz69DyRe

https://platform.twitter.com/widgets.js

Jeffrey Palermo

Jeffrey Palermo – CEO & Chief Architect (ClearMeasure)

 

Our Global Sponsors

 

image

 

Our Local Sponsors

 

image

Fix : Error compiling for board SparkFun ESP8266 Thing Dev

Recently I was trying to setup Arduino with my newly brought SparkFun Thing Dev Board and surprisingly I had been facing a strange issue while compiling it which states

open C:\Users\{username}\AppData\Local\Temp\arduino_build_773581\sketch\app.ino.cpp: The process cannot access the file because it is being used by another process.
Error compiling for board SparkFun ESP8266 Thing Dev.

image

Based on every details provided in https://learn.sparkfun.com/tutorials/esp8266-thing-development-board-hookup-guide/setting-up-arduino I found that there were no issues while configuring Board, Port and libraries required to compile it. Spending almost two sleepless nights, I almost gave up to find a resolution for the issue I was facing.

Every time I am opening the Arduino board and compiling the app.ino.cpp file which was located in a different directory, this file was getting generated in Temp directory. Seems to me a permission issue but being an administrator, I was surprised to get this issue again and again.

Finally, I found the resolution which was so simple to do.

Get to the environment variables of the system and change the value of TEMP and TMP variable to C:\Temp instead of %USERPROFILE%\AppData\Local\Temp.

image

 

That’s it, everything started working as expected. Complied successfully and then uploaded it to the board without any issue. Hope this helps for someone who is facing similar issue

Configuring and Setting up of AWS IOT button

image

AWS IOT Button is basically used by the developers in order to program based on Amazon Dash Button hardware. You need to connect to Wifi network in order to make the button work. I just got this button and thought to do something with it. So the first step that I need to do is create my AWS account. Once the account is created I can log into AWS IOT console.

One thing I found is that AWS IOT is not available in Canada (Central). Hence I have selected another region US East (Ohio). Here I am going to show you step by step instructions of how to setup the button.

Configuration

Step 1: In AWS IOT Console, select Registry => Things and then Register a thing

image

Using Register a thing, we are going to create a button. Provide the button name

image

You can associate a thing type from the optional configuration dropdown. However if there are no thing types, you can create one. In this case I am creating a thing type named IOTButton

image

Having done these steps, the thing gets created.

image

Step 2: Next step is to create the Policy for the device which is IAM policy which will state the security, resources that can act on with the button.

Select Policy from the console and create a new policy. You can use an existing policy also.

image

In Policy creation page, you can select the action types that you would like to perform. Here I am going to add two actions one is iot: Connect for Connecting the device to the gateway and the other one is iot: Publish for Publishing the button to specific topic.

image

For action = iot:Connect, I will update the resource URL to *.

For action = iot: Publish, I will update the resource URL to arn:aws:iot:us-east-2:597248753215:topic/iotbutton [which is the thing type we have created]/[DSN Id present at the back of your device]

You can view and edit the policy that got created.

arn:aws:iot:us-east-2:597248753215:policy/IOTButton1Policy

   1: {

   2:   "Version": "2012-10-17",

   3:   "Statement": [

   4:     {

   5:       "Effect": "Allow",

   6:       "Action": "iot:Connect",

   7:       "Resource": "*"

   8:     },

   9:     {

  10:       "Effect": "Allow",

  11:       "Action": "iot:Publish",

  12:       "Resource": "arn:aws:iot:us-east-2:597248753215:topic/iotbutton/[device-id]"

  13:     }

  14:   ]

  15: }

Step 3: Next step is to create a certificate for the device since in order to connect to IOT gateway we need a certificate and a key pair.

Let’s create a certificate

image

image

Download the certificates and later on we will upload those certificates to the button

image

Step 4: Activate the certificate. Once done, we need to select the certificate and associate it with the thing for the button.

image

image

Associating the certificate will add identity to the button.

image

Now attach the created policy to assign some permissions to the identity

image

image

Now we have the thing which has the certificate and policy attached to it. Now we should be able to configure the device and send MQTT messages to the gateway.

Step 5: Now to configure the button you need to press the button for 5 seconds. You should see the button blinking.

 

image

The password should be the last 8 characters from the DSN id at the back side of the button

Use 192.168.0.1 to configure the button.

image

Upload the certificate

image

Upload the private key

image

Enter the IOT endpoint which you can get from IOT Console => Settings.

image

Select the endpoint region. In my case it is us-east-1.

image

image

Step 6: Now since the device is configured, now if we push the button, we should be able to see the messages. So let’s dive down how we can see the messages.

Here for testing purpose we can go to the Test console of AWS IOT console.

image

Then subscribe to the topic. The URL here should be Topic name/full serial number of the button.

image

image

Exception: One of the issue I was facing was that the device was not able to communicate to the gateway since during the configuration, I have tried to use the access point of my mobile. I just went ahead and re-configured with Step 5, made the access point as my home wifi and also the endpoint region to us-east-2 even though the region was not displaying in the drop down.

You can see the exception in the IOT console.

image

image

Once I did the changes, I went ahead and pressed the button once. It blinked for few times and then displayed a green light which shows the communication was successful and message had been sent.

image

TESTING:

You can test different types of click events for the button.

Message for 1-click:

image

Message for 2-clicks:

image

Message for long-press like (2 Seconds):

image

You can also use another testing tool called MQTT.fx which is pretty easy and can be used for demo purpose as you don’t necessarily required to log into IOT console. Check out this post of how you can connect to MQTT.fx to AWS IOT

Using Open Live Writer for writing blogs

Writing blog has always been one of my favorite hobby. I had been using Windows Live Writer for posting my ideas, thoughts and sharing my experience to the outside world. Recently I came around with another writer called Open Live Writer which can also be used for writing blogs. It is almost similar to Windows Live Writer. As a coder and blogger, I would like to share my experience of how you can get this writer and how you can embed your code snippet to your post.

The writer can be downloaded from the location. Once you download the writer, you will be asked to configure it to connect to your blog account. In my case I am using WordPress as my blog account. Once you have installed the writer, you need download the Source Code Snippet plugin from the following location. Thanks to the following link https://richhewlett.com/wlwsourcecodeplugin/live-writer-plugin-download/ from where I got the instruction of downloading the plugin and configuring it. Once you download the plugin, you need to unzip the plugin folder and copy the contents to any of your local directory folder.

image

Now you need to open your registry and follow the path HKEY_CURRENT_USERSoftwareOpenLiveWriterPluginAssemblies where you need to add a Key: SyntaxHighlight_WordPressCom_OLWPlugIn_V2.0.0 and Value: C:OLWPluginSyntaxHighlight_WordPressCom_OLWPlugIn.dll. The value will be the folder path where the plugin files resides.

image

Next open the configuration file OpenLiveWriter.exe.config from the following location C:UsersUserNameAppDataLocalOpenLiveWriterapp-0.6.2 and update the configuration file by adding <loadFromRemoteSources enabled=”true” /> at the runtime section.

image Once you complete this process, close the writer and reopen it. You will be able to view the Source Code Snippet plugin in the writer utility.

image

Hope this helps to all my fellow bloggers.

OctoWatch–a mobile app to monitor Octopus deployments

Check out the new open source native app that helps you to keep track of state of Octopus deployments on your machines. Here is the link to iTune for this app. This app has been build with React Native and TypeScript.

Here is the GitHub Url for the source code to OctoWatch https://github.com/OctopusDeploy/OctoWatch. Note that is only an iOS app.