TWiki
>
CF Web
>
TemplateSponsorDataAccounts
>
IncludeSponsorsDataEditingTutorial
(2018-02-14,
AdrianPepper
)
(raw view)
E
dit
A
ttach
---+ Sponsors Data Editing Tutorial <!-- <pre> // // IncludeSponsorsDataEditingTutorial // // This page was primarily designed for inclusion where necessary, // but might work well stand-alone, especially with the careful // use of the STARTINCLUDE and STOPINCLUDE "variables" which // allow a header and footer, although not generalized creation // of differences in included and non-included forms. // // It is intended as a brief inline Tutorial for use in many pages, and in fact // it both refers to and is used by CF.SponsorsDataEditingTutorial which is // a different page. (Naturally a superset of this page). // </pre> --> The central aspect of making any particular resource changes for any particular set of users defined by any criteria, is the editing of files in the [[SponsorsDataAccounts][ =sponsors data= ]] data base. Details of required changes may differ according to other specific details, but this attempted tutorial tries to describe in general what changes can be made once the appropriate file has been located. Reference is made to the [[IncludeSponsorsDataRunSponsorResources][ =sponsor_resources= ]] command. Running that command processes the data described here, and informs you of mistakes you may have made. I have recently realized that a good practice is to run it *before* you begin making your new changes, so you can see if there are currently any persistently unavoidable non-fatal errors. That will allow you to distinguish between those and errors you may introduce. <!-- <pre> // // Note the line after STARTINCLUDE. // The CFADRIANGADGETINCLUDE variable renders as a link which // makes it easy for a reader to get to the inclusion to edit it, // although the rendered presentation of that link does not seem fully intuitive yet. // </pre> --> %INCLUDE{CF.IncludeSponsorsDataEditingRCSout}% <!-- Bah! You don't seem to be able to have multiple STOP/STARTINCLUDE --> %STARTINCLUDE% ---++ Sponsors files format; how to make changes %CFADRIANGADGETINCLUDE% The sponsors files are divided into sections, delimited by 8 equal-signs, ie: "========" Following that is typically a "Class:" entry which then lists a billing or sponsorship code. These will appear, for instance, in the inventory under the "Sponsorship Code" drop box. Here's a fictional section of account sponsorship. (actually real region names, but fictional _userids_ and extra _group_ name). <blockquote> <pre> ======== Class: Rmg002 Description: sponsored accounts ==== # Basic accounts with varying SponsorshipEnds ("expiry") Computing: cs-general.cs.private Quota: 0G SponsorshipEnds: 2017/Jan/21 AssignTo: sgamgee SponsorshipEnds: 2015/Oct/31 AssignTo: ptook mbrandybuck SponsorshipEnds: 2010/Jan/10 AssignTo: bbaggins ==== # For cs-general.cs.private, parallel accounts are needed on serverus.cs Computing: serverus.cs Groups: general_cs SponsorshipEnds: 2017/Jan/21 AssignTo: sgamgee SponsorshipEnds: 2015/Oct/31 AssignTo: ptook mbrandybuck SponsorshipEnds: 2010/Jan/10 AssignTo: bbaggins ==== # Extra quota # Samwise needs more room for mpegs Computing: cs-general.cs.private SponsorshipEnds: 2017/Jan/21 Quota: 20G AssignTo: sgamgee ==== # Extra groups # bbaggins and ptook belong in group heroes Computing: cs-general.cs.private Groups: heroes SponsorshipEnds: 2017/Jan/21 AssignTo: ptook SponsorshipEnds: 2010/Jan/10 AssignTo: bbaggins </pre> </blockquote> Note that lines beginning with ="#"= are _comments_ which the programs (=sponsor_resources=) ignore; the comment lines are intended to explain things to people reading the sponsorship files. The ="===="= lines are required, and reset all resource parameters. After that, ="Computing: "= must appear, specifying an appropriate hostname. The other lines change resource parameters, causing the resources defined when ="AssignTo: "= is encountered to be assigned to the indicated userids. The examples here are designed to act as a template to explain some possibilities. For a reasonably complete explanation, see the [[%CFMANURL%?page=sponsors][sponsors]] man page. If the userids actually existed, and =sponsor_resources= were run on the above sometime after =2010/Jan/10= but before =2015/Oct/31=, the above would result in resource allocation (as indicated by [[AccountsUserinfoCommand][ =userinfo= ]] command) of... <blockquote> <pre> cs-xh-admin% userinfo mbrandybuck ... Sponsored: computing cs-general.cs.private: Rmg002(0) Sponsored: computing serverus.cs: Rmg002(0;general_cs) ... cs-xh-admin% userinfo ptook ... Sponsored: computing cs-general.cs.private: Rmg002(0;heroes),Rmg002(0) Sponsored: computing serverus.cs: Rmg002(0;general_cs) ... cs-xh-admin% userinfo sgamgee ... Sponsored: computing cs-general.cs.private: Rmg002(0),Rmg002(20000000) Sponsored: computing serverus.cs: Rmg002(0;general_cs) ... </pre> </blockquote> Note that resources would not be allocated for =bbaggins= because his =SponsorshipEnds= date has passed in all cases. Note that when you specify the =userid= you should, as described in more detail in SponsorsDataEditingUserids, follow it with a colon, and an appropriate extra id number for redundancy. The [[AccountsUserinfoCommand][ =userinfo= ]] command can be used to determine that id number. The id will be a student id, employee id, HR id, employee id, or WatIAM "P-number". It may be added once to a =Userids:= keyword near the beginning of the file, or it may be added to each use in an =AssignTo:=. For more details see SponsorsDataEditingUserids. If you omit that id, however, the =sponsor_resources= command will actually tell you what value to use, and in fact the resources will be allocated. If you use an incorrect value (for example an employee id for a user who has a student id), you will be told what the correct value is, and an error will be generated and the resources will *NOT* be allocated. To help make sure we don't slip up and put a real =userid:idnumber= in one of these pages, we by convention omit =:idnumber= in all examples. Note that logical lines can be extended by beginning following lines with spaces, as was done with. <blockquote><pre> AssignTo: ptook mbrandybuck </pre> </blockquote> That's deliberately sloppy, to indicate the flexibility of the input format. Normally it's nice to line things up. <!-- <pre> should somewhere indicate lists might be arbitrarily long and somewhere mention input redirection. Membership/*MEMBERS* ? </pre> --> Note the common resources for all others, but with additional disk quota for =sgamgee= and group membership for =ptook=. There are a number of common changes one might want to make (usually to fulfill a request from a user or their sponsor). You could add a new =AssignTo: userid= in appropriate places to cause new resources to be allocated for that =userid= on the indicated =Computing= environments. If one of the existing =SponsorshipEnds= date is appropriate, you could add the new =userid= to an existing =AssignTo:= line. Otherwise you could add new =SponsorshipEnds= lines as well as new =AssignTo= lines for the new =userid=. You could change the =0G= to something else to change quota for all the associated users at once. For example, you could change it to =5G= which would give each of them an extra =5G= (5 gigabyte) of disk quota. <i> Aside: After the time this tutorial was first written, base quotas in many regions have been increased to the point that nearly all accounts now are given (extra) quota of 0G. </i> You could change the date after a =SponsorshipEnds= to change when the resource sponsorship, and likely whole account(s), expires. You could add another section like =#Extra quota= or =#Extra groups= to add more quota or groups for existing accounts. %STOPINCLUDE% %INCLUDE{CF.IncludeSponsorsDataEditingRCSin}% <em>More explicit descriptions of explicit change types are (will appear) in [[CF.SponsorsDataEditingTutorial]]. </em> -- Main.AdrianPepper - 04 Dec 2012 --- %INCLUDE{CF.IncludeAdrianReferers}%
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r13
<
r12
<
r11
<
r10
<
r9
|
B
acklinks
|
V
iew topic
|
WYSIWYG
|
M
ore topic actions
Topic revision: r13 - 2018-02-14
-
AdrianPepper
CF
Information in this area is meant for use by CSCF staff and is not official documentation, but anybody who is interested is welcome to use it if they find it useful.
CF Web
CF Web Home
Changes
Index
Search
Administration
Communication
Email
Hardware
HelpDeskGuide
Infrastructure
InternalProjects
Linux
MachineNotes
Macintosh
Management
Networking
Printing
Research
Security
Software
Solaris
StaffStuff
TaskGroups
TermGoals
Teaching
UserSupport
Vendors
Windows
XHier
Other Webs
CSEveryBody
Main
Sandbox
TWiki
UW
My links
People
CERAS
WatForm
Tetherless lab
Ubuntu Main.HowTo
eDocs
RGG NE notes
RGG
CS infrastructure
Grad images
Edit
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback