Kushal Das

FOSS and life. Kushal Das talks here.

kushal76uaid62oup5774umh654scnu5dwzh4u2534qxhcbi4wbab3ad.onion

Day -1 of PyCon US 2016

I reached Portland two days back, was happy to see that Remy helped us to find a hotel just opposite to the conference center. As I am typing this, I can see the empty roads, and the main doors of the venue. Yesterday also I woke up by 5AM, the virtue of being in a place 12:30 hours apart from your standard timezone :) After writing the article about Microbit support in Fedora (it is still under review) I moved to the conference venue. It was very easy to find the staff room. As usual Doug,Lvh,Eric were already there, later I met Ewa, and then met Betsy for the first time. While discussing security practices when I asked, Lvh pointed out that getting golang vendored sources in the source code repository and then not updating them later, is more of a software engineering problem than a security problem as he sees.

Later in the day few of us walked towards downtown to get some lunch, and then we decided to visit Powell's again. Mike Pirnat gave some valuable insights about children books, and card games :) After coming back to the venue, we saw more people are coming in. Rami was the first person to meet, PyCon is really a great place to meet old friends. Later I met Glyph, Hynek, Guido, Harry, Mike Muller, Graham Dumpleton, and Yarko (I don't think I will be able to write down people's names like this from tomorrow, the list will be too long :D ). I also found PyDanny, and Audrey coming in for the registration. It was good see her walking around after the big surgery.

Guido pointed out the xkcd comics about the Python patch. The discussion then moved to regex, legal side of the software field. I also had a chat about how CentOS is helping CPython with CI effort. It turns out that Guido knew about CentOS, but never looked deep into what is that :) He was seems be happy about help CentOS is doing by providing the beefy boxes to do build+test super fast. I am actually going to talk about that today in the Language Summit.

Later at night a large group of us moved to a nearby Ethiopian place for dinner. The food was great, we had more people coming in for the next few hours. Ntoll also came in and joined our table. Came back to the hotel room around 22:30, and tried to sleep early so that I can wake up in time. Today I will be in the registration desk from 7AM just like other years, and then I will move into the Language Summit. See you all in PyCon :)

dgplug summer training student Tosin Damilare James Animashaun

Your name (blog/twitter) and what do you do

My name is Tosin Damilare James Animashaun (IRC: acetakwas; Twitter: @acetakwas; Github: github.com/takwas, Blog: takwas.github.io).

I am currently a part-time Software Engineering student at NIIT, Lagos. I am also a co-founder at a startup called Krohx. We are in the final stages of deploying a job/hiring web platform that targets seekers of short-term jobs while also easing the process of getting service delivery for the hirers.

With my involvements with the burgeoning Python community in Nigeria, I recently got elected as secretary for the organization.

How did you learn about the training? (++ My Experience) I fail to recall

exactly how I learnt about the community now, but I remember joining the mailing list and going on from there. This was in fact my first time of joining a mailing list. Upon learning about the #dgplug IRC channel, I promptly enlisted the channel to my IRC client's favourites.

I was so enthusiastic about this, as I had no prior experience of an online tutoring session. The feeling was truly exhilarating.

Having come from a Java background, I was really interested in learning the Python programming language as soon as I caught on waves with. At the time, I had volunteered to write some scripts to help automate some of the manual processing of NIIT's annual scholarship exam records/documents at my school for that year. I accomplished that using Java, but in hind-sight, I feel I could have saved a lot of time if I had utilised Python in the situation.

This was a blog post I wrote as part of tasks given to us. I have failed to maintain that blog though. I now write here

How this training changed (if at all) your life? Python is surely the more

beginner-friendly language and it's making its rounds these days. Every programmer should have it in their arsenal. One of the things I love most about the language is it versatility in application.

No doubt, I have continued to improve with Python everyday, but more so in my programming journey. I have become more and more familiar with various mainstream concepts and tools. The idea of contributing to open-source can be overwhelming at first, but following the path laid out in this course, one would be surprised to learn how easy it could be.

I have volunteered to mentor attendees at a Django Girls workshop, which held in Lagos, Nigeria. I picked-up Django in a week prior to the event, because frankly, there wasn't much of a learning curve to it since I already used Flask, a different Python-based web development framework.

Flask was a framework I first got introduced to at the summer training, but I did not revisit it until months later. As a backend web-developer, I now do most of my work in Flask.

In my experience, there is no better or faster way to grow, than to collaborate; and that is what open source preaches. Note that growth here is not only about the project, but the growth applies to each contributing individual. Heck, even if you do not contribute, you will grow by reading good open-source code -- this I can attest to. And joining the dgplug community has surely made open-source a more approachable endeavour. # #

