Build a bootstrap image with an additional package

Build a bootstrap image with an additional packageΒΆ

You can install any custom package from the default repository or the connected external repository through the fuel-bootstrap builder script.

Example 1: Installation of the ``strace`` package from the default repository

  1. Build the bootstrap:

    $ fuel-bootstrap build --package 'strace' --label 'bootstrap_with_strace' \
                           --output-dir ~/example1/
    

    System response:

    ...Building process...
    Building initramfs
    Building squashfs
    ...
    Bootstrap image a778efad-88ca-41fe-b592-f02101c11d22 has been built: /root/example1/a778efad-88ca-41fe-b592-f02101c11d22.tar.gz
    

    You can also specify a path to a custom configuration file with parameters for building a new bootstrap instead of using parameters from the default configuration file.

    For example:

    $ fuel-bootstrap build --config /etc/fuel-bootstrap-cli/my-config-xenial.yaml
    
  2. After the build process is completed, you can import and activate the new bootstrap image:

    $ fuel-bootstrap import ~/example1/a778efad-88ca-41fe-b592-f02101c11d22.tar.gz --activate
    
  3. Verify that the bootsrtap image has been activated:

    $ fuel-bootstrap list |grep active
    

    System response:

    | a778efad-88ca-41fe-b592-f02101c11d22 | bootstrap_with_strace  | active |
    
  4. Reboot the discovered node:

    $ ssh 10.109.0.3 reboot
    
  5. Verify that the new bootstrap image is loaded on the discovered node:

    1. Verify that the runtime_uuid value of the activated bootstrap image has been updated in the nailgun-agent configuration file:

      # cat /etc/nailgun-agent/config.yaml
      

      System response:

      {runtime_uuid: a778efad-88ca-41fe-b592-f02101c11d22}
      
    2. Verify that the new package has been installed:

      # dpkg -l |grep strace
      

      System response:

      ii  strace            4.8-1ubuntu5  amd64 A system call tracer
      

Example 2: Installation of the ``nginx`` package using a custom repository

  1. Add the nginx repository to the fuel_bootstrap_cli.yaml file:

    1. Open the fuel_bootstrap_cli.yaml file for editing:

      $ vim /etc/fuel-bootstrap-cli/fuel_bootstrap_cli.yaml
      
    2. Add the following text:

      ...
       repos:
      - name: ubuntu-0
      ...
      - name: ubuntu-1
      ...
      - name: custom_user_repo
        priority: 1001
        section: "nginx"
        suite: trusty
        type: deb
        uri: "http://nginx.org/packages/ubuntu"
      ...
      

    Warning

    The first repository must point to the upstream mirror.

    Warning

    Use priorities higher than 1000 to force the installation of an old version of a package, when other repositories have newer versions of the same package or a newer version of the package is already installed on the system. You can use the force installation in case of a regression caused by the newer version of a package. Find more information about apt-pinning in Debian Manuals.

  2. Build the bootstrap image:

    $ fuel-bootstrap --verbose --debug build --label 'with_nginx_repo_package' --package nginx --activate
    

    System response:

    ...
    Bootstrap image e295a410-2605-4ddf-a967-c3d638d901bc has been built:
    ...
    Bootstrap image e295a410-2605-4ddf-a967-c3d638d901bc has been activated.
    ...
    
  3. After the build process is completed, reboot the discovered node.

  4. Verify that the new package has been installed:

    # dpkg -l |grep nginx
    

    System response:

    ii  nginx     1.8.1-1~trusty     amd64   high performance web server
    
  5. View the status of the packageL

    # apt-cache show nginx
    

    System response:

    Package: nginx
    Status: install ok installed
    ...
    
  6. Verify that the runtime_uuid value of the activated bootstrap image has been updated in the nailgun-agent configuration file:

    # cat /etc/nailgun-agent/config.yaml
    

    System response:

    {runtime_uuid: e295a410-2605-4ddf-a967-c3d638d901bc}
    
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

Contents