Install Continuous Delivery for PE in an offline environment

Use these instructions to install Continuous Delivery for PE in an air-gapped or offline environment where the Continuous Delivery for PE host node does not have direct access to the internet.

  1. Using a proxy server or a computer with internet access, download Docker CE.
    sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    sudo yumdownloader --resolve docker-ce
  2. Using a proxy server or a computer with internet access, download the Continuous Delivery for PE container image.
    sudo docker pull puppet/continuous-delivery-for-puppet-enterprise:3.x
    sudo docker image save puppet/continuous-delivery-for-puppet-enterprise -o cd4pelatest.tar
  3. Transfer the Continuous Delivery for PE container image to the server you've designated as the Continuous Delivery for PE host.
    scp cd4pelatest.tar <CD4PE_HOST_ADDRESS>
    sudo docker image load -i /<directory>/cd4pelatest.tar
  4. Using a proxy server or a computer with internet access, download the puppetlabs-cd4pe module, its dependent modules, and a module to manage job hardware.
    The modules and their required versions are as follows:
    Module Required version
    puppetlabs-cd4pe 1.1.0 or later in the 1.x or 2.x series

    The Nodes page requires version 2.0.1 or later

    puppetlabs-stdlib 4.19.0 or later
    puppetlabs-puppet_authorization 0.5.0 or later
    puppetlabs-hocon 0.9.3 or later
    puppetlabs-concat 2.1.0 or later
    puppetlabs-docker 3.3.0 or later
    puppetlabs-apt 4.4.1 or later
    puppetlabs-translate 1.1.0 or later
    puppetlabs-cd4pe_jobs
    Note: This module manages job hardware running a Puppet agent. Install this module with Continuous Delivery for PE version 3.4.0 or newer.
    1.0.0 or later
    puppetlabs-pipelines
    Note: This module manages job hardware running the deprecated Continuous Delivery agent. Install this module only if you are installing Continuous Delivery for PE version 3.3.0 or older.
    1.0.1
  5. Add the nine modules listed above to the Puppetfile for each environment against which your compilers compile catalogs.
    A sample Puppetfile entry:
    mod 'puppetlabs-cd4pe', '2.0.2'
    # Requirements for cd4pe
    mod 'puppetlabs-stdlib', '8.1.0'
    mod 'puppetlabs-puppet_authorization', '0.5.1'
    mod 'puppetlabs-hocon', '1.1.0'
    mod 'puppetlabs-concat', '7.1.1'
    mod 'puppetlabs-docker', '4.1.2'
    mod 'puppetlabs-apt', '8.3.0'
    mod 'puppetlabs-translate', '2.2.0'
    mod 'puppetlabs-cd4pe_jobs', '1.5.0'
    # Required only if using Continuous Delivery agents for job hardware
    mod 'puppetlabs-pipelines', '1.0.1'
  6. Deploy the updated code to the relevant environments by running puppet code deploy <ENVIRONMENT>.
  7. Configure the Continuous Delivery for PE host node:
    1. Install the operating system and version used on your Puppet master.
      Important: The Continuous Delivery for PE host server must run the same operating system and version as your Puppet master. Do not install Continuous Delivery for PE on the same server as your Puppet master.
    2. Install a Puppet agent. See Installing agents in the PE documentation for details.
    3. Install and start Docker CE . Use the scp command to move the Docker CE package you downloaded in step 1 to the Continuous Delivery for PE host node.
      sudo rpm -ivh *.rpm
      sudo systemctl start docker
  8. In the PE console, click Classification. Click Add group and create a new node group with the following specifications.
    • Parent name: PE Infrastructure

    • Group name: Continuous Delivery for PE

    • Environment: production

    • Environment group: Do not select this option

  9. Open the newly created Continuous Delivery for PE node group. Add your Continuous Delivery for PE host server to the node group by either creating a rule or pinning the node.
  10. Click Configuration. In the Add new class field, select the cd4pe class and click Add class.
    Note: If the cd4pe class isn't available, click Refresh to update the available class definitions.
  11. Automate upgrades of Continuous Delivery for PE to the latest available version in the 3.x series by setting the cd4pe_version parameter to 3.x. Add the parameter and commit your change.
    After the classification change is applied on the next Puppet run, your Continuous Delivery for PE installation automatically upgrades itself whenever a new version is available.
  12. Optional: Customize your Continuous Delivery for PE installation by setting any of the parameters listed in Advanced configuration options. If none of these parameters are set, your installation proceeds with the default settings.
    Important: In order to use the default installation, your Puppet certificate name must be a resolvable DNS hostname. If that is not the case, you must set the resolvable_hostname parameter to a resolvable address (hostname or IP address) where the Continuous Delivery for PE server is reachable. You can use the ${trusted[certname]} fact to set this parameter.
  13. Run Puppet on your Continuous Delivery for PE host server.
    Note: This Puppet run will return "unreachable repository" errors, which are expected at this point in this process.
  14. Install the PE-PostgreSQL components needed to set up the local database.
    yum --disablerepo=docker -d 0 -e 0 -y install pe-postgresql96-server
    yum --disablerepo=docker -d 0 -e 0 -y install pe-postgresql96-contrib
  15. Run Puppet on your Continuous Delivery for PE host server. This run should complete without any errors or warnings about skipped steps.
  16. Finally, follow the instructions in Configure Continuous Delivery for PE with a task. When configuration is complete, you'll be directed to navigate to the Continuous Delivery for PE web UI.
Results
The installation process is now complete, and you're ready to run Continuous Delivery for PE in an offline environment.