Docker – just a glimpse!

Earlier I had written a blog post about kubernetes and containers, but as days passed I had to get accustomed to my new job life and hence I thought of giving a month to get habituated to this new routine. Over this month I realised that I should now make my schedule in such a way where I have to keep progressing my about Kubernetes at the same time. Hence, after a month of observation that docker is also same as Kubernetes but where docker runs on a single cluster Kubernetes runs on a cluster. While I started learning Kubernetes because I had no idea how these tools are used I got very bored and eventually the interest died. But I wanted know about containers and how people are using them, so I started from again, smaller steps but longer run.

Dockers are also containerized environment where one can pull an image and their dependencies and libraries. It helps in solving the compatibility issue of different applications with respect to OS, libraries and dependencies. But in Linux kernel one can run only Linux containers that is one can run Linux softwares having different flavors of OS but one cannot run windows container on Linux kernel.

The difference between containers and virtual machines is that a Virtual machine consists of hypervisor and on top of sits different Virtual machines which has their own operating system and hypervisors which makes the system heavy due to high storage capacity. It also takes up minutes to boot up whereas Dockers on the other hand just sits on top of OS and creates different environments a.k.a containers and the application can have it’s own libraries and dependencies plus it takes less storage capacity compared to VM. Containers are less isolated that Virtual Machines as they rely on same OS or kernel. One can pull down any required image from docker hub which is a public registry.

The difference between Image and containers is that an image is a package or a template which is used to create containers and the containers are running image instances that are isolated and have their own environments.

Last 9 days(100 days of journey)

Day 32 – Watched another detailed video about Regex module and the concept was pretty much clear. No code done but just read about regex.

Day 33 – Solved one code using class and sub-class. It was simple and I understood it.

Day 34 – Started watching videos on OOPS series, and got to know about class instance and did 2 codes using class to calculate simple area and parameters. This challenge helped me atleast to move further and reach to OOPS concept. Earlier I could not maintain the practice and hence these topics seemed so far and untouchable.

Day 35 – An immense hectic day, went to college and got very very tired. No coding done!

Day 36 – Solved a question using class and sub-class, watched a video first and got hold of the concept and also learnt about static method and class method.

Day 37 – Happy Ganesh Chaturthi, no coding done but started contribution to Kubernetes docs.

Day 38 – Learnt about inheritance, watched a video and did a code using inheritance, but an error popped up, did second code raise an exception error read about.

Day 39 – A friend helped me out with the error, seemed like I had a doubt for argument passing, reviewed the code but did not completed the code.

Day 40 – Solved the issue, pushed the solutions into the PR and also got some PDFs on OOPS concept. Did another code on try and except block and watched a video regarding it.

Last 6 days of my 100 python journey!

Day 26 – I could not sit for a code, had immense stomach pain so took the day off.

Day 27 – I realized that I finally came close to 30 days and there was still a long way to go but I am not looking at the bigger number (100) I just want go for the next 5 days and then the next 5 days. I did 6-7 simple codes using tuples, map and filter. Also read about map and filter functions.

Day 28 – The more I used maps and functions and list comprehensions and I got hold of using them. The topics which once felt hard were very easy to use.

Day 29 – I was literally having fun using filter and map functions and again did 1-2 codes.

Day 30 – A hectic day and busy day but still sat for 5 mins to review old code and did one code only.

Day 31 – This was a weekend and I wanted to slack off but I reminded myself to sit for at-least 10 mins and hence I got introduced into regex. I earlier heard the topic and it was very confusing but today it felt less confusing. I did not do any code but watched a video and got an idea about it.

3 days(23,24,25) of my 100 days journey!

I almost forgot writing it in my blog, actually in one of the last three days I had my assessment and it was little bit of tension for me but I finished the assessment, so I got a little laid back. But I still sat for atleast few minutes and that is making the little bit progress.

