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.
-
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
-
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
-
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
-
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 -
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'
-
Deploy the updated code to the relevant environments by running
puppet code deploy <ENVIRONMENT>
. -
Configure the Continuous Delivery for PE host node:
-
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.
- Install a Puppet agent. See Installing agents in the PE documentation for details.
-
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
-
Install the operating system and version used on your Puppet master.
-
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
-
- 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.
-
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.
-
Automate upgrades of Continuous Delivery for PE to the latest available
version in the 3.x series by setting the
cd4pe_version
parameter to3.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. -
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. -
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.
-
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
- Run Puppet on your Continuous Delivery for PE host server. This run should complete without any errors or warnings about skipped steps.
- 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.