You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: coldfront/README.md
+93-52Lines changed: 93 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,8 @@ Once the containers are started, navigate to the [ColdFront site - https://local
32
32
33
33
## ColdFront Overview
34
34
35
+
This section should give you an idea of how ColdFront can be used in your center by PIs (principal investigators - also faculty, professors, project managers) to manage access to resources for their research groups or classes, by your system administrators to manage the resources & grant the access, and your center director or other staff to review who has access and what type of research they're doing. It's just one short example but it provides the full product lifecycle so you can see how the different roles might utilize the software. The next section provides more details specifically for system administrators managing resources at an HPC center.
@@ -58,8 +60,6 @@ Click the `Email` button to see this functionality. Go back to the `Project Rev
58
60
- Click through the different options in the `Director` menu if desired
59
61
- Logout
60
62
61
-
For more options on allowing permissions for various types of staff access, see the ColdFront manual: https://coldfront.readthedocs.io/en/latest/manual/users/
62
-
63
63
64
64
### Activate the allocation request
65
65
@@ -78,52 +78,77 @@ At part of the database seeding we did at the start of the tutorial, we activate
78
78
### Try to run a job as the PI user
79
79
Now let's go outside of ColdFront to the command line and try to submit a batch job as the `cgray` user.
80
80
- Login to the frontend container:
81
-
`ssh -p 6222 hpcadmin@localhost`
82
-
password: `ilovelinux`
81
+
```
82
+
ssh -p 6222 hpcadmin@localhost
83
+
password: ilovelinux
84
+
```
83
85
Switch to the PI user account:
84
-
`su - cgray`
85
-
password: `test123`
86
-
`sbatch --wrap "sleep 600"`
86
+
```
87
+
su - cgray
88
+
password: test123
89
+
sbatch --wrap "sleep 600"
90
+
```
87
91
You will get an error message that you do not have permission to run on the cluster
- Let's see what slurm access cgray currently has:
90
-
`sacctmgr show user cgray -s list`
93
+
- Let's see what slurm access cgray currently has:
94
+
```
95
+
sacctmgr show user cgray -s list
96
+
```
91
97
You should not see any Slurm account information for the `cgray` user
92
98
_**This is because we have not synced the allocation information in ColdFront with Slurm yet.**_
93
99
- Type `exit` to log out of the cgray account and you should be on the frontend logged in as the hpcadmin account.
94
100
95
101
### Run Slurm plugin to sync active allocations from ColdFront to Slurm
96
102
- Login to the coldfront container & setup ColdFront environment
97
-
`ssh coldfront`
98
-
`source /srv/www/venv/bin/activate`
103
+
```
104
+
ssh coldfront
105
+
source /srv/www/venv/bin/activate
106
+
```
99
107
100
-
- Now dump the slurm account/association info from ColdFront's active allocations:
101
-
`coldfront slurm_dump -c hpc -o ~/slurm_dump`
108
+
- Now dump the slurm account/association info from ColdFront's active allocations:
109
+
```
110
+
coldfront slurm_dump -c hpc -o ~/slurm_dump
111
+
```
102
112
- Let's see what was created:
103
-
`ls -al ~/slurm_dump`
104
-
`cat ~/slurm_dump/hpc.cfg`
113
+
```
114
+
ls -al ~/slurm_dump
115
+
cat ~/slurm_dump/hpc.cfg
116
+
```
117
+
105
118
- Load the slurm dump into slurm database:
106
-
`sacctmgr load file=~/slurm_dump/hpc.cfg`
107
-
`Type 'Y'` to add the new account & associations for cgray
119
+
```
120
+
sacctmgr load file=~/slurm_dump/hpc.cfg`
121
+
Type 'Y' to add the new account & associations for cgray
122
+
```
123
+
108
124
- Let's look at cgray's slurm account again:
109
-
`sacctmgr show user cgray -s list`
125
+
```
126
+
sacctmgr show user cgray -s list
127
+
```
110
128
- Let's look at csimmons's slurm account again:
111
-
`sacctmgr show user csimmons -s list`
129
+
```
130
+
sacctmgr show user csimmons -s list
131
+
```
112
132
NOTE: The csimmons user is under the cgray slurm account
113
133
- Logout of ColdFront container
114
-
`exit`
134
+
```
135
+
exit
136
+
```
115
137
116
138
### Login (or go back) to frontend container
117
139
NOTE: you should already be on the frontend but just in case you're not:
118
-
`ssh -p 6222 hpcadmin@localhost`
119
-
password: `ilovelinux`
120
-
140
+
```
141
+
ssh -p 6222 hpcadmin@localhost
142
+
password: ilovelinux
143
+
```
121
144
Switch over to the PI user account and try to run a job again:
122
-
`su - cgray`
123
-
password: `test123`
124
-
`sbatch --wrap "sleep 600"`
125
-
`squeue` (the job should be running on a node)
126
-
`exit` (logout from cgray account)
145
+
```
146
+
su - cgray
147
+
password: test123
148
+
sbatch --wrap "sleep 600"`
149
+
squeue (the job should be running on a node)
150
+
exit (logout from cgray account)
151
+
```
127
152
<br>
128
153
129
154
**Tip:**
@@ -132,11 +157,14 @@ password: `test123`
132
157
133
158
<hr>
134
159
135
-
ColdFront Admin Tasks
160
+
## ColdFront Admin Tasks
161
+
162
+
Building on what you learned in the previous section, this part of the tutorial provides information on an array of administrative tasks and setup steps you'll need to know in order to setup ColdFront at your center. We'll step through a few of these tasks from the ColdFront administration page and then go back into the ColdFront front end to test these.
163
+
136
164
137
165
### Elevating User to PI Status:
138
166
139
-
Let's give a user PI access:
167
+
In order for a user to create a new project, they need to have `PI` status. Let's give the `sfoster` account PI access:
140
168
- If necessary, login as `hpcadmin` password `ilovelinux`
141
169
- Go to Admin menu and click on `ColdFront Administration`
142
170
- Scroll to the bottom under the `User` section and click on `User Profiles`
@@ -145,7 +173,9 @@ Let's give a user PI access:
145
173
146
174
### Adding a Resource
147
175
148
-
Let's add a cloud resource:
176
+
The tutorial database comes with two resources already created. However, when running this at your center, you'll need to manually create a resource for each system or service you want your users to access. Let's add a cloud resource
177
+
178
+
Still on the `ColdFront Administration` page:
149
179
- Scroll to the `Resource` section and click on `Resources`
150
180
- Click on the `Add Resource` button
151
181
- Select `Cloud` for `Resource Type` and enter a description.
@@ -160,8 +190,7 @@ Let's add a cloud resource:
160
190
161
191
Allocation change requests allow a project manager to request a change on an active allocation without having to request a whole new allocation for that resource. They can request a date extension and/or a change on an allocation attribute. We don't necessarily want to let users request changes on all allocation attributes so we need to set the ability to make change requests on individual allocation attributes.
162
192
163
-
- Login as `hpcadmin` password `ilovelinux`
164
-
- Go to Admin menu and click on `ColdFront Administration`
193
+
Still on the `ColdFront Administration` page:
165
194
- Under the `Allocation` section click on `Allocation Attribute Types`
166
195
- Let's allow project managers to request an increase in their storage quotas. Click on the number next to `Storage Quota (GB)`
167
196
- Check the box `Is Changeable` and then click the `Save` button.
@@ -179,15 +208,16 @@ For more information about configuring Allocation Change Requests [see here](#mo
179
208
180
209
Now that you've set up the new cloud resource, let's create a new project and request an allocation it:
181
210
182
-
- Login as `sfoster` password `ilovelinux` OR using the ColdFront Administration page, use the "Login As" option
211
+
- Using the `ColdFront Administration` page, use the "Login As" option: Under the `Authentication and Authorization` section, click on `Users` then click on `sfoster`
212
+
- At the top right, click on `Login As` which redirects us to the ColdFront home page for the user
183
213
- Click the `Add a project` button and fill out the `Title` and `Description` fields and select a field of science. Click the `Save` button.
184
214
- Once redirected to the project detail page, click `Request Resource Allocation` under the Allocations section.
185
215
- Select the cloud resource from the drop down, provide a justification, enter the number of CPU hours, and click the `Submit` button.
186
216
Click on the `release sfoster` button at the top in the yellow banner.
187
217
188
218
As the admin, let's configure and activate that allocation:
189
219
190
-
-Login using local account username: `hpcadmin` password: `ilovelinux`
220
+
-From the `ColdFront Administration` page, click on the `View Site` link at the top right.
191
221
- Navigate to the `Admin` menu and click on `Allocation Requests`
192
222
- Click on the `Details` button next to the `Research Cloud` allocation request to configure and activate the allocation:
193
223
click the `Add Allocation Attribute` button and select these allocation attributes from the drop down menu:
@@ -196,44 +226,55 @@ click the `Add Allocation Attribute` button and select these allocation attribut
196
226
`Cloud Account Name` Enter: `cgray`
197
227
Notice as you add the core usage and cloud storage quota attributes you see usage graphs displayed. These can tie into a plugin such as XDMoD or the OpenStack community developed plugins for usage information.
198
228
199
-
Now let's go look at and activate the allocation change request submitted by `cgray` for the storage resource. As the HPC admin user, activate and setup the new allocation:
200
-
- From the ColdFront Administration page, click on the `View Site` link at the top right.
229
+
Now let's go look at and activate the allocation change request submitted by `cgray` for the storage resource.
201
230
- Navigate to the `Admin` menu and click on `Allocation Change Requests`
202
231
- Click on the `Details` button to review and approve the allocation changes requested. As the admin you have the ability to approve the date extension, change it to another setting or select `no extension` You can remove the `storage_quota` request or change it. You can add notes for the PI and users on the allocation to see. Then you can take action such as `Approve` or `Deny` the request. For this demo, let's click the `Approve` button.
203
232
- At the bottom of the page, click the `View Allocation` button and notice the `Storage Quota` attribute value has changed from 10000 to 20000.
204
233
234
+
### Staff Member View
235
+
236
+
We have setup the `astewart` account as an example of what a center staff member might see in ColdFront.
237
+
- Login as `astewart` password `ilovelinux` to see what additional menus and functionality this account has access to.
238
+
- Navigate to the `Staff` menu and click through the menu options to get a sense of the access we recommend for staff members.
239
+
- Click on the `User Search` menu option and enter one of the other account names and click the `Search` button. Click on the username and then click on the `View User Projects and Managers` button. You'll see a list of projects the user is a member of and if they are a PI or manager on any of them.
240
+
- Logout
205
241
242
+
For more options on allowing permissions for various types of staff access, see the ColdFront manual: https://coldfront.readthedocs.io/en/latest/manual/users/
206
243
207
244
208
245
### Removing Access
209
246
210
247
When an allocation expires or is revoked, the users on that allocation should lose access to the resource. If the allocation has the `freeipa_group` attribute set, all allocation users are removed from the group when the FreeIPA plugin is run. If the allocation is for a Slurm resource, all Slurm user associations and the Slurm account are removed when the Slurm plugin is run. Let's expire a Slurm allocation and then run the `slurm_check` tool.
211
248
212
-
-If necessary, login as `hpcadmin` password `ilovelinux`
213
-
-From the `admin` menu, click on `All allocations` and click on the allocation for the hpc cluster resource.
249
+
-Login as `hpcadmin` password `ilovelinux`
250
+
-Navigate to the `Admin` menu, click on `All allocations` and click on the allocation for the hpc cluster resource.
214
251
- Change the status to `Expired` and the End Date to today. Click the `Update` button.
215
252
216
-
- If you're not still logged into the coldfront container, log back in via the terminal:
217
-
218
-
- Login to the coldfront container & setup ColdFront environment:
253
+
- If you're not still logged into the coldfront container, log back in via the terminal & activate the ColdFront virtual environment:
219
254
220
255
```
221
256
ssh -p 6222 hpcadmin@localhost
222
257
ssh coldfront
223
258
source /srv/www/venv/bin/activate
224
259
```
225
-
- Use the Coldfront slurm_check tool to remove access for the expired allocation. The first command looks at everything in slurm and compares it to what's in ColdFront:
226
-
`coldfront slurm_check -c hpc`
227
-
228
-
- For the tutorial we created slurm accounts for all the test accounts in the database. This allows the other parts of the tutorial to work independently of the ColdFront piece. However, when we run this command it's not finding allocations for all of these accounts so it wants to remove them. We'll specify the cgray account so it only removes those:
229
-
`coldfront slurm_check -c hpc -s -x -a cgray`
260
+
- Use the Coldfront slurm_check tool to remove access for the expired allocation. This first command looks at everything in slurm and compares it to what's in ColdFront:
261
+
```
262
+
coldfront slurm_check -c hpc
263
+
```
230
264
265
+
- For the tutorial we created slurm accounts for all the test accounts in the database. This allows the other parts of the tutorial to work independently of the ColdFront piece. However, when we run this command it's not finding allocations for all of these accounts so it wants to remove them. We definitely don't want that! We'll specify the cgray account so it only removes those:
266
+
```
267
+
coldfront slurm_check -c hpc -s -x -a cgray
268
+
```
231
269
The `-s` flag tells it to actually sync to slurm so you'll see it removed the user associations for cgray and csimmons and removed the cgray slurm account. You can use the `-n` flag to run in `noop` mode which will give a listing of what it will change without doing the sync.
232
270
233
271
- Let's look at cgray's slurm account again:
234
-
`sacctmgr show user cgray -s list`
272
+
```
273
+
sacctmgr show user cgray -s list
274
+
```
235
275
There should be no account or association listed any longer
236
276
277
+
That wraps up the full day tutorial but there is a lot more you can do with ColdFront. See the steps we did to [pre-seed the database](#seeding-the-database-for-the-full-day-tutorial) for this tutorial and the [documentation for more info](https://coldfront.io).
237
278
238
279
</details>
239
280
<br>
@@ -366,7 +407,7 @@ The information in this section can be used for reference or to go through the t
366
407
367
408
## Seeding the Database for the Full Day Tutorial
368
409
<details>
369
-
These steps were done in advance to allow for the presentation of a more hands-on tutorial which spends time on learning the features rather than the minutia of the setup. If you would like to go through these steps yourself, destroy the containers, delete the ColdFront database, start the containers, login to ColdFront and follow these steps:
410
+
These steps were done in advance to allow for the presentation of a more hands-on tutorial which spends time on learning the features rather than the minutia of the setup. If you would like to go through these steps yourself, destroy the containers, delete the ColdFront database, and start the containers. This will create a new, empty ColdFront database. Then you'll be able to login to ColdFront and follow these steps to populate the database.
370
411
371
412
```
372
413
./hpcts destroy
@@ -473,7 +514,7 @@ NOTE: If there is a project you never want project reviews on, uncheck 'Requires
473
514
474
515
## Starting from Scratch (Half Day Tutorial)
475
516
<details>
476
-
These steps were done in advance to allow for the presentation of a condensed half day version of the tutorial. If you would like to go through these steps yourself, destroy the containers, delete the ColdFront database, start the containers, login to ColdFront and follow these steps:
517
+
These steps were done in advance to allow for the presentation of a condensed half day version of the tutorial. If you would like to go through these steps yourself, destroy the containers, and delete the ColdFront database. Start the containers which will create a new, empty coldfront database. Then login to ColdFront and follow the steps below:
477
518
478
519
```
479
520
./hpcts destroy
@@ -597,7 +638,7 @@ This wraps up the setup done to the ColdFront database to prepare for the conden
597
638
Allocation change requests are turned on by default. This will allow PIs to request date extensions for their allocations. The date ranges default to 30, 60, & 90 days but can be set changed or disabled completely in `hpc-toolset-tutorial/coldfront/coldfront.env`
598
639
See https://coldfront.readthedocs.io/en/latest/config/#coldfront-core-settings for more information.
599
640
600
-
If you want PIs to be able to request changes to allocation attributes (i.e. storage quotas, unix group) this needs to be set on the allocation attribute. For this demo, we allowed the PI to request changes Qon the `Storage Quota` attribute.
641
+
If you want PIs to be able to request changes to allocation attributes (i.e. storage quotas, unix group) this needs to be set on the allocation attribute. For this demo, we allowed the PI to request changes on the `Storage Quota` attribute.
601
642
602
643
603
644
## More info on the OnDemand Plugin
@@ -608,7 +649,7 @@ We have already added the OnDemand instance URL to the ColdFront config. You ca
608
649
When creating the resource at the start of the tutorial, we added the `OnDemand` attribute to the `hpc` resource which tells it to display the OnDemand logo and link to the OnDemand URL for any allocations for this resource. Notice on the ColdFront home page next to the allocation for the HPC cluster resource you see the OnDemand logo. Click on the Project name and see this logo also shows up next to the allocation. When we click on that logo, it directs us to the OnDemand instance.
609
650
610
651
611
-
## ColdFront installation & Configuration
652
+
## ColdFront Installation & Configuration
612
653
- View `hpc-toolset-tutorial/coldfront/install.sh` to see how ColdFront is installed
613
654
- View `hpc-toolset-tutorial/coldfront/coldfront.env` to see how ColdFront is configured
614
655
- This is where you'd enable or disable any plugins and set variables for your local installation. Check out the [full configuration options available in the ColdFront documentation](https://coldfront.readthedocs.io/en/latest/config/)
0 commit comments