commit | 8f904e1ad33987103cd5dd1d05c3885792b534a9 | [log] [tgz] |
---|---|---|
author | Malith Munasinghe <mpmunasinghe@users.noreply.github.com> | Mon Aug 13 20:38:26 2018 +0530 |
committer | Jason Peterson <jasonpet@us.ibm.com> | Mon Aug 13 11:08:26 2018 -0400 |
tree | ccf4cffb8a740b29081f2237b55f4d63e3be32cf | |
parent | a53b598338cdf5e899a9b80b073a8b88675f1d6a [diff] |
Adding :admin:tools:install task to the travis build.sh (#29)
The /whisk.system/deploy
package offers a convenient way for you to describe and deploy any part of the OpenWhisk programming model using a Manifest file written in YAML.
The package includes the following actions.
Entity | Type | Parameters | Description |
---|---|---|---|
/whisk.system/deploy | package | Package to deploy OpenWhisk programming model elements | |
/whisk.system/deploy/wskdeploy | action | gitUrl, manifestPath, envData | Deploy from github repositories with the appropriate structure and a defining manifest. |
The /whisk.system/deploy/wskdeploy
package deploys OpenWhisk assets from a github repository with a defining manifest. The parameters are as follows:
gitUrl
: A string specifying the location of the github repository containing the assets to be deployed. For example: https://github.com/ibm-functions/template-cloudant-trigger
manifestPath
: Optional. A string specifying the location of the folder enclosing the manifest.yaml file. For example: src/openwhisk
. If this parameter is not provided, it will default to the root of the github repo.
envData
: Optional. A string with a json object providing any optional enviroment data specified by the manifest.yaml file. For example:
"{ "CLOUDANT_HOSTNAME": "some-hostname-bluemix.cloudant.com", "CLOUDANT_USERNAME": "some-username", "CLOUDANT_PASSWORD": "my-password", "CLOUDANT_DATABASE": "database-name" }"
A simple hello world example of a deployable github repository can be found here.
A more complex example of a deployable github repository, including a trigger, a sequence, and cloudant credentials can be found here.
If you would like the manifest.yaml file to be in a different location, you can do so, but you'll need to pass in the optional manifestPath parameter to let wskdeploy know where the file is.
With the repository created, you can now deploy from it.
For the most simple manifests, with no associated services you can run the command with a gitUrl parameter and a manifestPath parameter which tells wskdeploy which language you want from your project.
wsk action invoke /whisk.system/deploy/wskdeploy -p gitUrl https://github.com/ibm-functions/template-hello-world/ -p manifestPath "src/openwhisk"
installCatalog.sh
git clone https://github.com/openwhisk/incubator-openwhisk-package-deploy
cd incubator-openwhisk-package-deploy/packages
./installCatalog.sh AUTH EDGE_HOST WSK_CLI DOCKER
AUTH is your auth key. EDGE_HOST is the OpenWhisk hostname. WSK_CLI is location of the Openwhisk CLI binary. DOCKER is an optional param for the desired wskdeploy
docker image, resolves to openwhisk/wskdeploy:0.9.3
by default.You can also remove the package using
uninstall.sh
in a similar fashion like so:./uninstall.sh AUTH EDGE_HOST WSK_CLI