You are viewing documentation of Keptn that is currently under development and subject to change.

Keptn Quality Gates Installation using manifests (experimental)

The following installation instructions provide a way to manually install Keptn Quality Gates without any installer job. Furthermore, no NGINX will be installed using these instructions.

Following these manual installation instructions is not the recommended way to install Keptn. But in case you cannot use the prepared installer because you e.g. need to exactly control what is installed in your Kubernetes cluster, the instructions can be used.

Please note: These instructions are experimental.

Please note: No upgrade script or instructions are provided for a manual installation of Keptn.

Prerequisites

Setup Keptn Quality Gates

  1. Select the Keptn version 0.6.2:

    export KEPTNVERSION=0.6.2
    
  2. Apply the Keptn namespace:

    kubectl apply -f https://raw.githubusercontent.com/keptn/keptn/$KEPTNVERSION/installer/manifests/keptn/namespace.yaml
    
  3. Apply NATS resources:

    kubectl apply -f https://raw.githubusercontent.com/keptn/keptn/$KEPTNVERSION/installer/manifests/nats/nats-operator-prereqs.yaml
    kubectl apply -f https://raw.githubusercontent.com/keptn/keptn/$KEPTNVERSION/installer/manifests/nats/nats-operator-deploy.yaml
    kubectl apply -f https://raw.githubusercontent.com/keptn/keptn/$KEPTNVERSION/installer/manifests/nats/nats-cluster.yaml
    kubectl apply -f https://raw.githubusercontent.com/keptn/keptn/$KEPTNVERSION/installer/manifests/keptn/rbac.yaml
    
  4. Install the Keptn Datastore:

    kubectl apply -f https://raw.githubusercontent.com/keptn/keptn/$KEPTNVERSION/installer/manifests/logging/namespace.yaml
    kubectl apply -f https://raw.githubusercontent.com/keptn/keptn/$KEPTNVERSION/installer/manifests/logging/mongodb/pvc.yaml
    kubectl apply -f https://raw.githubusercontent.com/keptn/keptn/$KEPTNVERSION/installer/manifests/logging/mongodb/deployment.yaml
    kubectl apply -f https://raw.githubusercontent.com/keptn/keptn/$KEPTNVERSION/installer/manifests/logging/mongodb/svc.yaml
    kubectl apply -f https://raw.githubusercontent.com/keptn/keptn/$KEPTNVERSION/installer/manifests/logging/mongodb-datastore/k8s/mongodb-datastore.yaml
    kubectl apply -f https://raw.githubusercontent.com/keptn/keptn/$KEPTNVERSION/installer/manifests/logging/mongodb-datastore/mongodb-datastore-distributor.yaml
    
  5. Create a Keptn API-token, as explained here.

  6. Install the Keptn Core:

    kubectl apply -f https://raw.githubusercontent.com/keptn/keptn/$KEPTNVERSION/installer/manifests/keptn/core.yaml
    kubectl apply -f https://raw.githubusercontent.com/keptn/keptn/$KEPTNVERSION/installer/manifests/keptn/keptn-domain-configmap.yaml
    
  7. Install Keptn API Gateway NGINX:

    kubectl apply -f https://raw.githubusercontent.com/keptn/keptn/$KEPTNVERSION/installer/manifests/keptn/api-gateway-nginx.yaml
    
  8. Install Keptn Quality Gates:

    kubectl apply -f https://raw.githubusercontent.com/keptn/keptn/$KEPTNVERSION/installer/manifests/keptn/quality-gates.yaml
    

Summary of applied images

By following the DockerHub link, you will find the built image on DockerHub. The referenced Dockerfile shows how the image was built.

Access the Keptn API

In order to access the Keptn API, you can either use a LoadBalancer or a Port-forward:

Using a LoadBalancer

Expose the Keptn API by patching the service api-gateway-nginx:

  kubectl patch svc api-gateway-nginx -n keptn -p '{"spec": {"type": "LoadBalancer"}}'

Query the IP:

  export KEPTN_ENDPOINT=http://$(kubectl get svc api-gateway-nginx -n keptn -ojsonpath='{.status.loadBalancer.ingress[0].ip}')

or the hostname (for EKS)

  export KEPTN_ENDPOINT=http://$(kubectl get svc api-gateway-nginx -n keptn -ojsonpath='{.status.loadBalancer.ingress[0].hostname}')

Using a Port-forward

Make a port-forward with:

  kubectl port-forward svc/api-gateway-nginx -n keptn 8080:80
  export KEPTN_ENDPOINT=http://localhost:8080

Use the Keptn CLI

  1. Follow the Keptn CLI install instructions.

    Important: The Keptn CLI in version 0.6.2 or above is required.

  2. Authenticate your CLI

./keptn auth --endpoint=$KEPTN_ENDPOINT --api-token=$KEPTN_API_TOKEN --scheme=http

Please note: Always add the flag --scheme=http to all CLI commands. Otherwise, the CLI uses https which is not configured in this installation.

Please note: The WebSocket communications cannot be used when the API is exposed via a Port-forward. Hence, please add --suppress-websocket to all CLI commands.

Setup Quality Gates for your existing services

Now, you are able to continue with the use case as described here.