Xcat Installing Kit

Source: Internet
Author: User

This article link: http://blog.csdn.net/kongxx/article/details/44086779


Building the kit file structure

First use the Buildkit tool to generate a kit, for example here we assume our kit name is HelloWorld

Buildkit Create HelloWorld

The above command will generate a HelloWorld directory in the user's root directory, the following is the generated directory structure, here we just want to do a test, so I have nothing to change, the resulting directory structure can be packaged directly into kit package

Helloworld/├──buildkit.conf├──docs│  └──index.html├──other_files│  └──sample│  ├ ──exclude.lst│  └──kitdeployparams.lst├──plugins│  └──sample│  ├──imageprofi Le.pm│  └──nodemgmt.pm├──scripts│  └──sample│  ├──genimage_post.sh│ &nbs     P     ├──postboot.sh│  ├──post.sh│  ├──postun.sh│  ├──postup.sh│          ├──pre.sh│  ├──preun.sh│  └──preup.sh└──source_packages└──sample├──pkg1 │  └──pkg1-1-1.noarch.rpm├──pkg2│  ├──pkg2│  │ &nb Sp        ├──cfg│  │  │  └──pkg2.cfg│  │  └──files │  │  ├──pkg2.file1│  │  └──pkg2.file2│   └──pkg2.spec        ├──pkg3│  ├──pkg3.spec│  └──pkg3.tar.gz└──pkg4└──pk g4-1-1.src.rpm

Modifying a configuration file

Edit buildkit.conf file, this file is still relatively easy to understand, inside the note is more detailed, which mainly defines the kit,kitrepo,kitcomponent and kitpackage and so on.
However, there is a property in the configuration file Compat_osbasenames need to pay special attention, if the target machine is RH machine, can be ignored, but if it is centos, you need to modify the definition of this property

Compat_osbasenames=centos

Packing

Package with the following command, resulting in a helloworld-1.0-1.tar.bz2 file in the HelloWorld directory

CD ~/helloworldbuildkit Buildrepo Allbuildkit Buildtar

If you modify a file to regenerate the kit package, you need to run "Buildkit Cleanall" before running the package command above.

Add Kit

First, you can use Lskit to view the added kits and kitcomponent in a xcat environment, such as

Lskitlskit helloworld-1.0-1lsdef-t kit-l Helloworld-1.0-1lskitcomp

You can then use the Addkit command to add the kit created above, which you can use to view the above commands.

Addkit helloworld-1.0-1.tar.bz2

If you want to delete it, you can use the Rmkit command

Rmkit helloworld-1.0-1

The next step is to check if the kit you added above can be used by osimage, first let's look at what the current system has osimage

Lsdef-t OSImage

Then use the Chkkitcomp command to check the validity.

Chkkitcomp-i Centos6.6-x86_64-install-compute helloworld_compute-1.0-1-rh-6.6-x86_64

If the check results are available, then you can use Addkitcomp to add kitcomponent to OSImage.

Addkitcomp-a-I centos6.6-x86_64-install-compute helloworld_compute-1.0-1-rh-6.6-x86_64

Of course, you can also use Rmkitcomp to delete after adding

Rmkitcomp-i Centos6.6-x86_64-install-compute helloworld_compute-1.0-1-rh-6.6-x86_64

Upgrade Node

Chdef <nodelist> provmethod=<osimage>      updatenode <nodelist> such as Chdef <nodelist> Provmethod=centos6.6-x86_64-install-computeupdatenode <nodelist>

The kit is installed on node, and you can use "Xdsh <node> Yum search HelloWorld" to see the results after the installation is complete.


Reference

Http://sourceforge.net/p/xcat/wiki/Building_Software_Kits
Http://sourceforge.net/p/xcat/wiki/Using_Software_Kits_in_OS_Images


Xcat Installing Kit

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.