This guide contains instructions on manually setting up Openwhisk and CouchDB on a fresh Ubuntu 14.04 server.
The guide is based on the OpenWhisk Ansible README, which at the time of writing is missing some key steps and gotchas - hence this guide.
sudo su -
apt-get update
sudo apt-get install git -y
cd
git clone https://github.com/apache/incubator-openwhisk.git openwhisk
cd openwhisk/
(cd tools/ubuntu-setup && ./all.sh)
add-apt-repository ppa:couchdb/stable -y
apt-get update
apt-get install couchdb -y
service couchdb stop
chown -R couchdb:couchdb /usr/share/couchdb /etc/couchdb /usr/bin/couchdb
chmod -R 0770 /usr/share/couchdb /etc/couchdb /usr/bin/couchdb
service couchdb start
curl -X PUT localhost:5984/_config/admins/ubuntu -d '"wskdbpass"'
curl -X PUT localhost:5984/_config/query_server_config/reduce_limit -d '"false"' -u ubuntu:wskdbpass
sed -i 's/;bind_address = 127.0.0.1/bind_address = 0.0.0.0/' /etc/couchdb/local.ini
sudo service couchdb restart
ifconfig
curl 172.17.0.1:5984
cd ansible
export OW_DB=CouchDB
export OW_DB_PROTOCOL=http
export OW_DB_HOST=172.17.0.1
export OW_DB_PORT=5984
export OW_DB_USERNAME=ubuntu
export OW_DB_PASSWORD=wskdbpass
touch db_local.ini
cat >db_local.ini << 'EOF'
[db_creds]
db_provider=CouchDB
db_username=ubuntu
db_password=wskdbpass
db_protocol=http
db_host=172.17.0.1
db_port=5984
EOF
ansible-playbook setup.yml
ansible-playbook prereq.yml
cd ..
./gradlew distDocker
cd ansible
ansible-playbook initdb.yml && ansible-playbook wipe.yml && ansible-playbook apigateway.yml && ansible-playbook openwhisk.yml && ansible-playbook postdeploy.yml
cd
export OPENWHISK_HOME=/root/openwhisk
git clone https://github.com/apache/incubator-openwhisk-cli.git openwhisk-cli
cd openwhisk-cli
./gradlew compile -PnativeCompile
cp build/wsk /bin
cd
wsk property set --apihost 172.17.0.1 --insecure
cd openwhisk/
wsk property set --auth `cat ansible/files/auth.guest`
wsk property get --auth
wsk action invoke /whisk.system/utils/echo -p message hello --result --i
wsk action list -i
wsk action update hello hello.php -i
wsk action invoke hello -r -i
wsk action invoke hello -r -i -p name Andrew
cd
wsk sdk install docker