wiki:Software/eAM/aInventory/fScheduler

Domain management

Adding new testbed

Currently, information about resources i.e. testbeds are kept into 2 databases, scheduler database (newScheduler) and inventory database (inventory54). To add new virtual domain we need to update both databases. There is a script addVirtualDomais.rb on internal2, /usr/share/omf-aggmgr-5.4/omf-aggmgr/ogs_loginCommon/w. Calling that script will add virtual domains into inventory database and prepare sql script to run from mysql to update scheduler database.

ruby addVirtualDomais.rb listOfdomains.txt

listOfDomains.txt is file with following information

domainName; <listo of nodes that belong to new domain>; <domain description>

Output file is machines.sql There is also file testbed_attributes.yaml to define necessary testbed information.

Make testbed inactive

To remove testbed from scheduler page just mark it inactive into both databases.

For scheduler databases run

UPDATE resources set status = 'u' where name='<testbed_name>';

For inventory, change INF_status attribute to 0:

 wget -qO- 'http://new.orbit-lab.org:5054/inventory/attribute_modify?name=<testbed_name>&attribute=INF_status&value=0

Updating Scheduler Database

To change testbed name, make it active and change list of nodes do the following:

  • Make domain active in scheduler database i.e set status to 'a':
    Update newScheduler.resources set status='a' where name = '<old_name>';
    
  • Change name and description:
    Update newScheduler.resources set name='<new_name>', notes='node3-3 i node4-10' where name = '<old_name>';
    

or with one statement

Update newScheduler.resources set status='a', name='<new_name>', notes='node3-3 i node4-10' where name ='<old_name>';

Updating Inventory Database

Core of is the mkinv with commands: add, delete, rename and swap

/usr/share/omf-aggmgr-5.4/omf-aggmgr/ogs_inventory/scripts# ./mkinv --help
Command that manages inventory
Usage:
      mkinv CMD [options] file1 file2 file3
 
      With: 
      CMD                       mandatory command - one of: add,delete,rename,swap
      Options:
      -o, --orbit               ORBIT fqdn to ip mapping
      -g, --geni                GENI fqdn to ip mapping
      -b, --backup              backup inventory database before applying changes
      -h, --help                print this help message
      -d, --debug               turns on debugging
      -u, --url URL             inventory AM url
      Files:
        one or more yaml configuration files

add - add a number of nodes =

Configuration file example for adding 3 nodes: nodeA, nodeB and nodeC to domain outdoor.orbit-lab.org:

---
domains: 
  grid.orbit-lab.org:
    nodes:
      nodeA.outdoor.orbit-lab.org:
        CM_type: 3 
      nodeB.outdoor.orbit-lab.org:
        CM_type: 3
      nodeC.outdoor.orbit-lab.org:
        CM_type: 3 

With this configuration saved in file file1.yaml nodes are added with:

./mkinv add -o file1.yaml
delete - delete a number of nodes

Configuration file example for deleting nodeA and nodeB from grid.orbit-lab.org domain:

---
domains: 
  grid.orbit-lab.org:
    nodes:
      nodeA.grid.orbit-lab.org:
        CM_type: X 
     nodeB.grid.orbit-lab.org:
        CM_type: X
./mkinv delete file.yaml
rename - rename a number of nodes
swap - swap a number of node pairs

Default attributes are configured in inv-defatt.yml file; three sections: global attributes are in attributes section, domain specific overrides are in domains section; mandatory section lists mandatory attributes that should be present when adding the resource/node.

# NOTE: use only 'spaces' to indent !
# ('tab' indents are not supported by the ruby yaml parser used to read this file)
#
#
---
# Global attributes
attributes:
  CM_type: 3
  CM_port: 1    
  INF_data_switch_port_id: 0    
  INF_control_switch_port_id: 0
  INF_default_disk: /dev/sda
  INF_pxe_image: omf-5.4   
  INF_reset_timeout: 80   
  INF_max_frisbee_rate: 700000000

# Domain specific attributes      
domains:
  grid.orbit-lab.org:
    INF_data_switch_port_id: 1

# Mandatory attributes
mandatory:
  - "CM_type"
  - "CM_ip"
  - "CM_port"
  - "CM_mac"
  - "INF_x_coor" 
  - "INF_y_coor" 
  - "INF_control_ip"
  - "INF_control_mac"
  - "INF_default_disk"
  - "INF_pxe_image"

Updating Topologies

mktopo

Last modified 2 years ago Last modified on 01/24/16 21:30:10