Kushal Das

FOSS and life. Kushal Das talks here.

kushal76uaid62oup5774umh654scnu5dwzh4u2534qxhcbi4wbab3ad.onion

dgplug summer training student Suraj Deshmukh

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

Name: Suraj Deshmukh

Twitter: @surajd_

Blog: https://deshmukhsuraj.wordpress.com/

What I do: I work as an Associate Software Engineer at Red Hat

  • How did you learn about the training?

From Chandan Kumar, when he was attending an event at my college.

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

It has entirely changed the course of my life. It paved a way into open-source for me. It helped me get a job at Red Hat. I found people with similar interests. I found people whom I can talk geeky stuff with ;). I learnt things that you otherwise learn the hard way. It wouldn't have had possible without training. I learnt how to get into community and start doing things, in a way made me confident enough to ask things on mailing lists. It has shown me how can you help others by writing code. Before training I just knew things by their name never got a chance or say push to start things but being in training helped me do that. And most of all I made friends for my life.

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

Before joining Red Hat, I have been contributing to Project Scapy and Openstack as a part of my job I contribute to project called as AtomicApp which is a sub-project of Project Atomic.

  • Any tips for the next batch of participants.

What I would like to say to new participants is that #dgplug is a ladder to reach open-source world and do stuff that really interests you, where you can hack with stuff and you are free to do things you like. And believe me, when you do things that you like without bothering if you are getting paid just for the sake of your passion, someday you will be paid to live your passion. Final word: get along with the training learn things, ask questions and start contributing to open-source project.

Testing containers using Kubernetes on Tunir version 0.15

Today I have released Tunir 0.l5. This release got a major rewrite of the code, and has many new features. One of them is setting up multiple VM(s) from Tunir itself. We now also have the ability to use Ansible (using 2.x) from within Tunir. Using these we are going to deploy Kubernetes on Fedora 23 Atomic images, and then we will deploy an example atomicapp which follows Nulecule specification.

I am running this on Fedora 23 system, you can grab the latest Tunir from koji. You will also need the Ansible 2.x from the testing repository.

Getting Kubernetes contrib repo

First we will get the latest Kubernetes contrib repo.

$ git clone https://github.com/kubernetes/contrib.git

Inside we will make changes to a group_vars file at contrib/ansible/group_vars/all.yml

diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml
index 276ded1..ead74fd 100644
--- a/ansible/group_vars/all.yml
+++ b/ansible/group_vars/all.yml
@@ -14,7 +14,7 @@ cluster_name: cluster.local
# Account name of remote user. Ansible will use this user account to ssh into
# the managed machines. The user must be able to use sudo without asking
# for password unless ansible_sudo_pass is set
-#ansible_ssh_user: root
+ansible_ssh_user: fedora

# password for the ansible_ssh_user. If this is unset you will need to set up
# ssh keys so a password is not needed.

Setting up the Tunir job configuration

The new multivm setup requires a jobname.cfg file as the configuration. In this case I have already downloaded a Fedora Atomic cloud .qcow2 file under /mnt. I am going to use that.

[general]
cpu = 1
ram = 1024
ansible_dir = /home/user/contrib/ansible

[vm1]
user = fedora
image = /mnt/Fedora-Cloud-Atomic-23-20160308.x86_64.qcow2
hostname = kube-master.example.com

[vm2]
user = fedora
image = /mnt/Fedora-Cloud-Atomic-23-20160308.x86_64.qcow2
hostname = kube-node-01.example.com

[vm3]
user = fedora
image = /mnt/Fedora-Cloud-Atomic-23-20160308.x86_64.qcow2
hostname = kube-node-02.example.com

The above configuration file is mostly self explanatory. All VM(s) will have 1 virtual CPU, and 1024 MB of RAM. I also put up the directory which contains the ansible source. Next we have 3 VM definitions. I also have hostnames setup for each, this are the same hostnames which are mentioned in the inventory file. The inventory file should exist on the same directory with name inventory. If you do not want to mention such big names, you can simply use vm1, vm2, vm3 in the inventory file.

