tree: 718ca27d91cf06031f68cdfed439859dabe201d2 [path history] [tgz]
  1. README.md
  2. all.sh
  3. ansible.sh
  4. bashprofile.sh
  5. docker-xenial.sh
  6. docker.sh
  7. java8.sh
  8. misc.sh
  9. pip.sh
tools/ubuntu-setup/README.md

Setting up OpenWhisk on Ubuntu server(s)

The following are verified to work on Ubuntu 14 LTS. You may need sudo or root access to install required software depending on your system setup.

The commands below should be executed on the host machine for single VM/server deployments of OpenWhisk. For a distributed deployment spanning multiple VMs, the commands should be executed on a machine with network connectivity to all the VMs in the deployment - this is called the bootstrapper and it is ideally an Ubuntu 14.04 VM that is provisioned in an IaaS (infrastructure as a service platform e.g., OpenStack). Your local machine can act as the bootstrapper as well if it can connect to the VMs deployed in your IaaS.

# Install git if it is not installed
sudo apt-get install git -y

# Clone openwhisk
git clone https://github.com/apache/openwhisk.git openwhisk

# Change current directory to openwhisk
cd openwhisk

Open JDK 8 is installed by running the following script as the default Java environment.

# Install all required software
(cd tools/ubuntu-setup && ./all.sh)

If you choose to install Oracle JDK 8 instead of Open JDK 8, please run the following script.

# Install all required software
(cd tools/ubuntu-setup && ./all.sh oracle)

Select a data store

Follow instructions tools/db/README.md on how to configure a data store for OpenWhisk.

Build

cd <home_openwhisk>
./gradlew distDocker

If your build fails with ‘Exception in thread “main” javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty’, you might need to run ‘sudo update-ca-certificates -f’.

Deploy

Follow the instructions in ansible/README.md to deploy and teardown OpenWhisk within a single machine or VM.

Once deployed, several Docker containers will be running in your machine. You can check that containers are running by using the docker CLI with the command docker ps.

Configure the CLI

Follow instructions in Configure CLI. The API host should be 172.17.0.1 or more formally, the IP of the edge host from the ansible environment file.

Use the wsk CLI

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