Commit Graph

17 Commits

Author SHA1 Message Date
Brad Horrocks 624be19596 Add dynamic_settings.yml for docker config
Change-Id: I0c811ba1afcf1509679e5c6ec98ca39aef627dd9
Reviewed-on: https://gerrit.instructure.com/117286
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Tested-by: Jenkins
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2017-06-29 01:38:13 +00:00
Tyler Pickett 823cda8924 Move MathMan to being configured by Consul
Fixes: CNVS-35833

There is a lot more than just moving to Consul going on here. The whole
PrefixProxy business wouldn't be required for this change, but it will
be really useful as we move to adding cluster awareness.

Test Plan:
- Have MathMan running
- Update config/consul.yml to enable use_for_svg and
  use_for_mml under the math-man init values key
- Start Canvas
- Build an equation with the rich content editor
- The equation should be rendered as usual.

Change-Id: I650527ebaecb6224c6ee6ba26346d27dee33b9d7
Reviewed-on: https://gerrit.instructure.com/111543
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
2017-06-26 15:54:38 +00:00
gbeckmann 3cbd14fda4 Add chrome to docker-compose config as default
Change-Id: Ie12f15d3093cdbb6c1f60de7eb62d2987250006e
Reviewed-on: https://gerrit.instructure.com/114481
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
2017-06-13 17:03:00 +00:00
Jon Jensen ef480cd1c3 docker enhancements/fixes, fixes SD-2499, refs gh-1043
bring the development docker image down from 3.6GB -> 2.4GB

add a production docker image that weighs in at 1.2GB, which should speed
up end-to-end tests

template-ize web Dockerfiles so that common stuff stays consistent, volume
dirs are set up properly, etc.

test plan:
1. docker-based builds should pass
2. docker image should be usable (docker-compose up, etc)

Change-Id: I41ebb155090f66e346bdc285ca5c613ee5793127
Reviewed-on: https://gerrit.instructure.com/112859
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-05-26 20:57:24 +00:00
Tyler Pickett 29e1ddec0f Optionally configure live events via Consul
Fixes: CNVS-35832
Refs: CNVS-32864

This was super simple because of the change to using a hash for
configuring LiveEvents instead of a PluginSetting object

Change-Id: Ia34cb905e22a21c822f48b581e3e3cd4f7a738d3
Reviewed-on: https://gerrit.instructure.com/110193
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
2017-05-10 16:07:41 +00:00
Andrew Huff e1fc6b60c4 update example config
Change-Id: If40276ec55013de411010a04058f1beaf9635381
Reviewed-on: https://gerrit.instructure.com/102876
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Andrew Huff <ahuff@instructure.com>
QA-Review: Andrew Huff <ahuff@instructure.com>
2017-02-22 20:21:12 +00:00
Andrew Butterfield 9cc05207ad Add Live Events Publish Service
fixes PLAT-2080 PLAT-2059 PLAT-2061

Test plan:
* Set up canvas
  * To be able to talk to http://les.docker
  * To use an encryption key and signing secret that are 32 bytes long
* Set up live events subscription service
  * To use the same signing secret you used in canvas and a base64
    encoded version of the encryption key you used in canvas
  * Run docker-compose run --rm app npm run seed:dynamo and give it the
    developer key you want to use for testing
* With the subscription service running open up a rails console in Canvas
  and run the following:
    ToolProxy = Struct.new("ToolProxy", :guid, :product_family)
    Family = Struct.new("Family", :developer_key)
    f = Family.new(<a developer key>)
    tp = ToolProxy.new('hahahah', f)
    res = Services::LiveEventsSubscriptionService.tool_proxy_subscriptions(tp)
* Ensure that you get a response back with the subscriptions for your
  developer key
* Go through this process first with dynamic settings enabled and then
  with consul enabled

Change-Id: I454d5a82d98ce1edb2bd9afd23cb974dc062e04f
Reviewed-on: https://gerrit.instructure.com/100072
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
2017-02-02 19:09:58 +00:00
Andrew Butterfield 3156da1fee Add config for subscription service
This only applies for local development
An OPS ticket will need to be made for configuring production/beta

fixes PLAT-2079 PLAT-2064

Test plan:
* Run the following command
  cp config/dynamic_settings.yml.example config/dynamic_settings.yml
* Open up a rails console and run
  Canvas::DynamicSettings.from_cache('live-events-subscription-service', expires_in: 5.minutes)
* Ensure that a settings hash is returned with the url for a local,
  dockerized subscription service
* Remove the config/dynamic_settings.yml
* Add config/consul.yml either by copying config/consul.yml.example or
  docker-compose/config/consul.yml.example
* Configure docker compose to use consul
* Open up a rails console and run
  Canvas::DynamicSettings.from_cache('live-events-subscription-service', expires_in: 5.minutes)
* Ensure that a settings hash is returned with the url for a local,
  dockerized subscription service

Change-Id: I495cc73d914cbefd409fed5ec7ad6cebd0f8c200
Reviewed-on: https://gerrit.instructure.com/99797
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
2017-01-19 19:16:41 +00:00
Brad Horrocks 3c809153d1 docker-compose.yml v2
If you have a docker-compose.override file you'll want to
move it somewhere else.

mv docker-compose.override.yml docker-compose.`whoami`.yml

Once you've updated your override file to the version 2 syntax, you
should add it to the COMPOSE_FILE environment variable. Probably in a
.env file in the project root.

