Commit Graph

152 Commits

Author SHA1 Message Date
Charley Kline e6a09c85c4 Fix database.yml
flag=none

Looks like there were a couple of typos in this file.

Test plan:
* looks good now?

Change-Id: I0c3c513b774a5b999f1b4086d5bf0b6383e894bb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235999
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Simon Williams <simon@instructure.com>
Tested-by: Charley Kline <ckline@instructure.com>
2020-05-01 20:37:14 +00:00
Derek Bender e1bf14466f Remove DATABASE_URL from docker dev envs
Fixes: CCI-347

This will allow connecting to the test environment again.
Copy over the updated config/docker-compose.override.yml (or delete the
relevant line from your existing docker-compose.override.yml). Also copy
over the restored and modified config/database.yml.example.

    $ cp -iv config/docker-compose.override.yml.example \
      docker-compose.override.yml
    $ cp -iv docker-compose/,}config/database.yml

If you have existing databases that don't match the naming scheme of
"canvas_<ENV>" then you'll need to do a custom configuration for your
database names in config/database.yml or rename your databases in
postgres.

Test Plan
- update your override config and database.yml:

    $ cp -iv config/docker-compose.override.yml.example \
      docker-compose.override.yml
    $ cp -iv {docker-compose/,}config/database.yml

- make sure your postgres image is up to date from earlier patchset
  (this will remove all your data):

    $ docker-compose down --volumes
    $ docker-compose build --no-cache postgres

- boot the app, bundle, and wait for postgres to be available (for
  internal start up scripts to run):

    $ docker-compose run --rm web bundle \
      && docker-compose run --rm web build/new-jenkins/wait-for-it \
      postgres:5432 -t 30

- test that connctions to both development and test databases work:
  - developement:

    $ docker-compose run --rm web bin/rails runner \
      'puts ActiveRecord::Base.connection.current_database'
    => 'canvas_development'

  - test:

    $ docker-compose run --rm -e RAILS_ENV=test web bin/rails runner \
      'puts ActiveRecord::Base.connection.current_database'
    => 'canvas_test'

- set a custom database name:

    $ docker-compose run --rm \
      -e RAILS_ENV=test \
      -e CANVAS_DATABASE_TEST=canvas_rails3_ \
      web bin/rails runner \
      'Rails.application.load_tasks; \
        Rake::Task["db:create"].invoke; \
        puts ActiveRecord::Base.connection.current_database'
    => 'canvas_rails3_'

flag = none

Change-Id: Ia19038586508dc91c6a4d4386d812752e00a4ad6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235642
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2020-04-29 19:09:35 +00:00
Derek Bender 11c01f4b66 Configure databases in a unified manner
This patchset removes the much duplicated database.yml and instead
defaults to a DATABASE_URL scheme. There is however still present a
docker-compose/config/new-jenkins/database.yml file to temporarily allow
our internal portal service to still function until such time we can
reconfigure it.

To set up custom connection options all that is needed is setting
DATABASE_URL. See examples of this in docker-compose.yml and
docker-compose.new-jenkins.yml.

Test Plan
=========

Image:
- pulling canvas-lms:master image boots without database errors

Repo:
- given default dev environment where
  COMPOSE_FILE=docker-compose.yml:docker-compose.override.yml

- build the web and postgres images: docker-compose build web postgres
  (feel free to comment out `yarn install` and `compile_assets` in the
  Dockerfile since we won't be needing them for this test and this
  speeds things up)

- set a custom DATABASE_URL to change the database name and echo it to
  see it gets into the image correctly:

    $ docker run -it -e \
      DATABASE_URL=postgres://postgres:sekret@postgres/canvas_custom_env \
      $(docker-compose ps -q web) bash -c "echo \$DATABASE_URL"
    => postgres://postgres:sekret@postgres/canvas_custom_env

    $ docker-compose run --rm -e \
    DATABASE_URL=postgres://postgres:sekret@postgres/canvas_custom_env \
    web bash -c "echo \$DATABASE_URL"
    => postgres://postgres:sekret@postgres/canvas_custom_env

- Test that setting a custom database name via DATABASE_URL can create
  the database

    $ docker-compose run --rm -e \
    DATABASE_URL=postgres://postgres:sekret@postgres/canvas_custom_env \
    web bash -c "bin/rails db:create"
    => Created database 'canvas_custom_env'

- This patchset boots on portal

Change-Id: Ic6f3819550df94b6c98b17ef05ac2029a578cfe4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234213
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
QA-Review: Rex Fleischer <rfleischer@instructure.com>
QA-Review: Jacob Powell <spowell@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
2020-04-28 22:42:21 +00:00
Benjamin Christian Nelson 9a20868030 remove unused selinimum gem
Change-Id: I0adc219a6cab442226619d5bdd0814d7f09d0d52
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230713
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
QA-Review: Jacob Powell <spowell@instructure.com>
Product-Review: Jacob Powell <spowell@instructure.com>
2020-04-23 17:25:57 +00:00
Ethan Vizitei 432419fbcd dual-write path for postgres auditors
refs CNVS-48876
flag = none

add setting for auditors read/write paths

map settings into boolean helpers

create config values for AR writing path

split backend of event_stream by strategy
and confirm writing to both destinations functions

test dual writing from config

wrap tests around attribute mapping from
  event stream to active record

dual write from all 3 auditor classes
via a shared model mixin

