Giter Site home page Giter Site logo

microsoft / wingtipticketssaas-dbpertenant Goto Github PK

View Code? Open in Web Editor NEW
180.0 26.0 88.0 15.93 MB

A sample multitenant SaaS application using a database per tenant model, built on Azure SQL Database. Includes management scripts for a range of scenarios.

License: MIT License

PowerShell 64.21% C# 14.89% HTML 7.83% CSS 5.10% JavaScript 0.04% TSQL 7.93%

wingtipticketssaas-dbpertenant's Introduction

Wingtip Tickets SaaS - Database per Tenant

Sample multi-tenant SaaS application and management scripts built on SQL Database using a database-per-tenant model.

Versions of Wingtip Tickets SaaS apps

Looking for one of the other SaaS app patterns? Learn more about the Standalone application and Sharded multi-tenant versions.

Wingtip Tickets SaaS app

The Wingtip Tickets app is a simple event listing and ticketing SaaS app, where each venue is a tenant with events, ticket prices, customers, and ticket sales. The app, together with the management scripts and tutorials, showcases an end-to-end SaaS scenario. This includes provisioning tenants, monitoring and managing performance, schema management and cross-tenant reporting and analytics, all at scale. This application is functionally identical across all three versions repositories.

Database per tenant SaaS pattern

This project showcases the database per tenant model. This model is effective for service providers that are concerned with tenant isolation and want to run a centralized service that allows cost-efficient use of shared resources. A database is created for each venue, or tenant, and all the databases are centrally managed. They can be hosted in elastic pools to provide cost-efficient and easy performance management, which leverages the unpredictable usage patterns of the tenants. A catalog database holds the mapping between tenants and their databases. This mapping is managed using the shard map management features of the Elastic Database Client Library, which also provides efficient connection management to the application.

Get started - Deploy sample app

NOTE: If you install the application, you will be charged for the Azure resources created. Actual costs incurred are based on your subscription offer type but are nominal if the application is not scaled up unreasonably and is deleted promptly after you have finished exploring the tutorials.

The basic application, which includes three sample databases for three venues, installs in your Azure subscription under a single ARM resource group. To uninstall the application, delete the resource group from the Azure Portal.

To deploy the app to Azure, click the link below. Deploy the app in a new resource group, and provide a short user value that is appended to resource names to make them globally unique. Your initials and a number is a good pattern to use.

After deployment completes, launch the app by browsing to http://events.wingtip-dpt.USER.trafficmanager.net in a web browser, substituting USER with the value you set during deployment.

Get started - Run management scripts and tutorials

IMPORTANT: If you download and extract the repo or Learning Modules from a zip file, make sure you unblock the .zip file before extracting. Executable contents (scripts, dlls) may be blocked by Windows when zip files are downloaded from an external source and extracted.

To avoid scripts from being blocked by Windows:

  1. Right click the zip file and select Properties.
  2. On the General tab, select Unblock and select OK.

You will find management scripts in the repo that allow you to explore many SaaS management scenarios, including provisioning tenants and monitoring performance, managing database schema, analytics, and more. You can find the tutorials associated with these scripts in Azure SQL database documentation.

Also available in the Documentation folder in this repo is an overview presentation that provides background, explores alternative database models, and walks through several of the SaaS patterns at a high level. There is also a demo script you can use with the presentation to give others a guided tour of the app and several of the patterns.

License

Microsoft Wingtip SaaS sample application and tutorials are licensed under the MIT license. See the LICENSE file for more details.

Contributing

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

wingtipticketssaas-dbpertenant's People

Contributors

ajlam avatar anumjs avatar ayoolubeko avatar billgib avatar ddove avatar dhruvanmurthy avatar karwoskij avatar meyergm avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar mikewo avatar msftgits avatar ninarn avatar rakshith076 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wingtipticketssaas-dbpertenant's Issues

App's URL returns 404

Accessing the app's URL about 25 minutes after deployment completion returns the result below.

I've tried twice - the second time using a 'random' username in case duplication was the issue.

image

Demo-ProvisionAndCatalog.ps1 Fails

This Powershell file fails looking for a Resolve-DnsName cmdlet in Get-ServerNameFromAlias on line 41:
$serverName = Get-ServerNameFromAlias $newTenantAlias

That cmdlet is also used in several other Powershell files and will probably fail there.
Here's the exact error message:

Get-ServerNameFromAlias : The term 'Resolve-DnsName' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At C:\Users\pkandra.ATLANTA\Downloads\WingtipTicketsSaaS-DbPerTenant-master\WingtipTicketsSaaS-DbPerTenant-master\Learning Modules\Provision and Catalog\Demo-ProvisionAndCatalog.ps1:41
char:19

  • $serverName = Get-ServerNameFromAlias $newTenantAlias
    
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (Resolve-DnsName:String) [Get-ServerNameFromAlias], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException,Get-ServerNameFromAlias

Find-AzureRmResource not recognized

cd WingtipTicketsSaaS-DbPerTenant\Learning Modules\Provision and Catalog> .\Demo-ProvisionAndCatalog.ps1

After selecting the subscription I'm getting this:

WingtipTicketsSaaS-DbPerTenant\Learning Modules\Provision and Catalog\Demo-ProvisionAndCatalog.ps1 : The term 'Find-AzureRmResource' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the 
name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ .\Demo-ProvisionAndCatalog.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Demo-ProvisionAndCatalog.ps1

Looks like the script could do with an update, https://docs.microsoft.com/en-us/troubleshoot/azure/general/find-azurermresource-fails

[Questions] Support REporting Services / Analisis Services

Today I work on a product where we are using:
sql server
reporting services
analisis services
All these product are installed per user in most of the cases and we are looking work with multitenant arch.

I am looking forward your github repo& docs I would like to know if you have more materials related with:
Reporting services working with multitenant
Analysis services working with multitenant
Thanks in advance.

Does not build

Does not build. After i download and restore I get below error every time i try to build :(

Error CS0017 Program has more than one entry point defined. Compile with /main to specify the type that contains the entry point. Events-TenantUserApp D:\VSRubbishProjects\WingtipTicketsSaaS-DbPerTenant-master\App\src\Events-TenantUserApp\Program.cs

I am using the most up to date vs 2017 as of this post

Updating to NET5

Hi there!
Thank you for all useful information in your repo and ms docs page!
Today I tried to get the latest of your repo and I can see that the solution is not compatible with Vs2019.- Any idea if you are going to migrate the code to latest version ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.