freedomofpress / securethenews

An automated scanner and web dashboard for tracking TLS deployment across news organizations
https://securethe.news
GNU Affero General Public License v3.0
102 stars 25 forks source link

Replace Vagrant with Docker/Docker Compose #83

Closed garrettr closed 7 years ago

garrettr commented 7 years ago

Secure the News currently uses a Vagrant-based development environment. This is less than ideal for a number of reasons:

  1. Vagrant continues to be a hassle to set up and use. This is especially true for FPF staff, many of whom use hardened Linux kernels (significant work is required to get grsecurity and any of the virtualized providers to work together) or Qubes (where only the Docker provider works anyway, because you cannot nest Vagrant's virtual machines in a Qubes AppVM).
  2. vagrant destroy -f && vagrant up (to test configuration changes from scratch) is slow, clocking in at 9m15s on my workstation. A lot of this slow-down is due to re-running slow commands (like apt-get install) in the Ansible provisioner. It's my understanding that this kind of repeated task gets optimized in Docker thanks to their layered filesystem approach.

In the long term, FPF is interested in experimenting with moving to container-based infrastructure for several of our current projects, so Secure the News seems like a good testbed for exploring our options and learning the ropes.

conorsch commented 7 years ago

Definitely in favor of ditching the VM/vagrant dev environment, but would prefer a Molecule-based testing strategy for managing the containers, since it integrates cleanly with Ansible and would provide more similarity between dev and prod.

conorsch commented 7 years ago

123 doesn't quite resolve this issue, so I'll submit a separate PR with a dev scenario.