|
Distributed Service Management Toolkit
An open platform for managing planetary-scale services. |
|
|
|
|
Documentation Publications Services |
NAME
rpmgen - generates an rpm complaint with DSMT's deployment agent
SYNOPSIS
rpmgen --file <filename> --installdir <installation directory>
[--start <start script> [--stop <stop script>
[--status <status report script> [--dependencies
<dependencies>
DESCRIPTION
rpmgen works with both tarball and preexisting rpm files. If run on a
tarball, rpmgen first creates an rpm (<appname>lt;version>lt;build>i386.rpm)
and then creates an rpm wrapper (dsmtw_<appname>lt;version>lt;build>i386.rpm).
If rpmgen is run on an rpm, then it only creates the dsmtw_ wrapper.
COMMAND SUMMARY
--file <filename>
<filename> defines the name of the input file. The tarball must contain a
directory "appname>lt;comma separated version number> and then, below this
directory, the whole app to be installed.
Examples of valid tarball names are:
foo-1.0-1.tar.gz
foo-1.0.0-beta.tgz
Note that the build version (sequence of characters between the second
dash and extension name) MUST NOT contain any full stop punctuation mark.
--installdir <installation directory>
Target directory where to install the deployed application.
Example: rpmgen --file newapp-1.0-1.tgz --installdir /usr/local/dsmt/
A directory newapp-1.0 will be created under --installdir, so in the
example above, after you install the rpm you end up with
/usr/local/dsmt/newapp-1.0/.
--dependencies <dependencies>
Define the dependencies of the deployed application. The dependencies are
separated by commas.
Example:
--dependencies "binutils >= 1.0,mysql < 3.4.1,tomcat"
--start <start script>
<start script> defines the file name of the start script. This script will
be used by the deployment agent to start the deployed application. If no
start scripts is given then no start operation is supported for the
deployed application.
--stop <stop script>
<stop script> defines the file name of the stop script. This script will
be used by the deployment agent to stop the deployed application. If no
stop scripts is given then no stop operation is supported for the deployed
application.
--status <status report script>
<status report script> defines the file name of the status script. This
script will be used by the deployment agent to check the current
availability of the deployed application. This script MUST return 0 in
case everything is fine with the application and 1 otherwise. If no status
script is given then a default script is created that uses the ps command.
GENERAL EXAMPLE
rpmgen --file newapp-1.0.0-3.tgz --installdir /usr/local/dsmt/ \
--dependencies "binutils > 1.0,mysql < 3.4.1, tomcat" \
--start start.sh --stop stop.sh --status status.sh
The output of this command is "newapp-1.0.0-3.i386.rpm" and
"dsmtw_newapp-1.0.0-3.i386.rpm". The user must upload both rpms to Alpha. The
dsmtw rpm is a wrapper rpm that just installs the /etc/init.d script required
by the deployment agent and it also has a unique dependency on "newapp". The
deployment agent yums dsmtw rpm and so <appname>rpm is also installed.
Also the script /etc/init.d/dsmtw_newapp is created and chkconfiged.
AUTHORS
Guilherme Magalhaes and Sandro Rafaeli from HP Brazil.
|