XCAT Installation Kit

Source: Internet
Author: User
Tags bz2

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


Build Kit File Structure

First use the Buildkit tool to generate a kit, for example, we assume that 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 did not change anything, the resulting directory structure can be packaged directly into the kit package

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

Modify configuration file

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

Compat_osbasenames=centos

packaged

Packaged with the following command, the result is a helloworld-1.0-1.tar.bz2 file is generated in the HelloWorld directory

CD ~/helloworld
buildkit buildrepo all
buildkit Buildtar

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

Add Kit

First in the XCAT environment you can use Lskit to view the kits and kitcomponent that have been added, such as

Lskit
lskit helloworld-1.0-1
lsdef-t kit-l helloworld-1.0-1

You can then use the Addkit command to add the kit created above, and you can use the above command to view the

Addkit helloworld-1.0-1.tar.bz2

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

Rmkit helloworld-1.0-1

The next step is to check if the kit you added above is osimage, first let's check out what the current system has osimage

Lsdef-t OSImage

Then use the Chkkitcomp command to check for 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 the 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 remove

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-compute
updatenode <nodelist>

Kit is installed on the node node and you can use the Xdsh <node> yum search HelloWorld to view 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


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.