Have you contributed to any upstream project(s)? If yes, then details.

While (and a bit disappointingly) I have yet to contribute to an upstream project, I do have quite a number of them lined up. Most probably, the first would be to the official Slack Client written in Python. Having recently developed a bot, which was used in conducting the election of committee members of the Python Users Nigeria Group, I do have a number of changes I plan to push to the aforementioned API library.

With this forked project, I have also tried my hands at revamping the architecture of the official dgplug bot ekanora, which is used in running the summer training sessions.

Some other projects I'd like to contribute to include:

  • https://github.com/StellarCN/py-stellar-base
  • https://github.com/getpelican/pelican-blog

Any tips for the next batch of participants. (++Final words)

I am not sure I am in the best position to answer this. However, I would advise that you endeavour to remain focused through this; simply keep at it. Even if your experience at the summer camp doesn't go as you expect, you should definitely not count it loss. Instead, make it a reason to put in more effort and grow as you go.

Depending on your personal activity schedule, you might miss one/two classes. But that shouldn't deter you from continuing the program. The logs are available for covering such lapses. Also, you could consult the summer training docs to get a hang of the agenda, so you can anticipate classes beforehand and be better prepared.

While I participated in the training, there were times when there was no power supply, and I had to use my phone. Thankfully, there are IRC clients for mobile phones (I recommend AndChat).

The class sessions have a few rules, and the community would love it if you played by them. Not to worry, they are no stringent rules; just there to keep everyone behaving. For instance, the use of SMS-speak is discouraged.

You should keep notes beside you when attending the sessions. Writing is a good way to memorize things in my opinion. Also, although most clients would have this by default, you should ensure your IRC client is configured to log conversations. Going back over what you've learnt would do you great good as you mightn't be able to keep up with the speed of the class at times.

If you have some time before program begins, two things I'd advise you become familiar with are: - Your OS (Linux, preferably Fedora or Ubuntu) - An IRC client (I suggest HexChat)

I learned quite a lot from the summer training. I was really obsessed with attending whenever I could. Although coming from a different country, the timing wasn't favourable, often meeting me in the middle of the day's activities -- school especially. I made efforts to invite a few friends to join on -- one or two did, but the determination to keep on was obviously lacking, which reminds me of a statement I heard a while back that reads something like this:

"If 40 people begin a course like this together, only about 5 get to
finish."

That in my experience is very often the case. Be aware that a lot of people are on this bandwagon. The question to ask yourself, is "Do I want to be among the surviving commutants at the end of this journey?" Unless you plan to experiment with this experience, if your answer is yes, then I congratulate you as you begin the journey that could potentially kick-start your software engineering career/journey.

Know this, free and open source software is for the good of all. The open source community is wide and continues to grow. It welcomes all and sundry, but it poses a few hurdles to sieve the wheat from the chaff. In the end, the gains are worth it.

Report: Fedora 24 Cloud/Atomic test day

Last Tuesday we had a Fedora 24 test day about Fedora Cloud, and Atomic images. With help from Adam Williamson I managed to setup the test day. This was first time for me to use the test day web app, where the users can enter results from their tests.

Sayan helped to get us the list of AMI(s) for the Cloud base image. We also found our first bug from this test day here, it was not an issue in the images, but in fedimg. fedimg is the application which creates the AMI(s) in an automated way, and it was creating AMI(s) for the atomic images. Today sayan applied a hotfix for the same, I hope this will take care of issue.

While testing the Atomic image, I found docker was not working in the image, but it worked in the Cloud base image. I filed a bug on the same, it seems we already found the root cause in another bug. The other major issue was about upgrade of the Atomic image failing, and it was also a known issue.

In total 13 people volunteered in the test day from Fedora QA, and Cloud SIG groups. It was a successful event as we found some major issues, but we will be happy not to have any issues at all :)

Fedora 24 Cloud/Atomic test day tomorrow

Tomorrow we are going to have a test day for Fedora 24 Cloud/Atomic images. The details of the event can be found in the wiki page. We also setup an event in the testdays application, this is where you can see all the tests we want to tryout, you can also submit results into the same place.

What do you need to participate in this test day?

A recent Fedora system, where you can download the latest nightly builds for Fedora 24. If you have access to any Openstack or other cloud IAAS system where you can upload the image, and boot an instance, that will also do. In case you have vagrant setup in Mac or on Windows, you can download the corresponding vagrant-virtualbox.box image, and boot an instance.

Where to find us or place for getting any help?

We will be online at #fedora-test-day IRC channel in the freenode server.

