Skip to content

The mini design of using xcat inventory templates to setup xCAT cluster with ansible

Yuan Bai edited this page Apr 25, 2018 · 5 revisions

User case:

As a xCAT user, I want to setup a xCAT cluster rapidly.

The summary of the user case:

As a xCAT user, I have 2 hosts named host1 and host2. I want to install ansible in host1, and I want to use ansible on host1 to setup host2 as xCAT MN cluster rapidly. My steps:

  1. install ansible on host1, since xCAT MN is host2, make sure ssh password-less between host1 and host2.

  2. download xCAT ansible playbooks name xcat-automation on host1, manually add host2 in xcat-automation/hosts file and customize other playbooks variables if needed, such as NFS server, OS image ISO name, software URL etc.

  3. download xcat-inventory cluster templates to xcat-automation directory on host1, name it as xcat_inventory_template.yaml.

  4. manually customize the object in the xcat_inventory_template.yaml, including site object, network object, passwd object, node object and osimage object.

  5. run ansible-playbook command using main playbook under xcat-automation diretory to setup xCAT cluster, for example ansible-playbook -i hosts fast_cluster.yaml. After the command is finished, xCAT cluster is ready on host2.

Playbook workflow to setup a xCAT cluster:

  1. download xCAT from xcat.org, and install xCAT on target MN ------(Done)

  2. configure xCAT MN using xcat-inventory templates ------(#task55)

    • configure site object
    • configure passwd object
    • configure networks object
    • configure route object
    • configure policy object
    • import node object
    • import osimage object
  3. switch Database (Mysql or Postgresql) ------(Not Done)

  4. OS image management ------(partially Done, osimage template is not ready in xcat-inventory )

    • generate basic osimage definition
    • customize osimage with other application -------mellanox and cuda etc
    • osimage list|update|delete using xcat-inventory
  5. xCAT nodes management ------(Not Done)

    • node.list
    • node.delete
    • node.update
  6. xCAT network service management ------(Not Done)

    • DNS
    • DHCP
  7. invoke OS provision ------(Not Done)

    • rinstall/nodeset/rsetboot/rpower to invoke OS provision

The structure of the playbooks design

The playbook is named xcat-automation, its structure is at the end of this part. Here is the explanation of the structure.

  1. xcat-automation is the playbooks top directory name. It contains hosts, 6 yaml files and 3 directories (group_vars, host_vars and roles).
  2. hosts is inventory file for production servers.
  3. fast_cluster.yaml is the main playbook, it runs the whole cluster setup process:
    ansible-playbook -i hosts fast_cluster.yaml
    
    fast_cluster.yaml calls install_xcat.yaml, configure_xcat.yaml, osimage.yaml and provision.yaml. All the install_xcat.yaml, configure_xcat.yaml, osimage.yaml and provison.yaml can also run separately like:
    ansible-playbook -i hosts osimage.yaml
    
    • install_xcat.yaml is to install xCAT on MN
    • configure_xcat.yaml is to configure xCAT MN, using xcat-inventory
    • osimage.yaml is to generate osimage
    • provison.yaml is to configure DNS/DHCP, rinstall the nodes
    • xcat_inventory_template.yaml is customized xcat-inventory template yaml file, it contains site,network,route,passwd and node object.
  4. group_vars directory stores variables for particular groups
  5. host_vars directory stores variables for particular systems
  6. roles directory contains common and xcat directories.
    • the common directory contains non-xcat function playbook.
    • the xcat directory contains xcat function playbook.
      • install.xcat is to install xCAT using go-xcat.
      • configure.xcat is to configure xCAT MN using xcat-inventory templates
      • nodes is to manage node object:
        • node.list|update|delete is list|update|delete node definition using xcat-inventory
      • osimage is to manage osimage object:
        • copycds is to generate basic osimage definition
        • genimage is to genimage and packimage diskless osimage
        • osimage.list|update|delete is list|update|delete osimage definition using xcat-inventory
        • software is to customize osimage with other application
      • provision is to use rinstall or nodeset,rsetboot,rpower to invoke OS provision
xcat-automation
├── hosts
├── fast_cluster.yaml
├── install_xcat.yaml
├── configure_xcat.yaml
├── osimage.yaml
├── provision.yaml
├── xcat_inventory_template.yaml
│ 
├── group_vars
│    ├── group1
│    └── group2
│ 
├── host_vars
│   ├── hostname1
│   └── hostname2
│ 
└── roles
    ├── common
    │   ├── nfs.mount
    │   └── nfs.umount   
    │  
    └── xcat
        ├── install.xcat
        ├── configure.xcat   
        ├── network.service
        │   ├── DHCP
        │   └── DNS
        ├── nodes
        │   ├── node.list
        │   ├── node.update       
        │   └── node.delete
        ├── osimage
        │   ├── copycds
        │   ├── genimage
        │   ├── osimage.list
        │   ├── osimage.update
        │   ├── osimage.delete
        │   └── software
        │       ├── mellanox.ofed
        │       └── nvidia.cuda
        └── provision

News

History

  • Oct 22, 2010: xCAT 2.5 released.
  • Apr 30, 2010: xCAT 2.4 is released.
  • Oct 31, 2009: xCAT 2.3 released. xCAT's 10 year anniversary!
  • Apr 16, 2009: xCAT 2.2 released.
  • Oct 31, 2008: xCAT 2.1 released.
  • Sep 12, 2008: Support for xCAT 2 can now be purchased!
  • June 9, 2008: xCAT breaths life into (at the time) the fastest supercomputer on the planet
  • May 30, 2008: xCAT 2.0 for Linux officially released!
  • Oct 31, 2007: IBM open sources xCAT 2.0 to allow collaboration among all of the xCAT users.
  • Oct 31, 1999: xCAT 1.0 is born!
    xCAT started out as a project in IBM developed by Egan Ford. It was quickly adopted by customers and IBM manufacturing sites to rapidly deploy clusters.
Clone this wiki locally