Now if we remember, we need a jobname.txt file containing the actual commands for testing. The following is from our file.

PLAYBOOK cluster.yml
vm1 sudo atomic run projectatomic/guestbookgo-atomicapp

In the first line we are mentioning to run the cluster playbook. In the second line we are putting in the actual atomic command to deploy guestbook app on our newly setup Kubernetes. You can understand that we mention which VM to execute as the first part of the line. If no vm is marked, Tunir assumes that the command has to run on vm1.

Now if we just execute Tunir, you will be able to see Kubernetes being setup, and then the guestbook app being deployed. You can add few more commands in the above mentioned file to see how many pods running, or even about the details of the pods.

$ sudo tunir --multi jobname

Debug mode

For the multivm setup, Tunir now has a debug mode which can be turned on by passing --debug in the command line. This will not destroy the VM(s) at the end of the test. It will also create a destroy.sh script for you, which you can run to destroy the VM(s), and remove all temporary directories. The path of the file will be given at the end of the Tunir run.

DEBUG MODE ON. Destroy from /tmp/tmp8KtIPO/destroy.sh

Please try these new features, and comment for any improvements you want.

Day 3 of FOSSASIA 2016

Before I write about day 3 of FOSSASIA, I want to mention about the dinner at the end of day 2. Py managed to grab the microphone, and kept speaking to it in her encrypted language. In between I was running behind her so that she does not pick up any left over drinks. But once she managed to grab someone's beer and had her first drink before we can do something.

Day 3 morning I managed to reach the venue just before the day started. We had one workshop about Telegram bots. Harish was also in the room, we got some nice participation from everyone. People tried out the live bot.

After this as the next workshop started, we moved into 2nd floor to listen to Huzaifa. In his talk he mentioned many cases where people/companies are focusing on casting buzz, and confusing FOSS users rather than just working towards fixing the vulnerabilities. Many closed source products do not even tell their users which all vulnerabilities they fixed in a released update. It was a very well received talk. I wanted to attend Lennart's Systemd workshops, but they were at the same time in morning :(

During lunch I demoed the latest features of Tunir to Lennart Even though we never discussed deep details, but he seemed to be happy with the ideas. I also managed to get a VLC chocolate :)

After lunch at 2PM few of us gathered near exhibition area for a key signing event. We all verified each other's ID(s), and the fingerprints.

At 4:30PM we all moved into the big hall for the last session of the event. Hong Phuc and Mario gave many details about how they event went. We had people are 32 different countries, 206 speakers (7 did not turn up), 1086 unique participants. FOSSASIA is going to stay in Singapore, means next year we all are coming back to this amazing country for another great event.

Day Two of FOSSASIA 2016

I had to leave early to the venue for day two, as I had a welcome talk in the Python track. The morning started with the "Introduction to GSOC, and GCI" talk from Stephanie Taylor. The room was full with many ex-GSOC and GCI students, and mentors. The students of GCI last year completed more than 4k tasks, among them 1k+ was done by the students under FOSSASIA organization.

After this talk I moved to the Python track room. With a small welcome talk we started the first talk in the track, "Test driven development with pytest" from Ivan Zimine. The Goat book was there in the slides. He gave example of a very simple Flask application, and then how to test it with pytest. At the end few users asked about preference between Django and Flask :)

Next Sayan started his talk about Fedora Infrastructure. He gave a nice overview of the different applications running in the infrastructure, and how one can join the team. During the QA session, one person asked how do we choose which projects to work on? I think this answer should get it's own blog post.

Next, I was up for the talk about Tunir. I demoed the latest features (again, more details are coming next week). My talk slides are here.

After lunch I moved to the "Internet, Society, Community" track as Anwesha had her talk there. I managed to stay inside the room for the most part of Anivar's talk about India's fight for Netneutrality and Open Internet, but Py was crying, so I had to leave the room. Luckily she slept just before Anwesha's talk, so we managed to get back into the room. Anwesha gave her talk on a FOSS conference titled Anatomy of a Software Patent for a foss developer. I am sure she will write more about it in her blog.

