GSoC – 2021 OpenWRT PPA final evaluation

Hey all hope you all are doing. With heavy heart I would like to conclude this beautiful journey of GSoC 2021 with one last blog.

First I would like to start by thanking Freifunk, Google and my mentor Mr. Benjamin Henrion for guiding me to become a better developer during the course of this program.

The link to my work can be accessed from here

Work done till now

As stated in the first blog, the main project revolved around making a working OpenWRT SDK available to users with an abstraction layer for their easy use.

First order of business was to present the user with a web interface where they just have to provide with their repository link, which can then be build using the OpenWRT SDK and final packages and targets could be hosted on a server.

The website looks like :-

The final build are hosted on a httpd server running on the background

Challenges encountered

During the development of this project the issue I faced was that of building the user scripts in the docker container containing the SDK. Also the default config file had to be implemented to override the menuconfig settings.

To overcome this I created a docker image containing the SDK which automatically builds the user packages. You can find it here.

The second challenge was for the build container to run in the background, without disturbing the the web-interface functionality.

For this I have used multiprocessing module and subprocess’s Popen module respectively. What they do is simply create a separate process for build step and running it parallelly alongside the web-interface thereby achieving concurrency.

Future Plans

  1. Improve Web-portal with added UI/UX
  2. Finding more ways to host these packages.
  3. Improving the build process by running them in Kubernetes cluster.
  4. Having a provision for multiple builds.
  5. Possibly include CI/CD pipeline for the same.

Conclusion

During this program I learnt many different things ranging from tools to technologies.

There is still a lot to be achieved for the project, which is why I’ll keep on working on it. Contributions, suggestions and feedback are always welcomed.

At the end it is just the beginning of another journey. Good day and fare the well everyone.

 

GSoC 2021 – OpenWRT PPA update for first evaluation

Hey everyone , hope you all are doing fine.

As we have come a long way from the start of the program, here I have compiled everything that I done till date regarding my project.

It has been rightly said that open source development is a continuous process and I for one have been learning a lot with the help of my mentor. Some of my learnings are :-

  • Learnt more about the SDK provided by OpenWRT.
  • Setting up of FTP servers
  • Learnt more about Docker
  • Explored K3d as well as K3s.
  • Setting up local registries ………………………… and may more.

Current Status & Workaround

In order to get started with the project , you would be required to have some basic setup and configuration. For this one can run the following :-

> chmod +x ./setup.sh
> ./setup.sh

This will configure k8s cluster and setup local registry . Then you can start your flask web server which looks like below :

Starting the project required understanding all the process that goes into successfully creating packages and targets from given files and configuration. In order to achieve that, the process I followed was :-

  • Updating feeds.default.conf to locally stream its feeds from local folder
  • Running the update and install script for local feed.
  • Finally creating packages and targets by running make.

The run.sh script is invoked when the user provides with repo-url (contents of which are cloned and then mounted to local feeds folder on container of neelaksh1/custom-owrtppa )

At present manual run of the above process needs to be done on bash-shell of the running container.

After the packages and targets are generated, we can expose it to the outside world by running ftp server using neelaksh1/custom-ftp .

For that we can use htp.sh script which will be copying the generated bin/ folder and mounting it on the ftp container from the sdk container.

We can access ftp://localhost/ on our browser, which will look like below :-

Final Thoughts

The current project meets half of the promised work. It still is under development. Some of the stuff I would be working on in the upcoming days are :

  • Improving Front-End
  • Having provision for incremental builds, wherein the user can change his/her source multiple times for the same running container.
  • Working on running the SDK scripts automatically without the need for running them manually on the bash-shell
  • Creating deployment and services for the exposing final build packages and targets for the world.

Repository Link

The work is being updated on OpenWRT_PPA in the dev branch.

OpenWRT PPA @ Google Summer of Code 2021

File:OpenWrt Logo.svg - Wikimedia Commons
Mentor : Benjamin Henrion

Hey everyone , hope everyone is doing fine. I am delighted to have been given this opportunity to work for OpenWRT project under Freifunk.

A little about myself

I am currently a sophomore at Birla Institute of Technology, Mesra. I have always been interested in the technical aspect of the world, as to how from the stroke of a keyboard does one get to build/execute such seemingly daunting tasks with such ease. 

The curiosity led me to the beautiful world of automation and containerisation along with managing these tasks at scale.

Apart from being a tech-nerd, I have always loved to explore the great mysteries of life, watch football, and play Golf among many others.

I am always ready to talk about the above at any time, so feel free to contact me.

Project Overview

OpenWRT is a Linux distribution for off the shelf Wi-Fi routers. People who want to make and distribute their personal packages, often for development purposes, so far have the option to build the whole firmware from zero, but very few people use the OpenWRT SDKs.

The idea behind this project is to provide the user with an interface where they can simply put in their GitHub repo URL, which can be then compiled and built into an executable Docker Image fit for Launch in k3d cluster, and also available locally.

Benefits to Community

This project will be beneficial for users since now they won’t have to build everything from scratch, and now only provide the URL of their source code.

Additionally, it will also try to achieve the following goals :

  • Autonomy: no external person is needed for the platform.
  • Build with many different targets like  brcm2708, ar71xx, x86, sunxi, etc…
  • Rebuilding after every commit can become possible.

And many more …..

Deliverables

  1.  A front-end made using flask and python, where the user just needs to login and enter his/her repo URL.
  2. A backend made up using python and shell scripting for creating Docker Image based on the provided source-code.
  3. A database that stores this build docker image, made using MY-SQL database.
  4. A backend service integrating the above with k3d cluster for hosting docker container made using the container.

Next steps

I would be starting from implementing scripts for setting up the entire environment as well as working on the deployment of the newly created docker image on the local k3d cluster. I will also be in touch with my mentor , regarding the execution cycle and scope for improvement of the project.