TEST PLAN:
  * update dynamic settings to include dual write pattern
  * login a few times
  * publish a course
  * grade an assignment
  * make sure new auditor records are in cassandra
     (auditors API calls is fine)
  * make sure companion records are in the auditor postres table
     (auditor_authentication_records,
      auditor_course_records,
      auditor_grade_change_records)

Change-Id: I9b85fc926f7363876f89c82a3fdceb253244fb57
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234334
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2020-04-19 22:25:21 +00:00
Ethan Vizitei a3c2e318d6 enable instrumentation of APM for jobs
closes APM-16, APM-20
flag = none

also adds context id and user id
to request annotations for APM

configures host-level sampling

TEST PLAN:
  * enable apm collection on datadog agent on single test cluster
  * push consul config to same cluster for enabling apm sampling
  * push consul config depressing host sampling rate to 5%
  * delayed job telemetry should show up in ddog
  * trace count from active clusters should drop by an order of magnitude

Change-Id: I94d97b299ed14403e8b141629740a1627310b259
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230592
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: David Warkentin <dwarkentin@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-03-23 15:11:25 +00:00
Ethan Vizitei 8ce6b785aa enable auto-instrumentation for ddog APM
closes APM-7, APM-8
flag = none

hardcode set to a very low % of client sampling by default
to keep performance impact low.

test plan:
 * make sure telemetry is arriving in datadog APM
 * ensure trace traffic level is low, only from one cluster
     (proves settings are working)
 * canvas should not show degradation in response times post deployment

Change-Id: Ifca8d3f6239d6c4e70098dd2b68b9c2a1950e121
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230064
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-03-17 19:15:15 +00:00
Derek Bender 78123c4cb6 Multiple rubies and postgres on Jenkins
Closes: CCI-214
flag = none

Test plan:
- The following builds pass:
  - main-canvas
  - main-for-coverage
  - main-canvas-postgres-12
  - main-canvas-ruby-2.6
  - main-canvas-postgres-12-ruby-2.6

Change-Id: I253d0cc8f0a808d8453fd3cbe1cfc3400ec8b12a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227304
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2020-03-10 22:30:51 +00:00
Derek Bender 3ad7fbabf3 Upgrade unofficial postgis repo to official repo
Closes: CCI-261

The mdillon repo was an unofficial postgis repo, there is now and
official postgis/postgis repo!

https://registry.hub.docker.com/r/postgis/postgis/
https://github.com/postgis/docker-postgis

Test Plan:
- First, take notice if you currently have pg_collkey installed:
    $ docker-compose run --rm postgres psql -x \
        -h postgres
        -U postgres
        -d canvas
        -c "SELECT * FROM pg_available_extensions WHERE \
          pg_available_extensions.name = 'pg_collkey';"

  If `installed_version` is blank, then the extension is not isntalled
  into the `canvas` database.

- take down any running environment:
    $ docker-compose stop && docker-compose down

- copy (or update) new settings from docker-compose.override.yml:

    # manual diff
    $ diff config/docker-compose.override.yml \
        docker-compose.override.yml

    # overwrite any existing config
    $ cp config/docker-compose.override.yml .

- copy (or update) new settings from database.yml:

    # manual diff
    $ diff docker-compose/config/database.yml config/database.yml

    # overwrite any existing config
    $ cp docker-compose/config/database.yml config/

- rebuild and startup the postgres image:
    $ docker-compose up --build postgres

- the postgres logs do not mention

ERROR:  could not access file "$libdir/collkey_icu.so":
  No such file or directory

- install the extension if it wasn't previously present:

    $ docker-compose run --rm postgres psql -x \
        -h postgres \
        -U postgres \
        -d canvas \
        -c "CREATE EXTENSION IF NOT EXISTS pg_trgm SCHEMA public;
            CREATE EXTENSION IF NOT EXISTS postgis SCHEMA public;
            CREATE EXTENSION IF NOT EXISTS pg_collkey SCHEMA public;"

    $ docker-compose run --rm postgres psql -x \
        -h postgres \
        -U postgres \
        -d canvas_test \
        -c "CREATE EXTENSION IF NOT EXISTS pg_trgm SCHEMA public; \
            CREATE EXTENSION IF NOT EXISTS postgis SCHEMA public; \
            CREATE EXTENSION IF NOT EXISTS pg_collkey SCHEMA public;"

- pg_collkey is now present:

    $ docker-compose run --rm postgres psql -x \
        -h postgres
        -U postgres
        -d canvas
        -c "SELECT * FROM pg_available_extensions WHERE \
          pg_available_extensions.name = 'pg_collkey';"

    $ docker-compose run --rm postgres psql -x \
        -h postgres
        -U postgres
        -d canvas_test
        -c "SELECT * FROM pg_available_extensions WHERE \
          pg_available_extensions.name = 'pg_collkey';"

- Optionally, Build the postgres container with fresh volumes:

    $ COMPOSE_PROJECT_NAME=<a-unique-name> docker-compose --build \
        up postgres

- The postgres logs show no errors related to collkey_icu.so
  (like above)

Change-Id: I4f0e027cd908fee937b6204cd3a20e5ecf998021
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/228190
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2020-03-04 22:03:02 +00:00
James Butters 47f5de97a3 spec: upgrade chromedriver for chrome version 80 local and docker
flag = none
closes: CCI-263

Test Plan:
Jenkins selenium builds pass.