Day 23- Assessment day, I had to do 50 mcqs and a code in 2 hours. so I started with mcqs and I was able to do them, like what I understood from solving the mcqs that my concept was clear till now whatever I have been reading, only one topic (regex) I did not read about it, so I guess I need to know it; about the code, due to time limitation my mind kind of got blank and I could not understand the question first, a friend helped me with the solution but after the exam I calmed down and I understood the question and voila it was easy, like I could have attempted it. This is something which I must practice, keeping mind calm!

Day 24 – I did not wanted to sit to code because a heavy tension for exam was removed but I still sat for 20 mins and did some more simple codes using functions. Codes with functions no more seems tough in solving.

Day 25 – Things are getting a little boring, I guess I must find a way to my learning exciting. I still sat for some time and gave a revision to few codes which I have done for the past few days.

Day 21(100 days journey)

I was supposed to write it yesterday, but it got late ate night and I was tired and sleepy too! I did updated on twitter and I went to sleep. So on day 21 I did 4 simple codes using functions.

Functions was such a topic which i have struggling to use since I learnt C, but compared to C language I felt it was easy in Python. Though because I had some major bad experiences of using functions in C I was little bit scared. But once I understood the syntax it was easy. Simple codes such as adding two numbers, or adding two strings or convert integer to string, accept two strings and compute their length and print the largest length or if both the strings have equal length print both strings.

Looking forward for today (Day 22)

My 100 days challenge!

Phew! after so many days I am writing again. Well I thought that if I am sharing my 100 days challenge in twitter then why not blog it out. Also twitter restricts your text limit but my blog is my own canvas. I can write to my heart’s content; but I got this idea after completing my 20 days of challenge!

Days have been hectic in my new job and I am not complaining, I knew that this would take some moment to adjust and I accepted the fact. The lazy schedule I was living in changed, there were sessions and classes and still it happens but now I am habituated. So luckily I was given to a group of people where we are being taught Python, basically if we successfully pass the assessment we would be moving forward for further project allocations. I started learning Python since last year and I was doing okayish, but last minute college stuff plus placements made me stop practicing and hence I lost my grip over the language.

But life again gave me an option to make this language learn much better and properly. One day I was scrolling through my twitter and I found out people tweeting about #100daysofcode challenge. I searched about it and found out that it’s a challenge where people consistently code for 100 days or learn a skill and tweet about it. I was excited and thought of giving it a shot, I was scared at the same time because I am publicizing my daily learning update and what if I am not able to complete 100 days? Even-so, I saw the beauty of this challenge, I will be committing publicly so I must try to be consistent, at-least for my own sake.

Started with day1 and today is day20; To be honest, there were days where it was hard for me to sit to code because of the hectic schedule but I sat and divided my whole day. Few days were there where I could not code, but one of the folk(JasonBraganza) helped me realize that code or not code, the key is to show up even if it’s for 5 minutes. The thing which seemed like a mountain, it was now just a small pile of candies. The thought of blogging it out came late to my mind, but I will continue writing here whatever I learn everyday.

Oooh! and about the language grip, my confidence on taking up a question and attempting it without any fear has grown a lot. Earlier, I was scared to attempt questions if they were slightly twisted, but now I am not at all scared. I take up, sit with the questions, try different logic, and I even analyze that where and how my logic could have been better with more use of functions.

Day 20 – I learnt about classes, instance variables, method. OOPS concepts I have read earlier, but they were more like in a question answer format, I could not even imagine attempting any questions related to OOPS but now I coded a simple question where I created a class which will print employee’s name and their email id. I took it from a reference of YouTube video but I understood the concept much better compared to last time what I had read.

What I learnt about containers?

My notes will be short and crisp, I do not want to focus on perfection apparently. I just want to note down whatever I understood about containers. My journey to learn about K8s might be long and I have made peace with it because I have realized taking things slow and steady makes things more long-lasting. Hence, I write down what I understood

