PursuanceProject / pursuance

Pursuance: end-to-end encrypted task management optimized for large numbers of volunteers. We are building a vast and formidable ecosystem of opposition to institutionalized injustice.
https://pursuanceproject.org/
Other
134 stars 15 forks source link

Make it as simple as humanly possible for non-technical people to launch a Pursuance server #222

Open elimisteve opened 6 years ago

elimisteve commented 6 years ago

Approaches

  1. Do what Perkeep does here, but for clouds that aren't Google-controlled: https://perkeep.org/launch/

  2. Convince DigitalOcean to create a One-click Install server image for Pursuance

  3. Let users paste in a DO API key, then use it to spin up an instance for people

  4. Work on Cloudron?

    • I hear their apps run in Docker containers, so maybe this could work?

Other Notes

  1. DNS is generally a problem, particularly enabling users to easily host a Pursuance instance using their own domain

    • Maybe users could paste in API keys for their registrar, which we use once for setup then throw away?
    • One solution is: give each user their own subdomain (which they could name?)
      • E.g., noisebridge.pursuancecommunity.org
  2. Especially in light of the DNS issue just mentioned, if a semi-technical person needs to be involved anyway, perhaps the planned easy-to-run container-based deployment flow is good enough (see #86)?

    • Seems like we should be able to do better...
elimisteve commented 6 years ago

Packaging a Cloudron app indeed looks easy, though they may assume a single-process backend: https://cloudron.io/developer/packaging/

If that becomes an issue, we could create one Dockerfile that spins up the Go binary, PostgREST, and maybe Postgres using a technique such as https://docs.docker.com/config/containers/multi-service_container/ .

elimisteve commented 6 years ago

Cloudron has addons, including Postgres 9.5.5: https://cloudron.io/developer/addons/#postgresql

We could ship a very small Pursuance Cloudron app that includes a PostgREST binary that somehow optionally gets its Postgres connection info from the Cloudron-provided environment variables (e.g., POSTGRESQL_URL), a Go binary (called pursuance), and a folder of static assets (namely the JS and CSS bundles, and a few images).

EDIT: This actually fits really well with what we may end up doing with our default, perhaps containerized server installation, where Postgres sits outside of a container but the Go and PostgREST binaries don't.

elimisteve commented 6 years ago

Scaleway lets users paste in cloudinit JSON. Maybe we can create a cloudinit config that spins up a Pursuance instance???

cloudinit lets one create arbitrary files (see https://cloudinit.readthedocs.io/en/latest/topics/examples.html#writing-out-arbitrary-files ) which we can perhaps have run on boot?

EDIT: Can also run chef or puppet ~recipes: https://cloudinit.readthedocs.io/en/latest/topics/examples.html#install-and-run-chef-recipes

elimisteve commented 6 years ago

Finally found a great solution! If we pay Scaleway ~$3/month then we can join their "developer program", which lets us push custom machine images to their ImageHub that Scaleway customers can then launch using

https://www.scaleway.com/developer/

https://www.scaleway.com/imagehub/

https://github.com/scaleway/docker-machine-driver-scaleway

https://github.com/machine-drivers/?utf8=%E2%9C%93&q=docker-machine-driver-&type=&language=