Skip to content

harvard-dce/canvas_vagrant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Canvas LMS Vagrant Box

Installs a recent bootstrapped canvas via vagrant and virtualbox, optimized for LTI tool development.

Requirements

Quickstart

$ git clone http://github.com/harvard-dce/canvas_vagrant
$ cd canvas_vagrant
$ vagrant up # Time passes. . .
$ vagrant ssh
vagrant@vagrant:~$ cd canvas-lms
vagrant@vagrant:~/canvas-lms$ foreman start -f Procfile.dev 

You'll be able to access a recent canvas install at http://192.168.50.4:3000/ after the web server is started completely in about 30 seconds.

When you're done, you can exit the server with <ctrl-c>.

vagrant@vagrant:~/canvas-lms$ exit
$ vagrant halt # Free RAM and CPU by shutting down the box, or remove entirely via 'vagrant destroy'

If you've used this project before and want to update your box, see Updating below.

Vagrant box overview

The vagrant box includes:

  • A 2gb RAM allocation (canvas requires this much RAM to run acceptably),
  • A recent-ish canvas as of the time the base box was created, from the master branch,
  • A migrated and seeded database,
  • Rendered assets,
  • Canvas is exported on http://192.168.50.4:3000/ (after you've started it),
  • A Procfile.dev to make starting canvas easier.

You should see specific instructions in the vagrant SSH session telling you how to spin up the canvas LMS and how to access it in your virtualbox host.

postgres is configured to use ident auth. You can access the development databases within the vagrant box thusly:

vagrant@vagrant:~$ psql canvas_development

Redis is installed and configured, but ruby- and rails- level caching is not enabled by default. See this part of the quickstart if you'd like to introduce class, template, and rails caching. Keep in mind that you'll need to restart after every code change if you go this route.

We use foreman to spin up canvas with all its attached services. This is documented in the motd you get when vagrant sshing.

rbenv is used to manage rubies, with ruby-build handling installations.

Updating

If you've used this project before and want to update to the latest canvas box, you should:

  • Update the git repository: cd canvas_vagrant && git pull
  • Remove your previous box (after you've backed up or copied whatever is important out of it, which is hopefully nothing): vagrant destroy
  • Update to the latest box: vagrant box update
  • Launch!: vagrant up
  • Remove the old box version to clear up disk space: vagrant box remove harvard-dce/ubuntu-14-04-canvas-lms --box-version=<the old version>

See also

The future

  • Use passenger-standalone for the web server
  • Create a self-signed SSL cert and host canvas on HTTPS and HTTP
  • Better seed data

Contributors

  • Dan Collis-Puro - djcp

Copyright

Copyright (c) President and Fellows of Harvard College, 2014

About

A bootstrapped canvas-lms box via vagrant and atlas

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published