Change-Id: Ib7970d5b5b9c9a6d07051b1a22758ef055bb1bcc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/228326
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-02-28 15:38:01 +00:00
Derek Bender 66bc8751b9 Copy over pg_collkey.control
Currently it appears pg_collkey throws an error in the postgres
container, althought it doesn't appear to halt the process. Adding this
missing file resolves this problem

Fixes: CCI-252

Test plan:
- docker-compose build postgres
- docker-compose up -d
- docker-compose logs -f --tail=100 postgres
- visit http://canvas.docker/ in the browser
- the postgres logs should no longer contain a message like:

ERROR:  could not access file "$libdir/collkey_icu.so": No such file or
directory

feature_flag = none

Change-Id: Ib1483a24e705260b2eaeba81ec456ed9f6acf89d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227805
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
2020-02-25 17:06:29 +00:00
Jared Crystal ed46ea3690 Update postgres package names
refs CCI-234

test plan:
 - using default COMPOSE_FILE:
 - docker-compose build --no-cache --pull postgres

flag = none

Change-Id: Ifa6f23a6e91dc19404795f9bd8b11d7d775d883e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226810
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jim Simon <jsimon@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
Reviewed-by: Laura Gonzalez-Horwitz <lgonzalez-horwitz@instructure.com>
Product-Review: Jared Crystal <jcrystal@instructure.com>
2020-02-14 20:29:50 +00:00
Jacob Burroughs 3c2bb3e318 Add vault client to canvas
Next step will be to integrate a secrets API a-la-dynamic settings

test plan:
- Specs pass

Change-Id: Ic2fdd2be3c7f665804627f3ef3ffb5bc408d135b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224281
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-02-03 19:00:13 +00:00
James Butters fcd5a4fee8 spec: update version of chrome to 78
closes: CCI-162

flag = none

Change-Id: Id03868b8095a948929fd39ae74d0c70a5eef0df9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221262
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-01-09 17:08:52 +00:00
Frank Murphy a5270786ef Add configuration and scripts for replication.
References OUT-3442

Test Plan
:qa-cr:

Change-Id: Icd4bb2a80e9133196ee4d760f6fc1084ac7a438e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221319
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Frank Murphy <fmurphy@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
2019-12-20 22:21:12 +00:00
Jacob Burroughs 4329bab9cf Use correct database connection settings in docker default
Change-Id: I9c941d8b62f2015c2545124c16db610090a62a03
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220912
Tested-by: Jenkins
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Bryan Petty <bpetty@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2019-12-16 18:06:56 +00:00
James Butters 49dfe90d6a add wait-for-it script to postres directory
wait-for-it script was left out from the postgres directory after
the update to the Dockerfile that relies on it. Adding the script
in that directory so our Dockerfile builds correctly.

Change-Id: I1c445937ff809877a7063a37eb5b1052e3ae5af5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/217588
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2019-11-18 16:02:27 +00:00
Derek Bender 1586a140ac Add pg_collkey to postgres image for docker builds
Closes: CCI-2

Test Plan:
- specs that require pg_collkey are ran in new jenkins

Change-Id: I530373f9855d124dfc3c302e0d340f6217b8f33a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/215422
Reviewed-by: S. Jacob Powell <spowell@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2019-11-13 23:51:59 +00:00
Cameron Matheson e0804049cd run dynamodb in new jenkins
Change-Id: Ifc6676447ad065a30f3e8154444d5c00ed8afac3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/211347
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
2019-10-31 17:10:55 +00:00
James Butters ea88c7087e spec: downgrade docker chromedriver
there are some bugs in the newest version causing spec failures.

Change-Id: I5b2864815f552831d273b74843e129228b581f55
Reviewed-on: https://gerrit.instructure.com/211810
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2019-10-03 13:55:16 +00:00
James Butters a95e4b5c48 spec: update chromedriver version
this will get us up to chrome 77

Change-Id: I930a5a6d82f30d4fed0d8072a4cbec4e43742056
Reviewed-on: https://gerrit.instructure.com/211116
Tested-by: Jenkins
Reviewed-by: S. Jacob Powell <spowell@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: S. Jacob Powell <spowell@instructure.com>
Product-Review: S. Jacob Powell <spowell@instructure.com>
2019-09-26 17:06:59 +00:00
James Williams 56a487811b spec: knapsack for selenium
Change-Id: I30c0c0006de8779dea1743d6c626022756f05d5a
Reviewed-on: https://gerrit.instructure.com/210564
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2019-09-25 14:13:39 +00:00
James Williams 18cad7be4c spec: undo security.yml overwrite
Change-Id: Id4a31fe3d3c8784b65730d7c62d3bd1ef68767ed
Reviewed-on: https://gerrit.instructure.com/210756
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Jenkins
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-09-25 12:17:37 +00:00
James Williams bc1a16a557 spec: copy new jenkins config to container afterwards
instead of replacing the originals in the image

Change-Id: Ibb32bb32cf2487cf17eb4688eea30d19400b02a7
Reviewed-on: https://gerrit.instructure.com/210409
Tested-by: Jenkins
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-09-23 19:51:41 +00:00
James Williams 2768dda033 use knapsack in new jenkins rspec build
closes #CORE-3292 #CORE-3293

Change-Id: Id54c8568bd1ca45929f35926e0eebdd558e68a58
Reviewed-on: https://gerrit.instructure.com/207602
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
2019-09-13 15:19:34 +00:00
Cody Cutrer c9aab282ba use rails built-in RedisCacheStore
RedisStore is no longer supported

somewhat surprisingly, the serialization formats are compatible, so we don't
need to do any namespacing