From 4PM I had my "Python3 101" workshop. There were many newcomers in the workshop, so I tried to explain basic things more. We saw few differences between Python 2, and Python 3. At the end of the workshop we wrote our own "ls" replacement in Python. Below is a picture few students who came down from Dubai to attend FOSSASIA, they participated in my workshop along with their teacher.

FOSSASIA 2016 is on

FOSSASIA, the premier conference on Free and Open Source Software in Asia is having their 2016 edition in Singapore Science Center, Singapore. Even though the today is the first day of the event, the social part of the conference already started from yesterday.

Harish Pillay arranged a get together for all the speakers in the Singapore Red Hat office yesterday morning. I met many speakers from previous years, I also met some new faces. Among the many different discussions we had, a major portion was about SDR, and HAM. Thanks to Daniel Pocock, and Harish, and few others HAM(s) in the room, we learned a lot of new things. I came back to the hotel in between to get Py, and Anwesha. After lunch, rest of the day we spent in the office helping out Harish to setup Fedora 23 on the laptops for the conference. Anwesha was busy practicing her talk, Py was happy to see so many cables in one place :)

Had to wake up early so that we can catch the MRT on time, we reached the venue around 9:10AM, and moved directly in the main auditorium. After a slight delay, the conference started, Hong Phuc gave the first welcoming talk, and then Mario spoke for few minutes about the conference. Harish gave the keynote, and formally the talks started afterwards. In his talk he went through many history lessons, and also discussed about GPL. I am sure that he managed to get many people excited about the current phase of FOSS in the technology world.

The next talk of the morning was from Bunnie Huang, where he spoke about Burning Man 2015, and the IoT device they have used as the conference badge. Another interesting talk followed as Rethinking Drone Delivery with Open Source from Singapore Post. In another talk Cat Allman gave an insider view of Science and Open Source program in Google. As you can see, I had already attended way more number of talks than in most other conferences (even though I know that the video recording of the talks will be available in future).

Lunch was good, though Py was in kind of angry mode at that time. We had to chase her around in the venue as she was being able to walk/run properly from the last few days :)

I took some time to find the room for hardware track, I went in more than 1 hour before my talk on micro:bit. I met Daniel Blueman (from Numascale) once again (we met last year), and we spent the time discussing about ARM hardware, and why do we think that it will become a super major thing in future.

In my micro:bit talk I demoed Mu, the editor for microbit. Couple of kids tried hands on programing at the end of my talk.

We came back from the venue to the hotel. Even though there was another speakers' meetup at night, we both decided to skip it as we have talks/workshop tomorrow. I will start the Python track at 10:15AM, it will end with my Python 3 101 workshop starting from 4PM.

Python track at FOSSASIA 2016

(Stephen J. Turnbull during his talk in Python track, FOSSASIA 2015).

The 2016 edition of FOSSASIA is happening from 18-20th March, in the Singapore Science Center, Singapore. We are again having a Python track in this event, which starts on 19th March (Saturday). The following is a summarised entry of the schedule for us.

