diff --git a/README.md b/README.md index 3447461b..d3e9a2f8 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ There are three options for local setup: - [Docker](/docs/setup/docker_setup.md) (recommended) - Native (coming soon) -- AWS Virtual Machine (coming soon) +- [AWS Virtual Machine](/docs/setup/aws_vm_setup.md) ## Finding An Issue * Now you have everything setup, you will need to find issues to work on. **Operation Code** uses Github's built in issue tracker. A listing of all our issues can be found [here](https://github.com/OperationCode/operationcode_backend/issues). diff --git a/docs/setup/aws_vm_setup.md b/docs/setup/aws_vm_setup.md new file mode 100644 index 00000000..06960bd3 --- /dev/null +++ b/docs/setup/aws_vm_setup.md @@ -0,0 +1,66 @@ +# Virtual Machine + +A virtual machine is defined as a computer file, typically called an image, that behaves like an actual computer. + +## Create AWS VM +(Using Ubuntu 16.04 on AWS) +Make sure to open these ports in your security group +- Port 22 +- Port 3000 +When the VM spins up, SSH into it. + +## +(from your VM) +Fork https://github.com/operationcode/operationcode_backend + +```bash +git clone https://github.com/[YOUR-GITHUB-NAME]/operationcode_backend.git + +cd operationcode_backend + +git remote add upstream https://github.com/OperationCode/operationcode_backend.git + +sudo apt-get install make +``` + +## Install Docker +```bash +sudo apt-get update + +sudo apt-get install \ + apt-transport-https \ + ca-certificates \ + curl \ + software-properties-common + +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + +sudo add-apt-repository \ + "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ + $(lsb_release -cs) \ + stable" + +sudo apt-get update + +sudo apt-get install docker-ce +``` + +## Install Docker Compose + +```bash +sudo curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose +sudo chmod +x /usr/local/bin/docker-compose +``` + +## Setting up the Dev Environment +```bash +sudo make setup +``` + +(if you want to try running the tests, run this command) + +```bash +sudo make test +``` + +Now navigate to http://:3000 and you should see the "You're running on Rails" page!