Skip to content

Commit 6998fd3

Browse files
committed
updated the instructions to be a little neater
1 parent acacb60 commit 6998fd3

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
@@ -54,14 +64,6 @@ We strongly recommend you enforce scopes with your API key. The following scopes
5464
* files
5565
* url:GET|/api/v1/courses/:course_id/files
5666
* url:GET|/api/v1/courses/:course_id/files/:id
57-
* context_module_items_api
58-
* url:GET|/api/v1/courses/:course_id/modules/:module_id/items
59-
* url:GET|/api/v1/courses/:course_id/modules/:module_id/items/:id
60-
* url:PUT|/api/v1/courses/:course_id/modules/:module_id/items/:id
61-
* context_modules_api
62-
* url:GET|/api/v1/courses/:course_id/modules
63-
* url:GET|/api/v1/courses/:course_id/modules/:id
64-
* url:PUT|/api/v1/courses/:course_id/modules/:id
6567
* quizzes/quiz_questions
6668
* url:GET|/api/v1/courses/:course_id/quizzes/:quiz_id/questions
6769
* url:GET|/api/v1/courses/:course_id/quizzes/:quiz_id/questions/:id
@@ -79,7 +81,6 @@ We strongly recommend you enforce scopes with your API key. The following scopes
7981
* url:GET|/api/v1/courses/:course_id/pages/:url_or_id
8082
* url:PUT|/api/v1/courses/:course_id/pages/:url_or_id
8183

82-
---
8384
## Create an LTI Developer Key
8485
UDOIT uses LTI 1.3 to integrate with the LMS.
8586

@@ -89,30 +90,26 @@ Follow the steps below, replacing `<YOUR_UDOIT_BASE_URL>` with the `BASE_URL` va
8990
1. Navigate to `Developer Keys` in the root account menu.
9091
2. Choose to add a `Developer Key` => `LTI Key`
9192
3. Provide values for the following fields:
92-
* Key Name: i.e. UDOIT 3 LTI
93-
* Owner Email
94-
* Redirect URIs: <YOUR_UDOIT_BASE_URL>/lti/authorize/check
95-
* Configure method: Enter URL
96-
* JSON URL: <YOUR_UDOIT_BASE_URL>/lti/config
97-
* If your instance of Canvas is self-hosted, modify the URL under **JWK Method** to point to your Canvas instance.
98-
* Set Additional Settings
99-
* Domain: Your UDOIT domain
100-
* Tool ID: Enter a name
101-
* Custom Fields
102-
```
103-
lms_id=canvas
104-
lms_user_id=$Canvas.user.id
105-
lms_course_id=$Canvas.course.id
106-
lms_api_domain=$Canvas.api.domain
107-
```
93+
* Key Name: i.e. UDOIT 3 LTI
94+
* Owner Email
95+
* Redirect URIs: <YOUR_UDOIT_BASE_URL>/lti/authorize/check
96+
* Configure methods
97+
* Manual entry
98+
* Paste JSON URL: <YOUR_UDOIT_BASE_URL>/lti/config
99+
* If your instance of Canvas is self-hosted, modify the URL under **JWK Method** to point to your Canvas instance.
100+
* Set Additional Settings
101+
* Domain: Your UDOIT domain
102+
* Tool ID: Enter a name
103+
* Custom Fields
104+
```
105+
lms_id=canvas
106+
lms_user_id=$Canvas.user.id
107+
lms_course_id=$Canvas.course.id
108+
lms_api_domain=$Canvas.api.domain
109+
```
108110
4. Click Save.
109-
5. Click `ON` to enable the newly created key.
110-
111-
---
112-
## Docker Compose Base URL
113-
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`.
111+
5. Click `ON` to enable the newly created key.
114112
115-
---
116113
## Update the Institutions Table
117114
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.
118115
@@ -126,17 +123,21 @@ UDOIT is built to support more than one LMS instance. For this purpose, we have
126123
- `CREATED` = Date in this format: `2021-06-08`
127124
- `STATUS` = `1` if you are using MySQL or MariaDB (or Docker), `true` if you are using PostgreSQL
128125
- `VANITY_URL` = Your LMS vanity URL (i.e. `canvas.myschool.edu`)
129-
- `METADATA` = Optional. Institution-specific settings, such as language or excluded tests. Text representation of a JSON object. (i.e. `{"lang":"es"}`)
126+
- `METADATA` = Optional. Institution-specific settings, such as language or excluded tests. Text representation of a JSON object. (i.e. `{"lang":"en"}`)
130127
- `API_CLIENT_ID` = The ID of the developer API key you created earlier
131128
- `API_CLIENT_SECRET` = The secret for the API key you created earlier
132129
133-
4. Run the following command:
130+
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:
131+
```
132+
make ins-mysql
133+
```
134+
Or this one if you have a PostgreSQL setup:
134135
```
135-
make ins-mysql # For MySQL or MariaDB
136-
make ins-psql # For PostgreSQL
136+
make ins-psql
137137
```
138+
Your database should now show a new row in the `institution` table, containing all the values you input above.
139+
138140
139-
---
140141
## .ENV Setup
141142
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.
142143
@@ -154,5 +155,3 @@ UDOIT now needs to be added to an account in Canvas. Follow these steps to add t
154155
9. Click Submit.
155156
156157
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.
157-
158-

0 commit comments

Comments
 (0)