Skip to content

Commit e95b69c

Browse files
authored
Merge pull request ucfopen#1077 from dmols/updated-instructions
updated the instructions to be a little neater
2 parents 7ab110d + 6998fd3 commit e95b69c

File tree

2 files changed

+75
-60
lines changed

2 files changed

+75
-60
lines changed

INSTALL.md

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ cp .env.example .env
3838
This command copies the `.env.example` into `.env`, creating the `.env` file in the process if it does not exist.
3939

4040
2. Open `.env` with a text editor (i.e. Notepad, VS Code, etc.) and make the necessary changes to the following variables:
41-
- `APP_ENV`: If you are setting up a development environment, change this to `dev` and follow the steps in [Installing Composer Dependencies](#installing-composer-dependencies) without the `--no-dev` flag to obtain all of the development packages. Otherwise, leave it as `prod`.
41+
- `APP_ENV`: If you are setting up a development environment, change this to `dev`. Otherwise, leave it as `prod`.
4242
- `DATABASE_URL`: If you are hosting UDOIT on Docker or your local machine, leave it as it is. Otherwise, change it to your database URL.
4343
- `BASE_URL`: If you are hosting UDOIT on Docker or your local machine, leave it as it is. Otherwise, change it to the URL of your instance of UDOIT.
4444
- `WEBPACK_PUBLIC_PATH`: Uf you are hosting UDOIT on Docker or your local machine, leave it as it is. Otherwise, change it to match the `BASE_URL`in such a way that `/build` is located at the root of the `BASE_URL` (Example: If your `BASE_URL` is set to `http://127.0.0.1:8000`, your `WEBPACK_PUBLIC_PATH` should be `/build`).
@@ -51,20 +51,31 @@ This command copies the `.env.example` into `.env`, creating the `.env` file in
5151
### Option 1: Docker
5252
We provide a fast and simple way of setting up a local UDOIT instance through Docker.
5353

54-
1. Install [Docker Desktop](https://docs.docker.com/get-docker/). This will install Docker and Docker Compose on your system.
55-
> Alternatively, you may install Docker and [Docker Compose](https://docs.docker.com/compose/install/) individually.
54+
#### 1. Install [Docker Desktop](https://docs.docker.com/get-docker/). This will install Docker and Docker Compose on your system.
55+
> Alternatively, you may install Docker and [Docker Compose](https://docs.docker.com/compose/install/) individually.
5656
57-
2. Build the Containers
57+
#### 2. (Optional) Install the Necessary PHP Dependencies for Dev Environment
58+
59+
UDOIT uses Composer to install PHP dependencies. If your `APP_ENV` is set to `prod`, UDOIT will handle this for you. However, if it is set to `dev`, you may need some additional dependencies.
60+
61+
You can set them up by running the following command:
62+
```
63+
docker compose -f docker-compose.nginx.yml run composer composer install
64+
```
65+
66+
#### 3. Build the Containers
5867

5968
```
6069
make start
6170
```
6271

63-
3. Once the containers are initialized, run the following command:
72+
*Note: This may take a while to fully initiate. This is normal.*
73+
#### 4. Set Up Database
74+
75+
The following command applies migrations necessary to set up the database to store all UDOIT data. Please make sure the containers have fully spun up before running this command.
6476
```
6577
make migrate
6678
```
67-
This applies migrations necessary to set up the database to store all UDOIT data.
6879

6980
Running this will give the following warning:
7081

@@ -76,12 +87,14 @@ Type `yes` and proceed. The warning is expected and is a non issue.
7687
7788
UDOIT should be installed and running as Docker containers.
7889

79-
4. To stop the UDOIT containers, run the following command:
90+
#### To stop the UDOIT containers, run the following command:
8091
```
8192
make down
8293
```
8394

84-
> Please be sure to review the `makefile` for more information on what these commands do.
95+
Please be sure to review the `makefile` for more information on what this command and others do.
96+
97+
If UDOIT is running without errors, you can move on to [installing it for your LMS](#connecting-udoit-to-an-lms)! If you're encountering errors, please check out the [wiki](https://github.com/ucfopen/UDOIT/wiki).
8598

8699
### Option 2: Manual Installation
87100
If you prefer not to use Docker, the process is more complicated:
@@ -140,3 +153,6 @@ For example, if you are setting this up on your local computer via Docker, it ma
140153
To configure it fully within your LMS, follow the installation instructions below that apply to you.
141154
- To install it on Canvas, follow [INSTALL_CANVAS.md](INSTALL_CANVAS.md)
142155
- or for D2l Brightspace, follow [INSTALL_D2L.md](INSTALL_D2L.md)
156+
157+
## Encountering Errors
158+
Please resort to the [wiki page](https://github.com/ucfopen/UDOIT/wiki) for some commonly found errors when setting up UDOIT.

INSTALL_CANVAS.md

Lines changed: 51 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,29 @@ Once UDOIT has been installed on a public web server the following steps must be
55
* Update the Institutions table
66
* Install the application
77

8+
## Docker Compose Base URL
9+
If you are setting up UDOIT for local development through `docker compose`, <YOUR_UDOIT_BASE_URL> in both the API developer key and the LTI developer key above should be set to `http://127.0.0.1:8000/udoit3`.
10+
11+
812
## Create an API Developer Key
913
UDOIT requires an API developer key since all course data is gathered through the Canvas API.
1014

1115
### Steps to Create an API Key
1216
1. Navigate to `Developer Keys` in the root account menu.
1317
2. Choose to add a `Developer Key` => `API Key`
1418
3. Provide values for the following fields:
15-
* Key Name: i.e. UDOIT 3 API
16-
* Owner Email
17-
* Redirect URIs: <YOUR_UDOIT_BASE_URL>/authorize/check
18-
* Icon URL: <YOUR_UDOIT_BASE_URL>/build/static/udoit_logo.svg
19-
* Client Credentials
20-
* Canvas
21-
* Enforce Scopes
22-
* See the section below for a list of scopes to enable.
23-
* Check `Allow Include Parameters`
24-
* Redirect URL (Legacy) : *SKIP*
25-
* Vendor Code : *SKIP*
26-
* Notes : *Optional*
27-
* These are only seen by other LMS admins
28-
* Test Cluster Only : *SKIP*
19+
* Key Name: i.e. UDOIT 3 API
20+
* Owner Email
21+
* Redirect URIs: <YOUR_UDOIT_BASE_URL>/authorize/check
22+
* Redirect URL (Legacy) : *SKIP*
23+
* Vendor Code : *SKIP*
24+
* Icon URL: <YOUR_UDOIT_BASE_URL>/build/static/udoit_logo.svg
25+
* Notes : *Optional*
26+
* These are only seen by other LMS admins
27+
* Client Credentials Audience: Canvas
28+
* Enforce Scopes
29+
* Check `Allow Include Parameters`
30+
* See the section below for a list of scopes to enable.
2931
4. Save
3032
5. Click `ON` to enable the newly created key
3133

@@ -42,6 +44,14 @@ We strongly recommend you enforce scopes with your API key. The following scopes
4244
* url:GET|/api/v1/courses/:course_id/assignments
4345
* url:GET|/api/v1/courses/:course_id/assignments/:id
4446
* url:PUT|/api/v1/courses/:course_id/assignments/:id
47+
* context_module_items_api
48+
* url:GET|/api/v1/courses/:course_id/modules/:module_id/items
49+
* url:GET|/api/v1/courses/:course_id/modules/:module_id/items/:id
50+
* url:PUT|/api/v1/courses/:course_id/modules/:module_id/items/:id
51+
* context_modules_api
52+
* url:GET|/api/v1/courses/:course_id/modules
53+
* url:GET|/api/v1/courses/:course_id/modules/:id
54+
* url:PUT|/api/v1/courses/:course_id/modules/:id
4555
* courses
4656
* url:PUT|/api/v1/courses/:id
4757
* url:GET|/api/v1/courses/:id
@@ -55,14 +65,6 @@ We strongly recommend you enforce scopes with your API key. The following scopes
5565
* files
5666
* url:GET|/api/v1/courses/:course_id/files
5767
* url:GET|/api/v1/courses/:course_id/files/:id
58-
* context_module_items_api
59-
* url:GET|/api/v1/courses/:course_id/modules/:module_id/items
60-
* url:GET|/api/v1/courses/:course_id/modules/:module_id/items/:id
61-
* url:PUT|/api/v1/courses/:course_id/modules/:module_id/items/:id
62-
* context_modules_api
63-
* url:GET|/api/v1/courses/:course_id/modules
64-
* url:GET|/api/v1/courses/:course_id/modules/:id
65-
* url:PUT|/api/v1/courses/:course_id/modules/:id
6668
* quizzes/quiz_questions
6769
* url:GET|/api/v1/courses/:course_id/quizzes/:quiz_id/questions
6870
* url:GET|/api/v1/courses/:course_id/quizzes/:quiz_id/questions/:id
@@ -84,7 +86,6 @@ We strongly recommend you enforce scopes with your API key. The following scopes
8486
* url:GET|/api/v1/courses/:course_id/enrollments
8587
*
8688

87-
---
8889
## Create an LTI Developer Key
8990
UDOIT uses LTI 1.3 to integrate with the LMS.
9091

@@ -94,30 +95,26 @@ Follow the steps below, replacing `<YOUR_UDOIT_BASE_URL>` with the `BASE_URL` va
9495
1. Navigate to `Developer Keys` in the root account menu.
9596
2. Choose to add a `Developer Key` => `LTI Key`
9697
3. Provide values for the following fields:
97-
* Key Name: i.e. UDOIT 3 LTI
98-
* Owner Email
99-
* Redirect URIs: <YOUR_UDOIT_BASE_URL>/lti/authorize/check
100-
* Configure method: Enter URL
101-
* JSON URL: <YOUR_UDOIT_BASE_URL>/lti/config
102-
* If your instance of Canvas is self-hosted, modify the URL under **JWK Method** to point to your Canvas instance.
103-
* Set Additional Settings
104-
* Domain: Your UDOIT domain
105-
* Tool ID: Enter a name
106-
* Custom Fields
107-
```
108-
lms_id=canvas
109-
lms_user_id=$Canvas.user.id
110-
lms_course_id=$Canvas.course.id
111-
lms_api_domain=$Canvas.api.domain
112-
```
98+
* Key Name: i.e. UDOIT 3 LTI
99+
* Owner Email
100+
* Redirect URIs: <YOUR_UDOIT_BASE_URL>/lti/authorize/check
101+
* Configure methods
102+
* Manual entry
103+
* Paste JSON URL: <YOUR_UDOIT_BASE_URL>/lti/config
104+
* If your instance of Canvas is self-hosted, modify the URL under **JWK Method** to point to your Canvas instance.
105+
* Set Additional Settings
106+
* Domain: Your UDOIT domain
107+
* Tool ID: Enter a name
108+
* Custom Fields
109+
```
110+
lms_id=canvas
111+
lms_user_id=$Canvas.user.id
112+
lms_course_id=$Canvas.course.id
113+
lms_api_domain=$Canvas.api.domain
114+
```
113115
4. Click Save.
114-
5. Click `ON` to enable the newly created key.
115-
116-
---
117-
## Docker Compose Base URL
118-
If you are setting up UDOIT for local development through `docker compose`, <YOUR_UDOIT_BASE_URL> in both the API developer key and the LTI developer key above should be set to `http://127.0.0.1:8000/udoit3`.
116+
5. Click `ON` to enable the newly created key.
119117
120-
---
121118
## Update the Institutions Table
122119
UDOIT is built to support more than one LMS instance. For this purpose, we have an `institution` table that must be populated with the LMS information.
123120
@@ -131,17 +128,21 @@ UDOIT is built to support more than one LMS instance. For this purpose, we have
131128
- `CREATED` = Date in this format: `2021-06-08`
132129
- `STATUS` = `1` if you are using MySQL or MariaDB (or Docker), `true` if you are using PostgreSQL
133130
- `VANITY_URL` = Your LMS vanity URL (i.e. `canvas.myschool.edu`)
134-
- `METADATA` = Optional. Institution-specific settings, such as language or excluded tests. Text representation of a JSON object. (i.e. `{"lang":"es"}`)
131+
- `METADATA` = Optional. Institution-specific settings, such as language or excluded tests. Text representation of a JSON object. (i.e. `{"lang":"en"}`)
135132
- `API_CLIENT_ID` = The ID of the developer API key you created earlier
136133
- `API_CLIENT_SECRET` = The secret for the API key you created earlier
137134
138-
4. Run the following command:
135+
With all the values now set up, you're ready to run the command that will automate the creation of your `institutions` table! Run the following command if you have a MySQL database setup:
136+
```
137+
make ins-mysql
138+
```
139+
Or this one if you have a PostgreSQL setup:
139140
```
140-
make ins-mysql # For MySQL or MariaDB
141-
make ins-psql # For PostgreSQL
141+
make ins-psql
142142
```
143+
Your database should now show a new row in the `institution` table, containing all the values you input above.
144+
143145
144-
---
145146
## .ENV Setup
146147
For cloud-hosted canvas instances, the default value for the `JWK_BASE_URL` environmental variable will work out of the box. If you are not cloud-hosted, you may need to change the value of this variable in `.env.local` to match your canvas instance.
147148
@@ -159,5 +160,3 @@ UDOIT now needs to be added to an account in Canvas. Follow these steps to add t
159160
9. Click Submit.
160161
161162
You're done! "UDOIT" should now appear in the navigation menu of the course (or every course in the account) in which you installed it. If you installed it on an account, "UDOIT Admin" will also appear in the account navigation menu.
162-
163-

0 commit comments

Comments
 (0)