Skip to content

Latest commit

 

History

History
60 lines (47 loc) · 4.06 KB

DevGuide.md

File metadata and controls

60 lines (47 loc) · 4.06 KB

Gettings started developing

Getting started

  1. Install Visual Studio 2019 with the .NET Core and Azure Devlopment workloads.

  2. Install Azure Service Fabric SDK: https://www.microsoft.com/web/handlers/webpi.ashx?command=getinstallerredirect&appid=MicrosoftAzure-ServiceFabric-CoreSDK

  3. Install SQL Server Express: https://www.microsoft.com/en-us/sql-server/sql-server-editions-express

  4. Install Node.js LTS. When asked, at the end of installation, also option-in for all necessary tools.

  5. Acquire the required secrets from azure key vault. This can be done by running /src/Maestro/bootstrap.ps1 from an admin powershell window (note: the Powershell ISE may have problems running this script). This script will do 3 things:

    • Download a secret required for using the Microsoft.Azure.Services.AppAuthentication package from the service fabric local dev cluster
    • Download and install the SSL cert used for local development from key vault
    • Configure the SQL Server LocalDB instance for use from the local service fabric cluster
  6. Make sure you have installed Entity Framework Core CLI by running dotnet tool install --global dotnet-ef

  7. From the Maestro.Data project directory, run dotnet ef --msbuildprojectextensionspath <full path to obj dir for Maestro repo (e.g. "C:\arcade-services\artifacts\obj\Maestro.Data\")> database update.

    • Note that the generated files are in the root artifacts folder, not the artifacts folder within the Maestro.Data project folder
  8. Join the @maestro-auth-test org in GitHub (you will need to ask someone to manually add you to the org).

  9. In SQL Server Object Explorer in Visual Studio, find the local SQLExpression database for the build asset registry and populate the Repositories table with the following rows:

  10. Run .\Build.cmd -pack at the root of the repo

  11. Install ngrok from https://ngrok.com/ or choco install ngrok

  12. (optional - when darc is used) Run ngrok http 8080 and then use the reported ngrok url for the --bar-uri darc argument

After successfully running bootstrap.ps1 running the MaestroApplication project via F5 in VS (launch as elevated) will run the application on http://localhost:8080.

Azure AppConfiguration

Maestro.Web uses Azure AppConfiguration (AAC) to dynamically enable/disable automatic build to channel assignment. AAC works basically as a KeyVault, however it doesn't need to necessarily store secrets. We use Azure Managed Service Identity (AMSI) to authenticate to AAC.

Useful resources about AAC:

Running scenario tests against a local cluster

If you want to run the C# scenario tests (make sure that you followed the getting started steps beforehands), you will need to setup some variable environments:

  1. GITHUB_TOKEN : Get a github PAT
  2. MAESTRO_TOKEN : Get a maestro bearer token (you can create one after running maestro app)
  3. DARC_PACKAGE_SOURCE : Get the path to the darc nugget package (which would be in arcade-services\artifacts\packages\Debug\NonShipping\)
  4. MAESTRO_BASEURI : Run ngrok and get the https url

Troubleshooting

Things to try:

  • If Visual Studio hangs, edit properties of MastroApplication and change Aplication Debug Mode to Remove Application
  • If Visual Studio still hungs, under Debug->Options, uncheck "Enable Diagnostic Tools while debugging"
  • Clean your repo before building/running.
  • Ensure the ASP.NET Workload is installed for Visual Studio.
  • Search the web for the error you are seeing.