My name is Ricardo Fusco, I'm 23 years old and I'm a Portuguese graduate student from "Universidade de Évora" (University of Évora), and I am currently on my 2nd year masters in Computer Science, 6th year in university, just finished all the curricular units in the master with only thesis left.
I’ve started programming when I went to university (2011) and gradually developed my taste and love for programming and computer science overall since I entered university.
The bachelor and master in Computer Science are focused on Software Engineering and Artificial Intelligence. Besides the areas of focus of my bachelor and masters I've also developed quite an interest for web development lately which is a subject that lacks in my university.
Well, enough about me, let’s get to what matters.
The Project Introduction
I want to present to all of you the project I’m involved in as a part of the Google Summer of Code program for this year. The project I chose for GSoC was the Pull Request Testing Platform.
This project was the one that immediately stood out to me from all the others and seemed like an extremely interesting and exciting project, despite looking hard.
At first this project was not intended to remain in the list of the projects for this year’s GSoC edition, but after pointing out the value it would bring to Joomla! and some more thought and consideration from the organization the project was later reconsidered back into the projects list.
This project is a DevOps project with technologies like Docker for containerization, these are definitely the way for the future regarding software, automation, testing, etc.
In simple terms, DevOps can be characterized as a set of practices that connect software development and information technology operations. It’s a new way of working where continuous delivery, automation, continuous integration, agile software development and more are brought together for more efficient software testing and delivery for organizations.
And how does Docker fit in all this? Well Docker is essentially a tool/utility which can efficiently create, ship and run containers to deploy software in an easier way and with a certain abstraction from the host’s system and setup processes.
These Docker containers are created using Docker Images which are a sort of template where it is specified the desired environment divided in small modular components for the developer’s application to be able to run in the containers generated/built from that image.
The Docker containers are easily scalable, they can share kernel and their contents never need to be installed on the host system. They allow the developer to have the application bundled inside an “isolated” setting with all the dependencies, libraries and modules it needs to run, free from the constraints of the machine that is used as host and the repetitive and, sometimes, complex tasks of setting up and configuring the development environments to run software applications.
The main problem/limitation this project aims to solve is the constraints there are still regarding explorative tests like hardware problems, time consuming, repetitive and somewhat complex setup and deployment efforts (complex for most of the testers with less technical knowledge).
This limitation leads to a certain loss in human resources for testing Joomla!, and that is certainly not ideal, even more for such an inclusive, multicultural and community oriented organization like Joomla! so this project aims to bring us closer to those ideals.
So the main goal here is to automate the creation/setup of a testing environment for Joomla! CMS and with this shift the tester’s focus entirely to what really matters and test Joomla! instances almost instantaneously.
In the end the tester won’t need to configure his/her environment manually and would no longer need a more technical knowledge regarding the setup and deployment processes, would also benefit more technically advanced users as well because it also saves them from having a local Joomla! Installation and saves them time as well.
This would bring even more users and Joomla! together in order to test the CMS and provide a much better experience in an easier and more intuitive way.
The project scope and some specifics about the approaches to take changed a bit since the beginning of the GSoC period after several discussions between the team to decide the direction to go.
The final product at the end should be a test requests website a bit similar to the issue tracker (test.joomla.org for example) with github authentication where the user can request a test for a PR in particular, after choosing the PR to test the user can choose the PHP version and then awaits for the Joomla! instance to be prepared (with loading screen or not), after having the container prepared for use the user is redirected to the Joomla instance ready to be tested (either before the installation, or with the installation already done).
The next 3 images are a mockup example of what is intended at the end:
For now for phase 1 the objective is to have the general setup for the multi-container docker environment for the platform ready, have the github authentication ready and the Jenkins (Jenkins is a Continuous Integration tool) setup ready as well building the PRs with a webhook on the repository in order to communicate with the Github API.
Experience and Work So Far
So far it has been a great experience, it has been difficult but I am very much enjoying this learning experience, I have been learning a lot and still have a lot to learn, this is a project built from scratch and has a lot of particularities to consider, research and testing to do for each approach.
In the beginning I had a few difficulties researching and trying to find the best approaches and the right direction for the project, it’s a gradual process, also had a very busy week a few days ago and couldn’t dedicate as much as possible, but now I’m able to dedicate fully to the project.
My mentors and all members of the team (Niels Braczek, Tito Alvarez, Ashan Fernando, Puneet Kala, Yves Hoppe, Tobias Zulauf, Astrid Günther) have been nothing but helpful and have been guiding me every step of the way, I’m happy and grateful to have met them and to have the opportunity to be able to learn and work with them on this project. So far I have done successful tests with Jenkins having setup a webhook on a test repository and configured Jenkins locally to build every incoming PR/commit with the help of an app to setup a secure tunnel to localhost (ngrok) in order to test the connection with the webhook. You can see the tests below (https://github.com/TestOrg11111111/testrepo1/pull/7):
Besides setting up Jenkins, I have made a script to generate Dockerfiles given a combination of the supported PHP versions and the available branches in the Joomla! CMS repository fetching the branches names from the github API and receiving as input an xml file with the PHP versions, each Dockerfile with MySQL embedded instead of in separate image and container (https://github.com/joomla-projects/gsoc17_pr_testing_platform/pull/5).
The objective with this was to have a set of default Dockerfiles for each branch/PHP version combo and afterwards apply the PR patch to the container created from the default generated Docker images, but meanwhile we have changed this approach to a different one with docker-compose.
For the next steps I will be starting to build the test request website with the GitHub authentication, build the initial multi-container environment setup and integrate these components including Jenkins having a simple first iteration of the platform by the end of this month, then we will have to discuss the next steps for phase 2 as there were changes in what was planned for that phase. The tasks for phase 1 can be found here in the project board on the repository: https://github.com/joomla-projects/gsoc17_pr_testing_platform/projects/2.