Skip to content

Commit

Permalink
#1731 Docs for 20.0 release (#1754)
Browse files Browse the repository at this point in the history
* Update README.md

Review doc. Update by links. Add labels.

* Update readme.md: Review doc. Update links

* Update building.rst: Review doc

* Update overview.rst

* Update tests.rst: Review doc. Update links

* Update releaseprocess.rst: Update development process

* Update bigpicture.rst: Copy Welcoming from README

* Update contributing.rst: Add discussions and dev process refs

* Update gettingstarted.rst

* Update gotchas.rst: Write IIS gotchas

* Update notsupported.rst: Add sections. Use more links

* Update administration.rst: Review doc. Fix markup. More links

* Update authentication.rst: Review doc. Add more links

* Update authorization.rst: review. Add "Authorization Middleware" section

* Update caching.rst: Review markup. More links

* Update claimstransformation.rst: Review doc. Update markdown. Middleware links

* Correct spelling error  in dev docs

* Update configuration.rst: Review the doc. Rewrite "SSL Errors" section

* Update delegatinghandlers.rst: Review. More links. Add "Order of Execution" section

* Update dependencyinjection.rst: Review the doc. Fix markdown

* Update errorcodes.rst: Review. Add "Design" section

* Update graphql.rst: Review. Add "Future" section

* Update headerstransformation.rst: Review. More links. Rewrite Placeholders & Future sections

* Update headerstransformation.rst: Add "Global Headers Transformation" subsection

* Update kubernetes.rst: Review. Links. Add K8s logo

* Update kubernetes.rst: Add link to the parent feature

* Update loadbalancer.rst: Fix markdown. More links

* Update logging.rst: More links. Rewrite "Warning" section

* Update methodtransformation.rst

* Update middlewareinjection.rst: Review. Check links. Add "Future" section

* Update qualityofservice.rst: Review markdown

* Update ratelimiting.rst: Review. Markdown. Add "Future" section

* Update requestaggregation.rst: Review. Fix markdown

* Update requestid.rst: Review markdown

* Update routing.rst: Review markdown. Simplify code blocks

* Update servicediscovery.rst: Review markdown

* Update servicefabric.rst: Review markdown

* Update tracing.rst: Review markdown. More links

* Update websockets.rst: Complete rewrite

* Update README.md: Hide Coverage badge. More footnotes

* Update README.md: Add "Service Discovery" footnote

* Update index.rst: Arrange features. More instructions

* Update releaseprocess.rst: Be more pleasant

* Update qualityofservice.rst: Add QoS label and footnote

* Fix Sphinx build errors & warning. Fix typos

* Add bash script

* Order feature names ascending

* Sync & update scripts
  • Loading branch information
raman-m authored Oct 26, 2023
1 parent 0a05369 commit 640b005
Show file tree
Hide file tree
Showing 41 changed files with 1,844 additions and 1,500 deletions.
102 changes: 60 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

