DevOps and Linux practice reflection

During this month I have been practicing some common DevOps activities like setting up a repository, opening a server and updating it automatically with cron. Some of them were easy tasks because I’ve already done similar activities, but there were other task that I had no idea how to do and it took me a while to figure it out.

If you want to see the whole process I’ll link the part 1, part 2 and part 3 here. On this post I’m going to talk about my experience doing this activities and then show the results.

The first part was easy, most of the step were things I already had like the Linux distribution(Ubuntu 16) and all the development environment. I had to struggle a little bit with cron because I din’t know how to make sure it was running, but after reading a couple of tutorials I found that I had to send the output to a file with the «>>» symbol.  This operator appends anything I pass to the file without eliminating what was there before. This is an example of how my cron file looks:

* * * * * [path]/bashscript >> [path]/log.out

For the second part I also had experience using SSH keys for GitHub, I use that all the time now that I have 2FA because for the terminal it won’t let me use my normal password. To code the server I used NodeJS and ExpressJS because those were tools I was familiar with for this kind of things, later I had trouble with that but for this part it did what it had to do, the script moves to the git folder and pulled from master. Just to keep track of what was happening I kept the log file. During a period of time the script created a file and after doing all the stuff it had to do deleted it, that was surrounded with an if conditional that checked if the file was created. I deleted that on part 3 to simplify my tests because while I was working on it I had no idea what was giving me errors.

Finally, the part 3 was the most difficult for me. I quickly created a Maven project and in 5 minutes I could run the test without problems. The tricky part for me was that I could not find the way to read a file with the tests results and pass that to the web page. I tried a lot of ways and after a lot of failures and attempts to debug my code I learned that ExpressJS was not made to host HTML files. My HTML contained the JS that reads the tests results, that JS script was run in an environment without the proper modules so it didn’t work. My solution was to format the tests results files to have the proper HTML tags and then put that into a static HTML. This is how it looks:

devopsnapshot.PNG

It’s not pretty, but is useful…I guess. The code of the practices is available here

Overall, I enjoyed learning and using things that I don’t normally use, like cron or bash scripts. I think these tools are really helpful and I would like to learn more because I could find more interesting uses to it. After doing a little bit of research I found tools that could’ve helped me to do this easier. Jenkins is a tool that automates the whole development process, it’s open source and free. Kubernetes is another tool for automation but this one works for containers, from what I’ve heard is harder to learn and it’s not free. Both of them use Docker, a tool to containerize apps that I’ve hear a lot but haven’t had the chance to use it and learn why is useful. I think that all these tools are really powerful but sometimes complex, I need to learn how to use them well before implementing anything with them.

Now I know that doing all these tasks can be a lot of work and requires a lot of knowledge and experience to do some high quality automation.  Being a DevOp also requires a lot of creativity, each environment is different in hardware, software and people, the DevOp has to have a different set of abilities to solve each problem, whether it is about automation scripting or people management.

Reflection about Blogging and Me

The Bloggin and Me blog post by Ana is an insightful and fun read. She writes about a lot of topics that not many people want to talk about like personal fears and life problems, but she does it in a very relaxed style with some jokes. I like to read about others people’s life because sometimes I find that I’m not very different to others and I can relate a lot of their thoughts and experiences to mine.

I can imagine how she felt when she stopped having fun for working and earning money. I’ve always been very curious about technology, science and engineering since I was a kid, I liked to be creative, build stuff, experiment with new knowledge and have fun doing anything non-school related. I liked to challenge myself and discover or learn new things along the way. However, I stopped feeling like that since my mid years in college. Now, I rarely feel like I want to do something new and interesting, I don’t feel that fresh inspiration that pushes me to try something new or stupid or just fun. I know is not that I don’t have time, I have a lot of free time, I just don’t feel like that anymore. I spent most of my free time playing video games or watching series, tired, maybe thinking about the next assignment, the next exam, the grades or that I should sleep more. Now I see those fun activities as a waste of time and unproductive, but then I proceed to do something even less productive or worst, less fulfilling. Perhaps I’m burned out by school, I’m forced to think that I should spend my free time doing productive stuff to be more competent in my area, but that thinking makes me get tired quicker, more stressed and with the constant and unfulfilled desire to rest. I feel like when I was younger when I do challenging homework that pushes me to be creative, but each time is harder to find the right spot of time to start the work and put a decent amount of thinking to it. I mostly do homework to finish it, not to learn from it, hardly I sit and take my time, I don’t have fun anymore, and that is sad.

It is very inspiring how she quickly started to make conscience about her own thoughts and feelings to start working over them. She realized that a lot of people around her were toxic, and that most of her fears were a common occurrence among the developer community. In her words «Your fears are part of who you are and use them to your benefit». This line made me think about a conference where Jürgen Klaric talked about fear, and how fear forges our experience as human being. Fear is good because it saves us from apparent danger, it’s an instinct that is hard to avoid and very natural to follow. But fear is what stop us from doing more and better things with our lifes. He mentioned that eliminating our fears is impossible, fear is always going to be there to warn us, we cannot avoid it nor eliminate it, but we can learn to take advantage of it by understanding it.

At the end she mentions the personal benefits of having a space for you in your blog, more that doing it for someone else, is doing it for you. I think that having a space just for me and my silly thoughts, record my new learning or posting any content would very nice to have, but I just don’t find the motivation to do it. I hope that somewhere in the near future I can get healed from this weird mental illness and finally enjoy life as I used to, without worrying about grades, without worrying about how much I earn, without worrying about how «productive» I am and without worrying about what everyone else thinks of me. I think that maybe giving me the space to write a blog about anything could work as meditation and a relaxation activity. Maybe I could try it in the future when I’m done with the semester. I’m of course doing what I can to enjoy every second of my life and my beautiful student life, but is still hard sometimes to get out of the comfort zone and have enough energy to do something for myself.

The Secret Life of Bugs Opinion

After reading the paper «The Secret Life of Bugs: Going Past the Errors and Omissions in Software Repositories » I realized that debugging is still a big problem for software engineers and even for teams inside big companies. I imagined that everyone already have a predefined way to deal with bugs, but the paper shows that each company and team has their own methods, and not every method is very successful.

One of the many ways of dealing with bugs according to the research is to have a bug data base that keeps track of the first appearance of the bug, a description, how to solve it and the day the issue was closed. This process was many times automated and that lead to many errors like incomplete data, repeated information or erroneous information. In many cases people adopted insufficient practices due to the lack of correct information, for example, trying to find the bug owner sending emails to people they might thing have something to do with it. This happened because the database didn’t have a correct owner specified, in many cases the person listed there had nothing to do with the bug.

The paper suggest that debugging is not an process that can be automated because it depends on social and organizational factors. People need to communicate their knowledge and experiences in order to know exactly who found the bug and who can solve it. This research has 10 years now, can be considered old by many people; however, I don’t think the research and information discussed here is irrelevant to actual times.  A lot of companies and engineers can learn something from here, debugging is often a process that takes a lot of time and that is why we try to automate it, but maybe the faster way to do it is by talking to the team and looking for experts to solve it personally.