Change-Id: Iede3a023cada95313875f0ce419b649c364ee97c
Reviewed-on: https://gerrit.instructure.com/202663
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-08-09 20:22:56 +00:00
James Butters 946c69339d spec: update verion of chromedriver to new version of chrome
closes: GRADE-2211

Change-Id: Id5b0d91331dfb061a6eb304cd62d0e90709c9841
Reviewed-on: https://gerrit.instructure.com/195579
Reviewed-by: KC Naegle <knaegle@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Tested-by: Jenkins
2019-05-31 19:52:50 +00:00
wdransfield eac5a15d71 Update dynamic settings lti keys entry
Test Plan:
Using docker canvas verify you can hit the
/api/lti/security/jwks endpoint and see three JWKs

Change-Id: I687cec8012f4ebfd1d9319e65b52343e6bae89bb
Reviewed-on: https://gerrit.instructure.com/188823
Tested-by: Jenkins
QA-Review: Marc Phillips <mphillips@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
2019-04-12 20:08:05 +00:00
Derek Bender 38bdaa8b54 Smoke test docker image
Closes: GRADE-2048

Test Plan:
- specs pass
- canvas-image in new-jenkins passes

Change-Id: If8369df6467dd5842d8f19190ec5a952ce0f750b
Reviewed-on: https://gerrit.instructure.com/187292
Tested-by: Jenkins
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
Reviewed-by: Robert Lamb <rlamb@instructure.com>
2019-04-05 14:25:16 +00:00
Clay Diffrient ade362e515 Bump to Node 10
closes CORE-2329

There were some tests that were expecting a snapshot-like value
where it expected `new Date().toLocaleDateString()` to give something
Like “2016-7-11” but that was actually wrong. If you do
`new Date().toLocaleDateString()` in a browser it will give you
something like “7/11/2016”. And this new version of node matches what
a real browser would have done, so I just updated the specs so they
are looking for the correct format. This change does not actually
reflect a change in what a real user would see. Just what
jest/jsdom/node formats it as.

Test Plan:
  - check to make sure that the assignments 2 availability dates
    component produces markup exactly as it did before
  - Automated tests pass
  - Build canvas locally, everything passes.
  - Build canvas with docker, everything passes.

Change-Id: I74285cd6d9b251ca60ab79396e332cc3a419bcee
Reviewed-on: https://gerrit.instructure.com/177198
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-03-22 17:29:36 +00:00
Derek Bender a8b10171e0 update docker selenium images
closes: QA-629

Change-Id: Ibff14673731a4214ed5a7896c016b0e3ffa70f7d
Reviewed-on: https://gerrit.instructure.com/170604
Tested-by: Jenkins
Reviewed-by: Colleen Pai <ipai@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2018-11-02 20:11:41 +00:00
Derek Bender 1e31f18cd9 docs: add auto_open_devtools to docker
also fix code comments formatting

Change-Id: Idb507f00181bd56372d4c8fc5136c8b2576fb7fa
Reviewed-on: https://gerrit.instructure.com/168687
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2018-10-17 18:13:17 +00:00
Marc Phillips 66ada6850f Add dc config to jwk set_keys
Previously the jwk set_keys was not pointing to any
data_center when it makes the call to set the keys.
This now will grab the configuration from consul of
the dc and set it as the data_center to put to.

ref PLAT-3361

Test Plan:
 n/a

Change-Id: I70e3cfb52ba557543ad203c516739a18cae17c26
Reviewed-on: https://gerrit.instructure.com/159839
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Jenkins
Product-Review: Marc Alan Phillips <mphillips@instructure.com>
QA-Review: Marc Alan Phillips <mphillips@instructure.com>
2018-08-10 17:44:48 +00:00
wdransfield 59942f4ff8 LTI 1.3: Add security claims and sign with Canvas private key
Closes PLAT-3633, PLAT-3634

Test Plan:
- Do an LTI 1.3 launch in Canvas and verify the id token is
  signed with the current canvas secret key.
- Verify the following claims are included and correct:
  * exp
  * iat
  * iss
  * nonce
  * sub

Change-Id: I57699ac42bbe98a9fa03f82f3f9b9a16c6923011
Reviewed-on: https://gerrit.instructure.com/159855
Tested-by: Jenkins
Reviewed-by: Marc Alan Phillips <mphillips@instructure.com>
QA-Review: Marc Alan Phillips <mphillips@instructure.com>
Product-Review: Marc Alan Phillips <mphillips@instructure.com>
2018-08-09 21:33:03 +00:00
Nathan Mills 2bb1d541f3 update example lti keypairs
refs PLAT-3361

test-plan:

The updated examples should work

Change-Id: Ibea651d2846b740cb6b08e07b6d660e5e5812015
Reviewed-on: https://gerrit.instructure.com/157170
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Nathan Mills <nathanm@instructure.com>
2018-07-12 20:35:06 +00:00
Marc Phillips 872a9329f1 Add lti JWK fallback for Development
Added lti JWK config for local development purposes using
LTI 1.3. Works with local and docker development.

closes: PLAT-3505

Test Plan:
n/a

