Skip to content

Commit ba460f9

Browse files
authored
Merge pull request #99 from ubccpsc310/cs310_2023w1
2023W1/W2 Changes Everything tested and deployed in prod. Would be a good point for upstream to pull changes.
2 parents d2dee3d + dc642dd commit ba460f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+5263
-3659
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ Instructions for getting started with Classy have been sorted into sections base
8484
- [2. Hardware Requirements](/docs/tech-staff/hardware.md)
8585
- [3. Installation](/docs/tech-staff/install.md)
8686
- [3.1 Software Dependencies](/docs/tech-staff/install.md#software-dependencies)
87-
- [3.2 Install Classy](/docs/tech-staff/install.md#install-classy)
87+
- [3.2 Classy Installation](/docs/tech-staff/install.md#install-classy)
8888
- [3.3 System Configuration](/docs/tech-staff/install.md#create-user-group)
8989
- [3.4 Create SSL Certificates](/docs/tech-staff/install.md#create-ssl-certificates)
9090
- [3.5 Configure Firewall Rules](/docs/tech-staff/install.md#create-firewall-rules)
91-
- [4. Github Setup](/docs/tech-staff/githubsetup.md)
91+
- [4. GitHub Setup](/docs/tech-staff/githubsetup.md)
9292
- [5. Backup Configuration](/docs/tech-staff/backups.md)
9393
- [6. Build/Start/Stop Classy](/docs/tech-staff/operatingclassy.md)
9494
- [7. Patching](/docs/tech-staff/updates.md)
@@ -101,3 +101,4 @@ Instructions for getting started with Classy have been sorted into sections base
101101
## License
102102

103103
[MIT](LICENSE)
104+

docs/courses/310.md

Lines changed: 5 additions & 157 deletions
Original file line numberDiff line numberDiff line change
@@ -1,161 +1,9 @@
11
# CPSC 310
22

3-
## Note: this document is stale; better docs exist [here](https://github.students.cs.ubc.ca/CPSC310/project-resources/blob/master/docs/README.md) and [here](https://github.students.cs.ubc.ca/CPSC310/classy-cs310-plugin).
3+
## Note: this document is stale; better docs exist [here](https://github.students.cs.ubc.ca/CPSC310/project-resources/blob/master/docs/README.md) and [here](https://github.students.cs.ubc.ca/CPSC310/classy-cs310-plugin).
44

5-
A brief set of instructions for configuring Classy for 310.
6-
7-
### Initial Setup
8-
9-
* Request that the tech staff provision a VM and configure classy (including all required `autobot` tokens and the `github.student` org and `admin/staff` teams) for the term.
10-
* Visit the [classy instance](https://cs310.students.cs.ubc.ca), import the classlist (using the `Update Classlist` API button in the config tab), and provision the deliverables (at least `d0` as shown below).
11-
* Provision some repositories.
12-
13-
<!--
14-
* Request a VM from the tech staff by emailing `help@cs`.
15-
* Request a GitHub org from the tech staff by emailing `help@cs`.
16-
* In the org settings (under Member Privileges):
17-
* `Allow members to delete or transfer repositories for this organization` should be `false`.
18-
* `Allow members to change repository visibilities for this organization` should be `false`.
19-
* `Allow forking of private repositories` should be `false`.
20-
* Create a `staff` team; add all TAs to this team.
21-
* Create an `admin` team; add all faculty and `autobot` to this team.
22-
* Install Classy on the VM using the other instructions in this directory.
23-
-->
24-
25-
### Monitoring Classy
26-
27-
The VM should have monitoring configured by default:
28-
29-
* Create tunnel on your machine: `ssh -L19999:localhost:19999 cs310.students.cs.ubc.ca`
30-
* Connect: `http://localhost:19999`
31-
32-
### Configuring Classy
33-
34-
* Create your Deliverables (`d0`, `d1`, `d2`, `d3`, `d4`, and `project`). The two deliverables that will provision repositories are `d0` and `project`.
35-
36-
* `d0` deliverable settings:
37-
* Deliverable Id: `d0`
38-
* URL: https://github.com/ubccpsc/310/blob/<TERM BRANCH HERE>/project/Deliverable0.md
39-
* Visible: `true` (`false` if you're not quite ready to deploy, can change later)
40-
* Rubric: `{}`
41-
* Custom: `{}`
42-
* Open: _open date_; first day of class is fine
43-
* Close: _close date_; due date for project (usually around Sept 16 @ 1800)
44-
* Allow late AutoTest: `false`
45-
* Grades Released: `false`
46-
* Will Provision Repos: `true`
47-
* Import URL: `https://github.students.cs.ubc.ca/CPSC310/bootstrap.git` (make sure links in `bootstrap/README.md` are up-to-date)
48-
* Repo prefix: `''` (Repo name will be `d0_userXXX` for students, `d0_CWL` for staff)
49-
* Team prefix: `''` (Team name will be `d0_userXXX` for students, `d0_CWL` for staff)
50-
* Min size: `1`
51-
* Max size: `1`
52-
* Same lab: `true`
53-
* Students make teams: `false`
54-
* Will use AutoTest: `true`
55-
* Use `Create New image` to build your docker image (or select one if it has previously been created).
56-
* Container timeout: `300` (5 minutes)
57-
* Student Delay: `43200` (12 hours)
58-
* Regression Deliverables: `` (blank)
59-
* Custom Autotest Parameters: `{}`
60-
* `d1` deliverable settings:
61-
* Deliverable Id: `d1`
62-
* URL: _deliverable description url_
63-
* Visible: `true`
64-
* Rubric: `{}`
65-
* Custom: `{}`
66-
* Open: _open date_; first day of class is fine
67-
* Close: _close date_
68-
* Grades Released: `false`
69-
* Will Provision Repos: `false`
70-
* Will use AutoTest: `true`
71-
* Docker image name: `TBD: NICK`
72-
* Container timeout: `300` (5 minutes)
73-
* Student Delay: `43200` (12 hours)
74-
* Regression Deliverables: `` (blank)
75-
* Custom Autotest Parameters: `{}` **Note**: to show both public and private tests, set this to `{feedbackMode: "combined"}`
76-
* `d2` deliverable settings:
77-
* Deliverable Id: `d2`
78-
* URL: _deliverable description url_
79-
* Visible: `true`
80-
* Rubric: `{}`
81-
* Custom: `{}`
82-
* Open: _open date_; first day of class is fine
83-
* Close: _close date_
84-
* Grades Released: `false`
85-
* Will Provision Repos: `false`
86-
* Will use AutoTest: `true`
87-
* Docker image name: `TBD: NICK`
88-
* Container timeout: `300` (5 minutes)
89-
* Student Delay: `43200` (12 hours)
90-
* Regression Deliverables: `d1`
91-
* Custom Autotest Parameters: `{}` **Note**: to show both public and private tests, set this to `{feedbackMode: "combined"}`
92-
* `d3` deliverable settings:
93-
* Deliverable Id: `d3`
94-
* URL: _deliverable description url_
95-
* Visible: `true`
96-
* Rubric: `{}`
97-
* Custom: `{}`
98-
* Open: _open date_; first day of class is fine
99-
* Close: _close date_
100-
* Grades Released: `false`
101-
* Will Provision Repos: `false`
102-
* Will use AutoTest: `true`
103-
* Docker image name: `TBD: NICK`
104-
* Container timeout: `300` (5 minutes)
105-
* Student Delay: `43200` (12 hours)
106-
* Regression Deliverables: `d1, d2`
107-
* Custom Autotest Parameters: `{}` **Note**: to show both public and private tests, set this to `{feedbackMode: "combined"}`
108-
* `d4` deliverable settings:
109-
* Deliverable Id: `d4`
110-
* URL: _deliverable description url_
111-
* Visible: `true`
112-
* Rubric: `{}`
113-
* Custom: `{}`
114-
* Open: _open date_; first day of class is fine
115-
* Close: _close date_
116-
* Grades Released: `false`
117-
* Will Provision Repos: `false`
118-
* Will use AutoTest: `true`
119-
* Docker image name: `TBD: NICK`
120-
* Container timeout: `300` (5 minutes)
121-
* Student Delay: `43200` (12 hours)
122-
* Regression Deliverables: `` (no longer used)
123-
* Custom Autotest Parameters: `{}`
124-
* `project` deliverable settings:
125-
* Deliverable Id: `project`
126-
* URL: _deliverable description url_
127-
* Visible: `false`
128-
* Rubric: `{}`
129-
* Custom: `{}`
130-
* Open: _open date_; first day of class is fine
131-
* Close: _close date_
132-
* Grades Released: `false`
133-
* Will Provision Repos: `true`
134-
* Import URL: `https://github.ugrad.cs.ubc.ca/CPSC310-2018W-T1/bootstrap.git` (should be updated each term)
135-
* Team prefix: `team` (`team_project_` will be prepended)
136-
* Repo prefix: '' (blank) (`project_` will be prepended)
137-
* Min size: `2`
138-
* Max size: `2`
139-
* Same lab: `true`
140-
* Students make teams: `true`
141-
* Will use AutoTest: `true`
142-
* Docker image name: `cpsc310image`
143-
* Container timeout: `300` (5 minutes)
144-
* Student Delay: `43200` (12 hours)
145-
* Regression Deliverables: `` (blank)
146-
* Custom Autotest Parameters: `{}`
147-
148-
# Provisioning repos
149-
150-
* Visit `Manage Repositories` in the classy Config tab.
151-
* If you want initial grading on all the repos you provision, be sure to set the `Default deliverable` in the config tab first.
152-
* Select the deliverable you want to provision, and then the repos you want to provision (I would start with one, but if you're feeling lucky do them all).
153-
* This will create the repo and give staff access to it, but _not_ the students.
154-
* This task will take a long time (~10-15 seconds per repo), you can't close the browser while this is happening.
155-
* You can watch progress using the Classy toast, or just visit the GitHub dashboard for the term to see repos show up.
156-
* When you're happy with the repositories that have been provisioned you can release them to the students.
157-
* This might require refreshing the `Provision & Release` results (do this by just toggling the deliverable dropdown).
158-
* Select the repos you want to release and release them. This is a fast task (a few seconds at most per repository).
159-
* Students should then have access to the repo.
160-
* Make sure the `Default deliverable` is set in the config tab so that AutoTest runs on all pushes.
5+
### Viewing with the database (changes strongly discouraged)
1616

7+
* Configure your SSH keys on `remote` and `cs310`
8+
* Open an SSH tunnel: ssh -J remote.cs.ubc.ca cs310.students.cs.ubc.ca -L 27017:127.0.0.1:27017
9+
* With Robo3T: connect to `localhost:27017`. Do not use SSH tunnel (in Robo) and just connect as if local.

docs/courses/sdmm.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
# SDMM DevOps
22

3-
Host: [https://sdmm.cs.ubc.ca](https://sdmm.cs.ubc.ca)
4-
5-
### Update running instance:
6-
7-
To deploy new changes on SDMM, follow these steps:
3+
## The project component of the SDMM is not offered anymore as of January 2024. These can be ignored and removed.
84

9-
1. `sudo su w-sdmm`
10-
2. `cd /opt/classy`
11-
3. `git pull`
12-
4. `docker build -t classy:base .`
13-
5. `docker compose -f docker compose.yml -f docker compose.sdmm.yml up --detach --build portal autotest`
14-
15-
### Configuration
16-
17-
* If you want access to the admin dashboard, add your GitHub user to the `staff` team within the sdmm GitHub organization.
5+
Host: [https://sdmm.cs.ubc.ca](https://sdmm.cs.ubc.ca)

docs/developer/contributing.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- [Local Development Fork Setup](#local-development-fork-setup)
88
- [Remote Setup of a Fork](#remote-setup-of-a-fork)
99
- [Modifying Classy on Your Fork](#modifying-classy-on-your-fork)
10+
- [Running Local Tests](#running-local-tests)
1011
- [Main repos](#main-repos)
1112
- [Goals](#goals)
1213
- [Pulling changes from `root/main` into `fork/main`](#pulling-changes-from-rootmain-into-forkmain)
@@ -93,6 +94,15 @@ During the term, `ubccpsc/classy` will only receive critical bug fixes so course
9394

9495
Custom changes can be made to code in your fork, but the custom changes should **NOT** be pushed back to the root `Classy` repository, unless it is a needed feature.
9596

97+
## Running Local Tests
98+
99+
Both AutoTest and Classy have extensive test suites. While these will be run by CI, during development you usually want to run them locally.
100+
To do this you need to do two things:
101+
1. Ensure you have a local mongo instance running (see `DB_URL` in `.env`).
102+
In a terminal, run: `docker run -p 27017:27017 mongo`
103+
1. Have a test profile in your IDE that runs the tests. In Webstorm, this is done by creating a Mocha target with node options `--require dotenv/config -r tsconfig-paths/register` as the node options and the test directory pointed to the relevant test parent for the project. You will also want to set `Compile typescript` as a before launch action.
104+
1. Ensure you have a valid `.env` file in the root of the project. You can copy the `.env.example` file and fill in the values.
105+
96106
## Main repos
97107

98108
* `ubccpsc/classy/main` (hereby `root`) is the core project that repos pull stable code from

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"@types/fs-extra": "5.0.0",
3939
"@types/jszip": "3.1.6",
4040
"@types/mocha": "2.2.44",
41-
"@types/mongodb": "^3.6.20",
4241
"@types/node": "^18.11.18",
4342
"@types/node-fetch": "^2.5.5",
4443
"@types/restify": "8.5.5",

0 commit comments

Comments
 (0)