Skip to content

Latest commit

 

History

History
78 lines (64 loc) · 2.62 KB

okd-311.md

File metadata and controls

78 lines (64 loc) · 2.62 KB

Deploying OpenWhisk on OKD/OpenShift 3.11

Overview

The 3.11 version of OKD/OpenShift is based on Kubernetes 1.11.

We assume you have an operational cluster that meets the technical requirements and that you have sufficient priveleges to perform the necessary oc adm operations detailed below.

Initial Setup

Create an openwhisk project (Kubernetes namespace) using the command

oc new-project openwhisk

Because OpenShift doesn’t allow arbitrary UIDs by default, execute the following commands:

oc adm policy add-scc-to-user anyuid -z default
oc adm policy add-scc-to-user privileged -z default
oc adm policy add-scc-to-user anyuid -z openwhisk-core
oc adm policy add-scc-to-user privileged -z openwhisk-core

Configuring OpenWhisk

You must use the KubernetesContainerFactory on OKD/OpenShift.

Here is a sample mycluster.yaml, where <DOMAIN_USED_IN_ROUTES_FOR_THIS_CLUSTER> should be replaced with the domain used for Routes in your cluster.

whisk:
  ingress:
    type: OpenShift
    apiHostName: openwhisk.<DOMAIN_USED_IN_ROUTES_FOR_THIS_CLUSTER>
    apiHostPort: 443
    apiHostProto: https
    domain: openwhisk.<DOMAIN_USED_IN_ROUTES_FOR_THIS_CLUSTER>
  testing:
    includeTests: false

invoker:
  containerFactory:
    impl: kubernetes
``

## Limitations

The nginx service is currently not deployed on OpenShift (problem
determining the appropriate value to use for `k8s.dns`, which is used to
set the resolver in `nginx-cm.yaml`).  As a result, the namespace
prefixed 'vanity url' rewriting routes and the download of the cli/SDK
binaries is not currently supported when deploying on OpenShift.

Smoketesting a deployment via `helm test` is not supported because it
relies on `tiller` (the server side component of Helm) and OpenShift
forbids the use of the server-side components of Helm.