apache / openwhisk

Apache OpenWhisk is an open source serverless cloud platform
https://openwhisk.apache.org/
Apache License 2.0
6.5k stars 1.16k forks source link

Move /whisk.system/samples from openwhisk to openwhisk-catalog #664

Closed houshengbo closed 8 years ago

houshengbo commented 8 years ago

Issue #4 is a prereq.

In general, we are are moving actions that appear in the "/whisk.system/samples" namespace form the current repo. "openwhisk-openwhisk" to this repo. "openwhisk-catalog".

By convention, we will:

Create top-level “package” named directories (1-per logical sample, same functional sample)
For each unique language implementation for sample package, create a subdirectory named for the language in which that language impl. will reside (e.g., “javascript”, "swift", “python”, java”, etc.)
    so it would look like: openwhisk/catalog/packages/samples/ <action name> / <language name> / <xxx>.<language extension>
    for example: "openwhisk/catalog/packages/samples/hello/swift/hello.swift"

Specifically, create known sample directories (and language specific subdirs.) for the following packages:

“countdown”
    create “javascript” -> “countdown.js”
    Rodric indicates code is not working properly but could and needs to be fixed.
"curl"
    create “javascript” -> “curl.js”
    May need testing/fixing?
"echo"
    move echo.js to /whisk.system/utils package, remove from “samples” directory, move to “utils” directory.
    move catalog install logic to change package namespace and directory locations.
"greeting"
    create “javascript” - > “echo.js”
“hello”
    Needs subdirs, for javascript, python, java, swift (others?)
    rename impl. files for actions/feeds to remove any language references (e.g., “helloJava.java” should ne just “hello.java”) as a new convention
    Python “hello.py” would come from the "blue" sample named “helloPython.py”…
    we will do this on a different issue # after this initial move.
“helloAsync”
    create “javascript” -> “helloAsync.js”
“httpGet”
    create subdir. “swift” to host “httpGet.js”
“invoke”
    create subdir “swift” to host invoke.swift
"printParams"
    create “javascript” - > “printParams.js”
"trigger"
    create ”swift” -> “trigger.swift”
    Note: may need testing/fixing
"wordcount"
    create “javascript” - > “wc.js”
    rename wc.js to wordcount.js
    move wcbin.js to wordcount javascript directory
    merge wcbin.js (i.e., wordcount binary) into wordcount.js
    provide new optional parameter to return binary result

Please also move the following actions currently in "openwhisk-openwhisk/catalog/utils" to their own directories under "openwhisk-catalog/packages/samples/".

cat.swift
head.swift
split.swift

Be sure to coordinate "delete" from the current repo. once these are moved (see Issue #2) as this move is noted there is well.

houshengbo commented 8 years ago

Refer to openwhisk-catalog: https://github.com/openwhisk/openwhisk-catalog/issues/3

rabbah commented 8 years ago

Move implies removing the corresponding artifacts in this repo. Are you covering the cleanup in some other issue?