Project to make contributions easier

Hi!

I’m currently working on a little project to make it easier to contribute to Network Weathermap. This post will be my attempt to sum up what I’m doing, why I’m doing it and what my plans are. So:

What do I want to achieve?
My main goal is to make it easier to contribute to Network Weathermap.

Why?
I wanted to contribute myself, but wound up spending all my time and energy on understanding how Network Weathermap was built, how to get a working build environment, how to do testing and so on. While this is good to get to know the project I ended up pestering Howie with a thousand questions and spending all my time and energy on this instead of actually contributing.

How do I intend to make it easier to contribute?
Howie had already started looking at using Vagrant to create a dev and testing environment using virtual machines that was easy to replicate, but it wasn’t finished. My intention is to finish this work and improve the dev documentation. This will allow anyone with zero knowledge of the inner workings on Network Weathermap to have a fully operational battle station development platform up and running within the hour. I also want to avoid cluttering the contributors host operating system with a zillion software packages (but there will be a few for git and Vagrant).

Things I’m working on currently:

  • A Vagrant purely for development. This would be where a contributor sets up his/her own IDE so it wouldn’t be destroyed every time we want to do a new test (which may require rebuilding the test Vagrants). Later on I’m thinking of including an IDE. Right now though, it’s just a Ubuntu 16.04 installation without any GUI. It does however have all packages required to build and test. Packages for testing may be moved to the test Vagrants later if we don’t need them on the dev machine.

  • One Vagrant for each OS and php version combination that we want to test on. Currently aiming for all combinations of php 5.6 and php 7 on Ubuntu 16.04 and Centos 6 or 7.

  • Documentation! This may be the most important point and also the most boring one to do but it needs to be done. And it needs to be done well. Current progress on this one is about 0% :sweat_smile:

  • Set up some nice scripts to automate as much as possible of building and testing, setting up and destroying Vagrants, producing reports and so on and so forth. All the stuff that takes time and energy from development basically.

What I’m not intending to do right now (but maybe later)

  • Add support for multiple Vagrant providers. Right now I’m using virtualbox as the provider since it seems best supported, most popular and works on many host operating systems, but personally I’d like a KVM provider better.

  • Clean up the project folder structure. After discussing this with Howie he expressed that this should wait until we’ve passed the Cacti 1.x hurdle since it will mean a lot of changes to the whole Network Weathermap project. This seems wise to me.

For anyone interested in following what I’m up to, I’ve forked Howies git repository and started a separate branch.
https://github.com/malgoe/network-weathermap/tree/dev-tools
I’ve also logged some of my progress on the wiki: https://github.com/malgoe/network-weathermap/wiki/Log

If it results in a documented process that someone else can use to contribute, it’s definitely not pestering. I’m happy to fill in the gaps.

Also, I did start writing this kind of stuff a couple of times before, during the stalled rewrite of a couple of years ago. So there is some documentation in the master branch, and also the github wiki, but it’s probably not very accurate for the database-refactor branch that we’re currently working with.

1 Like

Update:
Started experimenting today with actually running a desktop on a vagrant. Might be useful if we want to actually run an IDE on it :smiley:
I’m going for the Cinnamon window manager as I hate Ubuntus Unity stuff. Also found out that VS Code and Virtualbox are not friends, but that can be fixed… :stuck_out_tongue:

@howie for Cacti 0.8.x I added this line in mysql:
SET GLOBAL sql_mode = ‘ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION’;

It’s needed for some backwards compability because that Cacti version was made for an older mysql as far as I understand. Do you know if it is required for Cacti 1.x as well? I haven’t had the time to check.

No idea. It’s not in the (many) mySQL-related recommendations that appear during the installation screens though…