Commit Graph

30 Commits

Author SHA1 Message Date
Omar Khan b51d4f5af6 Use redis:alpine
Updates docker-compose.yml to use redis:alpine, which is the same
version we use to run tests on jenkins. Our lua scripts don't seem to
work with redis 2.6.

Change-Id: I608d7bbea9e813a5fb31f0c32b8fdf5ba127f16d
Reviewed-on: https://gerrit.instructure.com/121058
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-07-31 22:31:40 +00:00
Sheldon Leibole e60af33613 add i18n sorting dependencies to docker
fixes CNVS-35005

Test Plan

1. run:  docker-compose build
2. run: docker-compose run --rm web bundle exec rake db:migrate:redo VERSION=20120502190901
3. Visit: /accounts/1/users
4. Create users with the names: Jalapeno, Jalapeoo, Jalapeño, JalapeЖo
5. Refresh the page and verify they are sorted:
   Jalapeno, Jalapeño, Jalapeoo, JalapeЖo
6. Create an assignment
7. Give each of the students created above a grade
8. Visit: /courses/1/gradebook/history
9. Click on the assignment name to display the hidden table.
10. Verify the table of students / grades is sorted:
    Jalapeno, Jalapeño, Jalapeoo, JalapeЖo

Change-Id: I9743c559a20a3d50600bcbc7e4a310105ec638cf
Reviewed-on: https://gerrit.instructure.com/102465
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-02-21 18:24:56 +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
Simon Williams d31e52af55 upgrade canvas dockerfile to ruby 2.3.1
this changes the name of the canvas gem volume, so you'll need to run:
  docker-compose run --rm web bundle install
after applying this change. you may also want to run:
  docker volume rm canvas-gems
to delete the old gem volume, which will no longer be used.

closes CNVS-33086

test plan:
- docker-compose run --rm web bundle install
- docker-compose up
- things should work

Change-Id: Iace97ca723c9e56a5d252a2a5f447f3196487d0a
Reviewed-on: https://gerrit.instructure.com/94311
Tested-by: Jenkins
Reviewed-by: Benjamin Christian Nelson <bcnelson@instructure.com>
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2016-11-07 16:06:45 +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
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
Dan Minkevitch 2579abf917 Set REMOTE_DEBUGGING_ENABLED to off by default
There seem to be miscellaneous reports surrounding the performance
impact people have been having when this flag is enabled. Changing
it from opt-out to opt-in is a safer default mechanism to prevent
future users from experiencing this and having to debug the issue.

Change-Id: I61b4b85720f1e421f6980b700f06ddea7f4780c0
Reviewed-on: https://gerrit.instructure.com/82779
Reviewed-by: Andrew Huff <ahuff@instructure.com>
Tested-by: Jenkins
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: Dan Minkevitch <dan@instructure.com>
2016-06-16 23:11:53 +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
Ben Rinaca a1a3fc26ba avoid port conflicts for remote debugging
if you're backgrounding multiple services on the same host in
development (ex: pow) then byebug_server would not be able to bind and
would cause your canvas to barf when booting. this change makes it so
it'll auto-assign ports and it also updates the byebug-remote to just
connect to the last one that had started.

also only starts byebug server if REMOTE_DEBUGGING_ENABLED is set, which
will be default for canvas docker development environment.

Change-Id: I646209e6bec64777945c56c45a3db29b847eb159
Reviewed-on: https://gerrit.instructure.com/81260
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Ben Rinaca <brinaca@instructure.com>
QA-Review: Ben Rinaca <brinaca@instructure.com>
2016-06-02 15:37:32 +00:00
Ethan Vizitei 30e44c97f7 upgrade consul image
closes CNVS-28804

use 0.6 in development, since that's what we use in production

Change-Id: Ie6400f26d1447d00599944e866f5b2e6762aa441
Reviewed-on: https://gerrit.instructure.com/77410
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-04-19 22:17:50 +00:00
Ethan Vizitei def842ac8f remove unnecessary docker-compose config
secrets are in consul now
config/WEBPACK is the normal way to make webpack happen

Change-Id: I6624756afb74a0fa89ad7275520f7d7513468b12
Reviewed-on: https://gerrit.instructure.com/73539
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-03-02 21:43:11 +00:00
Tyler Pickett 3bba37137e Remove node_modules volume
We're removing this volume for now because it ends up getting the wrong
permissions making it impossible for a fresh install to work properly.