Come and join us to make Fedora 24 a great release.

Fedora Pune meetup April 2016

I actually never even announced the April meetup, but we had in total 13 people showing up for the meet. We moved the meet to my office from our usual space as I wanted to use the white board. At beginning I showed some example code about how to write unittests, and how are we using Python3 unittests in our Fedora Cloud/Atomic images automatically. Anwesha arranged some soft drinks, and snacks for everyone.

Praveen Kumar, Chandan Kumar, and /me were helping out people. Everyone tried to take one command, or one usecase in Fedora, and then tried to implement a test case for it. I still have 6 pull requests in the Tunirtests repository. I will go through them later on, and make sure that we merge them after the required clean ups. We always wanted to have such meetups so that people get something out of them, I hope last month's Fedora meetup was helpful. There are 5 reports in the event page of the wiki.

Btw, we are meeting again on May 14th.

dgplug.org is now using Lektor

Couple of years back we moved dgplug into a static website. But still there are requirements when we do want to update parts of the site in a timely manner. We also wanted to track the changes. We tried to maintain a sphinx based docs, but somehow we never managed to do well in that case.

This Sunday Suraj, Chandan, and /me were having a casual discussion, and the site management came up. I knew Armin wrote something new in the static sites side, but never managed to look into it. From the website of Lektor:

A flexible and powerful static content management system for building
complex and beautiful websites out of flat files — for people who do not
want to make a compromise between a CMS and a static blog engine.

So Lektor is for static cms, and that is what I was looking for. The dependency chain also looked reasonable. As usual documentation is in great shape. Yesterday I spent some time to setup a Fedora container which has Lektor inside along with a small flask based webapp. Sayan helped to fix the template/CSS issues.The web application listens for events from github webhoooks, and rebuilds the site. You can find the source for our site here, and the container Dockerfile and other details are here. Note: The web application is actually very crude in nature :)

Event report: rootconf 2016

Rootconf is the largest DevOps, and Cloud infrastructure related conference in India. This year's event happened on 14-15th April in the MLR convention center, Bangalore. I traveled on the day one of the event from Pune. Woke up by 3AM in the morning, and then took the first flight to Bangalore. Picked up Ramky on my way to the venue. Managed to skip most of the (in)famous Bangalore traffic thanks to a govt holiday.

I carried the Fedora standee, and the table cloth from Pune, we set up the Fedora table in the conference. Meanwhile the place was getting full with attendees. We found so many ex-foss.in friends. Premshree, Pankaj, Raj, Vasundhar and many others I met after years. There were 300+ attendees in the event.

I should also mention about the Cat5 cable lanyard.

The day started with Zainab welcoming everyone is super fast manner :) The first talk of the day was " Happiness through Crash-Only software" by Antoine Grondin. The whole idea that failure is part of life, and we will make our software even more complex by trying to avoid is something we all should keep in mind. He gave some ideas about how Digital Ocean works in the back. Instead of a normal start/end he explained how having recovering from failed state as start, and considering that the process will fail at the end can help. Seeing hand drawn slides was another exciting thing for me, I was doing that quite a lot in my previous talks.

The next talk was from Raj Shekhar, who gave an overview of Mesos. Even in the limited time, his talk was a very right fit while still describing the use case. This was the first time I listened to a talk about Mesos, and it was a very good one.

After this during tea break we moved out the booth/table. We had Ramky, Lalatendu, Aditya, /me, and rtnpro in the table talking to the attendees. The Fedora DVD(s), and badges went out like hot cakes :) Through out two days we had many questions related to Project Atomic, the great looking stickers actually helped to get more attention. In between, I went through the details of my talk to Raj, he provided some valuable input.

Food is always great in hasgeek events, but having so many food startups from Bangalore in one place seriously added new flavor to the conference. hasgeek is not only growing itself, but making sure that they have a great community all across the conference, from talks to food, everything.

Rest of the day 1 we spent talking to people in, and around booth area. hasgeek gets some great recording done of their talks, so we can view them in future :) In the evening we had the dinner at the venue, once again too tasty food :) I went to rtnpro's house by 10pm as I still wanted to work on my slides.

Day 2

Photo by Lalatendu (Photo by Lalatendu)

Woke up by 6:30AM, and went through my slides once again. The title of my talk was "Failure at Cloud and rescued by Python". The agenda of the talk was to encourage DevOps/Sys-admins to write Python scripts than shell scripts. It was the first talk of the day. I hope it went well, the slides are available here. As I mentioned Ansible in my talk, we had many Ansible questions asked in the Fedora booth.

