Updated Design: Version Control (markdown)

Nick O'Leary 2016-07-25 16:33:19 +01:00
parent d7c0760ac4
commit 0180b9f553
1 changed files with 30 additions and 6 deletions

@ -116,12 +116,36 @@ By default, the `localfilesystem` implementation should be entirely file based.
An optional storage module will be provided that uses a Git repository for its storage.
- if the specified flow file, `my-flows.json` does not exist, it will:
- create an empty repository under `<userHome>/my-flows`
- store `my-flows.json` and `my-flows_cred.json` under that directory
- if the specified flow file does exist and is determined to be in a git repo, it
will be used as-is.
There are two uses to consider, that have a bearing on what configuration options
need to be exposed.
1. a user doesn't care how the repository is laid out, they just want it in a git repo
that allows it to be maintained externally (eg GitHub).
- User provides **flow file name**, eg `my-flows.json` - as they can today
- Node-RED uses a repository under `<userHome>/my-flows` - creating it if needed
- Node-RED stores `my-flows.json` and `my-flows_cred.json` under that directory
2. a user wants to maintain a repo that contains more then just the flow files.
- User provides **git url** for an existing repo, and a **flow file name** as a
relative path within the repo.
- If it is a local repo, Node-RED uses that repo directly. A user could configure
a post-commit hook to handle pushing updates remotely.
- Otherwise, Node-RED clones that repo under `<userHome>/.flows` and uses that,
ensuring to do `git push` back to the origin
- The user should be able to provide authentication settings for the git repo
via settings - or by well-defined environment variables.
In some environments, such as Bluemix, it isn't possible to administer a git repo
locally outside of the Node-RED process. In this case, the user needs to be able
to configure a git url of an existing, externally hosted, repo that should be used,
as well as a path within the repo at that url. This needs to consider the necessary
authentication options; for example GitHub allows you to use an application token -
this would need to be provided via an environment variable, rather than hardcode
into the application.
# Added Nodes