You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2017/11/03 00:14:13 UTC
[GitHub] pritidesai commented on issue #633: Introduce "managed" object for all openwhisk entities
pritidesai commented on issue #633: Introduce "managed" object for all openwhisk entities
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/633#issuecomment-341594870
Deployments are classified into two categories: **managed** and **unmanaged**
**Managed Deployments:**
Managed deployment are the ones when OpenWhisk entities are deployed using `wskdeploy` with command line flag `--managed`. This will result in a hidden annotation in every OpenWhisk entity in manifest file. OpenWhisk entities are annotated with `Project Name` and therefore Project Name in manifest file is mandatory for managed deployments:
```
project:
name: MyProject
packages:
package1:
....
```
Every OpenWhisk entity in the manifest file will be annotated with:
```
managed:
project: MyProject
hash: SHA1("OpenWhisk " + <size_of_manifest_file> + "\0" + <contents_of_manifest_file>)
file: Absolute path of manifest file on file system
```
Where the text OpenWhisk is a constant prefix and \0 is also constant and is the NULL character. The <size_of_manifest_file> and <contents_of_manifest_file> vary depending on the file.
Managed deployments will also generate a separate manifest YAML file with all these hidden annotations in every OpenWhisk entities.
Now, subsequent deployment (`wskdeploy --managed`) of the same project minus few OpenWhisk entities from the manifest file will result in undeployment of those deleted entities.
OpenWhisk entities which are deployed using some other tool or automation and also appearing in the manifest file will left unmodified. Such entities are classified as external entities and will not be overwritten.
Undeployment of such project can be driven with `wskdeploy` without any manifest/deployment file but only specifying project and SHA1.
**Unmanaged Deployments:**
Unmanaged deployments are done without specifying `--managed` flag or done outside of `wskdeploy`.
**Questions:**
1. What is the purpose of annotating entities with SHA1? Hash will change when a manifest file changes. How can we trace back entities belonging to the same project using SHA1? What value does this hash add to deployment/undeployment?
2. What is the use of client side manifest YAML file?
3. Can undeployment of managed deployments be done without SHA1?
**References:**
- https://github.com/lionelvillard/openwhisk-project/blob/master/docs/format.md
- Matt's Meeting Notes
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services