-
Notifications
You must be signed in to change notification settings - Fork 5
Home
fab-canvas is a python script that helps with (mostly) hands-free installation of canvas in the cloud.
- Canvas is open source LMS from Instructure
- Fabric is awesome and probably no one needs an intro
Typing this in your "correctly set up" virtualenv will Production Start canvas in your cloud server
$ workon workhere
...
...needs some hands on DNS configuration work
...
$ fab test -----pings your server IP address to make sure your DNS is set correctly
$ fab prep -----prepares your cloud server for canvas installation
$ fab canvas -----installs canvas in production https://github.com/instructure/canvas-lms/wiki/Production-Start
##REQUIRED hands on work
###REQUIRED Create keys if you dont have it already The keys will save in ~/.ssh
ssh-keygen -t dsa -C "lvnilesh@yahoo.com"
###REQUIRED Setup your domain DNS A record pointing to the cloud IP Address
Setup a cloud server in rackspace with Ubuntu Lucid Lynx 10.04. Note down the IP address and root password
canvas.nescorp.us. IN A 50.57.36.98
DNS name canvas.nescorp.us points to IP address received from cloud provider. Also, the reverse DNS points to back to canvas.nescorp.us.
###REQUIRED etup your files_domain DNS A record pointing to the cloud IP Address
canvasfiles.nescorp.us. IN A 50.57.36.98
###REQUIRED edit domains.yml to match your DNS A records for your domain and your files_domain
production:
domain: "canvas.nescorp.us"
files_domain: "canvasfiles.nescorp.us"
###REQUIRED edit canvas.sites apache virtual host file to match your domain and your files_domain and server admin
<VirtualHost *:80>
ServerName canvas.nescorp.us
ServerAlias canvas.nescorp.us
ServerAdmin lvnilesh@yahoo.com
...
...
<VirtualHost *:443>
ServerName canvas.nescorp.us
ServerAlias canvas.nescorp.us
ServerAdmin lvnilesh@yahoo.com
###REQUIRED edit database.yml to insert your db passwords for canvas db user
production:
adapter: mysql
encoding: utf8
database: canvas_production
host: localhost
username: canvas
password: THIS-IS-A-VERY-SECURE-PASSWORD
timeout: 5000
queue:
adapter: mysql
encoding: utf8
database: canvas_queue_production
host: localhost
username: canvas
password: THIS-IS-A-VERY-SECURE-PASSWORD
timeout: 5000
###REQUIRED edit mysql-script.sh to insert your db passwords for canvas db user and root db user
#!/bin/sh
# This is a comment
mysql -t --user=root --password=THIS-IS-A-VERY-SECURE-PASSWORD <<STOP
-- This is a comment inside an sql-command-stream.
create database canvas_production;
create database canvas_queue_production;
create user 'canvas'@'localhost' identified by 'THIS-IS-A-VERY-SECURE-PASSWORD';
grant all privileges on canvas_production.* to 'canvas'@'localhost' with grant option;
grant all privileges on canvas_queue_production.* to 'canvas'@'localhost' with grant option;
\q
STOP
test $? = 0 && echo "Your mysql batch job completed gracefully"
###REQUIRED add fabric to the virtual environment
workon workhere
pip install fabric
###OPTIONAL add openstack.compute to the virtual environment
openstack.compute library helps manage servers in the cloud using python
workon workhere
cd ~/domains/workhere
git clone https://github.com/jacobian/openstack.compute.git
cd openstack.compute
python setup.py install
cd ~/domains/workhere