Closed tdmalone closed 4 years ago
I have a couple of questions @sargunv:
It can run anywhere that can run a Docker container in privileged mode. Ideally the platform would be able to schedule the run somehow, or otherwise run based on certain conditions such as a webhook.
The reason I ask about CI is because the webhook is basically just a push to GitHub, right? Which would mean it's a perfect candidate for a CI job.
But a privileged container... hmm. Travis won't run privileged Docker containers; I'm not sure if Circle does.
It needs to be privileged because it launches PokeAPI and its dependencies in an inner container. It should be possible to set up the whole system without inner containers, but I'd prefer not to work on doing that. It would involve setting up an environment with two different Python projects: one python2, one python3, and postgres. I'm fine just running it on my own server or on a $5/month DigitalOcean droplet. If DigitalOcean will still sponsor us, that's even better.
It also needs write access to the repo, which I currently accomplish by mounting a suitable .ssh
folder as a volume at /root/.ssh
in the container at runtime. GitHub access tokens may work too.
CircleCI can run privileged containers if the CI job runs on a VM instead of a container: https://circleci.com/docs/2.0/executor-types/#overview.
If it's possible, my vote is for a CI system as well, because:
1) Other contributors can make changes to it 2) Increases the bus factor if say you go on vacation
@Naramsim As for bus factor, I've included a readme in the updater folder showing exactly how to run it. It's really nothing more than ensuring the bot have the right access to the repo and then running a privileged container.
I'll check out CircleCI. Looks like they offer 1500 build minutes for free, which is enough for a daily build if it's not drastically slower than on my machine. Clone does take a while since it's pulling every single object once.
The bot now runs on CircleCI.
Although we should move it from here to a separate repo or to pokeapi, imho.
From PokeAPI/pokeapi#353:
@sargunv: