The mini design of using xcat inventory templates to setup xCAT cluster with ansible - xcat2/xcat-core GitHub Wiki
User case:
As a xCAT user, I can setup xCAT testing/production cluster rapidly with ansible, I can testing things in a testing environment, then rapidly setup production cluster.
The summary of the user case:
As a xCAT user, I have ansible node host1, xCAT automation playbook and xcat-inventory data in github. I want to use ansible to setup host2 as xCAT MN cluster rapidly. (host1 and host2 can be the same host) The steps:
- Make sure ssh password-less between host1 and host2.
- git checkout xCAT ansible playbook
xcat-automation
on host1, runansible-playbook
command using main playbook under xcat-automation diretory to setup and configure xCAT cluster on host2. After the command is finished, xCAT cluster is ready on host2.
Playbook workflow to setup a xCAT cluster:
-
download xCAT from xcat.org, and install xCAT on target MN ------(Done, need to formalize the structure)
-
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 (pending)
-
switch Database (Mysql or Postgresql) ------(Not Done)
-
OS image management ------(partially Done, osimage template is not ready in xcat-inventory )
-
xCAT nodes management ------(Not Done)
- node.list
- node.delete
- node.update
-
xCAT network service management ------(Not Done)
- DNS
- DHCP
-
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.
-
xcat-automation
is the playbooks top directory name. It contains fast_cluster.yaml and 3 directories (templates
,cluster.example
andansible
). -
fast_cluster.yaml is basic cluster configuration file
-
templates
stores xcat-inventory templates file -
cluster.example
stores configuration example files for advanced scenarios, for example, configuration files for using mellanox_cuda osimage cluster. -
ansible
directory contains ansible playbooks.- 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 templatesnodes
is to manage node objectosimage
is to manage osimage objectdatabase
is to switch db ( mysql, postgresql)provision
is to userinstall
ornodeset,rsetboot,rpower
to invoke OS provision
xcat-automation
βββ fast_cluster.yaml
β
βββ cluster.exmaple
β βββ hierarchy_cluster.yaml
β βββ mellanox_cuda.yaml
β βββ ... ...
β
βββ templates
β βββ xcat_inventory_template.yaml
β
βββ ansible
βββroles
βββ common
βββ xcat
βββ install.xcat
β
βββ configure.xcat
β βββ tasks
β βββ main.yaml
β βββ networks.yaml
β βββ passwd.yaml
β βββ site.yaml
β βββ node.yaml
β βββ ... ...
β
βββ network.service
β βββ DHCP
β βββ DNS
βββ nodes
β βββ node.list
β βββ node.update
β βββ node.delete
βββ osimage
β
βββ database
β βββ mysql
β βββ postgresql
βββ provision