Change-Id: I9e08510722bf7bcc8b87c04fce697d5ba26f299b
Reviewed-on: https://gerrit.instructure.com/73495
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Tyler Pickett <tpickett@instructure.com>
QA-Review: Tyler Pickett <tpickett@instructure.com>
2016-03-02 18:16:54 +00:00
Ethan Vizitei ff9633ffac add phantom js support as an avenue for js test runs
keep it commented for now to be optional

Change-Id: I2b64b11aac72b6da74401e9c8391a844a620c387
Reviewed-on: https://gerrit.instructure.com/72407
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-03-02 16:58:32 +00:00
Tyler Pickett 9bb9a55f49 Move development image to instructure/ruby-passenger
Change-Id: I81272405edf9078cc5016840216b60964a08e201
Reviewed-on: https://gerrit.instructure.com/72573
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins
Product-Review: Tyler Pickett <tpickett@instructure.com>
QA-Review: Tyler Pickett <tpickett@instructure.com>
2016-03-02 14:41:01 +00:00
August Thornton 19f0f11da9 add lti test tool functionality
This tool can be spun up with docker-canvas-lms
for integration test runs.

closes PLAT-1148

test plan:
  * run docker-compose up
  * tool should be started successfully

Change-Id: I72a3699d0f8e5158ffc77fe22b778d41f68be832
Reviewed-on: https://gerrit.instructure.com/72271
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Product-Review: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2016-02-19 18:26:56 +00:00
Brian Palmer 3cfeb24072 use our pre-built kinesalite docker image
This image is an appliance more in line with the postgres or redis
images, so it manages its own data volume. Thus the docker-compose and
doc file changes.

Change-Id: I8f435400bd8427313d0bc290c84cd44639ead074
Reviewed-on: https://gerrit.instructure.com/71502
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2016-02-09 18:47:11 +00:00
Brian Palmer 9f65fcf2b2 restore the bootstrap param to consul
I removed this in my change because consul outputted a warning
suggesting that I didn't really want it... but I think what it was
actually saying was use `-bootstrap` instead of `-bootstrap-expect 1`.

This fixes an intermittent error if the canvas dev container tries to
query consul before it is ready.

Change-Id: I48988592f9cbea4c32b372461f56ebbd8b34567c
Reviewed-on: https://gerrit.instructure.com/71583
QA-Review: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2016-02-05 16:35:34 +00:00
Brian Palmer ef9cd3f6fc replace our custom consul dev container
This removes our custom-built consul docker container (only used in
development) and replaces it with a popular public image from the docker
registry.

Change-Id: I7d42117e704f60b99f8e7f2895e9fb1b029c15f2
Reviewed-on: https://gerrit.instructure.com/71511
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2016-02-04 22:54:02 +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
Michael Nomitch d692a83efd RCS - allow instructure record call via event
refs CNVS-25536

test plan:
  - with MCE loaded on non eportfolio page
    - you can record a media comment like usual

  - eportfolios with tinyMCE loaded via service
    - it loads properly (though you wont be
      able to add a media comment)

Change-Id: I892eb6033a18d67d712bda2f1bf7528533cf3ff6
Reviewed-on: https://gerrit.instructure.com/68224
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-12-14 23:01:06 +00:00
Ethan Vizitei be9244a47c add feature flag and dynamic config for RCE service
refs CNVS-24816

create the feature flag and expose it in
the Eportfolios controller

Add a consul docker container to docker-compose.yml,
and a class for consuming settings in consul.

Also, add the ability to init config values
into consul from the consul.yml file

TEST PLAN:
1) edit your consul.yml to look kinda like this:

development:
  host: consul
  port: 8500
  ssl: false
  init_values:
    rich-content-service:
      app-host: rce.docker
      cdn-host: rce.docker

2) go to edit an eportfolio as a logged in user
3) check in js console "ENV.RICH_CONTENT_SERVICE_ENABLED"
4) should be "true" or "false" depending on the feature
flag state for that user's root account
5) with the feature flag on, refresh and check the env
6) should have values in the env for
RICH_CONTENT_APP_HOST and RICH_CONTENT_CDN_HOST

