miércoles, 20 de marzo de 2019

Testing with PyTest

It's been so long since I have done anything serious on Python, even though it was the very first serious programming language that I've ever used. I took my introductory course to programming back at the University of Toronto. The lecturer had a set up environment on an Ubuntu virtual machine with PyCharm over several frameworks. He made us write some testing functions over there. So when I first started this assignment I was quite happy thinking that everything was going to be as easy as it was back up there. Turns out I was wrong and the lecturer really did a big favor to us by setting up the environment. I don't usually have too much trouble on setting stuff up but, something happened this time that I nearly went bananas on the set up for PyTest. The main problem on the setup was that my PyCharm wasn't able to recognize the PyTest variable on my my virtual environment. After a while I figured that I had to install pytest-runner as an administrator and install the library for PyTest in the IDE. That took 90% of my time for this task.
Concerning the course I believe it was nice, clear and well paced. Hands on were quite simple so I took this opportunity to skim over the tutorial's code and create my own version of the source in order to remember some basic Python. The only thing that was slightly annoying was having to install and set up my environment while following a tutorial that is somehow outdated.
Anyways, here's the requested evidence media:




domingo, 10 de marzo de 2019

DevOps Part 2


HANDS ON!

Its been so long since I had my Operative Systems class, it was one of those classes in which the lab instructor was not really sure what was the lecture professor asking him to work on. Supposedly we were to work on mutex locks, system calls, and other things that fall more into the theoretical spectrum of the Operative Systems class. But instead the instructor wt this panted to give us a dive into the life of being a Linux administrator. And right now I am very happy that he did so.

So well, the first part of this whole thing was to install some Linux distribution. Even though during the lab mentioned previously I worked over CentOS, this time I decided to pick on Ubuntu because I had the feeling that it would make this whole thing easier for me, For those struggling to install and configure Ubuntu (which is quite simple in my opinion) you can always use this handy site, it contains pre-built images of the most popular operative systems for Oracle's Virtualbox. I was a bit short on time for installing Ubuntu, aditionally I consider that I have fair amount of knowledge on installing operative systems on a virtual machine since I had to go through the nightmare of installing Gentoo during the same class.

First of all I started by installing Java and Git for my virtual machine. Even though both were easily completed with a couple commands on the console for each I had to virtually google everything since I didn't really remember. I believe git was the one that I had slightly more problems with since the first time I installed it I chose my user path for git, and I thought that if I just left it like that, whenever I wanted the cron to push the files into that directory, I would be pushing everything that is in the directory, most of which were files of the OS itself, so I had to redo the Git configuration.  As for Java I screwed up slightly in the same page. I didn't remember were did I put the JDK so at the time I was trying to get over with the installation of IntelliJ I had to wast a handful of minutes looking for it. Additionally took some minutes in order to enable the two factor authentication for my Git account.

For my web server I decided to go for Apache. One of the main tasks of my Operative Systems lab which took several sessions, was to install 3 different web servers: Joomla, Moodle and Apache. From these, Apache proved to be way nicer and simpler in its installation and deployment, since it was not necessary to manually configure the files inside of the build, additionally, Apache is widely more used than the other two, so installing it on CentOS proved as easy as I just did on Ubunbtu. The whole thing took to follow the steps given in this website. The only thing I had to look up from other sources for was to set up the port number. But after a couple minutes of research I just found which file I was supposed to rewrite. I wanted to refresh a bit my skills on using an in-console text editior so I decided to do this configuration on /etc/apache2/ports.conf by making use of the vim editor. Finally and honestly I did just a small research and a simple test of my cron file. Even though it is not something that buggers me too much, I didn't have the need to install cron since OSboxes' image came with it installed. I found this video that was really handy in helping me understand the structure of the crontab file, which seemed quite misleading to me in the official documentation . However I still have my doubts since I don't fully understand the git commands in the script (I always deal with VCS by making use of the IDE plugins, not the terminal).Anyway it just worked by writing the file just as it shows in the video with my own files and timing.

I think this assignment is nice and it is helping me to refresh my mind on some of this OS administrator skills.

domingo, 3 de marzo de 2019

DevOps?

DevOps is one of those tech words that is in mouth of everyone in any IT workplace. In this post I will try to paraphrase about DevOps and what is its function in the IT environment.

Apparently DevOps is a term that bears no canonical definition, this means that the definition of DevOps can change from one company to another. I am not ashamed to tell you that my personal favorite general definition of the term was the one I found on Wikipedia and it goes as it follows:
  "... DevOps is the immediate response to the interdependence of software development and IT operaions...".
 So based on this definition, we can picture a DevOps employee as a person whose duty is to facilitate the life of a developer by helping out with nuisances such as putting up and maintaining the server in which an application is going to run. Even though this is a good brief definition there is much more to it. For showing this, I'm bringing up Atlassian's definition of the term: 

"DevOps is a set of practices that automate processes between software development teams and IT teams, so that it is easier to compile, test and publish software quickly."

This definition seems to take a fair amount of disciplines and work on the part in which they connect in the process of software development. And yes DevOps people require to be fond of a wide skillset, but they also require to adopt a different mindset towards collaboration.  Some authors cite that the implementation of DevOps most of the time requires an internal cultural shift.In order to understand this it is necesary to look back to 2008, the time around DevOps started to come out. At the time a developer was completely responsible for writing code exactly the way IT operations asked them to. This of course made both of these departments to have different goals which usually caused a conflict among them. DevOps aims to blend them into a collaborative team that is able to understand the needs of each department and the enhancement of each. 

For the particular set of exercises assigned in class,  I believe there is a greater focus towards the job of a system administrator  rather than the DevOps practices as a whole. For that we would need a team of developers and a team of system administrator, testers, database administrators, etc.  In order to focus towards DevOps.