1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Updated Design: Version Control (markdown)

Nick O'Leary 2016-07-25 16:33:19 +01:00
parent d7c0760ac4
commit 0180b9f553

@ -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. 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: There are two uses to consider, that have a bearing on what configuration options
- create an empty repository under `<userHome>/my-flows` need to be exposed.
- 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 1. a user doesn't care how the repository is laid out, they just want it in a git repo
will be used as-is. 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 # Added Nodes