Change-Id: Ic138e24416b2aadd965ce4811d3c56538de391bc
Reviewed-on: https://gerrit.instructure.com/66614
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-12-02 20:32:42 +00:00
Simon Williams a1e7f57c56 webpack tests
closes CNVS-24966

change js specs to work with web pack.
update some dependency references, make some aliases
for external dependencies to get the right version,
and clean up a bunch of leaky state.

TEST PLAN:
js tests should pass in web pack _and_ requires

Change-Id: If37fbce93e7e67021d90bacb470ffc4f1b17402d
Reviewed-on: https://gerrit.instructure.com/66309
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-11-24 18:40:58 +00:00
Ethan Vizitei 5183710300 Add a JWT endpoint for generating services tokens
closes CNVS-24285

This token isn't consumed by anyone yet, ultimately it will be used
to be passed back to canvas from other trusted services to
prove the user is authorized to those services and assets.

TEST PLAN:
1) login as a user
2) visit /jwts/generate
3) you should see a token-like thing in the JSON

Change-Id: I95852758597606d4ee3f1d2c788fcb252e7c154a
Reviewed-on: https://gerrit.instructure.com/65983
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-11-03 19:32:45 +00:00
Ethan Vizitei d7f61d1820 use web pack
closes CNVS-24124

makes working with web pack possible in canvas
instead of require-js.  See doc/working_with_webpack.md
for instructions.

TEST PLAN:
Nothing should change in non-webpack'd behavior
Things should mostly work when you use the
USE_WEBPACK environment variable, but make sure to document
and ticket things that don't

Change-Id: I493a259a609e9e183950bc57aa5876df70108547
Reviewed-on: https://gerrit.instructure.com/64386
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-11-02 16:27:14 +00:00
Zach Wily 65fa886acb make selenium docker-compose service commented out by default
Building the Selenium image, and running the selenium container, is
pretty resource heavy. Therefore, we'll require you to uncomment it
when you want to use it. Hopefully Docker Compose will provide a more
elegant way to do this in the future.

Change-Id: I1ea2ccbd4dd384cc5dcdb973c09caf9d36367015
Reviewed-on: https://gerrit.instructure.com/63380
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Zach Wily <zach@instructure.com>
QA-Review: Zach Wily <zach@instructure.com>
2015-09-16 21:23:03 +00:00
Zach Wily 75b9a4db24 switch guard from polling
Change-Id: I294165c7e62c088973f883612d40998b8a8ca523
Reviewed-on: https://gerrit.instructure.com/59978
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-08-17 22:36:23 +00:00
Zach Wily 663a1c9518 fix docker-compose warning
The latest Docker Compose wants volume paths to be more explicit.

Change-Id: Ib632fb6b6d15ce11bacbaf39c4d5c6094e86072e
Reviewed-on: https://gerrit.instructure.com/60954
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-08-14 21:51:07 +00:00
Brian Palmer 86c2fbe3a2 allow *.canvas.docker in the docker-compose dev environment
The leading dot is nginx syntax for allowing both `canvas.docker` and `*.canvas.docker`

Also pull in libxmlsec1-dev, for SAML.

Change-Id: I4281252053b7d890b08c06c30ad17f5b11670579
Reviewed-on: https://gerrit.instructure.com/52720
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2015-04-23 16:47:09 +00:00
Zach Wily 5d232f03af initial live events implementation
This commit adds a new module called LiveEvents that knows how to send a
certain set of events to Kinesis. The module is configured via
normal plugin settings per account. Once the plugin is configured with
a Kinesis stream, events will start getting sent to that stream.

Events are sent asynchronously, in a background thread.

test plan:
 * See `doc/live_events.md` for instructions on how to setup a local
   kinesis stream and configure the LiveEvents plugin.
 * Start tailing the stream with the command specified in
   `doc/live_events.md` in a terminal.
 * Perform the actions described in `doc/api/live_events.md` and verify
   that events show up in your Kinesis terminal with the correct data.

Change-Id: Id799688c972205a1eee84a673912f84b0c7abb57
Reviewed-on: https://gerrit.instructure.com/50324
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
Product-Review: Zach Wily <zach@instructure.com>
2015-04-03 15:22:33 +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