-
Notifications
You must be signed in to change notification settings - Fork 81
WebJob Sample
cdmdotnet edited this page Jul 24, 2017
·
9 revisions
Congratulations! You've created a project. You can launch and publish your app once you've configured it using the instructions below.
- Create a new Azure SQL Database:
- Run SQL scripts:
- \MicroServices\tools\ConversationSummary.sql
- \MicroServices\tools\Credentials.sql
- \MicroServices\tools\Messages.sql
- \MicroServices\tools\Users.sql
- Run CQRS SQL scripts:
- \MicroServices\tools\Create-Log-Table.sql
- \MicroServices\tools\EventStoreTable-SqlServer.sql
- Run SQL scripts:
- Create an new instance of Azure Service Bus
- Create a Azure Storage Account
- Create Website/App Service
- Set WebSockets to On
- Set Always On to On
- Set ARR Affinity to Off
- Add Azure Service Bus connection strings in App settings:
- Cqrs.Azure.CommandBus.ConnectionString
- Cqrs.Azure.EventBus.ConnectionString
- Add Azure Storage Account connection strings for the Azure WebJob:
- AzureWebJobsDashboard
- AzureWebJobsStorage
- Add database connection strings:
- DataStore
- EventStore
- Logs
- Add virtual folders: If you get the following error while publishing to Azure "Web deployment task failed. (Creating a new application is not supported by this server environment.)" Confirm the below virtual applications are correctly setup first.
/Chat Directory: "site\wwwroot" Application turned Off /Chat/UI Directory: "site\UI" Application turned On /Chat/RestAPI Directory: "site\RestAPI" Application turned On /Chat/WcfAPI Directory: "site\WcfAPI" Application turned On
- Update the follow files with the above app settings and connection strings so you can run you application locally:
- RestAPI\web.config
- WcfAPI\web.config
- WcfAPI.Tests\app.config
- MicroKernel\app.config
- Make sure you start the micro-kernel (it's a console application) first.
- The app setting CreateTestData control if the database gets cleared/flushed of all data and populated with fresh data each time it starts. Change this to false if you want to.
- Open the WebDeploy.pubxml WebDeploy publishing profiles in each project and replace any reference to cqrs-chat with the name of your Azure App Service created in step 4 of Configure you app.
- Publish the following project to Azure using the provided WebDeploy publishing profiles:
- Chat.RestAPI
- Chat.WcfAPI
- MyWebApp.UI
- Chat.MicroKernel