Updating README, CONTRIBUTING, and LICENSE.

This commit is contained in:
Travis Jensen 2019-09-20 14:53:28 -07:00
Родитель e2e3db332d
Коммит f3fad0e89a
3 изменённых файлов: 84 добавлений и 10 удалений

50
CONTRIBUTING.md Normal file
Просмотреть файл

@ -0,0 +1,50 @@
# Contributing
Welcome, and thank you for your interest in contributing to Forge! This project welcomes contributions and suggestions.
Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to,
and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
---
## How to submit a PullRequest to Forge GitHub
### Quick note about branch names and the versioning convention used:
* When creating a new branch, prefix the branch name with "feature/".
* Ex) git branch feature/ForgeActionAttribute
* A new Forge DevOps build is kicked off each time either the master branch or a "feature/" branch gets pushed to GitHub.
* GitVersion is used to handle the versioning. It's set up for the standard SemVer, Major.Minor.Patch-<tags>.
* feature/ branches have the <alpha> tag appended to ensure they cannot be pushed as official Nuget updates.
* master branch updates do not have tags appended.
### Git commands
(Use cmd window for all commands)
```cmd
echo Set up new git workspace…
mkdir works-forge
cd works-forge
git init
echo You may be prompted for GitHub sign-in info…
git remote add origin https://github.com/microsoft/Forge.git
Git pull
git checkout master
echo Make changes on new branch and push…
git branch feature/<branch name>
git checkout feature/<branch name>
git commit -a -m "Adding new feature X."
git push --set-upstream origin feature/<branch name>
```
### Creating a PullRequest
After pushing your "feature/" branch upstream, you can view and create a PullRequest on the GitHub page for your branch.
https://github.com/microsoft/Forge

Просмотреть файл

Просмотреть файл

@ -1,14 +1,38 @@
[![Build Status](https://dev.azure.com/ForgePipeline/Forge/_apis/build/status/Microsoft.Forge?branchName=master)](https://dev.azure.com/ForgePipeline/Forge/_build/latest?definitionId=1&branchName=master)
[Forge.TreeWalker NuGet link](https://www.nuget.org/packages/Forge.TreeWalker/)
# Contributing
## What is Forge?
Forge is a config-driven decision tree, designed to execute your logical workflows in a dynamic way.
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com.
* The config-driven approach allows for high versatility and velocity as compared to code deployments.
* The decision tree concept allows for better clarity and control of the workflows.
* The dynamic capabilities allows for high extensibility on top of the base features.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.
## Is Forge right for my application?
Forge is a perfect library for managing workflows that 1) make decisions and 2) update frequently.
Example scenarios: repair workflow driving, policy matching
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
## Use case: Azure-Compute Fault Handling
Microsoft Azure-Compute's fault handling service is backed by Forge. Fault information is passed to the TreeWalker and a ForgeTree schema is walked. Depending on the type of fault and a handful of other checks, TreeWalker may attempt in-place recovery actions. If these actions were unsuccessful in mitigating the issue, diagnostics are collected and Tardigrade may be performed. You can read more about Azures recovery workflow in this recent blogpost: https://azure.microsoft.com/en-us/blog/improving-azure-virtual-machines-resiliency-with-project-tardigrade/
## Roslyn - dynamically compiled expressions
Forge will dynamically compile and run C# code snippets from the JSON schema file using Roslyn. The Roslyn code has access to the Forge Session which holds all the persisted state output from Actions, and Forge UserContext, the dynamic user-defined object that can have direct access to your application. This effectively allows you to write C# code in a JSON schema file that controls your workflows. Powerful stuff!
## Forge components at a high-level
Forge has 3 major components: ForgeTree, TreeWalker, and ForgeEditor.
* ForgeTree is the JSON schema data contract that defines the tree structure. It contains normal tree-concept objects such as TreeNodes and ChildSelectors, as well as TreeActions and RetryPolicies.
* TreeWalker takes in the ForgeTree and other parameters, and walks the tree to completion. It calls user-defined callbacks and actions, passing in properties from the ForgeTree and the dynamic UserContext object. Instead of hardcoded statements in the code, the TreeWalker makes decisions at run-time about the path it walks by utilizing Roslyn to evaluate C# code-snippets from the ForgeTree.
* ForgeEditor is coming to GitHub by end of 2019 (currently only available internally to Microsoft). ForgeEditor is an Electron application that allows you to visualize and edit the ForgeTree in a clean UI experience. It contains features such as: tree visualization, buttons to create/delete TreeNodes, auto-complete when editing JSON file, text highlighting when hovering over TreeNode, evaluates ForgeSchemaValidationRules while editing, Diagnose mode, etc..
## Further Reading
Check out the [Wiki page](https://github.com/microsoft/Forge/wiki) for a deeper dive into Forge, as well as How To guides!
## Contributing
Interested in contributing to Forge? Check out the [Contributing](CONTRIBUTING.md) page for details.
## License
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the [MIT](LICENSE.txt) license.