The need for command line tool
Initially we were using upstart to manage Countly daemon process, and since Ubuntu was our main platform, it was quite enough.
But since Countly is an open system, other users wanted to port it to other platforms too, including CentOS, Fedora and even OSX. But that would mean to change lots of internals and modify the core, so it either works on one system or the other.
So we kept such modifications as tutorials to be able to run Countly on different operating systems, but when Countly was updated it meant to apply those changes once again.
And then one day, Ubuntu released new version, where it used systemd instead of upstarts, completely putting us into dead end.
We faced a decision either to update to systemd and drop support for upstart, or try to create something more robust, that would cover both problems.
Of course we went the latter way.
So we created a command line tool with stub methods to control Countly process and fill them in during installation based on init system detection script.
And now everyone can add platforms they want, by adding Countly script, that will overwrite stubs and manage Countly process. All that needs to be done is to create a folder with your platform/init system in bin/commands and put all needed files there and symlink countly.sh script overriding countly functions into enabled folder (or update init system detection script, to detect your system too).
But eventually it become more than a way to deal with different systems. Countly developers saw the potential of such tool, allowing it to do more.
Now Countly support team, while providing support to client, can provide precise commands to execute, rather than specifying vague point and click instructions.
Any Countly developer can connect to server and easily identify Countly version and where Countly is installed, as well as change configuration and enable/disable plugins, without requiring the access to dashboard.
Countly server admins can create automatic backups using Countly command line and upgrade components periodically, as translations, geolocation database, device mode list, etc.
If you are interested on more what you can achieve using Countly command line tool, visit our documentation page.
If you have any great ideas what we could also add to our command line tool, let us know. Drop us a line at firstname.lastname@example.org :)
Arturs Sosins is one of the lead engineers at Countly, who’s main goal is making Countly as robust and extendable as possible. In the spare time, when not spending time with his big family, Arturs enjoys game development, game design and music related projects.