Skip to content

Latest commit

 

History

History
82 lines (68 loc) · 3.11 KB

README.md

File metadata and controls

82 lines (68 loc) · 3.11 KB

Setting up OpenWhisk with Docker for Mac

OpenWhisk can run on a Mac host with Docker for Mac. If you prefer to use Docker-machine, you can follow instructions in docker-machine/README.md

Prerequisites

The following are required to build and deploy OpenWhisk from a Mac host:

Tips:

  1. Versions of Docker and Ansible are lower than the latest released versions, the versions used in OpenWhisk are pinned to have stability during continuous integration and deployment.
  2. It is required to install Docker >= 18.06.2 because of this CVE

Homebrew is an easy way to install all of these and prepare your Mac to build and deploy OpenWhisk. The following shell command is provided for your convenience to install brew with Cask and bootstraps these to complete the setup. Copy the entire section below and paste it into your terminal to run it.

echo '
# install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install cask
brew tap homebrew/cask
# install for AdoptOpenJDK (java10)
brew tap AdoptOpenJDK/openjdk
# install java 10
brew cask install adoptopenjdk10
# install scala
brew install scala
# install gnu tar
brew install gnu-tar
# install pip
sudo easy_install pip
# install script prerequisites
sudo -H pip install docker==2.2.1 ansible==2.5.2 jinja2==2.9.6 couchdb==1.1 httplib2==0.9.2 requests==2.10.0' | bash

Make sure you correctly configure the environment variable $JAVA_HOME.

Build

cd /your/path/to/openwhisk
./gradlew distDocker

Tip Using gradlew handles the installation of the correct version of Gradle to use.

Deploy

Follow instructions in ansible/README.md

Configure the CLI

Follow instructions in Configure CLI

Use the wsk CLI

bin/wsk action invoke /whisk.system/utils/echo -p message hello --result
{
    "message": "hello"
}