GithubHelp home page GithubHelp logo

kryndex / incubator-openwhisk-package-deploy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apache/openwhisk-package-deploy

0.0 1.0 0.0 72 KB

Apache openwhisk

Home Page: https://openwhisk.apache.org/

License: Apache License 2.0

JavaScript 39.30% Shell 17.93% Scala 42.77%

incubator-openwhisk-package-deploy's Introduction

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.

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.

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"
    

Working with repository

Deploying the Deploy Package using installCatalog.sh

  1. git clone https://github.com/openwhisk/incubator-openwhisk-package-deploy
  2. cd incubator-openwhisk-package-deploy/packages
  3. ./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.8.10 by default.

You can also remove the package using uninstall.sh in a similar fashion like so: ./uninstall.sh AUTH EDGE_HOST WSK_CLI

incubator-openwhisk-package-deploy's People

Contributors

bvennam avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.