On 19th March

  • Python at FOSSASIA (Introduction talk to the track), speaker: /me.
  • 10:30am Test driven development with pytest by Ivan Zimine (Python User Group Singapore).
  • 11:00am Dive deep into Fedora Infra by Sayan Chowdhury (Fedora Project).
  • 11:30am Tunir the simple CI by /me again.
  • Photo and then lunch break
  • 1:30pm Command Line Application Design by Shadab Zafar (Jamia Millia Islamia).
  • 2:00pm Using Python Client to talk with Zanata Server by Sundeep Anand (Red Hat).
  • 2:30pm Python in my Science Classroom by Praveen Patil (ExpEYES).
  • 3:00pm Building a proper UI/UX for the wiki engine (GSoC'15 Project) by Yask Srivastava (Moin Moin Wiki).
  • 3:30pm ircb - A versatile, scalable IRC Bouncer, as a service, for humans by Sayan Chowdhury (Fedora Project).
  • 4:00pm Python 3 101 workshop of 2 hours, by /me.

On 20th March

  • 10:00am Leveraging Telegram API and nltk to implement interactive user interfaces for businesses by Kranthi Kiran Guduru (NIT Warangal) workshop of 1 hour
  • 11:00am Building user centric applications using the Loklak and Twitter API - An example of Complaint registrations by Sudheesh Singanamalla (Loklak / NIT Warangal) workshop of 1 hour
  • 1:00pm Openess in Quality: Migrating testing framework from bash to pytest by Amita Sharma (Red Hat).
  • 1:30pm Multibody Dynamics and Control with Python by Sahil Shekhawat (SymPy / PyDy)
  • 2:00pm Symbolic Computation with Python using SymPy by Amit Kumar JHA (SymPy) Workshop of 2 hours

If you look closely at the talks, we have talks on testing framework (pytest), talks on particular applications including how Python is being used to teach science in class rooms (ExpEyes). We have hands on workshops about Python3, Telegram, and Twitter API, and about symbolic computation. It is going to be lot of discussions, and learning. The full conference schedule is also live. It has many other tracks, and speakers from different upstream projects. We also have a DevOps track, which is filled with some excellent talks from my colleagues in Red Hat.

State of tests for Fedora Cloud and Atomic in March 2016

Till Fedora 22 release we have tested our Cloud images only with manual help. The amazing Fedora QA team organized test days, and also published detailed documentation on the wiki about how to test the images. People tried to help as when possible, as not having access to a Cloud was a problem for many. The images are also big in size (than any random RPM), so that also meant only people with enough bandwidth can help.

During Fedora 23 release cycle, we worked on a change for Automated Two Week Atomic release. A part of it was about having automated testing, which we enabled using Autocloud project. This automatically tests every Cloud Base and Atomic qcow2 images, and libvirt, and Virtualbox based Vagrant images.

This post will explain the state of currently activated tests for the same. These tests are written as Python3 unittest cases.

At first we run 5 non-gating tests, failing any of these will not do a release blocking, but at the end of each run we get the summary for all of these non-gating tests. These include bzip2, cpio, diffutils, Audit.

Then we go ahead in testing the basics test cases, things like journald logging, package install (only on base image), SELinux should be enforcing, and no service should fail during startup of the image.

The next test is about checking that /tmp should be world writable. We then move into testing the mount status of the /tmp filesystem. If it is a link, then also it should behave properly. Our next test checks that for Vagrant images we are using predictable naming convention of network devices, basically checking the existing of eth0.

We then disable crond service, after a reboot we make sure that the service is still in disabled state, and do the rest of service manipulations. We also check that the user journald log file exists on that reboot, this comes from a regression test. Then we reboot the instance again.

After this second reboot, we test the status of the crond service once again, and then we move to our special tests cases related to Atomic host. Means these tests will run only on Atomic hosts (both cloud, and Vagrant ones).

In the first test we check if the package docker is at all installed or not. Yes, if you guessed that this is a regression test, then you are correct. We once had an image without the docker package inside :) Next, we test the docker storage setup, that should be up, and in running state. We then run the busybox image, and see that it should be able to run properly. The atomic command is used next to start the same container. Pulling in the latest Fedora image, and running it is the next test. As our next test, we try to mount / as /host in the container. The next test is about having /bin, /sbin, and /usr mounted as read only in the Atomic host. In our final test, we check that a privileged container should be able to talk to the host docker daemon.

We also have a github wiki page explaining how to write any new test case. Feel free to ping if you want to contribute, and make Fedora flying high in the Cloud.

dgplug summer training student Trishna Guha

This is the third post in this series.

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

I am Trishna Guha (trishnag), a 6th semester B.Tech student with Computer Science and Engineering branch.

  • How did you learn about the training?

I have learned about the training from my brother Suman Guha https://twitter.com/sumanguha.

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

This training has changed my life entirely. I started the training as a newbie. I took part in the training attentively and tried to learn and implement what all have been taught in the summer training. After few months I really could feel the change. I jotted down the skills those I didn't used to have before the training and it felt so awesome. Finally this training has turned me into an Open Source Contributor :). I am learning a lot contributing to opensource.

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

