The currently supported operating system (OS) is: Ubuntu 16.04 LTS (Xenial)
It goes without saying that you should use a virtualenv, but it's outside the scope of this documentation to explain that. So use a virtualenv for your own protection.
To install the necessary dependencies run:
pip install -r requirements.txt
After this, read the README.md
document inside the environments directory you are working with. For example, if you are setting up the site within a VM, look at the environments/vm/README.md
file.
It is recommended that you be able to run this setup and deploy on your local system using a VM or the host system itself (see the supported architectures above) before trying to deploy to a shared environment (and/or production environment). After this, you and everyone else around you will feel more comfortable giving you keys to deploy to a shared environment.
If you need assistance setting up a local VM for this project, see the Creating a VM section below.
The generalized usage looks something like this:
export ENV=vm
ansible-playbook -i environments/$ENV/inventory main.yml
NOTE: If you need to use AWS secrets in a deployment, you should set an appropriate AWS_PROFILE
environment variable, or the typical set of AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
.
Please see the environment's README for specific details. For deploying to a local VM, there are instructions on using Vagrant available in the VM environment README.md
The rex redirect process is described in our wiki here:
The testing of REX redirects occurs in cnx-automation. See that project README.md for more information.
-
Search through the issues on github. If you find the issue, check for a resolution. If there is no resolution, let your voice be heard and wait for a reply.
-
Please file a issue on github for this project.
-
Please treat the problem as a challenge and try to fix it! =)
If you have questions, put those in a github issue as well.
To view the available environments, run ls environments/
. Within the environment directory, look for documentation in a README.md
file or at the head of the inventory
file.
Q: Why doesn't this install an OpenStax Accounts instance?
A: There is already a working ansible playbook for installing accounts within tutor-deployment. There is no reason to replicate that effort here.
Q: Why is this not a part of tutor-deployment?
A: Connexions is a distinctly separate entity that is availble for use outside the OpenStax ecosystem, therefore it should be independently buildable. And It's hard to see the forest through the trees, meaning, there is a lot of stuff going on in tutor-deployment.
You will need an instance of OpenStax Accounts either installed locally or out in the interwebs. If you are connecting to one in the interweb, you will need to contact a sys admin (or devops) person to register for an api key/secret pair.
Continue reading if you need help setting up Accounts locally.
If you are running Accounts locally, you can setup the key/secret pair yourself.
Create a virtual machine (VM). As of writing this, it will only install on Ubuntu 14.02.
Find the IP address of the VM and then make the following registration in your /etc/hosts
file:
192.168.x.x accounts.local.openstax.org
Replace 192.168.x.x
with the IP address in your VM.
Run the custom play!
ansible-playbook -i environments/local-accounts-vm/inventory provision_accounts.yml
To run one of the accounts rake commands use:
RAILS_ENV=production RBENV_ROOT=/home/ostaccounts/.rbenv/ rbenv exec bundle exec rake
Make sure to run this command as 'ostaccounts'.