Installing Edge using Ops Manager offline

This document describes how to install Edge when you do not have the Internet connection.

The basic process is:

  1. Import the 4.19.01-01 Edge tile into Ops Manager, which includes support for offline install. Contact Apigee to obtain the tile.
  2. Use fpm to create a RPM that stores the necessary repos.
  3. In the Ops Manager, specify the URL that points to this RPM. The installer deploys this repo as the first step after a VM is launched.

This installation approach has several advantages:

  • A single URL is required.
  • You can put as many repo files within the RPM as required.
  • Supports the use case where you have separate mirrors for epel, base, and other utilities.
  • You can use additional yum features, such as enable gpgcheck with ability to specify a gpgkey.

Requirements on VM hosting the repo

  • CentOS VM with 2 CPUs, 4 GB RAM, and 70 GB SDD
  • Created within the infra subnet of pcf
  • Hosts a web server used to access the repo

Offline install procedure

  1. Create CentOS and EPEL Local Satellite Server.

    You must create a mirror repo and host it on a VM with a web server. This example illustrates how to create a CentOS mirror repo on CentOS/RHEL with the NGINX web server.

    sudo yum update -y
    sudo yum install -y createrepo rsync
    sudo yum install -y nginx
    sudo systemctl start nginx
    # Create directory for the CentOS base repo.
    sudo mkdir -p /usr/share/nginx/html/centos/7/os/x86_64/
    # Create directory for the CentOS update repo.
    sudo mkdir -p /usr/share/nginx/html/centos/7/updates/x86_64/
    #  Create directory for the EPEL 7 repo.
    sudo mkdir -p /usr/share/nginx/html/epel/7/x86_64/
    createrepo /usr/share/nginx/html/centos/7/os/x86_64/
    createrepo /usr/share/nginx/html/centos/7/updates/x86_64/
    createrepo /usr/share/nginx/html/epel/7/x86_64/
    rsync -avz -avz --delete --exclude='repo*' \
      rsync:// \
    rsync -avz --delete --exclude='repo*' \
      rsync:// \
    rsync  -avz --delete rsync:// /usr/share/nginx/html/epel/7/x86_64/
    createrepo --update /usr/share/nginx/html/centos/7/os/x86_64/
    createrepo --update /usr/share/nginx/html/centos/7/updates/x86_64/
    createrepo --update /usr/share/nginx/html/epel/7/x86_64/

    This process creates a CentOS mirror and hosts it on a NGINX server.

  2. Install fpm.

    For CentOS/Redhat, you can use the following command to install fpm. If you used Step 1 to create the VM, you can install fpm on the same host VM where you have hosted CentOS mirror.

    yum install ruby-devel gcc make rpm-build rubygems
    gem install --no-ri --no-rdoc fpm

    See here for more details on installing fpm on other platforms.

  3. Create the directory structure for a custom repo.

    In case you have built your own mirror, you can execute these steps on the same CentOS VM.

    mkdir customrepo && cd customrepo
    yum install wget -y
    mkdir etc
    mkdir -p etc/pki
    mkdir -p etc/yum/vars
    mkdir -p etc/yum.repos.d
  4. Go to /etc/yum/vars directories and edit the following vars. These vars are used in the next step when editing customrepo/etc/yum.repos.d/custom.repo to configure your repo.

    • customrepohost

      Set to the hostip/fqdn of the mirror repo. If you built your own local mirror, set customrepohost to the IP address of the host machine.

    • customuser and custompassword

      If the repo hosting the Edge RPM requires authentication by username:password, set these vars.

  5. Edit customrepo/etc/yum.repos.d/custom.repo to set the CentOS Base, CentOS Update, and EPEL 7 repo details.

    Edit this file to point to your CentOS base, CentOS update, and latest EPEL repos. You can use the example given below if you have built your local CentOS mirror as described in Step 1. In case you have a local mirror, please point the baseurl and gpgkey accordingly.

    #centos base
    name=Custom CentOS-$releasever - Base
    #released updates
    name=Custom CentOS-$releasever - Updates
    name=Custom Extra Packages for Enterprise Linux 7 - $basearch
  6. Use fpm to create a custom repo and move it to the NGINX base webroot directory. In case you have a local mirror, please move this to webroot of any web server, which can be accessed from the PCF Server.

    fpm -C . --package /tmp --iteration 11 -s dir -t rpm -n "custom-repo" etc
    mv /tmp/custom-repo-1.0-11.x86_64.rpm /usr/share/nginx/html/
  7. From the host, check if you can access the custom repo:
    curl http://hostip/custom-repo-1.0-11.x86_64.rpm -O
  8. Continue with Edge BOSH tile install. Use the URL you tested in the previous step— http://hostip/custom-repo-1.0-11.x86_64.rpm—in the Custom RPM field of the Apigee Edge on PCF tab of the Edge tile.