diff --git a/README.md b/README.md index db55ee9e8..a09f0de02 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,7 @@ ### Requirements -- Vagrant 1.8.1+ -- VirtualBox 4.3+ -- Ansible 2.3+ +- Docker ### Quick setup @@ -34,24 +32,23 @@ CCAPI_EMAIL=test@test.com CCAPI_PASSWORD=testpw ``` -You will also need to add Esri credentials for geocoding, which can be found in the Temperate app in the [Azavea Esri account](https://developers.arcgis.com/applications/dab66240dd264cc6b44fba60609de51d) (use the 'ESRI Company Account' credentials in LastPass). +You will also need to add Esri credentials for geocoding, which can be found in the Temperate app in the [Azavea Esri account](https://developers.arcgis.com/applications/dab66240dd264cc6b44fba60609de51d) ('ESRI Company Account' credentials in LastPass are to get you in the ESRI portal). ``` ESRI_CLIENT_ID= ESRI_CLIENT_SECRET= ``` -#### Initial set-up of Vagrant environment +#### Initial set-up -After `docker-compose.env` has been configured, create and provision the Vagrant VM: +After `docker-compose.env` has been configured, you can create the docker images ```bash $ ./scripts/setup ``` -With the Vagrant VM provisioned, start the Docker containers: +With that you can start the server ```bash -$ vagrant ssh $ ./scripts/server ``` @@ -122,7 +119,6 @@ Temperate draws upon real-world adaptation plan data to help inform and connect #### Ingesting the data ```bash -$ vagrant ssh $ ./scripts/ingest_missy_dataset ``` @@ -144,22 +140,11 @@ It is easier to download the data using the above script. If you want to update - Save each sheet in CSV format - Update the CSVs on S3, located in the `s3://azavea-climate-sandbox` folder as `missy_cities.csv` and `missy_strategies_with_weather_events.csv`. -### Using Docker in the VM - -The other project scripts are meant to execute in the VM in the `/vagrant` directory. -To run the containers during development use the following commands: - -```bash -$ vagrant ssh -$ ./scripts/server -``` - ### Nginx vs Angular By default `./scripts/server` will host the user interface using the Angular server on port 4210. This provides features in development like live refresh on code change. If you want to use Nginx to host on post 8102, you can do so with the `--nginx` flag ```bash -$ vagrant ssh $ ./scripts/server --nginx ``` @@ -212,9 +197,7 @@ yarn start --port 4211 ### Docker -This project uses Docker containers inside the Vagrant box. -Below are a few Docker commands you can use to get oriented to what's happening in the VM. -You'll need to `vagrant ssh` into the VM to use them: +Below are a few Docker commands | Command | Description | | ------------------------------------ | ----------------------------------------------------- | diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 8abcb6d8b..000000000 --- a/Vagrantfile +++ /dev/null @@ -1,60 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant.require_version ">= 1.8" - -TEMPERATE_SHARED_FOLDER_TYPE = ENV.fetch("TEMPERATE_SHARED_FOLDER_TYPE", "nfs") -if TEMPERATE_SHARED_FOLDER_TYPE == "nfs" - if Vagrant::Util::Platform.linux? then - TEMPERATE_MOUNT_OPTIONS = ['rw', 'vers=3', 'tcp', 'nolock', 'actimeo=1'] - else - TEMPERATE_MOUNT_OPTIONS = ['vers=3', 'udp', 'actimeo=1'] - end -else - if ENV.has_key?("TEMPERATE_MOUNT_OPTIONS") - TEMPERATE_MOUNT_OPTIONS = ENV.fetch("TEMPERATE_MOUNT_OPTIONS").split - else - TEMPERATE_MOUNT_OPTIONS = ["rw"] - end -end - -Vagrant.configure(2) do |config| - config.vm.box = "ubuntu/trusty64" - - config.vm.synced_folder "~/.aws", "/home/vagrant/.aws" - - # Need to use NFS else Vagrant locks up on OSX - config.vm.synced_folder ".", "/vagrant", type: TEMPERATE_SHARED_FOLDER_TYPE, mount_options: TEMPERATE_MOUNT_OPTIONS - - config.vm.provider :virtualbox do |vb| - vb.memory = 3072 - vb.cpus = 2 - end - - # NFS - config.vm.network "private_network", ip: "192.168.10.100" - - # Gunicorn - config.vm.network :forwarded_port, guest: 8100, host: 8100 - - # Django debug server - config.vm.network :forwarded_port, guest: 8101, host: 8101 - - # Nginx - config.vm.network :forwarded_port, guest: 8102, host: 8102 - - # Angular - config.vm.network :forwarded_port, guest: 4210, host: 4210 - - # Change working directory to /vagrant upon session start. - config.vm.provision "shell", inline: <