This repository has been archived by the owner on Oct 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
Deployment
Aaron Gunderson edited this page Mar 23, 2018
·
7 revisions
Observatory is deployed on Digital Ocean. We currently have two servers running, a jumpbox and the web server handling requests. All access and controls should be done from the jumpbox. The jumpbox has privileges to talk to the server and is configured to manage deployments. You can ask someone with existing SSH access to get your public key on the Jumpbox. People with access:
- Aaron
- Kiana
- Wes
- Alexander
Updating the site takes two steps:
- Pull the latest code with
git pull
(or check out a commit or branch of your choice) - Run
ansible-playbook ./Observatory3/deploy/deploy.yml -vv
The same steps can be used to test your code on staging.rcos.io
- Launch a new Digital Ocean instance. This will be our jumpbox for Ansible
- Run the following command setting up a username and password and give them root privileges and make sure you can SSH in as this user by copying your public key into their SSH config. A good tutorial for this is here: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04 adduser deploy usermod -aG sudo deploy
- Install Ansible via apt sudo apt-add-repository ppa:ansible/ansible sudo apt-get update sudo apt-get install ansible
- Install the Ansible role for node via Ansible Galaxy sudo ansible-galaxy install geerlingguy.nodejs
- Checkout the Observatory directory
After setting following the generic configuration direction (Steps 1 & 2)
- On the jumpbox make sure
/etc/ansible/hosts
(?) has the a group with the new server IP address in ini format like:
[staging-rcos]
12.34.56.78
- Now you can run the initializing Ansible script which will install everything the webserver needs like mongo, node, nginx and more.
- For staging:
ansible-playbook ./Observatory3/deploy/initialize.yml --extra-vars="variable_host='staging-rcos' domain='DOMAIN.rcos.io'"
- For production:
ansible-playbook ./Observatory3deploy/initialize.yml -vvv -e "domain_name='rcos.io'"
- The web server should now be configured and you can follow the deploy directions, just make sure to keep the
variable_host='staging-rcos'
in the extra-vars or you will over write production.