Off The Shelf Application

Workflow for off the shelf applications

In this workflow, all files are owned by the user and maintained in a repository under their control, but they are based on an off-the-shelf configuration that is periodically consulted for updates.

off-the-shelf config workflow image

Following are the steps involved:

  1. Find and fork an OTS config

  2. Clone it as your base

    The base directory is maintained in a repo whose upstream is an OTS configuration, in this case some user’s ldap repo:

    1. mkdir ~/ldap
    2. git clone https://github.com/$USER/ldap ~/ldap/base
    3. cd ~/ldap/base
    4. git remote add upstream git@github.com:$USER/ldap
  3. Create overlays

    As in the bespoke case above, create and populate an overlays directory.

    The overlays are siblings to each other and to the base they depend on.

    1. mkdir -p ~/ldap/overlays/staging
    2. mkdir -p ~/ldap/overlays/production

    The user can maintain the overlays directory in a distinct repository.

  4. Bring up variants

    1. kustomize build ~/ldap/overlays/staging | kubectl apply -f -
    2. kustomize build ~/ldap/overlays/production | kubectl apply -f -

    You can also use kubectl-v1.14.0 to apply your variants.

    1. kubectl apply -k ~/ldap/overlays/staging
    2. kubectl apply -k ~/ldap/overlays/production
  5. (Optionally) Capture changes from upstream

    The user can periodically rebase their base to capture changes made in the upstream repository.

    1. cd ~/ldap/base
    2. git fetch upstream
    3. git rebase upstream/master