Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Before You Install CN2 Pipelines

Release: CN2 23.3
{}
Change Release
date_range 27-Jun-23

SUMMARY The following procedures will help you obtain some prerequisites and some values used to fill the values.yaml file for the CN2 Pipelines Helm chart.

Install Helm

Before installing the CN2 Pipelines chart, you need to install Helm 3 in the management cluster. Helm helps you manage Kubernetes applications. Helm charts help you define, install, and upgrade even the most complex Kubernetes application.

Run the following command to download and install the latest version of Helm 3:

content_copy zoom_out_map
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

Verify Kubeconfig

Before creating the kubeconfig file as base64, verify kubeconfig works from the management cluster.

  1. Copy the kubeconfig file from CN2 to the management cluster. You can do this with a copy and paste.
  2. Run the following command to view the nodes on the CN2 cluster:
    content_copy zoom_out_map
    kubectl get nodes --kubeconfig=<kubeconfig_file_of_CN2_cluster>
  3. Run the following command to view the all the pods on the CN2 cluster:
    content_copy zoom_out_map
    kubectl get pods -A --kubeconfig=<kubeconfig_file_of_CN2_cluster>

CN2 Cluster Configuration

CN2 cluster configuration performs the following actions in the CN2 cluster:

  • Creates CN2 Pipelines namespace if namespace does not exist already.

  • Creates a service account named cn2pipelines.

  • Applies the cluster role and role bindings.

Based on the above items, CN2 Pipelines creates a dynamic bearer token to communicate with the CN2 cluster immediately during the provisioning of CN2 Pipelines with Argo CD.

Mountpath for CN2 Cluster Configuration

Place the CN2 cluster configuration with the name config in the mountpath specified in the values.yaml.

For example:

content_copy zoom_out_map
mountpath: /opt/cn2_workflows/config

Create a Personal Access Token for GitLab

To create a personal access token, use the following procedure from GitLab:

  1. Select Edit profile.
  2. In the left pane, select Access Tokens.
  3. Enter a name and (optional) expiration date for the token.
    Default expiration is 30 days.
  4. Select the desired scopes.
  5. Select Create personal access token.
  6. Save the personal access token somewhere safe. After you leave the page, you no longer have access to the token.
    For more information, see GitLab Personal Access Token.

Mountpath and Profiles

You need to put the mountpath in a mountpath folder, then create your profiles in the mountpath folder. For example, if your mountpath is /opt/cn2_workflows as defined in the values.yaml, you will create a folder named /opt/cn2_workflows.

Create a Sample ConfigMap in Git Server Folder

You need to create a sample ConfigMap before installing the CN2 Pipelines. Create and add the sample ConfigMap to the CN2 network configuration folder identified in your GitLab server branch. The same branch and folder also needs to be added in the values.yaml. This ConfigMap gets applied by Argo CD as part of the CN2 Pipelines installation.

  1. Run the following command to create a ConfigMap with the filename cn2configmap:
    content_copy zoom_out_map
    cat <<'EOF'>> cn2configmap.yaml

    Output:

    content_copy zoom_out_map
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: pipelines-config
      namespace: default
    data:
      cn2pipeline: "true"
  2. Commit the ConfigMap file to the CN2 configuration folder identified in your Git server branch.

Update /etc/hosts for an OpenShift Deployment

On the CN2 cluster, check the ingress components.

Verify that /etc/hosts contains entries from the OpenShift cluster. For example:

content_copy zoom_out_map
192.168.19.571 api.ocp-ss-571.net
footer-navigation