25300a2ef5
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16517 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
231 lines
6.6 KiB
Plaintext
231 lines
6.6 KiB
Plaintext
=head1 NAME
|
|
|
|
B<buildkit> - build a product Kit to package software for installation in an xCAT cluster.
|
|
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
B<buildkit> [B<-V> | B<--verbose>] B<create> I<kit_basename> [B<-w> | B<--workdir> I<directory>]
|
|
|
|
B<buildkit> [B<-V> | B<--verbose>] B<chkconfig> [B<-w> | B<--workdir> I<directory>]
|
|
|
|
B<buildkit> [B<-V> | B<--verbose>] B<listrepo> [B<-w> | B<--workdir> I<directory>]
|
|
|
|
B<buildkit> [B<-V> | B<--verbose>] B<buildrepo> {I<repo_name> | B<all>} [B<-w> | B<--workdir> I<directory>]
|
|
|
|
B<buildkit> [B<-V> | B<--verbose>] B<cleanrepo> {I<repo_name> | B<all>} [B<-w> | B<--workdir> I<directory>]
|
|
|
|
B<buildkit> [B<-V> | B<--verbose>] B<buildtar> [B<-w> | B<--workdir> I<directory>]
|
|
|
|
B<buildkit> [B<-V> | B<--verbose>] B<cleantar> [B<-w> | B<--workdir> I<directory>]
|
|
|
|
B<buildkit> [B<-V> | B<--verbose>] B<cleanall> [B<-w> | B<--workdir> I<directory>]
|
|
|
|
B<buildkit> [B<-V> | B<--verbose>] B<addpkgs> I<kit_tarfile> {B<-p> | B<--pkgdir>} {B<-k> | B<--kitversion> I<version>} {B<-r> | B<--kitrelease> I<release>} I<package_directory> [B<-w> | B<--workdir> I<directory>]
|
|
|
|
B<command> [B<-?> | B<-h> | B<--help> | B<-v> | B<--version>]
|
|
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
The B<buildkit> command is a collection of utilities to package a product as a Kit that can be installed on an xCAT cluster. A Kit is a tarfile containing the product software packages, configuration and control information, and install and customization scripts.
|
|
|
|
You will need to run the buildkit command several times with different subcommands to step through the process of building a kit:
|
|
|
|
=over 4
|
|
|
|
=item 1.
|
|
|
|
cd to your work directory
|
|
|
|
=item 2.
|
|
|
|
Create a template directory for your kit:
|
|
|
|
buildkit create kit_basename
|
|
|
|
=item 3.
|
|
|
|
cd to the new template directory:
|
|
|
|
cd kit_basename
|
|
|
|
=item 4.
|
|
|
|
Edit the buildkit configuration file for your kit:
|
|
|
|
vi buildkit.conf
|
|
|
|
=item 5.
|
|
|
|
Create all required files, scripts, plugins, and packages for your kit.
|
|
|
|
=item 6.
|
|
|
|
Validate your kit build configuration, fixing any errors that are reported:
|
|
|
|
buildkit chkconfig
|
|
|
|
=item 7.
|
|
|
|
List the repos defined in your buildkit configuration file:
|
|
|
|
buildkit listrepo
|
|
|
|
=item 8.
|
|
|
|
For each reponame listed, build the repository. Note that if you need to build repositories for OS distributions, versions, or architectures that do not match the current system, you may need to copy your kit template directory to an appropriate server to build that repository, and then copy the results back to your main build server.
|
|
|
|
buildkit buildrepo repo_name
|
|
|
|
or, you can build all of the repos at one time if there are no OS or architecture dependencies for kitcomponent package builds or kitpackage builds:
|
|
|
|
buildkit buildrepo all
|
|
|
|
=item 9.
|
|
|
|
Build the kit tar file:
|
|
|
|
buildkit buildtar
|
|
|
|
|
|
=back
|
|
|
|
=head1 OPTIONS
|
|
|
|
=over 10
|
|
|
|
=item B<-h |--help>
|
|
|
|
Display usage message.
|
|
|
|
=item B<-V |--verbose>
|
|
|
|
Verbose mode.
|
|
|
|
=item B<-v|--version>
|
|
|
|
Command Version.
|
|
|
|
=item B<-w|--workdir>
|
|
|
|
The location to perform the buildkit subcommand.
|
|
|
|
=back
|
|
|
|
=head1 SUB-COMMANDS
|
|
|
|
=over 10
|
|
|
|
=item B<create> I<kit_basename>
|
|
|
|
Creates a new kit build directory structure for kit I<kit_basename> in the current directory. The sample kit files from /opt/xcat/share/xcat/kits/kit_template are copied over, and the <cwd>/I<kit_basename>/buildkit.conf is modified for the specified I<kit_basename>.
|
|
|
|
=item B<chkconfig>
|
|
|
|
Reads the buildkit.conf file from the current directory, verifies that the file syntax is correct and that all specified files exist.
|
|
|
|
=item B<listrepo>
|
|
|
|
Reads the buildkit.conf file from the current directory, lists all Kit package repositories listed in the file, and reports the build status for each repository.
|
|
|
|
=item B<buildrepo> {I<repo_name> | B<all>}
|
|
|
|
Reads the buildkit.conf file from the current directory, and builds the specified Kit package repository. The built packages are placed in the directory <cwd>/build/kit_repodir/I<repo_name>. If B<all> is specified, all kit repositories are built.
|
|
|
|
=item B<cleanrepo> {I<repo_name> | B<all>}
|
|
|
|
Reads the buildkit.conf file from the current directory, and deletes all the package files and package meta data files from the <cwd>/build/kit_repodir/I<repo_name> directory. If B<all> is specified, all kit repository files are deleted.
|
|
|
|
=item B<buildtar>
|
|
|
|
Reads the buildkit.conf file from the current directory, validates that all kit repositories have been built, and builds the Kit tar file <cwd>/I<kitname>.tar.bz2.
|
|
|
|
=item B<cleantar>
|
|
|
|
Reads the buildkit.conf file from the current directory, deletes the Kit tar <cwd>/I<kitname>.tar.bz2, and deletes all files in the build work directory <cwd>/build/I<kitname>.
|
|
|
|
=item B<cleanall>
|
|
|
|
Equivalent to running B<buildkit cleanrepo all> and B<buildkit cleantar>.
|
|
|
|
=item B<addpkgs> I<kit_tarfile> {B<-p> | B<--pkgdir>} {B<-k> | B<--kitversion> I<version>} {B<-r> | B<--kitrelease> I<release>} I<package_directory>
|
|
|
|
Add product package rpms to a previously built kit tar file. This is used for incomplete product kits that are built and shipped separately from the product packages, and are identified with a I<kit_tarfile> name of I<kitname>.B<NEED_PRODUCT_PKGS.tar.bz2>. Optionally, change the kit release and version values when building the new kit tarfile. If kitcomponent version and/or release values are defaulted to the kit values, those will also be changed and new kitcomponent rpms will be built. If kit or kitcomponent scripts, plugins, or other files specify name, release, or version substitution strings, these will all be replaced with the new values when built into the new complete kit tarfile I<cwd>/I<new_kitname>.B<tar.bz2>.
|
|
|
|
=back
|
|
|
|
|
|
=head1 RETURN VALUE
|
|
|
|
=over 3
|
|
|
|
=item 0
|
|
|
|
The command completed successfully.
|
|
|
|
=item 1
|
|
|
|
An error has occurred.
|
|
|
|
=back
|
|
|
|
|
|
=head1 EXAMPLES
|
|
|
|
=over 3
|
|
|
|
=item 1.
|
|
|
|
To create the sample kit shipped with the xCAT-buildkit rpm on a RHELS 6.3 server and naming it B<mykit>, run the following commands:
|
|
|
|
cd /home/myuserid/kits
|
|
buildkit create mykit
|
|
cd mykit
|
|
vi buildkit.conf
|
|
buildkit chkconfig
|
|
buildkit listrepo
|
|
buildkit buildrepo all
|
|
buildkit buildtar
|
|
|
|
=item 2.
|
|
|
|
To clean up a kit repository directory after build failures on a RHELS 6.3 server to prepare for a new kit repository build, run:
|
|
|
|
buildkit cleanrepo rhels6.3
|
|
|
|
=item 3.
|
|
|
|
To clean up all kit build files, including a previously built kit tar file, run
|
|
|
|
buildkit cleanall
|
|
|
|
=item 4.
|
|
|
|
To create the sample kit in the working directory /home/foobar instead of the current working directory.
|
|
|
|
buildkit create mykit -w /home/foobar
|
|
|
|
=back
|
|
|
|
|
|
=head1 FILES
|
|
|
|
/opt/xcat/bin/buildkit
|
|
|
|
/opt/xcat/share/xcat/kits/kit_template
|
|
|
|
/opt/xcat/share/xcat/kits/kitcomponent.spec.template
|
|
|
|
<cwd>/buildkit.conf
|
|
|
|
<cwd>/build/I<kitname>/kit.conf
|
|
|
|
<cwd>/I<kitname>.tar.bz2
|
|
|
|
|
|
=head1 SEE ALSO
|
|
|
|
|
|
|