Change-Id: Ib45f33d11027c608d6eb2397d29af6ef1878b2a7
Reviewed-on: https://gerrit.instructure.com/154194
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Marc Alan Phillips <mphillips@instructure.com>
QA-Review: Marc Alan Phillips <mphillips@instructure.com>
2018-06-19 20:34:58 +00:00
Derek Bender d4577f8f07 update js-tests to node 8 and fix cmd
Change-Id: I2e5c1be87cb3e88a203379127891ed4b6782fc26
Reviewed-on: https://gerrit.instructure.com/145756
Reviewed-by: Marc Alan Phillips <mphillips@instructure.com>
Tested-by: Jenkins
Product-Review: Marc Alan Phillips <mphillips@instructure.com>
QA-Review: Marc Alan Phillips <mphillips@instructure.com>
2018-04-06 17:46:58 +00:00
Derek Bender c3fd3f2112 fix delayed_jobs redis client for docker
Change-Id: I7671a573ecc004c351e48c9ff6c2c7ad55aac3d3
Reviewed-on: https://gerrit.instructure.com/145158
Tested-by: Jenkins
Reviewed-by: Omar Khan <okhan@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
2018-03-29 15:23:37 +00:00
Cameron Sutter 940bab380a panda token endpoint
closes MBL-9792

test plan:
- make a request to /api/v1/users/:id/pandata_token
  with param 'app_key' of value 'IOS_pandata_key'
- make the same call with a value of 'ANDROID_pandata_key'
- both should return a 200 code
  and a json object with a 'token' and a 'expires_at'

Change-Id: If993ad3c49b89a61ef8caa91d5f347250998070b
Reviewed-on: https://gerrit.instructure.com/144535
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
2018-03-28 20:39:17 +00:00
Andrew Huff c6783ad4cb update instfs dynamic_settings examples
test plan: none

Change-Id: I34b1c44edbac29118c290c715eb22e12736eaa05
Reviewed-on: https://gerrit.instructure.com/137635
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
Product-Review: Andrew Huff <ahuff@instructure.com>
QA-Review: Andrew Huff <ahuff@instructure.com>
2018-03-07 20:58:17 +00:00
Ryan Shaw c1c93e1e14 Use node 8.9.4
If you are getting errors about “The engine "node" is incompatible with 
this module. Expected version ">=8.9.4”.” after applying this change,
It means you need upgrade your node to 8.9.4. to do so:

if you use nvm: `nvm install` inside the canvas dir
If you use brew: `brew upgrade node`
If you use apt-get: see https://github.com/nodesource/distributions
If you use docker: rebuild your docker container

Closes: CORE-704

Test plan:
* js tests should pass
* webpack and brandable_css should generate the exact same
  CSS and JS output as before.
* all of our build tooling, including docker stuff, should continue
  to work and use Node 8. 

If you know of something else that needs to be updated to use node 8 
everywhere, let me know

Change-Id: Ic019710c219d8b8c627ce03e0dffde731cfa2856
Reviewed-on: https://gerrit.instructure.com/136802
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-01-03 20:41:37 +00:00
Tyler Pickett a0e14364b8 Update to Postgres 9.5 and fix installing pg_collkey
Fixes: SD-3169

Before rebuilding your image dump your existing 9.3 data:
  docker-compose start postgres
  docker-compose exec postgres pg_dumpall -c -U postgres > tmp/data.sql
  docker-compose stop postgres

Once that is done clean up the old container, image and volume:
  docker-compose rm --force postgres
  docker rmi canvaslms_postgres
  docker volume rm canvaslms_pg_data

Build the new image, start a container and populate it with your data:
  docker-compose build --pull postgres
  docker-compose start postgres
  cat tmp/data.sql | docker-compose exec postgres psql -U postgres

Change-Id: Ib01e02dd583be0447c13756e89cb470b972af8cc
Reviewed-on: https://gerrit.instructure.com/129977
Reviewed-by: Bryan Petty <bpetty@instructure.com>
Tested-by: Jenkins
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
2017-10-18 14:08:38 +00:00
Jacob Burroughs ac15b8bf30 Fix docker pg build
Probably broken by the release of PG 10, but it could be something else.

test plan:
- Check out the commit
- Try `dc build --no-cache postgres`
- It should successfully build

Closes gh-1136

Change-Id: I78772a60cbf85ba1fa93957ecb6651e8f1b60068
Reviewed-on: https://gerrit.instructure.com/129878
Reviewed-by: Bryan Petty <bpetty@instructure.com>
Product-Review: Bryan Petty <bpetty@instructure.com>
QA-Review: Bryan Petty <bpetty@instructure.com>
Tested-by: Jenkins
2017-10-16 21:05:20 +00:00
Derek Bender 563fe17b91 remove redis_store from test env
fixes: GRADE-275

Change-Id: I6f4e99a86c5280d336b22b039626934c5ae83043
Reviewed-on: https://gerrit.instructure.com/126731
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
2017-09-20 15:42:09 +00:00
Tyler Pickett 099365aec1 Add rake task to populate Consul from dynamic_settings.yml
Fixes: CNVS-39293

Since we eliminated the pre-population functionality from our Consul
wrapper we needed something to conveniently populate the KV store.

Test Plan:
- Start a Consul server
- Run `bin/rake canvas:seed_consul`
- Verify that values were written to the KV store.

Change-Id: I340011b7d00ed4e3dd2918e3f101f6377fc72d7e
Reviewed-on: https://gerrit.instructure.com/126574
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
2017-09-19 18:08:39 +00:00
Derek Bender 55ae3c74e7 Persist cassandra volume
fixes: GRADE-243

