Browse Source

Merge pull request #91 from gravitl/feature_v0.2_apidocs

Feature v0.2 apidocs
Alex 4 years ago
parent
commit
ae68ed59f8
9 changed files with 133 additions and 13 deletions
  1. 0 0
      LICENSE.txt
  2. 2 6
      README.md
  3. 1 1
      controllers/nodeHttpController.go
  4. 1 1
      docs/API.md
  5. 74 0
      docs/CODE_OF_CONDUCT.md
  6. 26 4
      docs/CONTRIBUTING.md
  7. 1 0
      docs/SITE_2_SITE.md
  8. 19 0
      docs/TROUBLESHOOTING.md
  9. 9 1
      docs/USAGE.md

+ 0 - 0
licensing/LICENSE.txt → LICENSE.txt


+ 2 - 6
README.md

@@ -38,7 +38,7 @@ In future releases, we have plans to support other platforms such as Windows and
 ## Docs
 **For more information, please read the docs, or check out the Quick Start below:**
 
- - [Getting Started](docs/GETTING_STARTED.md)
+ - [General Usage](docs/USAGE.md)
  - [Troubleshooting](docs/TROUBLESHOOTING.md)
  - [API Documentation](docs/API.md)
  - [Product Roadmap](docs/ROADMAP.md)
