commit | 161b90d69831104479f75011ad3334ba4d3c64cc | [log] [tgz] |
---|---|---|
author | Vincent <shou@us.ibm.com> | Thu Mar 16 15:49:20 2017 -0400 |
committer | Carlos Santana <csantana23@gmail.com> | Thu Mar 16 15:49:20 2017 -0400 |
tree | 192af954df9d6c067fdc0056558b6238f8aa8851 | |
parent | 9492a4386cd3dd619c0d85092b517014b1c4f2d3 [diff] |
Rename the binaries into wskdeploy within zip files (#191) Under windows, the binary name is wskdeploy.exe. Under Linux and Mac, the binary name is wskdeploy.
wskdeploy
wskdeploy
is a utility to help you create and deploy OpenWhisk projects. Deploy all your actions, triggers, and rules using a single command! You can use this in addition to the OpenWhisk CLI.
wskdeploy
is currenty under development and in its very early stages. Check back often to see how its progressing.
wskdeploy
is written in Go. You can invoke it as a Go program, or run its binary file wskdeploy
directly after building.
You can get the detail usage of this tool by using following commands:
$ go run main.go --help
or
$ ./wskdeploy --help
For example,
$ go run main.go -m tests/usecases/triggerrule/manifest.yml -d tests/usecases/triggerrule/deployment.yml
or
$ ./wskdeploy -m tests/usecases/triggerrule/manifest.yml -d tests/usecases/triggerrule/deployment.yml
will deploy the triggerrule
test case.
wskdeploy
can be built with Go tool.
Make sure $GOPATH
is defined. If not, setup your Go development environment.
Then download wskdeploy
and dependencies by typing:
$ cd $GOPATH $ go get github.com/openwhisk/openwhisk-wskdeploy # see known issues below if you get an error
And finally build wskdeploy
$ cd src/github.com/openwhisk/openwhisk-wskdeploy/ $ go build -o wskdeploy
If you want to build with the godep tool, please execute the following commands.
$ go get github.com/tools/godep # Install the godep tool. $ godep get # Download and install packages with specified dependencies. $ godep go build -o wskdeploy # build the wskdeploy tool.
You can verify your build by running:
./wskdeploy --help
Note: we have no releases yet so you should build the development
branch.
Start by creating a fork of openwhisk-wskdeploy
and then change the git origin
to point to your forked repository, as follows:
$ cd $GOPATH/src/github.com/openwhisk/openwhisk-wskdeploy $ git remote rename origin upstream $ git remote add origin https://github.com/<your fork>/openwhisk-wskdeploy $ git branch --set-upstream-to origin/master # track master from origin now
You can now use git push
to push changes to your repository and submit pull requests.
If you don't want to bother with go installation, build, git clone etc, you can do it with Docker, then you can run wskdeploy tool in your container.
First you need a docker daemon running locally on your machine or whatever in a VM etc.
Get the Docker file.
wget -O Dockerfile https://raw.githubusercontent.com/openwhisk/wskdeploy/master/Dockerfile
docker build -f Dockerfile . -t openwhisk/wskdeploy
docker run -ti openwhisk/wskdeploy
wskdeploy
and have fun.Note: Based on user role, you may need add sudo before your command to run as root.
You might get this error when downloading openwhisk-wskdeploy
Cloning into ''$GOAPTH/src/gopkg.in/yaml.v2'... error: RPC failed; HTTP 301 curl 22 The requested URL returned error: 301 fatal: The remote end hung up unexpectedly
This is caused by newer git
not forwarding request anymore. One solution is to allow forwarding for gopkg.in
$ git config --global http.https://gopkg.in.followRedirects true