Skip to content

Commit a72153b

Browse files
committed
updates to full day tutorial
1 parent e4cd7f8 commit a72153b

1 file changed

Lines changed: 93 additions & 52 deletions

File tree

coldfront/README.md

Lines changed: 93 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ Once the containers are started, navigate to the [ColdFront site - https://local
3232

3333
## ColdFront Overview
3434

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.
36+
3537
### PI View: Annual Project Review, Allocation Renewal & Allocation Change Requests
3638

3739
- Login as `cgray` password `test123`
@@ -58,8 +60,6 @@ Click the `Email` button to see this functionality. Go back to the `Project Rev
5860
- Click through the different options in the `Director` menu if desired
5961
- Logout
6062

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-
6363

6464
### Activate the allocation request
6565

@@ -78,52 +78,77 @@ At part of the database seeding we did at the start of the tutorial, we activate
7878
### Try to run a job as the PI user
7979
Now let's go outside of ColdFront to the command line and try to submit a batch job as the `cgray` user.
8080
- 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+
```
8385
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+
```
8791
You will get an error message that you do not have permission to run on the cluster
8892
`sbatch: error: Batch job submission failed: Invalid account or account/partition combination specified`
89-
- 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+
```
9197
You should not see any Slurm account information for the `cgray` user
9298
_**This is because we have not synced the allocation information in ColdFront with Slurm yet.**_
9399
- Type `exit` to log out of the cgray account and you should be on the frontend logged in as the hpcadmin account.
94100

95101
### Run Slurm plugin to sync active allocations from ColdFront to Slurm
96102
- 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+
```
99107

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+
```
102112
- 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+
105118
- 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+
108124
- 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+
```
110128
- 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+
```
112132
NOTE: The csimmons user is under the cgray slurm account
113133
- Logout of ColdFront container
114-
`exit`
134+
```
135+
exit
136+
```
115137

116138
### Login (or go back) to frontend container
117139
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+
```
121144
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+
```
127152
<br>
128153

129154
**Tip:**
@@ -132,11 +157,14 @@ password: `test123`
132157

133158
<hr>
134159

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+
136164

137165
### Elevating User to PI Status:
138166

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:
140168
- If necessary, login as `hpcadmin` password `ilovelinux`
141169
- Go to Admin menu and click on `ColdFront Administration`
142170
- Scroll to the bottom under the `User` section and click on `User Profiles`
@@ -145,7 +173,9 @@ Let's give a user PI access:
145173

146174
### Adding a Resource
147175

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:
149179
- Scroll to the `Resource` section and click on `Resources`
150180
- Click on the `Add Resource` button
151181
- Select `Cloud` for `Resource Type` and enter a description.
@@ -160,8 +190,7 @@ Let's add a cloud resource:
160190

161191
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.
162192

163-
- Login as `hpcadmin` password `ilovelinux`
164-
- Go to Admin menu and click on `ColdFront Administration`
193+
Still on the `ColdFront Administration` page:
165194
- Under the `Allocation` section click on `Allocation Attribute Types`
166195
- Let's allow project managers to request an increase in their storage quotas. Click on the number next to `Storage Quota (GB)`
167196
- 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
179208

180209
Now that you've set up the new cloud resource, let's create a new project and request an allocation it:
181210

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
183213
- Click the `Add a project` button and fill out the `Title` and `Description` fields and select a field of science. Click the `Save` button.
184214
- Once redirected to the project detail page, click `Request Resource Allocation` under the Allocations section.
185215
- Select the cloud resource from the drop down, provide a justification, enter the number of CPU hours, and click the `Submit` button.
186216
Click on the `release sfoster` button at the top in the yellow banner.
187217

188218
As the admin, let's configure and activate that allocation:
189219

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.
191221
- Navigate to the `Admin` menu and click on `Allocation Requests`
192222
- Click on the `Details` button next to the `Research Cloud` allocation request to configure and activate the allocation:
193223
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
196226
`Cloud Account Name` Enter: `cgray`
197227
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.
198228

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.
201230
- Navigate to the `Admin` menu and click on `Allocation Change Requests`
202231
- 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.
203232
- At the bottom of the page, click the `View Allocation` button and notice the `Storage Quota` attribute value has changed from 10000 to 20000.
204233

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
205241

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/
206243

207244

208245
### Removing Access
209246

210247
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.
211248

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.
214251
- Change the status to `Expired` and the End Date to today. Click the `Update` button.
215252

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:
219254

220255
```
221256
ssh -p 6222 hpcadmin@localhost
222257
ssh coldfront
223258
source /srv/www/venv/bin/activate
224259
```
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+
```
230264

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+
```
231269
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.
232270

233271
- 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+
```
235275
There should be no account or association listed any longer
236276

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).
237278

238279
</details>
239280
<br>
@@ -366,7 +407,7 @@ The information in this section can be used for reference or to go through the t
366407

367408
## Seeding the Database for the Full Day Tutorial
368409
<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.
370411

371412
```
372413
./hpcts destroy
@@ -473,7 +514,7 @@ NOTE: If there is a project you never want project reviews on, uncheck 'Requires
473514

474515
## Starting from Scratch (Half Day Tutorial)
475516
<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:
477518

478519
```
479520
./hpcts destroy
@@ -597,7 +638,7 @@ This wraps up the setup done to the ColdFront database to prepare for the conden
597638
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`
598639
See https://coldfront.readthedocs.io/en/latest/config/#coldfront-core-settings for more information.
599640

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.
601642

602643

603644
## More info on the OnDemand Plugin
@@ -608,7 +649,7 @@ We have already added the OnDemand instance URL to the ColdFront config. You ca
608649
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.
609650

610651

611-
## ColdFront installation & Configuration
652+
## ColdFront Installation & Configuration
612653
- View `hpc-toolset-tutorial/coldfront/install.sh` to see how ColdFront is installed
613654
- View `hpc-toolset-tutorial/coldfront/coldfront.env` to see how ColdFront is configured
614655
- 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

Comments
 (0)