Next was Premshree, who talked about "Continuous deployment at Scale" with the detailed example of how they handle things at Etsy. Glad to see that they use a IRC bot to do the deployment :)

After lunch I attended "Working in and with Open Source Communities" from Bernd Erk. This talk was full with tips about communities, how to treat everyone as member. One major point was about a community leader who should become the balance between the people who talk the most, and the silent ones of the community. He also emphasized about getting new members in the community as "Because you will die someday" :)

Rest of the day we again spent in and around of the Fedora booth. Met Tarun Dua after a long time. I came back in a late night flight to Pune. I will post the links to the talk videos when I get it.

Quick way to get throw away VMs using Tunir

The latest Tunir package has a --debug option which can help us to get some quick vms up, where we can do some destructive work, and then just remove them. Below is an example to fire up two vms using Fedora Cloud base image using a quickjob.cfg file.

[general]
cpu = 1
ram = 1024

[vm1]
user = fedora
image = /home/Fedora-Cloud-Base-20141203-21.x86_64.qcow2

[vm2]
user = fedora
image = /home/Fedora-Cloud-Base-20141203-21.x86_64.qcow2

In the quickjob.txt file we just keep one command to check sanity :)

vm1 free -m

After we execute Tunir, we will something like below as output.

# tunir --multi quickjob
... lots of output ...

Non gating tests status:
Total:0
Passed:0
Failed:0
DEBUG MODE ON. Destroy from /tmp/tmpiNumV2/destroy.sh

The above mention directory also has the temporary private key to login to the instances. The output also contains the IP addresses of the VM(s). We can login like

# ssh fedora@192.168.122.28 -i /tmp/tmpiNumV2/private.pem -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no

The last two parts of the ssh command will make sure that we do not store the signature for the throwaway guests in the known_hosts file. To clean up afterwards we can do the following.

# sh /tmp/tmpiNumV2/destroy.sh

How to mount a raw guest image?

While testing the latest Fedora 24 cloud images, I had to mount it locally so that I inspect the files inside. We can do this by using the offset value calculated from the fdisk command.

# fdisk -l /var/lib/imagefactory/storage/7c34e40b-b27c-4cd9-ae05-459c93c98005.body
Disk /var/lib/imagefactory/storage/7c34e40b-b27c-4cd9-ae05-459c93c98005.body: 3 GiB, 3221225472 bytes, 6291456 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xfeecffb4

Device                                                                   Boot Start     End Sectors Size Id Type
/var/lib/imagefactory/storage/7c34e40b-b27c-4cd9-ae05-459c93c98005.body1 *     2048 6291455 6289408   3G 83 Linux

In this case the start value is 2048, and each sector is 512 bytes, so our offset value is 2048 * 512 = 1048576.

# mount -o offset=1048576 /var/lib/imagefactory/storage/7c34e40b-b27c-4cd9-ae05-459c93c98005.body /mnt
[root@fedora-build f23]# ls /mnt/
bin  boot  dev  etc  home  lib  lib64  lost+found  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var

dgplug summer training student Dhriti Shikhar

  • Your name (blog/twitter) and what do you do

Name: Dhriti Shikhar

IRC nick: dhritishikhar

Twitter: https://twitter.com/DhritiShikhar

Blog: https://dhrish20.wordpress.com/

Github profile: https://github.com/DhritiShikhar/

Pagure profile: https://pagure.io/user/dhrish20

I am a final year Engineering student in Information Technology. I am a regular contributor to FOSS and a regular participant of Pune Python meetup.

  • How did you learn about the training?

I learnt about the dgplug training from Chandan Kumar.

  • How this training changed (if at all) your life?

The dgplug training was completely life changing and the best decision I have ever made. I can't imagine a more rewarding way to spend my free time. It helped me to learn the developer tools. I learnt how to use IRC, git, vim, Python. And as a result of that I started contributing to OpenStack and Fedora Infrastructure. I hope to continue learning from dgplug. 

  • Have you contributed to any upstream project(s)? If yes, then details.

I have contributed to:

  • the documentation of various modules in OpenStack
  • Fedora-Hubs
  • Pagure
  • FAS
  • Any tips for the next batch of participants.

DGPLUG is a great place to learn. If you want to contribute to Open Source, attend the training attentively, follow the mentor and ask questions. Show people your passion. Open Source contributions show your willingness to learn. Make sure you blog regularly about new technologies you learn.

Feel free to add anything else you want to talk about.

I am really grateful to Kushal Das for inspiring and guiding me. Also, to really learn and understand a new technology, you should try to implement it. This learn-by-doing spirit is the most valuable thing you will learn in this training.