Test plan:

You'll need to remove your existing canvas containers and volumes to 
fully test this.

to do so run this **BEFORE** you checkout this patchset

```
docker-compose down
docker-compose ps -q | docker rm
docker volume ls -q | grep canvaslms | xargs docker volume rm 
```


then you should be able to get up and running using the following

```
cp docker-compose/config/* config/
dc build
dcr web bundle exec rake db:create db:initial_setup
dc up
```

You should be able to access canvas like normal

Change-Id: Ia7ff76cfdd4f46278fc1cb2a03969fdadaa4a434
Reviewed-on: https://gerrit.instructure.com/91008
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2016-11-15 17:06:37 +00:00
brian kirkby 8c2715424e better defaults for consul in the docker container
closes CNVS-33090

test plan:
- start with a fresh dinghy and fresh canvas-lms repo
- follow Canvas Docker Installation Guide in the wiki
- after canvas-compose up , login to your account on your local setup
- navigate to Admin > ACCOUNT > Settings > Feature Options and turn on
  "User Remote Version of Rich Content Editor..." options
- navigate to Dashboard , then navigate back to Admin > ACCOUNT > Settings
- rejoice that you do not get the "key length too short" CipherError

Change-Id: Ia4503fcfcafed00aab5616428d86fb41955d7ab3
Reviewed-on: https://gerrit.instructure.com/94383
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: brian kirkby <bkirkby@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2016-11-04 16:28:06 +00:00
Cemal Aktas 74b72bb5a1 spec: Add docker chrome container
Test Plan:
 N/A

Usage:
open vnc://secret:secret@seleniumff.docker          (firefox)
open vnc://secret:secret@seleniumch.docker:5901     (chrome)

Change-Id: Ic23bc0d13fa9fe3745fbf9835b5d20e128be3d91
Reviewed-on: https://gerrit.instructure.com/93921
Tested-by: Jenkins
Reviewed-by: Jayce Higgins <jhiggins@instructure.com>
Product-Review: Cemal Aktas <caktas@instructure.com>
QA-Review: Cemal Aktas <caktas@instructure.com>
2016-11-02 17:58:19 +00:00
Neil Gupta 9f84275bac Fix consul init values when running docker
Fixes CNVS-31618

Test plan:
1. copy the updated config/consul.yml into your config directory
2. make sure api specs pass in docker
(eg docker-compose run --rm web rspec spec/apis/v1/grading_periods_api_spec.rb)

Change-Id: Ib80c01d2770c216aa846362e3ea2efbfde5f5e63
Reviewed-on: https://gerrit.instructure.com/89692
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2016-09-07 17:09:32 +00:00
Bryan Petty 7b2bd67424 fix local docker selenium configuration
Changes:
- Uses standalone selenium node (meant for use without hub).
- Selenium node upgraded from 2.45.0 to 2.53.0.
- Upgrades Firefox from 34.0 to 45.0 (uses upstream version now).
- Clarify docker docs for running selenium specs a bit.
- Enable use of selenium container on checkout without changes.
- No longer requires link in web container.
  - Requires dinghy/dory though for proxy, but it already did.
- Fixes /tmp/.X99-lock issue on container re-use.

Change-Id: I31793103e62022dea227b181a738383788660f6d
Reviewed-on: https://gerrit.instructure.com/83193
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2016-06-21 21:21:45 +00:00
Bryan Petty 0cdf11b94f add mailcatcher for docker dev
Test Plan:
1. Ensure that the `jobs` docker container is running.
2. Trigger any kind of email notification.
3. Verify email shows up here: http://mail.canvas.docker/

Change-Id: I94074d5601bb1817444fb85220aada2ba2fef82f
Reviewed-on: https://gerrit.instructure.com/79319
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Bryan Petty <bpetty@instructure.com>
2016-06-15 20:59:07 +00:00
Jon Willesen d0364ce2d7 add optional docker config for cassandra
Change-Id: I2e24741a2cfbd6d2a3ba16739fc68a6a807c601c
Reviewed-on: https://gerrit.instructure.com/69909
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
QA-Review: Jon Willesen <jonw@instructure.com>
2016-01-18 17:37:30 +00:00
Ethan Vizitei 088527af6b add consul entry for docker users
our docs say that you just copy over your config files and you're
ready to start docker-ing, so we should make sure there's a consul
config file entry

TEST PLAN:
  1) no production changes (does not touch app code)
  2) clean install, clean config directory
  3) copy docker-compose/config/ files to your config directory
  4) you shouldn't be missing any config files when you start your
     compose file up

Change-Id: I5c3fc2ec1e537355bd9a4c5a8b36640349b822cf
Reviewed-on: https://gerrit.instructure.com/70327
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-15 15:56:48 +00:00
Brian Palmer 4b42a9f66d docker-compose based dev environment
Adds a docker-compose.yml file, some containers for dependencies, and
some docker-compose-friendly config files. See
doc/development_with_docker.md for instructions on how to use.

Change-Id: I5eaee8a3e3c84bb608282bfd44ec7d49a123ef5f
Reviewed-on: https://gerrit.instructure.com/45508
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Addison Higham <ahigham@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins
Product-Review: Zach Wily <zach@instructure.com>
QA-Review: Zach Wily <zach@instructure.com>
2015-03-30 20:59:48 +00:00