Skip to content

Commit 439d00c

Browse files
committed
Run generate_configs before install
1 parent 36db6e0 commit 439d00c

File tree

1 file changed

+61
-56
lines changed

1 file changed

+61
-56
lines changed

_docs/sysadmin/installation/index.md

Lines changed: 61 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,78 @@ You can use these [instructions](/sysadmin/installation/ansible).
3434
synchronize `/etc/passwd`, `/etc/shadow`, `/etc/group`, and `/etc/gshadow` before installing
3535
the rest of Submitty to avoid mismatched UIDs and GIDs of the Submitty users.
3636

37-
1. Run the bootstrap script:
37+
1. Install Submitty:
38+
### Option 1: Run the bootstrap script.
3839
```
3940
bash -c "$(curl -s https://raw.githubusercontent.com/Submitty/Submitty/master/.setup/bootstrap.sh)"
4041
```
42+
This will generate a random password for the database users. You will still have to edit the config file(s) generated, but you will have to do so after Submitty has been installed.
4143

42-
or clone the git repository and run the installer (requires git and lsb-release to be installed):
44+
### Option 2: Clone the git repository and run the scripts manually (requires git and lsb-release to be installed):
45+
46+
Note: During installation, if you have pre-configured JSON config files, put them in `/usr/local/submitty/config/`. Otherwise, generate default configs that you can edit, and will be found in the same path.
4347

4448
```
4549
mkdir -p /usr/local/submitty/GIT_CHECKOUT
4650
git clone https://github.com/Submitty/Submitty.git /usr/local/submitty/GIT_CHECKOUT/Submitty
47-
cd /usr/local/submitty/GIT_CHECKOUT/Submitty
48-
bash ./.setup/install_system.sh
51+
cd /usr/local/submitty/GIT_CHECKOUT/Submitty/.setup
52+
python3 ./generate_configs.py
4953
```
54+
Edit the config files to use your institutions specific values.
55+
```json
56+
{
57+
"submitty_install_dir": "/usr/local/submitty", // Installation dir (created in the steps above)
58+
"submitty_repository": "/usr/local/submitty/GIT_CHECKOUT/Submitty", // Where Submitty is cloned
59+
"submitty_data_dir": "/var/local/submitty", // Directory where Submitty courses are stored
60+
"autograding_log_path": "/var/local/submitty/logs/autograding",
61+
"sys_admin_email": "sysadmin@example.com", // Sysadmin email
62+
"sys_admin_url": "https://example.com",
63+
"site_log_path": "/var/local/submitty/logs",
64+
"submission_url": "http://localhost:1511", // URL where students will submit homework
65+
"vcs_url": "", // If using VCS, the URL where students students push to
66+
"cgi_url": "http://localhost:1511/cgi-bin", // Should be the <submission_url>/cgi-bin
67+
"websocket_port": 8443, // Only change if required
68+
"institution_name": "", // Name of your institution (e.x. Rensselaer Polytechnic Institute)
69+
"institution_homepage": "", // The homepage of your institution (e.x. rpi.edu)
70+
"timezone": "America/New_York", // Your time zone TZ identifier
71+
"default_locale": "en_US",
72+
"duck_special_effects": false, // Allow special effects
73+
"course_material_file_upload_limit_mb": "100",
74+
// Allow users to create their own accounts (Only works with DatabaseAuthentication), see documentation for how to use
75+
"user_create_account": false,
76+
"user_id_requirements": {
77+
"any_user_id": true,
78+
"require_name": false,
79+
"min_length": 6,
80+
"max_length": 25,
81+
"name_requirements": {
82+
"given_first": false,
83+
"given_name": 2,
84+
"family_name": 4
85+
},
86+
"require_email": false,
87+
"email_requirements": {
88+
"whole_email": false,
89+
"whole_prefix": false,
90+
"prefix_count": 6
91+
},
92+
"accepted_emails": [
93+
"gmail.com"
94+
]
95+
},
96+
"worker": false // Is Submitty being run as a worker
97+
}
98+
```
99+
For switching authentication methods, edit
100+
`<submitty_install_dir>/config/authentication.json` and change the
101+
authentication method to any of the methods. You should be able
102+
to leave all other settings to the default.
50103

51-
Note: During installation, if you have pre-configured JSON config files, put them in `/usr/local/submitty/config/`. Otherwise, the install will generate default configs that you can edit, and will be found in the same path.
52104

105+
After you have edited the config files, run the install script.
106+
```
107+
bash ./.setup/install_system.sh
108+
```
53109

54110
1. Run installations specific to your university.
55111
For example: [RPI Computer Science specific installations](https://github.com/Submitty/Submitty/blob/master/.setup/distro_setup/ubuntu/rpi.sh)
@@ -58,57 +114,6 @@ You can use these [instructions](/sysadmin/installation/ansible).
58114
sudo bash /usr/local/submitty/GIT_CHECKOUT/Submitty/.setup/distro_setup/ubuntu/rpi.sh
59115
```
60116

61-
1. Update Config values
62-
```json
63-
{
64-
"submitty_install_dir": "/usr/local/submitty", // Installation dir (created in the steps above)
65-
"submitty_repository": "/usr/local/submitty/GIT_CHECKOUT/Submitty", // Where Submitty is cloned
66-
"submitty_data_dir": "/var/local/submitty", // Directory where Submitty courses are stored
67-
"autograding_log_path": "/var/local/submitty/logs/autograding",
68-
"sys_admin_email": "sysadmin@example.com", // Sysadmin email
69-
"sys_admin_url": "https://example.com",
70-
"site_log_path": "/var/local/submitty/logs",
71-
"submission_url": "http://localhost:1511", // URL where students will submit homework
72-
"vcs_url": "", // If using VCS, the URL where students students push to
73-
"cgi_url": "http://localhost:1511/cgi-bin", // Should be the <submission_url>/cgi-bin
74-
"websocket_port": 8443, // Only change if required
75-
"institution_name": "", // Name of your institution (e.x. Rensselaer Polytechnic Institute)
76-
"institution_homepage": "", // The homepage of your institution (e.x. rpi.edu)
77-
"timezone": "America/New_York", // Your time zone TZ identifier
78-
"default_locale": "en_US",
79-
"duck_special_effects": false, // Allow special effects
80-
"course_material_file_upload_limit_mb": "100",
81-
// Allow users to create their own accounts (Only works with DatabaseAuthentication), see documentation for how to use
82-
"user_create_account": false,
83-
"user_id_requirements": {
84-
"any_user_id": true,
85-
"require_name": false,
86-
"min_length": 6,
87-
"max_length": 25,
88-
"name_requirements": {
89-
"given_first": false,
90-
"given_name": 2,
91-
"family_name": 4
92-
},
93-
"require_email": false,
94-
"email_requirements": {
95-
"whole_email": false,
96-
"whole_prefix": false,
97-
"prefix_count": 6
98-
},
99-
"accepted_emails": [
100-
"gmail.com"
101-
]
102-
},
103-
"worker": false // Is Submitty being run as a worker
104-
}
105-
```
106-
For switching authentication methods, edit
107-
`<submitty_install_dir>/config/authentication.json` and change the
108-
authentication method to any of the methods. You should be able
109-
to leave all other settings to the default.
110-
111-
112117
1. Edit PHP Settings
113118

114119
We recommend for security that you modify your PHP installation and disable certain PHP functions.

0 commit comments

Comments
 (0)