Every day we click the leetle button. It is so easy, yet we forget sometimes.
This toy stands on the
neck shoulders of Shawn Miller's work, but makes it dumber and way more complex. Because if we make it too easy to cheat then it's, um, cheating.
This takes a dumbed down version of the nightmare script, wraps it up in a container, runs it every two hours* via cron, and clicks the button.
To make it more interesting, I've done the leg work to make this also run
nicely on an ARM platform- think BeagleBone Black (and probably RPi or similar).
And I'm building the images for you, because I care.
If you know what you're doing...
Credentials are handled via environment variables, MEHUSERNAME and MEHPASSWORD.
docker pull hanzov69/meh-botton:latest
docker pull hanzov69/meh-botton:arm32v7-latest
If you don't know what you're doing...in docker
Using the docker hub image
- Grab a copy of meh-botton-docker.sh curl -O https://github.com/hanzov69/meh-botton/blob/master/meh-botton-docker.sh
- Edit this file, change the values for MEHUSERNAME and MEHPASSWORD to your own.
- sh ./meh-botton-docker.sh
- To see what's happening, try docker exec -it meh-botton tail -f /var/log/cron.log
Building it your own dang self
git clone https://github.com/hanzov69/meh-botton.git
docker build -t meh-botton .
docker run -d -t -i -e\ MEHUSERNAME="your username"\ -e MEHPASSWORD="your password"\ -e TASK_SCHEDULE='0 */2 * * * '\ --name meh-botton\ meh-botton
If you know what you're doing...in kubernetes
curl -O https://github.com/hanzov69/meh-botton/blob/master/meh-botton-deployment.yamlMake sure to edit this file with your credentials. NOTE: This is not being handled with kubectl secrets. It probably should be, but you know what you're doing, right? 1a. ARM
curl -O https://github.com/hanzov69/meh-botton/blob/master/meh-botton-deployment-arm32v7.yaml
kubectl apply -f meh-botton-deployment.yaml2a.
kubectl apply -f meh-botton-deployment-arm32v7.yaml
About the schedule...
By default this will run every two hours, on the hour. Which means it may not run for a couple of hours when you first fire it up. That's cool. With this in mind, it should hit the site 12 times a day, which seems like more than enough.
I really don't recommend messing with this value, particularly to something more aggressive unless you know what you're doing and are willing to risk the wrath of mediocrebot.
Why, you may ask yourself, would I go to the effort of making this stupid gadget work on an ARM platform, specifically that one? The answer is easy- I have a k8s cluster running on a buncha BeagleBone Blacks. That's why.