@@ -70,14 +70,10 @@ Run the following: `curl -sfL https://raw.githubusercontent.com/gravitl/netmaker
 
 #### LICENSE
 
-Netmaker's source code and all artifacts in this repository are freely available. All versions are published under the Server Side Public License (SSPL), version 1, which can be found under the "licensing" directory: [LICENSE.txt](licensing/LICENSE.txt).
+Netmaker's source code and all artifacts in this repository are freely available. All versions are published under the Server Side Public License (SSPL), version 1, which can be found here: [LICENSE.txt](./LICENSE.txt).
 
 #### CONTACT
 
 Email: [email protected]  
 Discord: https://discord.gg/zRb9Vfhk8A
 
-#### SUPPORT
-
-BTC: 3JE5ejpwu9i4vwA4rePkEDBEPpFY1xzJuN  
-ETH: 0xB6c5D23F2bE2100A5a2D337911A7Ef7575B4f91A

+ 1 - 1
controllers/nodeHttpController.go

@@ -615,7 +615,7 @@ func createGateway(w http.ResponseWriter, r *http.Request) {
         update := bson.D{
                 {"$set", bson.D{
                         {"postup", nodechange.PostUp},
-                        {"preup", nodechange.PostDown},
+                        {"postdown", nodechange.PostDown},
                         {"isgateway", nodechange.IsGateway},
                         {"gatewayrange", nodechange.GatewayRange},
 			{"lastmodified", nodechange.LastModified},

+ 1 - 1
docs/API.md

@@ -6,7 +6,7 @@ Most actions that can be performed via API can be performed via UI. We recommend
  
 #### Authentication
  In general, API calls must be authenticated via a header of  the format  `-H "Authorization: Bearer <YOUR_SECRET_KEY>"` There are two methods of obtaining YOUR_SECRET_KEY:
-1. Using the masterkey. By default, this value is "secret key," but you should change this on your instance and keep it secure. This value can be set via env var at startup or in a config file (config/environments/< env >.yaml). See the [getting started](./GETTING_STARTED.md) documentation for more details.
+1. Using the masterkey. By default, this value is "secret key," but you should change this on your instance and keep it secure. This value can be set via env var at startup or in a config file (config/environments/< env >.yaml). See the [general usage](./USAGE.md) documentation for more details.
 2. Using a JWT recieved for a node. This  can be retrieved by calling the `/api/nodes/<network>/authenticate` endpoint, as documented below.
 
 #### Format 

+ 74 - 0
docs/CODE_OF_CONDUCT.md

@@ -0,0 +1,74 @@
+## Code of Conduct
+
+### Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to making participation in our project and
+our community a harassment-free experience for everyone, regardless of age, body
+size, disability, ethnicity, gender identity and expression, level of experience,
+nationality, personal appearance, race, religion, or sexual identity and
+orientation.
+
+### Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or
+advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic
+  address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+  professional setting
+
+### Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or
+reject comments, commits, code, wiki edits, issues, and other contributions
+that are not aligned to this Code of Conduct, or to ban temporarily or
+permanently any contributor for other behaviors that they deem inappropriate,
+threatening, offensive, or harmful.
+
+### Scope
+
+This Code of Conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community. Examples of
+representing a project or community include using an official project e-mail
+address, posting via an official social media account, or acting as an appointed
+representative at an online or offline event. Representation of a project may be
+further defined and clarified by project maintainers.
+
+### Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported by contacting the project team at [email protected]. All
+complaints will be reviewed and investigated and will result in a response that
+is deemed necessary and appropriate to the circumstances. The project team is
+obligated to maintain confidentiality with regard to the reporter of an incident.
+Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good
+faith may face temporary or permanent repercussions as determined by other
+members of the project's leadership.
+
+### Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
+available at [http://contributor-covenant.org/version/1/4][version]
+
+[homepage]: http://contributor-covenant.org
+[version]: http://contributor-covenant.org/version/1/4/

+ 26 - 4
docs/CONTRIBUTING.md

@@ -1,6 +1,28 @@
-## Contributing
+# Contributing to Netmaker
+Welcome! If you're reading this, you might be wondering how to go about submitting some changes, whether those are features, bugfixes, or simple enhancements. You're in the right place. Please read below to learn more.
 
- 1. Create a feature / bugfix branch from develop
- 2.  Write your code
- 3. Submit PR to develop
+## Code of Conduct
 
+Please read through our [code of conduct](./CODE_OF_CONDUCT.md), and when making contributions to the community, stay true to that text.
+
+## Report bugs and requests [here](https://github.com/gravitl/netmaker/issues)
+We use GitHub issues to track bugs, feature requests, and enhancements. If you think there's something missing or wrong with Netmaker, let us know! Try to add the appropriate tags and describe your issue thoroughly. If it's a feature request and we like it, we'll add it to the [roadmap](ROADMAP.md)
+
+## Submitting a PR
+We actively welcome contributions, and the way to do that is with a PR:
+
+1. Fork the repo
+2. Create a branch from `develop` based on what you are developing. In general this will be a feature or a bugfix branch, and should have the format of feature_vX.X_mynewfeature or bugfix_vX.X_mybugfix. Check the releases to see what minor version we are currently developing.
+3. Do your thing
+4. Document thoroughly
+5. Issue a PR to `develop`
+6. Sign the CLA
+
+## Contributor License Agreement
+
+When submitting a PR, you will be asked to sign a CLA, defined [here](https://gist.github.com/afeiszli/2f9f8133929e7d5574a9d892959d58a7). We've tried to make this as non-annoying as possible. This is adapted from the text used by the Apache Foundation in their CLA.
+
+This project is evolving quickly and we may want to move to an MIT or GPL license at some point in the near future, which would be difficult without a CLA.
+
+## Licensing
+Any contributions you make will be under the SSPL Software License. When you submit code changes, you  understand that they will be under the same license that covers this project, defined [here](../LICENSE.txt). If you have any concerns around this, feel free to contact the maintainers.

+ 1 - 0
docs/SITE_2_SITE.md

@@ -0,0 +1 @@
+# This document will cover how to set up site to site connections using netmaker

+ 19 - 0
docs/TROUBLESHOOTING.md

@@ -1,2 +1,21 @@
+# Netmaker Troubleshooting Help
+
+## Client (netclient)
+
+### Client fails to install
+
+### Cannot run install script
+
+### Issue with accesstoken created by UI
+
+
+## Server
+
+## UI
+
+## MongoDB
+
+
+
 ## Incorrect backend detected. Please specify correct URL and refresh. Given: http://localhost:8081
 Solution: Front end expects a reachable address for the backend. Localhost is default. Check if server is up. If server is up, make sure you've got the right endpoint (endpoint of server. Will not be 'localhost' unless doing local testing). If server is up and endpoint is correct, check for port blockings.

+ 9 - 1
docs/GETTING_STARTED.md → docs/USAGE.md

@@ -1,4 +1,12 @@
-# Getting Started (Simple Setup)
+# Getting Started
+
+This guide covers the fundamentals of using Netmaker.
+
+## Quick Start
+
+
+## Non-Docker Setup
+
 ### Server Setup
  1. Get yourself a linux server and make sure it has a public IP.
  2. Deploy MongoDB `docker volume create mongovol && docker run -d --name mongodb -v mongovol:/data/db --network host -e MONGO_INITDB_ROOT_USERNAME=mongoadmin -e MONGO_INITDB_ROOT_PASSWORD=mongopass mongo --bind_ip 0.0.0.0 `