Ingress level 7
Originally posted on Twitter.
Ding!
Originally posted on Twitter.
Ding!
Ocassionally some of the MediaWiki wikis I help maintain would go down, usually due to heavy traffic or a DoS of some kind. Sometimes Apache would be overloaded, or even MySQL being hammered (I'm looking at you DPL).
When this was happening around WikiConference USA time to that wiki, I wrote a quick Python script that would text me whenever it went down.
I've now generalized that script to be more easily configurable, and support an arbitrary number of wikis, named mwmon, which now features a basic web frontend.
For each wiki, it checks that the home page, Special:BlankPage, and the API are responding. Ideally the home page check will test the cache, BlankPage will hit MediaWiki directly, and the API is used to get the version that is installed.
Notifications are delivered over email, which I have configured to use AT&T's email to text gateway (@txt.att.net), so it'll go to my phone.
Originally posted on Twitter.
Just finished upgrading the MusicBrainz wiki to 1.23! https://wiki.musicbrainz.org/Special:Version
This is not my typical music post. Yesterday I had the pleasure of visiting the Internet Archive (more on that in a future post), and they mentioned a collection called "Attention K-Mart Shoppers", which is just tapes they played over and over at K-Mart. And for some reason, people enjoy listening to it!
I spent my morning today listening to it. It was really soothing and relaxing. The ads for random TV shows and store announcements were amusing, but didn't really interrupt what I was doing.
Definitely worth listening to.
Originally posted on Twitter.
At Internet Archive!
As part of using only free software, I also started thinking about the various non-free services I am dependent upon. One of those I had already started working on replacing was Github. Github is currently the canonical source location for a lot of my various projects, including some that aren't even on my laptops.
So, alternatives. First I considered a hosted service that runs free software, but those don't really exist any more. Gitorious has shut down, and it turns out that GitLab has gone open core.
Alright then, self-hosted git it is. I tried out and evaluated two projects: cgit and gogs.
cgit is a web viewer for git repositories written in C. I like the UI, having used it while browsing Fedora and Linux kernel repositories. The basic set up of it was pretty simple, I downloaded and unzipped it, set up some Apache CGI rules, and bam, it was running. I imported 2 git repositories, and they showed up right away. I started trying to enable some other features like syntax highlighting, and that's where it stopped being easy to work with. I tried both Pygments and a Perl highlighter, neither worked. Around this point I got bored and gave up.
gogs is a full blown clone of Github's features written in Go. The UI is extremely similar to Github, so it was very easy to figure out. Set up was a little tricky, I had to create a "git" user for it to run as, and then fiddle with setting up an Apache proxy rule so /git
proxies to localhost:3000 (I originally started out in a sub-path instead of a full sub-domain). After that, I was able to import a few Github repos directly, and clone them. Yay! It also has a mirror feature that can synchronize with an external repository every hour. I found a gogs-migrate tool that claimed to set up mirrors of all your Github repos in a gogs installation, but I couldn't get it to work. I ended up writing my own Python version called gogs-mirror. And for bonus points, I submitted an upstream pull request to improve an interface message.
Currently I have gogs running at git.legoktm.com. All of my non-forked Github repos are mirrored there, and it also is the canonical source of gogs-mirror. The next step will be to switch the mirroring, so that the canonical source lives on git.legoktm.com, and Github is a mirror. I'll also want to update links to those repositories on places like PyPI, various wikis, etc. More to come!