Centos offline installer with rpms, docker, containers and artifacts

by rpwcal   Last Updated May 15, 2019 21:00 PM

I need to re-engineer a full offline installer that's been cobbled together in bash and has become brittle very quickly.

There are 2 parts to this, and I'm hoping there's something that can essentially handle both parts. Everything I know or have investigated doesn't handle full end to end.

Setting the stage at the customers location:

  • Customer is asked to provide a centos VM. All customers will provide the VM in one of the following states:
    • Installed from CD, never connected to the internet
    • Installed from CD, updated using a local "intranet" repo owned by customer
  • Intranet access is always available, but there is no route from the VMs to the internet as per customer company policy.

Part 1 - Creating the installer:

Some sort of tool or framework that can generate a package that includes everything necessary to take an VM as described above to operational.

Include the following components:

  • Docker RPM and all chained RPM dependencies
  • Docker containers
  • Java RPM and all RPM depedencies
  • Artifactory Artifacts
  • Deployment framework used by Part 2 (if independent of part 1 toolset)

Currently Part 1 is done in bash and has the following drawbacks:

  • It needs to explicitly list (currently) all 277 packages to download
  • A bunch of logic to allow incoming parameters to specify the version of each service to pull into the offline installer package
  • Credentials to access and download from private repos (docker, artifactory) stored in plaintext :(
  • manually retagging all downloaded docker images to a "local" registry

Part 2 - Running the installer package:

If there is no tool that can do both Part 1 and Part 2, solutions for just part 2 are much simpler to find (ex: ansible)

Execute the installer package:

  • Create a local RPM repo based on all the RPMs extracted via the installer package
  • Install via yum --enablerepo=local /*rpm (docker, java + all chained dependencies)
  • Copy java artifacts, install system service files and start non-dockerized services
  • Create local docker container repo
  • Call dockerfiles and spin up docker environment
  • Perform service checks and ensure services are running

Evaluated or known tools so far

Chef: Hamstrung in offline. Does not handle part 1. Has no mechanism to pack everything up for offline. Overkill for just deployment from an extracted offline package.

Habitat: Hamstrung in offline (tightly coupled to online repos), handles even less than chef. Effectively claims by design that part 1 can be ignored.

Ansible: Does not handle Part 1 at all. Can likely clean up some of part 2, seems to have ok support for offline but no personal experience with this yet.

Related Questions

Updated March 07, 2017 09:00 AM

Updated April 17, 2018 22:00 PM

Updated January 24, 2019 08:00 AM

Updated April 03, 2015 22:00 PM