stream install catalog with push package (#3)

* stream install catalog with push package

* use latest wskdeploy  version
3 files changed
tree: 52da48073bf34f4df8367e9f1562bbd4e7ed7f14
  1. gradle/
  2. packages/
  3. tests/
  4. tools/
  5. .gitignore
  6. .travis.yml
  7. CONTRIBUTING.md
  8. gradlew
  9. gradlew.bat
  10. LICENSE.txt
  11. README.md
  12. settings.gradle
README.md

Using the Deploy Package

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.

EntityTypeParametersDescription
/whisk.system/deploypackagePackage to deploy OpenWhisk programming model elements
/whisk.system/deploy/wskdeployactiongitUrl, manifestPath, envDataDeploy from github repositories with the appropriate structure and a defining manifest.

wskdeploy Parameters

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/blueprint-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"
    }"
    

Setting up your Repository

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.

  1. Create a github repository with a manifest.yaml at its root, and an actions directory containing any source files.
  • actions
    • my_action_name.js
  • manifest.yaml

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.

  • src
    • ...
    • manifest.yaml
  • test
  1. Please see the above referenced repositories for samples of the manifest.yaml. The manifest.yaml describes the OpenWhisk elements to be created. There is a great guide for writing manifests here.

Run the wskdeploy command

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/blueprint-hello-world/
    -p manifestPath "src/openwhisk"