Skip to content

Commit e63d4da

Browse files
authored
Merge pull request ucfopen#950 from SimHoZebs/improve-install-docs
Improve install docs
2 parents 6575ec0 + e44cc6f commit e63d4da

File tree

2 files changed

+117
-140
lines changed

2 files changed

+117
-140
lines changed

INSTALL.md

Lines changed: 59 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,96 +2,104 @@
22
UDOIT can be installed on your own existing servers with the following instructions. UDOIT is also available as a hosted and maintained product by [Cidi Labs](https://cidilabs.com). UDOIT is built using the [PHP Symfony Framework](https://symfony.com).
33

44
## System Requirements
5-
The system requirements depend on how you install UDOIT. If you use Docker, the host system doesn't require any additional software.
5+
The system requirements depend on how you install UDOIT.
66

77
### Docker Method
88
* Docker
99
* Docker Compose
10+
* Cmake (This is available on most systems by default)
1011

1112
### Manual Installation Method
1213
* Apache or Nginx webserver
1314
* PHP 8.1, 8.2
1415
* MySQL, MariaDB or PostgreSQL
1516
* Git (If you are using The Git Method below) or if you plan on contributing to UDOIT
16-
* Node v16 is supported; other versions may work
17+
* Node v16 is supported; later versions may work
1718
* Yarn
1819

1920
## Download the Code
20-
### Option 1: Git
21-
We strongly recommend managing the source code through Git. The benefit of this method is that you can update an existing installation of UDOIT by simply using `git pull`. It also lets you roll back to previous versions if needed. Follow these steps:
21+
### Option 1: Git (Strongly recommended)
22+
This method is strongly recommend as it allows UDOIT to be updated through a simple command on the terminal: `git pull`. It also lets you roll back to previous versions if needed. Follow these steps:
2223

23-
1. Install Git on your server
24-
2. Navigate to the directory on your server where UDOIT will live
25-
3. Run `git clone [email protected]:ucfopen/UDOIT.git . ` (The . is important. It tells Git to download the files to the current directory.)
24+
1. Install Git on your server (https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
25+
2. Create a folder/directory in which UDOIT will reside (e.g `UDOIT`) and navigate to it.
26+
3. Inside the UDOIT directory, run `git clone [email protected]:ucfopen/UDOIT.git . ` (The . is important; It tells Git to download the files to the current directory.)
2627

2728
### Option 2: Zip File
28-
If you prefer not to use Git, you can download a zip file of the latest release from the [Releases Page](https://github.com/ucfopen/UDOIT/releases). Unzip it in the directory on your server where UDOIT will live.
29+
If you prefer not to use Git, you can download the zip file of the latest release from the [Releases Page](https://github.com/ucfopen/UDOIT/releases). Unzip it in the directory in which UDOIT will reside.
2930

3031
## .ENV Setup
31-
UDOIT uses a `.env` file for storing configuration variables. To create it:
32+
UDOIT stores configuration variables in a `.env` file. To create it:
3233

33-
1. Copy the file `.env.example` to `.env` by running
34+
1. Inside the UDOIT directory, run the following command in shell:
3435
```
3536
cp .env.example .env
3637
```
37-
2. Leave `APP_ENV` set to `prod`
38-
> If you are setting up a development environment, set 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.
39-
3. Add your database information to the `DATABASE_URL` variable. (The default value of `mysql://root:root@db:3306/udoit3` is suitable for running it on your local computer using Docker.)
40-
4. Modify the `BASE_URL` to match the URL of your instance of UDOIT. (The default value of `http://127.0.0.1:8000/udoit3` is suitable for running it on your local computer using Docker.)
41-
5. Modify the `WEBPACK_PUBLIC_PATH` to match the `BASE_URL` you set. (The default value of `/udoit3/build` is suitable for running it on your local computer usind Docker. Example: If your `BASE_URL` is set to `http://127.0.0.1:8000`, your `WEBPACK_PUBLIC_PATH` should be `/build`.)
42-
6. Set `APP_LMS` to the name of your LMS.
43-
* `canvas` if you are using the Canvas LMS.
44-
* `d2l` if you are using the D2l Brightspace LMS.
45-
7. If you are using UDOIT with a self-hosted instance of Canvas, you can add the `JWK_BASE_URL` variable and set it to the URL of your instance of Canvas. (Example: `JWK_BASE_URL="https://canvas.dev.myschool.edu"`)
46-
8. (Optional) You can change the default language for your entire UDOIT instance by adding the `DEFAULT_LANG` variable. Currently supported languages are English (`en`) and Spanish (`es`).
38+
This command copies the `.env.example` into `.env`, creating the `.env` file in the process if it does not exist.
4739

48-
## Docker
49-
We provide a fast and simple way of setting up a local UDOIT instance through the use of Docker containers.
40+
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`.
42+
- `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.
43+
- `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.
44+
- `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`).
45+
- `APP_LMS`: `canvas` for Canvas LMS. `d2l` for D2l Brightspace LMS.
46+
- `JWK_BASE_URL`: If you are self-hosting Canvas, you may set it to the URL of your instance of Canvas. (Example: `JWK_BASE_URL="https://canvas.dev.myschool.edu"`)
47+
- `DEFAULT_LANG`: (optional) `en` for English. `es` for Spanish. This is English by default.
48+
3. Copy the contents of `ins.env.example` over to a new file called `ins.env`, and keep it in mind for when you're asked to fill out the institutions table. The `makefile` has a command to speed up this process.
5049

51-
### 1. Install Docker
52-
To set up the docker containers, you must first install [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/).
50+
## Installation
5351

54-
### 2. Build the Containers
55-
If you prefer to build the containers yourself, or you are actively developing UDOIT and need to rebuild the containers to test your cahnges, run the following command from within the UDOIT directory:
52+
### Option 1: Docker
53+
We provide a fast and simple way of setting up a local UDOIT instance through Docker.
5654

57-
docker compose -f docker-compose.nginx.yml up
55+
1. Install [Docker Desktop](https://docs.docker.com/get-docker/). This will install Docker and Docker Compose on your system.
56+
> Alternatively, you may install Docker and [Docker Compose](https://docs.docker.com/compose/install/) individually.
5857

59-
### 3. Wait
60-
Wait for all of the containers to finish initializing. This can take over 15 minutes. You will know you are ready to proceed with the next step when you haven't seen any output in your terminal for a few minutes.
58+
2. Build the Containers
6159

62-
### 4. Set up the Database
63-
The first time you start the containers, you will need to set up the database to handle all the information UDOIT generates as it runs. Run the following command:
60+
```
61+
make start
62+
```
6463

65-
docker compose -f docker-compose.nginx.yml run php php bin/console doctrine:migrations:migrate
64+
3. Once the containers are initialized, run the following command:
65+
```
66+
make migrate
67+
```
68+
This applies migrations necessary to set up the database to store all UDOIT data.
6669

67-
> You will also need to run that command whenever you update to a new version of UDOIT.
70+
Running this will give the following warning:
6871

69-
### 5. Next steps
70-
Skip to [Testing your Setup](#testing-your-setup) to continue.
72+
> WARNING! You are about to execute a migration in database "udoit3" that could result in schema changes and data loss. Are you sure you wish to continue? (yes/no) [yes]:
7173
72-
### 6. Stopping the Containers
73-
If you ever want to stop the containers, you can do so with the following command:
74+
Type `yes` and proceed. The warning is expected and is a non issue.
7475

75-
docker compose -f docker-compose.nginx.yml down
76+
> Note: You will need to run this command whenever you update to a new version of UDOIT.
7677
78+
UDOIT should be installed and running as Docker containers.
7779

80+
4. To stop the UDOIT containers, run the following command:
81+
```
82+
make down
83+
```
84+
85+
> Please be sure to review the `makefile` for more information on what these commands do.
7886
79-
## Manual Installation
87+
### Option 2: Manual Installation
8088
If you prefer not to use Docker, the process is more complicated:
8189

82-
### Configuring your Web Server
83-
The details of configuring a web server with PHP are out of the scope of this README. You should configure your web server to point to UDOIT's "public" folder as the web root folder. Doing this will hide the configuration and source files so that they are not web accessible. It will also clean up your URL structure so that you don't need to include the "public" folder in any of the URLs to UDOIT.
90+
#### 1. Configuring your Web Server
91+
The details of configuring a web server with PHP are out of the scope of this README. You should configure your web server to point to UDOIT's "public" folder as the web root folder. Doing this will hide the configuration and source files so that they are not web accessible. It will also clean up your URL structure so that you don't need to include the "public" folder in any of the URLs to UDOIT.
8492

8593
If you are using NGINX as your web server, you can use the `build/nginx/nginx.conf` file as a starting point.
8694

87-
### Installing Composer Dependencies
95+
#### 2. Installing Composer Dependencies
8896
UDOIT uses Composer to install PHP dependencies. Follow the upstream documentation on [Composer Installation](https://getcomposer.org/download/) to install `composer.phar` into the project root, then run the following:
8997

9098
php composer.phar install --no-dev
9199

92100
> Remove the `--no-dev` flag if you set `APP_ENV=dev` in your `.env.local` file.
93101
94-
### Database Setup
102+
#### 3. Database Setup
95103
While UDOIT is configured to use MySQL or MariaDB by default, Symfony can be configured to work with other databases as well. See the Symfony documentation for details.
96104

97105
Use Symfony to create the database with this command:
@@ -110,7 +118,7 @@ If you are operating in a production environment you will need to generate the d
110118

111119
php bin/console cache:warmup --env=prod
112120

113-
### JavaScript
121+
#### 4. JavaScript
114122
UDOIT uses [node](https://nodejs.org) and [yarn](https://yarnpkg.com/) to compile the JavaScript. Install Node and Yarn on your system, then run:
115123

116124
yarn install
@@ -119,16 +127,17 @@ To build the JavaScript files for production, run the command:
119127

120128
yarn build
121129

122-
## Testing Your Setup
123-
Once you have completed the steps above you will want to test your setup. Unfortunately, UDOIT is an LTI tool that can only fully run within the LMS. You will need to complete the steps in the [INSTALL_CANVAS.md](INSTALL_CANVAS.md) or [INSTALL_D2L.md](INSTALL_D2L.md) to test UDOIT fully.
124-
125-
However, UDOIT does have one URL that is publicly available outside of the LMS. To test your server setup point your browser to:
130+
## Testing successful installation
131+
While UDOIT is an LTI tool that only functions fully within an LMS, you can plug the following URL in your browser to test if UDOIT is installed correctly:
126132

127133
<BASE_URL>/lti/config
128134

129135
For example, if you are setting this up on your local computer via Docker, it may look like:
130136

131137
http://127.0.0.1:8000/udoit3/lti/config
132138

133-
## Configuring Your LMS
134-
You will need to complete the steps in the [INSTALL_CANVAS.md](INSTALL_CANVAS.md) or [INSTALL_D2L.md](INSTALL_D2L.md) to configure UDOIT to work within your LMS.
139+
140+
## Connecting UDOIT to an LMS
141+
To configure it fully within your LMS, follow the installation instructions below that apply to you.
142+
- To install it on Canvas, follow [INSTALL_CANVAS.md](INSTALL_CANVAS.md)
143+
- or for D2l Brightspace, follow [INSTALL_D2L.md](INSTALL_D2L.md)

INSTALL_CANVAS.md

Lines changed: 58 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +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-
**Skills Required**
9-
* Ability to insert MySQL
10-
118
## Create an API Developer Key
12-
UDOIT requires an API developer key, since all course data is gathered through the Canvas API.
9+
UDOIT requires an API developer key since all course data is gathered through the Canvas API.
1310

1411
### Steps to Create an API Key
15-
* Navigate to `Developer Keys` in the root account menu.
16-
* Choose to add a `Developer Key` => `API Key`
17-
18-
Provide values for the following fields:
19-
* Key Name
20-
* i.e. UDOIT 3 API
12+
1. Navigate to `Developer Keys` in the root account menu.
13+
2. Choose to add a `Developer Key` => `API Key`
14+
3. Provide values for the following fields:
15+
* Key Name: i.e. UDOIT 3 API
2116
* Owner Email
22-
* Redirect URIs
23-
* <YOUR_UDOIT_BASE_URL>/authorize/check
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`
2424
* Redirect URL (Legacy) : *SKIP*
2525
* Vendor Code : *SKIP*
26-
* Icon URL
27-
* <YOUR_UDOIT_BASE_URL>/build/static/udoit_logo.svg
2826
* Notes : *Optional*
29-
* These are only seen by other LMS admins
27+
* These are only seen by other LMS admins
3028
* Test Cluster Only : *SKIP*
31-
* Client Credentials
32-
* Canvas
33-
* Enforce Scopes
34-
* See section below for a list of scopes to enable.
35-
* Check `Allow Include Parameters`
36-
* Save
37-
* Click `ON` to enable the newly created key
29+
4. Save
30+
5. Click `ON` to enable the newly created key
3831

3932
### Scopes
4033
We strongly recommend you enforce scopes with your API key. The following scopes must be enabled for UDOIT to work.
@@ -95,84 +88,57 @@ Follow the steps below, replacing `<YOUR_UDOIT_BASE_URL>` with the `BASE_URL` va
9588

9689
1. Navigate to `Developer Keys` in the root account menu.
9790
2. Choose to add a `Developer Key` => `LTI Key`
98-
99-
Provide values for the following fields:
100-
* Key Name
101-
* i.e. UDOIT 3 LTI
91+
3. Provide values for the following fields:
92+
* Key Name: i.e. UDOIT 3 LTI
10293
* Owner Email
103-
* Redirect URIs
104-
* <YOUR_UDOIT_BASE_URL>/lti/authorize/check
105-
* Notes : *Optional*
106-
* These are only seen by other LMS admins
107-
* Configure method
108-
* Enter URL
109-
* JSON URL
110-
* <YOUR_UDOIT_BASE_URL>/lti/config
111-
* Click Save. Reload the page, then edit the LTI key you just created.
112-
* If your instance of Canvas is self-hosted, modify the URL under **JWK Method** to point to your canvas instance.
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.
11398
* Set Additional Settings
114-
* Domain
115-
* Your UDOIT domain
116-
* Tool ID
117-
* Enter a name
118-
* Custom Fields
119-
```
120-
lms_id=canvas
121-
lms_user_id=$Canvas.user.id
122-
lms_course_id=$Canvas.course.id
123-
lms_api_domain=$Canvas.api.domain
124-
```
125-
* Save
126-
* Click `ON` to enable the newly created key
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+
```
108+
4. Click Save.
109+
5. Click `ON` to enable the newly created key.
127110

128111
---
129112
## Docker Compose Base URL
130113
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`.
131114

132115
---
133116
## Update the Institutions Table
134-
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.
135-
136-
**Note:** This step requires knowledge of MySQL.
137-
138-
The following fields need to be populated in the `institution` table.
139-
* title
140-
* Your institution's name
141-
* lms_domain
142-
* The Canvas domain name of your institution.
143-
* Most institutions will use their `.instructure.com` domain.
144-
* Do not include `https://` or a trailing slash.
145-
* Example: `myschool.instructure.com`
146-
* lms_id
147-
* `canvas`
148-
* lms_account_id
149-
* The Canvas account ID (as a string) where UDOIT will be installed.
150-
* created
151-
* Date in this format: `2021-06-08`
152-
* status
153-
* `1` if you are using MySQL or MariaDB (or Docker)
154-
* `true` if you are using PostgreSQL
155-
* vanity_url
156-
* Your LMS vanity URL
157-
* Example: `canvas.myschool.edu`
158-
* metadata
159-
* Optional
160-
* Institution specific settings, such as language or excluded tests.
161-
* Text representation of a JSON object.
162-
* Example: `{"lang":"es"}`
163-
* Currently supported languages are English (en) and Spanish (es).
164-
* api_client_id
165-
* The ID of the developer API key you created earlier.
166-
* Client ID is found in the `Details` column on the Developer Keys page
167-
* Example: 1234500000000001234
168-
* api_client_secret
169-
* The secret for the API key you created earlier.
170-
* Click `Show Key` on the API key you created earlier.
171-
* This key will be stored encrypted on the first use of the key.
117+
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.
118+
119+
1. Inside the UDOIT directory, run `cp .ins.env.example .ins.env`
120+
2. open `.ins.env` with a text editor (i.e. Notepad, VS Code, etc.)
121+
3. Fill in the fields with the appropriate values
122+
- `TITLE` = Your institution's name
123+
- `LMS_DOMAIN` = The Canvas domain name of your institution (i.e. `myschool.instructure.com`)
124+
- `LMS_ID` = `canvas`
125+
- `LMS_ACCOUNT_ID` = The Canvas account ID (as a string) where UDOIT will be installed
126+
- `CREATED` = Date in this format: `2021-06-08`
127+
- `STATUS` = `1` if you are using MySQL or MariaDB (or Docker), `true` if you are using PostgreSQL
128+
- `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"}`)
130+
- `API_CLIENT_ID` = The ID of the developer API key you created earlier
131+
- `API_CLIENT_SECRET` = The secret for the API key you created earlier
132+
133+
4. Run the following command:
134+
```
135+
make ins-mysql # For MySQL or MariaDB
136+
make ins-psql # For PostgreSQL
137+
```
172138

173139
---
174140
## .ENV Setup
175-
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.
141+
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.
176142

177143
---
178144
## Install the App
@@ -183,8 +149,10 @@ UDOIT now needs to be added to an account in Canvas. Follow these steps to add t
183149
4. Choose the `Apps` tab.
184150
5. Choose the `View App Configurations` button in the top right corner.
185151
6. Click `+ App`
186-
7. In the dialog that appears, choose "Configuration Type" "By Client ID".
152+
7. In the dialog that appears, choose "Configuration Type: By Client ID".
187153
8. Paste the `Client ID` from the developer LTI Key you created earlier.
188154
9. Click Submit.
189155

190-
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 to an account, "UDOIT Admin" will also appear in the account navigation menu.
156+
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)