Skip to content

Deploying Venue

Kiana McNellis edited this page Dec 17, 2016 · 13 revisions

Step-by-step Deployment

Dependency Installation

  • Install bash
  • Install git, on ubuntu this can be done with sudo apt-get install git
  • [if using docker] Install docker, see installing docker on ubuntu

Clone the venue repository

git clone -b rpi https://github.com/rcos/venue.git

We recommend adding /path/to/venue/scripts to your $PATH. We'll assume that this has been done for the remainder of the guide. If you'd prefer not to add the scripts directory to your path, execute the scripts using /path/to/venue/scripts/<script name>.

Setup certs directory

Generate SSL certs. This can be done easily with let's encrypt.

Create a directory on your system for certifications and place your cert within it as cert.crt. Now place your private key within it as cert.key.

Add an environment variable to your startup shell (typically .bashrc) or manually export CERTS_DIRECTORY with the path to your newly created certs directory.

e.g.

export CERTS_DIRECTORY=/home/ubuntu/certs

Set appropriate environment variables

We recommend setting these environment variables in your .bashrc, but they can be exported prior to a venuestart or venueupdate command and work perfectly fine.

Environment Variable Example Value
DOMAIN https://venue.cs.rpi.edu
DOMAIN_NAME venue.cs.rpi.edu
VENUE_SECRET f10e2821bbbea527ea02200352313bc059445190
CAS_SERVER_URL https://cas-auth.rpi.edu/cas
CAS_VERSION CAS3.0
SCHOOL_EMAIL_SUFFIX @rpi.edu
EMAIL_SERVICE MOCK, SMTP, SENDGRID
SENDGRID_KEY SG.f10e2821bbbea527ea02200352313bc059445190
SMTP_LOGIN venue
SERVER_EMAIL venue@rpi.edu
SMTP_PASSWORD venuesmtppassword
INTERNAL_MONGO no
PRODUCTION_RUN yes
LOCAL_LOGIN no
DEBUG_LOGIN no
CERTS_DIRECTORY /home/ubuntu/certs
DATA_DIRECTORY /home/ubuntu/data
NODE_ENV production

[If not using docker] Setup Server

Follow Deployment of Venue Platform without Docker and ignore the remaining instructions.

[If using docker] Pull the latest docker image for rcos/venue

docker pull rcos/venue:rpi

Note: You can use venuepackage to create your own rcos/venue image.

Starting the database

The database is a separate container from venue (a microservice architecture). You can run your own mongodb database or simply run dbstart to use a well-known docker container.

Starting the Venue Server

Execute venuestart to start the container. You can view the running container using docker ps.

Execute venueserve to start the server.

Updating Venue using Docker

Note: If you use internal mongo this will wipe your data! Internal mongo should not be used in production.

cd /path/to/venue/scripts
./venueupdate

Creating admin user using Docker

dbadmin <email to adminify>