OCCNE HTTP Repository Configuration

Introduction

To perform an installation without the system needing access to the internet, a local HTTP repository must be created and provisioned with the necessary files. These files are used to provide the binaries for Kubernetes installation, as well as the Helm charts used during Common Services installation.

Prerequisites
  1. Docker is setup procedure should be completed before starting this procedure.
  2. Docker is setup and docker commands can be run by the target system.
  3. HTTP server that is reachable by the target system, Example- Running Nginx in docker container.
    $ docker run --name mynginx1 -p <port>:<port> -d nginx

    More information can be found out on configuring and installing Nginx using docker here: https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-docker/

    OR

    Use the html directory of Apache http server created during setting up yum mirror to perform the tasks listed below.

    Note:

    Create new directories for kubernetes binaries and helm charts in html folder.

Procedure Steps

Table A-3 Steps to configure OCCNE HTTP Repository

Steps Procedure Description
1.

Retrieve Kubernetes Binaries

The Kubernetes installer requires access to an HTTP server from which it can download the proper version of a set of binary files. To provision an internal HTTP repository one will need to obtain these files from the internet, and place them at a known location on the internal HTTP server.

The following command will retrieve the proper binaries and place them in a directory named 'binaries' under the command-line specified directory. This 'binaries' directory URL identified in the clusters hosts.ini inventory file (see below).
$ sh /var/occne/<cluster>/artifacts/k8s_retrieve_bin.sh /var/www/html

Example: $ sh /var/occne/rainbow/artifacts/k8s_retrieve_bin.sh /var/www/html

2.

Retrieve Helm binaries and charts

The Configuration installer requires access to an HTTP server from which it can download the proper version of a set of Helm charts for the common services. To provision an internal HTTP repository one will need to obtain these charts from the internet, and place them at a known location on the internal HTTP server.

$ sh /var/occne/<cluster>/artifacts/retrieve_helm.sh /var/www/html <helm path> < /var/occne/<cluster>/artifacts/config_helm_charts.txt

Example: $ sh /var/occne/rainbow/artifacts/retrieve_helm.sh /var/www/html ./ < /var/occne/rainbow/artifacts/config_helm_charts.txt

3.

Update inventory file with URLs The hosts.ini inventory file for the cluster needs to have a few variables set in the [occne:vars] section to direct the installation logic to the repository directories populated above. In this example the http server is winterfell on port 8082.

Note: The helm repo has a trailing / the k8s repo does NOT.

hosts.ini

...
[occne:vars]
...
occne_k8s_binary_repo='http://winterfell:8082/binaries'
occne_helm_stable_repo_url='http://winterfell:8082/charts/'
...