I have started contributing to upstream projects after the training. I have contributed to Fedora-Cloud testing [Tunirtests]( (https://github.com/kushaldas/tunirtests) and various projects of Fedora-Infra like bodhi, pkgdb2, [tahrir]( https://github.com/fedora-infra/tahrir, python-fedora.

  • Any tips for the next batch of participants.

This is the place to learn everything from scratch if anyone wants to get started with open source contributions and learn about various tools. So don't miss the training because it is one of the steps to change your life for the better.

Thank you DGPLUG.

dgplug summer training student Farhaan Bukhsh

This is the second post in the series, the first post was on Sanyam Khurana.

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

Farhaan Bukhsh

I am a 6th semester student in an engg. college in Bangalore. I attend college during day and contribute to fedora-infra rest of the time. I also intern for a company called Jnaapti. http://github.com/farhaanbukhsh

  • How did you learn about the training?

I met Sayan during a Bangpyper meet up and I saw him wearing a dgplug t-shirt, I went home and googled about it, this is how I got to know about it. Apart from that I was following Vignesh and Bhibhas on twitter and this is how I got to know that training was going to start and I enrolled in.

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

It has changed the way I think about technology, I made a lot of friends, this training has given me mentors which is required for personal and technical growth.Now I don't see technologies as challenge I see them as a tool to solve problem. Dgplug has given me the confidence to be proud of who I am. Being a Geek is generally not accepted but Dgplug is a place where I am accepted for who I am. It has changed my life by 360 degrees. I am really happy that I came to know about it.

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

I contribute to pagure, recently I got into the author list of pagure. I contribute to a lot of other fedora-infra projects like bodhi, nuancier etc. i have also been a contributor at Mozilla. Fedora autocloud is one of the project that I have been writing test cases for.

  • Any tips for the next batch of participants.

When going gets tough, tough gets going. Never give up, attend the training and follow what your mentor is telling you. Have faith , faith in yourself and faith in the mentor. Have a mindset of giving back to the community. Be passionate about the things you do, come with an open mind and ask as many question as you want to.Be on the channel for as long as possible. May the source be with you, Luke.

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

Learn and Teach, this is what you should be taking back with you, spread the same spirit in your place, hope you have a good year

dgplug summer training student Sanyam Khurana

This is the first of a series of blog posts where I asked few questions to the past students of dgplug summer training in our mailing list. I am pasting their responses without any modification. I will just mark my questions in a different formating.

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

My name is Sanyam Khurana (CuriousLearner). I'm a final year student pursuing B.Tech CSE from GGSIPU, Delhi. Twitter handle: @ErSanyamKhurana Blog: ersanyamkhurana.wordpress.com (would be shifted soon to a static blog on sanyamkhurana.com/blog)

  • How did you learn about the training?

I learned about the training from Sudip, who posted a comment in one of the Python groups on Facebook, and that's probably the best thing I've ever done with Facebook.

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

It had spinned my life 360 degrees. I made new friends, learned awesome things from communicating over mailing list/IRC to making web apps in Flask. I actually realized how few lines of code could cause a huge impact on lives of people; making it a lot better. It turned me to an Open source contributor, and trust me; when you really contribute that few lines of code in any FOSS project, that awesome feeling cannot be expressed in words!

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

I've been contributing to Mozilla. Here is my Mozillian's profile: https://mozillians.org/en-US/u/CuriousLearner/. I recently got my name is Mozilla about:credits. Also I've been contributing to various repositories of local open source groups such as Mozilla Delhi (Mozpacers) and PyDelhi (Python Delhi Users Group).

  • Any tips for the next batch of participants.

My college timings often clashed with training timings; so, mostly I reached late, and used to read the logs and carry on stuff. Now I think, if I've probably left the last lecture in college and carried on this training, it would be much more beneficial. But yes, you should definitely try to be there on IRC at the training time, I'm sure it would be a lot more beneficial for you. DGPLUG would serve as a ladder if you ever wanted to contributed to FOSS. Make sure you complete each home task and once you learn, you also teach others whatever you know :)

PFA my recent photo with this mail.

Thanks & Regards, Sanyam Khurana

www.SanyamKhurana.com Github: CuriousLearner