The bareon.drivers.deploy.nailgun
Module¶
-
class
bareon.drivers.deploy.nailgun.
Manager
(data_driver)¶ Bases:
bareon.drivers.deploy.base.BaseDeployDriver
-
destroy_chroot
(chroot)¶
-
do_bootloader
()¶
-
do_build_image
()¶ Building OS images
Includes the following steps 1) create temporary sparse files for all images (truncate) 2) attach temporary files to loop devices (losetup) 3) create file systems on these loop devices 4) create temporary chroot directory 5) install operating system (install_base_os) 6) configure apt-get sources,and perform package install. 7) configure OS (clean sources.list and preferences, etc.) 8) umount loop devices 9) resize file systems on loop devices 10) shrink temporary sparse files (images) 11) containerize (gzip) temporary sparse files 12) move temporary gzipped files to their final location
-
do_clean_filesystems
()¶
-
do_configdrive
()¶
-
do_copyimage
()¶
-
do_install_os
()¶
-
do_mkbootstrap
()¶ Building bootstrap image
Currently supports only Ubuntu-Trusty Includes the following steps 1) Allocate and configure debootstrap. 2) Install packages 3) Run user-post script(is defined) 4) populate squashfsinit- mlinuz files
- create metadata.yaml and pack thats all into tar.gz
-
do_multiboot_bootloader
()¶
-
do_partitioning
()¶
-
do_provisioning
()¶
-
do_reboot
()¶
-
dump_mkbootstrap_meta
(metadata, c_dir, bootstrap_scheme)¶ Dump mkbootstrap metadata to yaml file
Parameters: - metadata – dict with meta
- file –
Returns: 1)Process module files 2)Collect data from do_mkbootstrap metadata 3)Collect somedata from driver 4_Drop result dict ‘drop_data’ to yaml file
-
install_base_os
(chroot)¶ Bootstrap a basic Linux system
:param chroot directory where the installed OS can be found For now only Ubuntu is supported. Note: the data gets written to a different location (a set of ext4 images located in the image_build_dir directory) Includes the following steps 1) create temporary sparse files for all images (truncate) 2) attach temporary files to loop devices (losetup) 3) create file systems on these loop devices 4) create temporary chroot directory 5) mount loop devices into chroot directory 6) install operating system (debootstrap and apt-get)
-
mount_target
(chroot, treat_mtab=True, pseudo=True)¶ Mount a set of file systems into a chroot
Parameters: - chroot – Directory where to mount file systems
- treat_mtab – If mtab needs to be actualized (Default: True)
- pseudo – If pseudo file systems
need to be mounted (Default: True)
-
umount_target
(chroot, pseudo=True)¶
-
-
bareon.drivers.deploy.nailgun.
list_opts
()¶ Returns a list of oslo.config options available in the library.
The returned list includes all oslo.config options which may be registered at runtime by the library.
Each element of the list is a tuple. The first element is the name of the group under which the list of elements in the second element will be registered. A group name of None corresponds to the [DEFAULT] group in config files.
The purpose of this is to allow tools like the Oslo sample config file generator (oslo-config-generator) to discover the options exposed to users by this library.
Returns: a list of (group_name, opts) tuples