-
Notifications
You must be signed in to change notification settings - Fork 39
Packaging with packager.py
"packager.py" builds final debian or rpm packages based on the config files present in package_configs directory. Below are examples on how packager can be triggered. Please see ./packager -h for detailed help
./packager.py --build-id 1234 --sku havana
Packager's default can be overriden by values specified in config file or CLI. Use below option to specify custom config file. By default "config" file present in current directory is used.
./packager.py --build-id 1234 --sku grizzly --config <config-file>
Packager stores info like execution logs, packaged list in store directory. Use below option to specify custom store directory. Default store directory is sandbox/build/
./packager.py --build-id 1234 --sku grizzly --store-dir <path-to-store-dir>
Packager picks up third party packages specified in package_configs///depends_packages.cfg from default cache directory. Use below option to specify custom directory from where third party packages can be fetched. Separate multiple directories with space.
./packager.py --build-id 1234 --sku grizzly --absolute-package-dir <path/to/dir>
./packager.py --build-id 1234 --sku grizzly --absolute-package-dir <path/to/dir/1> <path/to/dir/2>
Packager makes all packages by default. To reuse existing packages or to avoid making packages again, use below option to specify the directory from which packages (other than third party depends packages) can be fetched. Separate multiple directories with space
./packager.py --build-id 1234 --sku grizzly --contrail-package-dir <path/to/dir/1>
./packager.py --build-id 1234 --sku grizzly --contrail-package-dir <path/to/dir/1> <path/to/dir/2>
Packager uses config files present in package_configs///depends_packages.cfg to fetch third party packages. Use below option to specify custom depends packages config file. Separate multiple files with space
./packager.py --build-id 1234 --sku grizzly --depends-package-file <file1>
./packager.py --build-id 1234 --sku grizzly --depends-package-file <file1> <file2>
Packager uses config file present in package_configs///contrail_packages.cfg to fetch contrail packages. Use below option to specify custom contrail packages config file. Separate multiple files with space.
./packager.py --build-id 1234 --sku grizzly --contrail-package-file <file1>
./packager.py --build-id 1234 --sku grizzly --contrail-package-file <file1> <file2>
usage: packager.py [-h] [--config CONFIG] [--version] [--build-id BUILD_ID]
[--sku SKU] [--branch BRANCH] [--store-dir STORE_DIR]
[--cache-base-dir CACHE_BASE_DIR [CACHE_BASE_DIR ...]]
[--absolute-package-dir ABSOLUTE_PACKAGE_DIR [ABSOLUTE_PACKAGE_DIR ...]]
[--contrail-package-dir CONTRAIL_PACKAGE_DIR [CONTRAIL_PACKAGE_DIR ...]]
[--base-package-file BASE_PACKAGE_FILE [BASE_PACKAGE_FILE ...]]
[--depends-package-file DEPENDS_PACKAGE_FILE [DEPENDS_PACKAGE_FILE ...]]
[--contrail-package-file CONTRAIL_PACKAGE_FILE [CONTRAIL_PACKAGE_FILE ...]]
[--make-targets MAKE_TARGETS [MAKE_TARGETS ...]]
[--make-targets-file MAKE_TARGETS_FILE]
Description:
Python Packager Script to Make Packages
-------------------------------------------------------------------------------
optional arguments:
-h, --help show this help message and exit
--config CONFIG, -c CONFIG
Config File for the Packager
--version, -v Print version and exit
--build-id BUILD_ID, -i BUILD_ID
Build ID of the new packages
--sku SKU Specify Openstack release
--branch BRANCH Specify GIT branch name
--store-dir STORE_DIR, -s STORE_DIR
Directory Location to which new packages be saved
--cache-base-dir CACHE_BASE_DIR [CACHE_BASE_DIR ...], -C CACHE_BASE_DIR [CACHE_BASE_DIR ...]
Base directory location where OS and third party
packages are available. packager will check files in
base_cache_dir/distribution/sku/. eg /cs-
shared/builder/cache/centos64/grizzly/
--absolute-package-dir ABSOLUTE_PACKAGE_DIR [ABSOLUTE_PACKAGE_DIR ...], -a ABSOLUTE_PACKAGE_DIR [ABSOLUTE_PACKAGE_DIR ...]
Absolute Directory Location where OS and third party
packages are available
--contrail-package-dir CONTRAIL_PACKAGE_DIR [CONTRAIL_PACKAGE_DIR ...], -P CONTRAIL_PACKAGE_DIR [CONTRAIL_PACKAGE_DIR ...]
Directory Location where pre-maked Contrail packages
are available
--base-package-file BASE_PACKAGE_FILE [BASE_PACKAGE_FILE ...], -b BASE_PACKAGE_FILE [BASE_PACKAGE_FILE ...]
Config files specifying base packages info
--depends-package-file DEPENDS_PACKAGE_FILE [DEPENDS_PACKAGE_FILE ...], -d DEPENDS_PACKAGE_FILE [DEPENDS_PACKAGE_FILE ...]
Config files specifying dependant pacakges info
--contrail-package-file CONTRAIL_PACKAGE_FILE [CONTRAIL_PACKAGE_FILE ...], -f CONTRAIL_PACKAGE_FILE [CONTRAIL_PACKAGE_FILE ...]
Config files specifying Contrail packages info
--make-targets MAKE_TARGETS [MAKE_TARGETS ...], -t MAKE_TARGETS [MAKE_TARGETS ...]
List of Contrail make targets to build
--make-targets-file MAKE_TARGETS_FILE, -T MAKE_TARGETS_FILE
Line seperated text file containing list of make
targets