[![CircleCI](https://circleci.com/gh/ThreeMammals/Ocelot/tree/main.svg?style=svg)](https://circleci.com/gh/ThreeMammals/Ocelot/tree/main)

[![Coverage Status](https://coveralls.io/repos/github/ThreeMammals/Ocelot/badge.svg)](https://coveralls.io/github/ThreeMammals/Ocelot)
<!-- [![Coverage Status](https://coveralls.io/repos/github/ThreeMammals/Ocelot/badge.svg)](https://coveralls.io/github/ThreeMammals/Ocelot) -->

# Ocelot
## About

Ocelot is a .NET API Gateway. This project is aimed at people using .NET running a microservices / service-oriented architecture
that need a unified point of entry into their system. However it will work with anything that speaks HTTP and run on any platform that ASP.NET Core supports.
that need a unified point of entry into their system. However it will work with anything that speaks HTTP(S) and run on any platform that ASP.NET Core supports.

In particular I want easy integration with IdentityServer reference and bearer tokens.

We have been unable to find this in my current workplace without having to write our own Javascript middlewares to handle the IdentityServer reference tokens. We would rather use the IdentityServer code that already exists to do this.
In particular we want easy integration with [IdentityServer](https://github.com/IdentityServer) reference and [Bearer](https://oauth.net/2/bearer-tokens/) tokens.
We have been unable to find this in our current workplace without having to write our own Javascript middlewares to handle the IdentityServer reference tokens.
We would rather use the IdentityServer code that already exists to do this.

Ocelot is a bunch of middlewares in a specific order.

Expand All @@ -23,56 +23,74 @@ That is basically it with a bunch of other features!

## Features

A quick list of Ocelot's capabilities for more information see the [documentation](https://ocelot.readthedocs.io/en/latest/).

* Routing
* Request Aggregation
* Service Discovery with Consul & Eureka
* Service Fabric
* Kubernetes
* WebSockets
* Authentication
* Authorization
* Rate Limiting
* Caching
* Retry policies / QoS
* Load Balancing
* Logging / Tracing / Correlation
* Headers / Method / Query String / Claims Transformation
* Custom Middleware / Delegating Handlers
* Configuration / Administration REST API
* Platform / Cloud Agnostic
A quick list of Ocelot's capabilities, for more information see the [Documentation](#documentation).

* [Routing](https://ocelot.readthedocs.io/en/latest/features/routing.html)
* [Request Aggregation](https://ocelot.readthedocs.io/en/latest/features/requestaggregation.html)
* [GraphQL](https://ocelot.readthedocs.io/en/latest/features/graphql.html) [^1]
* [Service Discovery](https://ocelot.readthedocs.io/en/latest/features/servicediscovery.html) [^2]
* [Service Fabric](https://ocelot.readthedocs.io/en/latest/features/servicefabric.html)
* [Kubernetes](https://ocelot.readthedocs.io/en/latest/features/kubernetes.html)
* [Websockets](https://ocelot.readthedocs.io/en/latest/features/websockets.html)
* [Authentication](https://ocelot.readthedocs.io/en/latest/features/authentication.html)
* [Authorization](https://ocelot.readthedocs.io/en/latest/features/authorization.html)
* [Rate Limiting](https://ocelot.readthedocs.io/en/latest/features/ratelimiting.html)
* [Caching](https://ocelot.readthedocs.io/en/latest/features/caching.html)
* [Quality of Service](https://ocelot.readthedocs.io/en/latest/features/qualityofservice.html) [^3]
* [Load Balancer](https://ocelot.readthedocs.io/en/latest/features/loadbalancer.html)
* [Logging](https://ocelot.readthedocs.io/en/latest/features/logging.html) / [Tracing](https://ocelot.readthedocs.io/en/latest/features/tracing.html) / [Correlation](https://ocelot.readthedocs.io/en/latest/features/requestid.html)
* [Headers](https://ocelot.readthedocs.io/en/latest/features/headerstransformation.html) / [Method](https://ocelot.readthedocs.io/en/latest/features/methodtransformation.html) / [Query String](https://ocelot.readthedocs.io/en/latest/search.html?q=Query+String&check_keywords=yes&area=default) / [Claims](https://ocelot.readthedocs.io/en/latest/features/claimstransformation.html) Transformation
* [Custom Middleware](https://ocelot.readthedocs.io/en/latest/features/middlewareinjection.html) / [Delegating Handlers](https://ocelot.readthedocs.io/en/latest/features/delegatinghandlers.html)
* [Configuration](https://ocelot.readthedocs.io/en/latest/features/configuration.html) / [Administration](https://ocelot.readthedocs.io/en/latest/features/administration.html) REST API
* [Platform](https://ocelot.readthedocs.io/en/latest/building/building.html?highlight=Platform#building) & Cloud Agnostic [Building](https://ocelot.readthedocs.io/en/latest/building/building.html)

## Install

Ocelot is designed to work with ASP.NET and it targets `net7.0`.

Install Ocelot and its dependencies using NuGet Package Manager:
Ocelot is designed to work with ASP.NET Core and it targets `net7.0` framework.
Install [Ocelot package](https://www.nuget.org/packages/Ocelot) and its dependencies using NuGet Package Manager:
```powershell
Install-Package Ocelot
```

Or via the .NET CLI:
```shell
dotnet add package Ocelot
```

All versions can be found [here](https://www.nuget.org/packages/Ocelot/).
All versions can be found [on nuget](https://www.nuget.org/packages/Ocelot#versions-body-tab).

## Documentation

Please click [here](https://ocelot.readthedocs.io/en/latest/) for the Ocelot documentation. This includes lots of information and will be helpful if you want to understand the features Ocelot currently offers.
- [Ocelot documentation — Read the Docs](https://ocelot.readthedocs.io)
<br/>This includes lots of information and will be helpful if you want to understand the features Ocelot currently offers.
- [Ocelot RST Docs](https://github.com/ThreeMammals/Ocelot/tree/develop/docs)
<br/>This includes source code of documentation as **.rst** files which are up to date for current development.

## Coming up

You can see what we are working on [here](https://github.com/ThreeMammals/Ocelot/issues).
You can see what we are working on in [backlog](https://github.com/ThreeMammals/Ocelot/issues).

## Contributing

We love to receive contributions from the community so please keep them coming :)

Pull requests, issues and commentary welcome!

Please complete the relevant template for issues and PRs. Sometimes it's worth getting in touch with us to discuss changes before doing any work in case this is something we are already doing or it might not make sense. We can also give advice on the easiest way to do things :)

Finally we mark all existing issues as help wanted, small, medium and large effort. If you want to contribute for the first time I suggest looking at a help wanted & small effort issue :)
We love to receive contributions from the community, so please keep them coming :octocat:
<br/>Pull requests, issues and commentary welcome!

Please complete the relevant [template](https://github.com/ThreeMammals/Ocelot/tree/main/.github) for [issues](https://github.com/ThreeMammals/Ocelot/blob/main/.github/ISSUE_TEMPLATE.md) and [PRs](https://github.com/ThreeMammals/Ocelot/blob/main/.github/PULL_REQUEST_TEMPLATE.md).
Sometimes it's worth getting in touch with us to [discuss](https://github.com/ThreeMammals/Ocelot/discussions) changes before doing any work in case this is something we are already doing or it might not make sense.
We can also give advice on the easiest way to do things :octocat:

Finally, we mark all existing issues as [![label: help wanted][~helpwanted]](https://github.com/ThreeMammals/Ocelot/labels/help%20wanted)
[![label: small effort][~smalleffort]](https://github.com/ThreeMammals/Ocelot/labels/small%20effort)
[![label: medium effort][~mediumeffort]](https://github.com/ThreeMammals/Ocelot/labels/medium%20effort)
[![label: large effort][~largeeffort]](https://github.com/ThreeMammals/Ocelot/labels/large%20effort) [^4].
<br/>If you want to contribute for the first time, we suggest looking at a [![label: help wanted][~helpwanted]](https://github.com/ThreeMammals/Ocelot/labels/help%20wanted)
[![label: small effort][~smalleffort]](https://github.com/ThreeMammals/Ocelot/labels/small%20effort)
[![label: good first issue][~goodfirstissue]](https://github.com/ThreeMammals/Ocelot/labels/good%20first%20issue) :octocat:

[~helpwanted]: https://img.shields.io/badge/-help%20wanted-128A0C.svg
[~smalleffort]: https://img.shields.io/badge/-small%20effort-fef2c0.svg
[~mediumeffort]: https://img.shields.io/badge/-medium%20effort-e0f42c.svg
[~largeeffort]: https://img.shields.io/badge/-large%20effort-10526b.svg
[~goodfirstissue]: https://img.shields.io/badge/-good%20first%20issue-ffc4d8.svg

### Notes
[^1]: Ocelot doesn’t directly support [GraphQL](https://graphql.org/). Developers can easily integrate the [GraphQL for .NET](/graphql-dotnet/graphql-dotnet) library.
[^2]: Ocelot does support [Consul](https://www.consul.io/), [Netflix Eureka](https://www.nuget.org/packages/Steeltoe.Discovery.Eureka), [Service Fabric](https://azure.microsoft.com/en-us/products/service-fabric/) service discovery providers, and special modes like [Dynamic Routing](/ThreeMammals/Ocelot/blob/main/docs/features/servicediscovery.rst#dynamic-routing) and [Custom Providers](/ThreeMammals/Ocelot/blob/main/docs/features/servicediscovery.rst#custom-providers).
[^3]: Retry policies only via [Polly](/App-vNext/Polly) library.
[^4]: See all [labels](https://github.com/ThreeMammals/Ocelot/issues/labels) of the repository.
10 changes: 6 additions & 4 deletions docs/building/building.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
Building
========

* You can also just run `dotnet tool restore && dotnet cake` locally!. Output will got to the `./artifacts` directory.
* You can also just run ``dotnet tool restore && dotnet cake`` locally! Output will got to the ``./artifacts`` directory.

* The best way to replicate the CI process is to build Ocelot locally is using the Dockerfile.build file which can be found in the docker folder in Ocelot root.
* The best way to replicate the CI process is to build Ocelot locally is using the `Dockerfile.build <https://github.com/ThreeMammals/Ocelot/blob/main/docker/Dockerfile.build>`_ file
which can be found in the `docker <https://github.com/ThreeMammals/Ocelot/tree/main/docker>`_ folder in `Ocelot <https://github.com/ThreeMammals/Ocelot/tree/main>`_ root.
Use the following command ``docker build --platform linux/amd64 -f ./docker/Dockerfile.build .`` for example. You will need to change the platform flag depending on your platform.

* There is a Makefile to make it easier to call the various targets in `build.cake`. The scripts are called with **.sh** but can be easily changed to **.ps1** if you are using Windows.
* There is a `Makefile <https://github.com/ThreeMammals/Ocelot/blob/main/docs/Makefile>`_ to make it easier to call the various targets in `build.cake <https://github.com/ThreeMammals/Ocelot/blob/main/build.cake>`_.
The scripts are called with **.sh** but can be easily changed to **.ps1** if you are using Windows.

* Alternatively you can build the project in VS2022 with the latest .NET 7.0 SDK.
* Alternatively you can build the project in VS2022 with the latest `.NET 7.0 <https://dotnet.microsoft.com/en-us/download/dotnet/7.0>`_ SDK.
4 changes: 3 additions & 1 deletion docs/building/overview.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Overview
========

This document summarises the build and release process for the project. The build scripts are written using `Cake <http://cakebuild.net/>`_, and are defined in `./build.cake`. The scripts have been designed to be run by either developers locally or by a build server (currently `CircleCi <https://circleci.com//>`_), with minimal logic defined in the build server itself.
This document summarises the build and release process for the project.
The build scripts are written using `Cake <https://cakebuild.net/>`_, and they are defined in ``./build.cake``.
The scripts have been designed to be run by either developers locally or by a build server (currently `CircleCi <https://circleci.com/>`_), with minimal logic defined in the build server itself.
66 changes: 45 additions & 21 deletions docs/building/releaseprocess.rst
Original file line number Diff line number Diff line change
@@ -1,38 +1,62 @@
Release process
Release Process
===============

* The release process works best with Git Flow branching.
* Contributors can do whatever they want on PRs and merges to main will result in packages being released to GitHub and NuGet.
* The release process works best with `Gitflow <https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow>`_ branching.
* Contributors can do whatever they want on PRs and feature branches to deliver a feature to **develop** branch.
* Maintainers can do whatever they want on PRs and merges to **main** will result in packages being released to GitHub and NuGet.

Ocelot uses the following process to accept work into the NuGet packages.

1. User creates an issue or picks up an existing issue in GitHub.
1. User creates an issue or picks up an `existing issue <https://github.com/ThreeMammals/Ocelot/issues>`_ in GitHub.
An issue can be created by converting `discussion <https://github.com/ThreeMammals/Ocelot/discussions>`_ topics if necessary and agreed upon.

2. User creates a fork and branches from this (unless a member of core team, they can just create a branch on the main repo) e.g. feat/xxx, fix/xxx etc. It doesn't really matter what the xxx is. It might make sense to use the issue number and maybe a short description. I don't care as long as it has (feat, fix, refactor)/xxx :)
2. User creates a fork and branches from this (unless a member of core team, they can just create a branch on the head repo) e.g. ``feature/xxx``, ``bug/xxx`` etc.
It doesn't really matter what the "xxx" is. It might make sense to use the issue number and maybe a short description.

3. When the user is happy with their work they can create a pull request against develop in GitHub with their changes. The user must follow the `SemVer <https://semver.org/>`_ support for this is provided by `GitVersion <https://gitversion.readthedocs.io/en/latest/>`_. So if you need to make breaking changes please make sure you use the correct commit message so GitVersion uses the correct semver tags. Do not manually tag the Ocelot repo this will break things.
3. When the contributor is happy with their work they can create a pull request against **develop** in GitHub with their changes.

4. The Ocelot team will review the PR and if all is good merge it, else they will suggest feedback that the user will need to act on. In order to speed up getting a PR the user should think about the following.
- Have I covered all my changes with tests at unit and acceptance level?
- Have I updated any documentation that my changes may have affected?
- Does my feature make sense, have I checked all of Ocelot's other features to make sure it doesn't already exist?
4. The maintainer must follow the `SemVer <https://semver.org/>`_ support for this is provided by `GitVersion <https://gitversion.net/docs/>`_.
So if the maintainer needs to make breaking changes, be sure to use the correct commit message, so **GitVersion** uses the correct **SemVer** tags.
Do not manually tag the Ocelot repo: this will break things!

In order for a PR to be merged the following must have occured.
- All new code is covered by unit tests.
- All new code has at least 1 acceptance test covering the happy path.
- Tests must have passed.
- Build must not have slowed down dramatically.
- The main Ocelot package must not have taken on any non MS dependencies.
5. The Ocelot team will review the PR and if all is good merge it, else they will suggest feedback that the user will need to act on.

5. After the PR is merged to develop the Ocelot NuGet packages will not be updated until a release is created.
In order to speed up getting a PR the contributor should think about the following:

6. When enough work has been completed to justify a new release. Develop will be merged into main the release process will begin which builds the code, versions it, pushes artifacts to GitHub and NuGet packages to NuGet.
- Have I covered all my changes with tests at unit and acceptance level?
- Have I updated any documentation that my changes may have affected?
- Does my feature make sense, have I checked all of Ocelot's other features to make sure it doesn't already exist?

7. The final step is to go back to GitHub and close any issues that are now fixed. You should see something like this in`GitHub <https://github.com/ThreeMammals/Ocelot/releases/tag/13.0.0>`_ and this in `NuGet <https://www.nuget.org/packages/Ocelot/13.0.0>`_.
In order for a PR to be merged the following must have occured:

- All new code is covered by unit tests.
- All new code has at least 1 acceptance test covering the happy path.
- Tests must have passed locally.
- Build must have green status.
- Build must not have slowed down dramatically.
- The main Ocelot package must not have taken on any non MS dependencies.

6. After the PR is merged to **develop** the Ocelot NuGet packages will not be updated until a release is created.

7. When enough work has been completed to justify a new release,
**develop** branch will be merged into **main** as **release/xxx** branch, the release process will begin which builds the code, versions it, pushes artifacts to GitHub and NuGet packages to NuGet.

8. The final step is to go back to GitHub and close any issues that are now fixed.
**Note**: All linked issues to the PR in **Development** settings (right side PR settings) will be closed automatically while merging the PR.
It is imperative that developer uses the "**Link an issue from this repository**" pop-up dialog of the **Development** settings!

Notes
-----

All NuGet package builds & releases are done with CircleCI `here <https://circleci.com/gh/ThreeMammals>_` and all releases are done from `here <https://ci.appveyor.com/project/TomPallister/ocelot-ayj4w>_`.
All NuGet package builds and releases are done with CircleCI, see `Pipelines - ThreeMammals/Ocelot <https://circleci.com/gh/ThreeMammals/Ocelot/>`_.

Only Tom Pallister (owner) and Ocelot Core Team members (maintainers) can merge releases into **main** at the moment.
This is to ensure there is a final `quality gate <#quality-gates>`_ in place. Tom is mainly looking for security issues on the final merge.

We **do** follow this development and release process!
If anything is unclear or you get stuck in the process, please contact the `Ocelot Core Team <https://github.com/orgs/ThreeMammals/teams/ocelot-core>`_ members or repository maintainers.

Quality Gates
-------------

Only TomPallister can merge releases into main at the moment. This is to ensure there is a final quality gate in place. Tom is mainly looking for security issues on the final merge.
To be developed...
Loading

0 comments on commit 640b005

Please sign in to comment.