Skip to content

Instantly share code, notes, and snippets.

@bbrowning
Last active August 22, 2018 15:59

Revisions

  1. bbrowning revised this gist Jun 23, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion openshift_instructions.md
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,7 @@ Then, deploy OpenWhisk:
    ```
    oc new-project openwhisk
    oc create -f https://raw.githubusercontent.com/projectodd/incubator-openwhisk-deploy-kube/simplify-deployment-openshift/configure/openwhisk_openshift.yml
    watch oc get all
    watch "oc get all"
    ```

    Make sure all pods enter the Running state before moving on. If not,
  2. bbrowning revised this gist Jun 23, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions openshift_instructions.md
    Original file line number Diff line number Diff line change
    @@ -23,6 +23,7 @@ eval $(minishift oc-env)
    Then, deploy OpenWhisk:

    ```
    oc new-project openwhisk
    oc create -f https://raw.githubusercontent.com/projectodd/incubator-openwhisk-deploy-kube/simplify-deployment-openshift/configure/openwhisk_openshift.yml
    watch oc get all
    ```
  3. bbrowning created this gist Jun 13, 2017.
    64 changes: 64 additions & 0 deletions openshift_instructions.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,64 @@
    # Running Apache OpenWhisk on OpenShift

    ## Prerequisites

    These instructions assume you are using
    [Minishift](https://www.openshift.org/minishift/) 1.0.1 or newer as
    your OpenShift installation.

    You'll also need a `wsk` binary in your `$PATH` to interact with
    OpenWhisk after it's deployed. Download the latest version for your OS
    from https://github.com/apache/incubator-openwhisk-cli/releases/

    ## Instructions

    First, start minishift and fix a networking bug in current releases:

    ```
    minishift start
    minishift ssh -- sudo ip link set docker0 promisc on
    eval $(minishift oc-env)
    ```

    Then, deploy OpenWhisk:

    ```
    oc create -f https://raw.githubusercontent.com/projectodd/incubator-openwhisk-deploy-kube/simplify-deployment-openshift/configure/openwhisk_openshift.yml
    watch oc get all
    ```

    Make sure all pods enter the Running state before moving on. If not,
    something is broken and start troubleshooting by looking in the logs
    of the failing pods.

    The `install-openwhisk-catalog-xxxxx` and
    `preload-openwhisk-runtimes-xxxxx` pods should transition from Running
    to Completed as they finish installing the default OpenWhisk catalog
    of packages and pulling the default OpenWhisk runtime container
    images.

    Then, wait until the controller recognizes the invoker as healthy:

    ```
    oc logs -f $(oc get pods | grep controller | awk '{print $1}') | grep "invoker status changed"
    ```

    You're looking for a message like `invoker status changed to invoker0:
    Healthy`. Once you see that message, OpenWhisk is running and you need
    to configure the client authentication to your controller:

    ```
    export AUTH_SECRET=$(oc get configmap openwhisk-config -o yaml | grep 'AUTH_WHISK_SYSTEM=' | awk -F '=' '{print $2}')
    export API_HOST=http://$(oc get route/controller --template={{.spec.host}})
    wsk property set --auth $AUTH_SECRET --apihost $API_HOST
    ```

    Finally, you're ready to test actions:

    ```
    wsk list
    wsk action invoke /whisk.system/utils/echo -p message hello -b
    ```

    Now you can follow along with the OpenWhisk docs on [creating
    actions](https://github.com/apache/incubator-openwhisk/blob/master/docs/actions.md).