Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The projects have a description-field. Currently there is only a single requirement on the content of this field:

  • It should start with the string "Expires YYYYMMDD", where YYYYMMDD is the date the project is scheduled for deletion.

In addition to that field you This field should provide a description of the project, to help the administrators to understand what it is there for.

Expiry

The projects can have an "expiry" property. This property controls when the project can be deleted. It should contain a date in the format "dd.mm.yyyy"

Creating a project

To create a project and add a student (or a group) with NTNU username pikachu with permissions to create Heat stacks in the course IMT3005.

Code Block
$ openstack project create --description "<Project Description>" --domain NTNU <Projectname>
$ openstack project set property expiry=<dd.mm.yyyy> <Projectname>
$ openstack role add --project IMT3005_H17_Group12 --user pikachu --user-domain=NTNU _member_
$ openstack role add --project IMT3005_H17_Group12 --user pikachu --user-domain=NTNU heat_stack_owner
$ openstack role add --project IMT3005_H17_Group12 --group pikachu --group-domain=NTNU _member_
$ openstack role add --project IMT3005_H17_Group12 --group pikachu --group-domain=NTNU heat_stack_owner

# if you copy and paste (a messy) list of user info from blackboard into a.txt and need to extract the usernames:
$ grep -o ' [^ ]*@[^ ]* ' a.txt | tr -d '\t' | tr -d ' ' | grep -o '^[^@]*' > usernames.dat

# redirecting usernames.dat into a loop to create a project for each student:
while read -r
do 
  openstack project create --description "IMT3005_H17_$REPLY" --domain NTNU IMT3005_H17_$REPLY
  openstack role add --project IMT3005_H17_$REPLY --user $REPLY --user-domain=NTNU _member_
  openstack role add --project IMT3005_H17_$REPLY --user $REPLY --user-domain=NTNU heat_stack_owner
done < usernames.dat

...