Allow cassandra's data to persist after using `docker-compose down
cassandra` where before this command would effectively wipe your database
This is in line with how the pg_data volumes work.

test plan:
- setup cassandra
- create a keyspace
- run `docker-compose down && docker-compose up -d` (-d for daemon)
- the previously create keyspace still exists

Change-Id: Ib58bec022eda79ad45352419e4fd33b07af7cf21
Reviewed-on: https://gerrit.instructure.com/124278
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Matt Taylor <mtaylor@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2017-09-01 18:19:46 +00:00
Omar Khan 0fdd64e53f Remove karma container from docker-compose.override.yml
Test plan:

- Add docker-compose/js-tests.override.yml to COMPOSE_FILE in .env
- docker-compose build js-tests
- docker-compose run --rm js-tests

Change-Id: I6d43cb2da47c1b6985a9fefd9cc23262e5f56233
Reviewed-on: https://gerrit.instructure.com/123284
Tested-by: Jenkins
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Omar Khan <okhan@instructure.com>
2017-08-18 20:03:30 +00:00
Omar Khan 399414b3ec Run javascript tests in headless chrome
Test plan: docker-compose run --rm karma yarn test

Change-Id: I316d80e7a1b712b0dda91a390c4dddeb09b3e6fb
Reviewed-on: https://gerrit.instructure.com/122776
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-08-16 16:11:52 +00:00
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
Tyler Pickett f0214f0923 Switch to Imperium gem and update Consul container.
Also, make Consul container accessible from the host.

Fixes: CNVS-35831
Refs: CNVS-34341, CNVS-32864

Test Plan:
- Smoke test RCS and Canvas running together to make sure they still
  play nice.

Change-Id: I418d54a176677b1df8ec42a009752807908a847c
Reviewed-on: https://gerrit.instructure.com/99443
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-04-07 16:59:01 +00:00
Bryan Petty 3b22577fb4 install ca-certs required for PG extensions
Docker environments now install PG i18n extensions, which require
CA certificates for installation verification.

Test Plan:
1. Verify success of: docker-compose build --pull postgres

Change-Id: I3aa771c592f4718495996494976b21e7cf914d6e
Reviewed-on: https://gerrit.instructure.com/103777
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Bryan Petty <bpetty@instructure.com>
2017-03-02 18:56:44 +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
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
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
August Thornton e265d37f01 update lti test tool override
The lti_test_tool_common file is no longer needed as the
selenium test automation work is going to happen in a
separate repo to keep from polluting canvas with external
micro-services.

test plan:
tests should still pass

Change-Id: If657c8ba98bfb54e5ab57faf3b1c016edf908d6a
Reviewed-on: https://gerrit.instructure.com/96765
Tested-by: Jenkins
Reviewed-by: Pedro Fajardo <pfajardo@instructure.com>
Product-Review: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2016-12-05 20:02:13 +00:00
Bryan Petty 616e054fa5 set +x on docker entrypoints that require it
Docker entrypoints can't be executed unless they are set as executable.

Also fixes a few other discrepancies:
- adds common docker-compose.local.*.yml to .dockerignore
- updates docs for enabling phantomjs-tests container
- mount common volumes for js-tests and phantomjs-tests containers

Test Plan:
1. Enable phantomjs-tests and js-tests docker containers.
2. docker-compose build --pull
3. Ensure phantomjs-tests and js-tests containers work.

Change-Id: I1ab20575f9936b6cfc2c61501441b1137c9df4cb
Reviewed-on: https://gerrit.instructure.com/95690
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Bryan Petty <bpetty@instructure.com>
2016-11-28 22:58:58 +00:00
Brad Horrocks 880f36e806 Cleanup Docker Docs, fix invalid version
Change-Id: I7262813593998444896f136e536e8e726ad4fdec
Reviewed-on: https://gerrit.instructure.com/95367
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: Brad Horrocks <bhorrocks@instructure.com>
2016-11-16 16:44:58 +00:00
Brad Horrocks 35a6eda075 go back to non wildcard TLD
Change-Id: I7909e0986a2f851bbb06c8c4788a798fcba06410
Reviewed-on: https://gerrit.instructure.com/95269
Tested-by: Jenkins
Reviewed-by: Dave Donahue <ddonahue@instructure.com>
Reviewed-by: Bryan Petty <bpetty@instructure.com>
Product-Review: Dave Donahue <ddonahue@instructure.com>
QA-Review: Dave Donahue <ddonahue@instructure.com>
2016-11-15 21:29:57 +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
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
Simon Williams 3bb96be019 update docker reference to woff tools
test plan:
- rebuild a docker container based on the canvas Dockerfile from scratch
- it should work

Change-Id: I096d33a73a5d2679a4e6d3c64ba2264d8274ed1d
Reviewed-on: https://gerrit.instructure.com/94024
Reviewed-by: Benjamin Christian Nelson <bcnelson@instructure.com>
Reviewed-by: Alex Ortiz-Rosado <aortiz@instructure.com>
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
2016-10-31 18:00:07 +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
Derek Bender 98966acaef update phantomjs-tests dockerfile to node 6
test plan:
 - rebuild phantomjs-tests dockerfile
 - `docker-compose run --rm phantomjs-tests`

Change-Id: I20dcca72c89c1647b7b3b4fee8fb5ede1a9e2511
Reviewed-on: https://gerrit.instructure.com/87631
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
2016-08-12 16:42:44 +00:00
Ryan Shaw f02b43f574 upgrade to node 6
closes: CNVS-29725

this gets everything working on node 6.

As far as our build process goes, it cannot support
running on both node 6 at the same time as 0.12
since our i18nliner handlebars stuff uses jsdom and
one version of it only works on node <4 and the
next only works on 4+.

But the stuff in the production dependencies in
package.json, aka the stuff that runs on the job
servers (brandable_css), can work on both. we just
need to run npm rebuild on the job servers if the stuff
that was npm installed into ./node_modules was compiled
against a different version of node. that is done here:
https://gerrit.instructure.com/81254
that commit needs to be committed to caturday before
we commit and deploy this to beta

as far as managing node, there are 2 "official"
ways that will make you life easier, you can either
just use docker or use nvm (https://github.com/creationix/nvm)

if you use nvm and if you use ZSH:
Put this into your $HOME/.zshrc to call nvm use automatically
whenever you enter a directory that contains an
.nvmrc file with a string telling nvm which node to use:

  # place this after nvm initialization!
  autoload -U add-zsh-hook
  load-nvmrc() {
    if [[ -f .nvmrc && -r .nvmrc ]]; then
      nvm use
    elif [[ $(nvm version) != $(nvm version default)  ]]; then
      echo "Reverting to nvm default version"
      nvm use default
    fi
  }
  add-zsh-hook chpwd load-nvmrc
  load-nvmrc

but however you do it, as long as you have node 6.2
installed it should work

test plan:
* install nvm
* check this patchset out
* run bundle exec rake canvas:compile_assets
* it should work
* use theme editor to preview a change to a theme
* it should work

Change-Id: I1cc9faed361938afc713c4b921042386b956db70
Reviewed-on: https://gerrit.instructure.com/80839
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-08-09 23:37:07 +00:00
Colleen Palmer 4b13d3e2b5 add python-lxml library to Dockerfile
This is required by the QTI import tool.

Change-Id: I2092ef99f86b05d29856ed19e1f0c703406c999e
Reviewed-on: https://gerrit.instructure.com/85542
Tested-by: Jenkins
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2016-07-19 21:02:47 +00:00
Colleen Palmer 603e4c8786 allow large file uploads in the docker env
Change-Id: If53615ebaa607e67a9528f0f6dc52d65034bf4e5
Reviewed-on: https://gerrit.instructure.com/85543
Tested-by: Jenkins
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2016-07-19 21:02:02 +00:00
Cody Cutrer 0cc82ca5ab allow bundler up to 1.12.5
also stop using the undocumented eval_gemfile - apparently its
implementation changed

Change-Id: I5db6c98cb06baa5da2573ba15a4764cf4822aae1
Reviewed-on: https://gerrit.instructure.com/84534
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-07-11 18:03:47 +00:00
Benjamin Porter fd0f5cfddc Fix volume creation permissions issues on linux
When the gem volume gets created on linux, it gets created with root
permissions.  This causes issues on linux because the docker user (id
9999) cannot write to it when it installs gems.

By creating the directory that the volume gets mounted to in the
Dockerfile, the volume will assume the same permissions/ownership and
thus will get ownership on the host system as user 9999

Change-Id: I61a04c38dd7f4f6f526746a0d3ddab2a15549f1c
Reviewed-on: https://gerrit.instructure.com/84432
Tested-by: Jenkins
Reviewed-by: Zach Wily <zach@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
QA-Review: Benjamin Porter <bporter@instructure.com>
2016-07-06 21:02:26 +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
Neil Gupta d611168314 Don't make containerized phantomjs karma tests single-run
Change-Id: I6c3162b5e414a4ce9e814fb847153db8ddd87ab4
Reviewed-on: https://gerrit.instructure.com/82166
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Neil Gupta <ngupta@instructure.com>
QA-Review: Neil Gupta <ngupta@instructure.com>
2016-06-09 23:40:42 +00:00
Mark Severson d2a767d235 handle bundler being installed to system gems
because we control what version of bundler is installed, we uninstall
the version provided by the base image and install the version we
expect to be there. however, if the base image installs bundler to a
system gem directory, an extra option must be provided to the
uninstall command. this is an issue as we are attempting to have the
base image install bundler system-wide.

Change-Id: I0b21e557315ed4ce7382efe3d740b602b016054d
Reviewed-on: https://gerrit.instructure.com/75328
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Product-Review: Mark Severson <markse@instructure.com>
QA-Review: Mark Severson <markse@instructure.com>
2016-03-28 18:34:42 +00:00
Sterling Cobb e5a5cc0d3c hide assignment cog menu for non manage roles
fixes CNVS-9516

For account level roles that don't have the manage permission, you
should not be able to change the weight etc via the cog menu on the
assignments page. This commit ensures only users that have the manage
permission can see the cog.

Test Plan
Setting Up a User -----
1. Create a new account role (something like TestAdmin)
2. Set permissions on that role to manage and view assignments but NOT
manage a course
3. Create a new user from the admin section with that role
4. Become that user to test this
------

Given you are an account level user with the mangage_courses permission
set to true
When you go to the assignments page
Then you should see a cog menu with the weight form in it

Given you are an account level user with the mangage_courses permission
set to false
When you go to the assignments page
Then you should NOT see an admin cog menu with the weight form in it

Change-Id: I64179f247e83647b11f7f1d34358d9d31023f2e8
Reviewed-on: https://gerrit.instructure.com/72919
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins
Product-Review: Sterling Cobb <sterling@instructure.com>
2016-03-09 08:39:18 +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
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
Nathan Mills cdc4ca37ce update docker file for ruby 2.1 image changes
fixes PLAT-1330


test plan:
you should be able to build and run the docker image

Change-Id: I4620cba9f6b4378d0677e1e500c367422187a27d
Reviewed-on: https://gerrit.instructure.com/71678
Reviewed-by: Benjamin Porter <bporter@instructure.com>
Product-Review: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
2016-02-08 21:18:18 +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
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
Ethan Vizitei d2e9b12035 update bundler in dockerfile
closes CNVS-26216

canvas requires a later bundler version than before

TEST PLAN:
 1) should be able to start a rails console without bombing due to
bundler version

Change-Id: I93f94f6e1afbd153668a2d9b5bbbc672840a065d
Reviewed-on: https://gerrit.instructure.com/69742
Reviewed-by: Benjamin Porter <bporter@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
2016-01-05 22:29:38 +00:00
Benjamin Porter 434a0a3f59 Dockerfile: add utility required for building fonts
Building of fonts fails unless we have sfnt2woff

Test Plan:

  - Make sure image is built successfully
  - Make sure the following command succeeds:
    - docker-compose run --rm web bundle exec fontcustom compile --force

Change-Id: Ie7fa7e701584894ee5fd6d1eea7d4144c512b5bf
Reviewed-on: https://gerrit.instructure.com/69103
Tested-by: Jenkins
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
2015-12-18 17:32:55 +00:00
Benjamin Porter a39a2c0fc4 Simplify locale setting in Dockerfile
There is a simpler (and faster) way to set the locale properly inside
the ruby:2.1 image.

Test Plan:

    - Make sure the build succeeds and the locale is set properly

Change-Id: I1f1b7fb8f723f1c46b3f44e357789ae313513c2d
Reviewed-on: https://gerrit.instructure.com/68728
Tested-by: Jenkins
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Ryan Taylor <rtaylor@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
2015-12-12 04:34:09 +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
Benjamin Porter 0a12543fe2 Dockerfile: Bump version of bundler
Test Plan:  Make sure that bundle install in the web container succeeds

Change-Id: I67af24cab8948e367e513068ec4d434b7388e883
Reviewed-on: https://gerrit.instructure.com/67018
Reviewed-by: Alex Kovshovik <akovshovik@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Porter <bporter@instructure.com>
Tested-by: Benjamin Porter <bporter@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
2015-11-12 03:52:41 +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 21329a09f1 switch docker dev env to use node 0.12
Canvas requires node 0.12 now.

Change-Id: I6ef4159c481ae1d2b2b2dc4eb962d07d5fe83025
Reviewed-on: https://gerrit.instructure.com/62955
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Jason Madsen <jmadsen@instructure.com>
QA-Review: Jason Madsen <jmadsen@instructure.com>
2015-09-14 18:54:14 +00:00
Tyler Pickett 381ff13617 Add gulp to the image used by grunt
Change-Id: I60d14059d9f6831263e031835c6757a599c1d958
Reviewed-on: https://gerrit.instructure.com/60422
Tested-by: Jenkins
Reviewed-by: Zach Wily <zach@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
QA-Review: Tyler Pickett <tpickett@instructure.com>
2015-08-13 02:16:06 +00:00
Ethan Vizitei 8c48fad850 my kinesis won't start without this
closes RC-70

I was continuing to error with this:

kinesis_1 | LevelUPError: Failed to require LevelDOWN (Cannot find module 'leveldown/package'). Try `npm install leveldown` if it's missing

Adding the npm install command to the Dockerfile for
kinesis seemed to solve the problem.

Change-Id: I963e97761c966492fca8b3d8eec607d628902af9
Reviewed-on: https://gerrit.instructure.com/59966
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-08-04 22:31:01 +00:00
Zach Wily 1bb6e4509a spec: ensure we wait for a new page load when doing a get
This is another attempt to fix selenium spec reliability. Without this
change, when doing a `get` on a URL, we weren't waiting for the new page
to actually load before doing our checks. This leads to stale element
errors, etc.

We do have to be sure to *not* wait for a new page load if the target
URL is the same as the current URL, but with a different hash.

Running the following command:

```
for i in $(seq 10); do
  echo "**** $i"
  bundle exec rspec -e "moving outcomes tree should move a learning outcome group via tree modal" spec/selenium/
done
```

would fail at least half the time without this patchset, and never fails
with it (in my testing).

Change-Id: I2d707f96d7713f69be865355d8a78bad1261d446
Reviewed-on: https://gerrit.instructure.com/53211
Tested-by: Jenkins
Reviewed-by: Zach Wily <zach@instructure.com>
Product-Review: Zach Wily <zach@instructure.com>
QA-Review: Zach Wily <zach@instructure.com>
2015-05-02 13:21:05 +00:00
Zach Wily e1d0fdaeac switch dev Dockerfile to run as docker user
Change-Id: Ie2a0bfc4cb84dd717fbaccb3b55531981ebba0d5
Reviewed-on: https://gerrit.instructure.com/53287
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Zach Wily <zach@instructure.com>
QA-Review: Zach Wily <zach@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
2015-05-01 18:50:34 +00:00
Zach Wily 521f619a3e switch to node image
Change-Id: Ibe5803fc1b3cfde211088f0661a98115e947d6a8
Reviewed-on: https://gerrit.instructure.com/52688
Tested-by: Jenkins
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Zach Wily <zach@instructure.com>
QA-Review: Zach Wily <zach@instructure.com>
2015-04-28 19:27:26 +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