Skip to content
ezabolo edited this page Feb 2, 2015 · 1 revision

Presentation : Provisioning lifecycle

What we will cover on this video

  1. Introduction - What we want to present

  2. Lifecycle Management process

  3. Lifecycle Management with foreman (Overview) what is foreman ? foreman architecture Deployable systems : Hardware(Baremetal ) Virtual Systems( VMware, KVM, ovirt ,openstack) Foreman configuration ( Infrastructure, Provisioning, Configuration) Foreman deployment process Network installation : DHCP, TFTP, PXEboot

  4. OS provisioning with foreman

    Creating an operating system Creating an installation media Creating a partition table Creating a kickstart profiles Kickstart default vs custom kickstart script Kickstart default pxelinux Kickstart default finish vs custom kickstart finish script creating an operating system Sample of VM provisioning Sample of Bare Metal provisioning

  5. Host configuration management using puppet Installing puppet modules Importing puppet modules Applying a puppet class to host Fallback process

  6. Migration Yum repository configuration (local and remote) Creating custom yum repository Package installation using yum Rollback installation using yum history

  7. Host monitoring with foreman Audit a host rebuild a host from foreman Destroy an host from foreman

  8. Conclusion

  9. lifecycle Management tool What is a Machine life cycle management anyway ? A complete lifecycle of a machine consists of the following steps: * Installation – The initial installation of an operating system. * Configuration – The installation and configuration of further software packages as well as the configuration of e.g. users and groups or network interfaces. * Update, Management and Audits – The installation of patches and/or the change of our server configuration and finally the monitoring over the entire lifespan.

    What kind of issue the life cycle management tool tries to solve ? Basic problems that the life cycle management tool will be trying to solve : *New hardware arrives in a remote office, needs OS + configuration + applications *We need to shift servers from one application to another *We need to upgrade to a new base OS + application set *A server has failed and we need to replace it... NOW ! *We upgraded an application across 5 servers and now we're seeing failures, need to roll everything back *We're opening a new office and need to bring up core infrastructure

    Machine management life cycle features

     *Kickstart Integration - automating the delivery of kickstart software, dynamic generation of ks.cfg, and automation 
     *Kickstart Profiles - Ability to parametrically manage personality of systems generated through kickstart
     *Configuration File Management - Centralized management of text/binary configuration files
     *Snapshots / Rollback - Precise time history of system states and ability to revert 
     *Profile Capture / Matching - ability to deploy an exact set of RPMs (not just latest) based on a stored system profile
    

    What is foreman ?

    Foreman is an open source project that helps system administrators manage servers throughout their lifecycle, from provisioning and configuration to orchestration and monitoring What foreman can do ? Discover, provision and upgrade your entire bare-metal infrastructure Create and manage instances across private and public clouds Group your hosts and manage them in bulk, regardless of location Review historical changes for auditing or troubleshooting Extend as needed via a robust plugin architecture Automatically build images (on each platform) per system definition to optimize deployment foreman architecture see the link below : http://projects.theforeman.org/attachments/download/192/foreman_architecture.png

    Foreman deployable systems : baremetal Virtual systems Foreman can deploy hosts from images or templates on different virtual compute resources like oVirt, libvirt [KVM], VMware, openstack. Deploying on those compute resources required some packages to be present on foreman : foreman compute foreman-libvirt foreman-vmware foreman-openstack foreman-ovirt Foreman configuration Key components that need to be configured before foreman can provision, configure and manage machines : Infrastructure: Domains, Subnets, Compute resources, Compute profiles Provisioning: Operating Systems, Provisioning Templates, Installation, Media, Architectures Configuration: Host Groups, Environments, Puppet Classes, Smart Variables

    Foreman deployment process

    The host boots with the PXE-protocol (via DHCP and TFTP). The host sends a broadcasts to search a DHCP-server that can handle PXE requests. The DHCP-server (Smart-Proxy) answers and gives an ip-address to the client. The PXE-Server will be contacted, it knows the route to the TFTP-Server. The TFTP-Server holds a boot image for the host. The host starts the installation through the boot image. This installation runs unattended using the the provisioning templates connected to the boot image Puppet will be run and configure the system and services specified for it. Reports and facts will be gathered and finally be sent to “The Foreman”.

    1. OS provisioning with foreman Creating an operating system Creating an operating system Creating an installation media Creating a partition table Creating a kickstart profiles Kickstart default vs custom kickstart script Kickstart default pxelinux Kickstart default finish vs custom kickstart finish script creating an operating system Sample of VM provisioning Sample of Bare Metal provisioning
    2. Host configuration management using puppet Installing puppet modules eg. puppet module install puppetlabs-ntp Importing puppet modules Go to Configure / Puppet classed / import from .. and then select the class that you want to import.] This supposes that the module has already been installed Applying a puppet class to host Go to Host / search for the host / then edit / puppet classs and then double click on the module that you want to install Fallback process ====> see puppet class to revert the installation
      1. Migration Yum repository configuration (local and remote) using http server create a directory inside your document root for each OS mkdir -pv /var/www/html/centos/7/{os,updates}/x86_64 sync the above directories with the remote repositories rsync -av --exclude debug rsync://mirrors.centos.org/centos-7/7/x86_64 /var/www/html/centos/7/os/x86__64 or if you have an iso file that you want to use mount -o loop /var/isos/Centos7.0141.iso /var/www/html/centos/7/os/x86__64 Will need to declare it in /etc/fstab run the command createrepo on the directory createrepo /var/www/html/centos/7/{os,updates}/x86_64 Configure client on the network to use the repository cd /etc/yum.repos.d create a file : myrepo.repo and the following line [internal] name = My local repo -farm.net baseurl=http://server.farm.net/centos/7/os/x86_64 enabled=1 gpgcheck=0 Installing package using yum yum -y install yum -y groupinstall to remove a package yum groupremove
     Rollback installation using yum history
       list all the transactions using the command yum history
       yum history ===> show all transactions with their ids
       to undo any transaction, just run the command
       yum history undo <id number>
    
    1. Host monitoring with foreman Audit a host rebuild a host from foreman Destroy an host from foreman
    2. Conclusion