# Git
* Install git from apt-get `sudo apt-get install git`
* Clone the repository for OrasiLabs
* In OrasiLabs root directory copy file .env.example and name it .env

# Install Ruby
#### RVM
* Install via instructions found here https://rvm.io/rvm/install
* OrasiLabs uses Ruby 2.4.2 `rvm install 2.4.2`
* Tell RVM to use the new rubies `rvm use 2.4.2`
* Create Gemset called doctrina-labs `rvm gemset create doctrina-labs`

#### Bundler
* Ruby might or might not come with bundler. To install `gem install bundler`
* From the OrasiLabs root directory install project dependencies `bundle install`
* Likely to see many errors from missing C libraries
  * `sudo apt-get install libpq-dev`
  * `sudo apt-get install cmake`
  * After these are installed run `bundle install` again and it should finish cleanly

# PostgreSQL
* Use PostgreSQL 9.6 `sudo apt-get install postgresql-9.6`
* Configure a super user with password and insert credentials in to .env file in OrasiLabs root folder
  * Access PSQL console `sudo -u postgres psql` as postgres user
  * Inside PSQL `CREATE USER orasilabs WITH SUPERUSER;`
  * Add password `ALTER USER orasilabs WITH PASSWORD 'Orasi01!';`
* Use rails to create databases for you. In project root directory run `rails db:create`

# Terraform
* OrasiLabs requires a specific version of terraform. Find it here https://releases.hashicorp.com/terraform/0.9.11/
* Download and unzip Terraform executable. Add the path to the file in the .env file

# AnyCableGO
* Install 5.* version of AnyCable Go from here https://github.com/anycable/anycable-go/releases
* Add path to executable to .env file

# Redis
* Install redis through apt-get `sudo apt-get install redis-server`

# JavaScript
* Install NodeJS `sudo apt-get install nodejs`
* OrasiLabs uses yarn package manager `sudo npm install -g yarn`
* From project root directory install JS dependencies `yarn install`

#OrasiLabs
* This can get tricky.  In theory you should run `rails db:setup` from project home directory
  * This can be messy because if the seed file is not kept up to date with app changes there will always be problems
* OrasiLabs uses foreman to manage all of it's processes. You can see all the processes foreman will start in the Procfile.dev file in the project root directory
* Run OrasiLabs withs `foreman start -f Procfile.dev`
