Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a sample that runs and tests locally in reliable configuration #5909

Merged
merged 1 commit into from
Sep 10, 2019
Merged

Adds a sample that runs and tests locally in reliable configuration #5909

merged 1 commit into from
Sep 10, 2019

Conversation

veikkoeeva
Copy link
Contributor

This adds a sample that:

  • Can test multiple siloes in reliable configuration locally.
  • Can start an API and a cluster locally in reliable configuration and test them.
  • Shows how local storage, SQL Server in this case, can be used and even bulk-loaded
    with data in tests and how snapshots can be used.
  • Shows how to do cross-cutting tests:
    • Capture log content from the system and test them.
    • Checks server sent headers.
  • Shows some real deployment issues such as security.
  • Allows to extend with same technique to Storage Emulator in tests and locally.
  • Allows to extend identity testing, e.g. IdentityServer with the same technique.

Closes #411

@veikkoeeva
Copy link
Contributor Author

This isn't likely good to go yet, but wanted to finally open this in case it would be useful to others.

There is more into the sample here than that description, but I'm a bit pressed on time so I write later a better one. My thinking is to later just add features on top of this, such as IdentityServer, Trill and others and test them likewise in a cross-cutting manner. Even add chaos engineering aspects. One is also a PWA front-end that would use https://github.com/kblok/puppeteer-sharp or something similar then to run the tests through the whole system.

The gist is to run Orleans locally in relieable mode, both in tests and also when debugging. I have privately a demo where I have IdentityServer also plugged in so that the system can test potentially even complex policy handling while testing. Though it needs to be cleaned up and I took a slight shortcut so that in tests it also open resource owner flow (password and username) while I would like to in tests too use just PKCE (with the web), we'll see how this goes.

@sergeybykov
Copy link
Contributor

This is epic!

I just wonder if there's a more descriptive name for it than "BigSample." 🙂

@veikkoeeva
Copy link
Contributor Author

@sergeybykov Perhaps OneBoxDeploymentSample? :)

This is probably difficult to review in GH and I don't know how keen anyone is to download the branch to try it, but I think I will write a better documentation of how it works, the intended development flow and what things I intend to incorporate over the time and iron out some code kinks and pitfals (e.g. don't blurp out stack traces while in production and an internal error occurs). This code has been sitting on my computer almost a year. While the age shows in some parts (e.g. no IoC, yet), I thought I could try to push it over the edge already.

@veikkoeeva
Copy link
Contributor Author

veikkoeeva commented Sep 2, 2019

I also think I should add a few general resources such as

Maybe articles such as Simple testing can prevent most critical failures.

Goes to show a bit clearer how one might want to think complex systems and testing them. The tooling seem to be there too and isn't anymore invasive than the logging example, but probably have to add in subsequent PRs.

@sergeybykov
Copy link
Contributor

@sergeybykov Perhaps OneBoxDeploymentSample? :)

I like "OneBoxDeployment". I think "Sample" is superfluous though. 🙂

@veikkoeeva
Copy link
Contributor Author

@sergeybykov, @ReubenBond can you see something here? Could be good to go as far as I'm concerned, me or someone can then refine things in separate PRs (e.g. update packages) later if there isn't anything fatal. I also wrote Readme.md that could be useful, see at https://github.com/dotnet/orleans/pull/5909/files#diff-bfa748e7941a1faa44354b3856662e5e. A bit of tangential OK? OK to list ideas for further additions?

…tion

This adds a sample that:
- Can test multiple siloes in reliable configuration locally.
- Can start an API and a cluster locally in reliable configuration and test them.
- Shows how local storage, SQL Server in this case, can be used and even bulk-loaded
  with data in tests and how snapshots can be used.
- Shows how to do cross-cutting tests:
  - Capture log content from the system and test them.
  - Checks server sent headers.
- Shows some real deployment issues such as security.
- Allows to extend with same technique to Storage Emulator in tests and locally.
- Allows to extend identity testing, e.g. IdentityServer with the same technique.

Closes #411
@sergeybykov sergeybykov merged commit 4e4c03f into dotnet:master Sep 10, 2019
@sergeybykov
Copy link
Contributor

Many thanks, @veikkoeeva! This is the most comprehensive sample we have by far!

@veikkoeeva veikkoeeva deleted the bigsample branch September 10, 2019 09:54
@github-actions github-actions bot locked and limited conversation to collaborators Dec 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

One-Box Deployment Scenarios
2 participants