To put it down simply, when I heard the term containers it instantly reminded me of blocks to carry any shipment or anything which we want it in an isolated environment. Same way, it allows software or applications to run in a separate environment along with their required libraries and dependencies. Containers use container runtime which provides with isolated environment. Containers are simple process, which has it’s own root-file system, networking,etc. The RFS(root-file system) is represented by docker and it can be viewed in form of number of layers. When we create an image the required commands are run and all these numbers of layers are merged together by docker. We use namespaces so that RFS running has it’s own capsulation. There are 7 types of namespaces specified for particular work, for an example network namespace controls the networking stack of the container, PID namespaces controls the process identifications numbers, cgroups or control groups which controls resource utilization by that process.

We can use pre-built images and pull that from a public repository. A registry is a simple collection of repository images and if it is made accessible to public then it is a public repository. To pull the image we use docker command along with pull sub command

docker pull<specific image name>

Since no particular registry it will pull the image by default from docker hub. If we have private registry we can specify it. We must also check the pre-built images if they are safe to use or are free from any malicious software.

Solved my own problem (just by searching by myself)

So, an amazing thing happened. My company training sessions are going to start from tomorrow and it recommended me to install Microsoft Teams app. Henceforth, I clicked onto the given link and went for downloading the app. Lucky enough they also had options for Linux users and for both RPM and DEB packages. Initial approach was just keep clicking; continue and my software manager would install the app but unfortunately it was failing to install and showed an error that due to internet connection the download was failed. I checked my internet connection and it was running just fine, tried again and failed again. Here comes the beauty of using Linux, when things don’t happen in a simple way just a little bit of research and commands would be the savior of the day. Hence, I tried searched a bit and typed those commands, and they were very simple. Just three commands and problem solved.

$ sudo apt update
$ sudo apt install snapd
$ sudo snap install teams-for-linux

But alas! again when I went to install snapd package it failed and hence, I again did some research and found an amazing blog regarding this problem. So, here’s what I got to know about snap and why am I using it.

Snap packages (snaps) are software packages that have been bundled with all their dependencies for easy installation, initially developed by Canonical for Ubuntu. Snaps are now available for all major Linux distributions. Snappy is the package manager used to manage snap. Snapd is the service running snap (snap daemon). The command for installing snap is not working because the ATP is blocking from getting it installed. So? the solution was to; open the file named nosnap.pref in /etc/apt/preferences.d

nosnap.pref in /etc/apt/preferences.d

and I could have either deleted the file or commented few lines mentioned in the blog. So I chose to comment out the lines and then again run the command for installing the snap package. Voila! my problem was solved and I was able to install the snap package.

A note to myself, college journey ended!

Well, in my last to last blog I wrote about my cultural fest happening in the college and how I was a part of it. So here’s an update "we" the final year were able to successfully present an amazing cultural fest 2021 and people enjoyed it. I can give you some insights as to what themes we kept this time; mostly we kept our theme in dedicating to all the late actors, singers, dancer who died in this pandemic situation. Also we dedicated a part to all the covid front-line warriors and we bought a famous bengali artist as our guest. All in all the last few weeks just passed by in just a gust of wind. Like all I knew was our cultural fest ended, our last year project presentation happened, grand viva happened and suddenly our semester dates were given. We had three subjects this time and Whoop! Finished, our college journey ended all our four years of memories came to an end, well not four technically three, because we had been locked in our homes for last year. But the saddest part is we were not able to adieu goodbye to all our friends because all had their jobs and their joining dates were given and everything happened up in a blink of eye.

But whatever memories happened good or bad it helped me to grow up in person what I am today, at times I was angry and frustrated when I had betrayals or felt alone but now I know that those experiences were all important to create ‘me’ the person I am today! A new phase will begin, my journey as an employee will begin and I know the road from now on will be more tough or it will not be a flower path and honestly I don’t want a flower path because these scars will make me a better version of myself.