Skip to content

Commit

Permalink
doc in progress and added artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
FBoucher committed Aug 5, 2020
1 parent 5fbfa7e commit 760c2c0
Show file tree
Hide file tree
Showing 166 changed files with 1,506 additions and 89 deletions.
60 changes: 3 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,11 @@

![TinyBlazorAdmin][TinyBlazorAdmin]

The project is just getting started but should have a v1 ready in Summer 2020. It will use Azure Active Directory (AAD) as authentication for the user and to connect to the API (Azure Function).
The project is now at version 1 and ready to be use! ~~just getting started but should have a v1 ready in Summer 2020~~. It will use Azure Active Directory (AAD) as authentication for the user and to connect to the API (Azure Function).

## Deployment
# Deployment

Until an automatic deployment is created here is the steps to deploy the TinyBlazorAdmin app into Azure. You can run it somewhere else and even locally.

### Create the backend.

This project is a frontend only so you will need to deploy the [Azure Url Shortener](https://github.com/FBoucher/AzUrlShortener) in "headless mode". Do to it click the blue button below and make sure to select **none** as Frontend

[![Deploy Backend to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/?WT.mc_id=urlshortener-github-frbouche#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FFBoucher%2FAzUrlShortener%2Fmaster%2Fdeployment%2FazureDeploy.json)

![CreateBackend][CreateBackend]

## Create a Service Principal in Azure

From the Azure Portal (portal.azure.com), open the **Azure Active Directory** page. From the left option menu select **App registrations**, then create a new registration. Note the ClientID and TenantID

![Create a new registration][newRegistration]

And update those values inside `TinyBlazorAdmin\wwwroot\appsettings.json`

```json
{
"AzureAd": {
"Authority": "https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx",
"ClientId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx",
"ValidateAuthority": true
}
}
```

## Create an Azure KeyVault

From the Azure Portal (portal.azure.com), click the **Create a new resource** button in the top left corner. Type **Key Vault**, and create a new one.

Once it created, open it to add a policy and let the App Registration have access to the secrets. Click the Add Policies button,

![AddPolicy.png][AddPolicy.png]

Give Secret Permissions Read and Get to the App Registration created previously.

![EditKeyVault][EditKeyVault]

Don't forget to save.

## Create a Secret

We need to create two secrets to save the Azure Function URL and the security code/ token.

![CreateSecrets][CreateSecrets]

[more to come... ]
Until an automatic deployment is created, you will need to deploy some part manually. [All the steps to deploy the TinyBlazorAdmin app into Azure are listed here](deployment.md). You can also run it somewhere else if you prefer, even locally.



Expand All @@ -70,12 +22,6 @@ If you find a bug or would like to add a feature, check out those resources:
To see the current work in progress: [GLO boards](https://app.gitkraken.com/glo/board/XtpDU2ZLuQARV8y7) 'kanban board'



[CreateBackend]: medias/CreateBackend.png
[newRegistration]: medias/newRegistration.png
[AddPolicy]: medias/AddPolicy.png
[EditKeyVault]: medias/EditKeyVault.png
[CreateSecrets]: medias/CreateSecrets.png
[TinyBlazorAdmin]: medias/TinyBlazorAdmin.png


Expand Down
50 changes: 50 additions & 0 deletions deployment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Deployment

Until an automatic deployment is created here is the steps to deploy the TinyBlazorAdmin app into Azure. You can run it somewhere else and even locally.

## Create the Backend

This project is a frontend only so you will need to deploy the [Azure Url Shortener](https://github.com/FBoucher/AzUrlShortener) in "headless mode". Do to it click the blue button below and make sure to select **none** as Frontend

[![Deploy Backend to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/?WT.mc_id=urlshortener-github-frbouche#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FFBoucher%2FAzUrlShortener%2Fmaster%2Fdeployment%2FazureDeploy.json)

![CreateBackend][CreateBackend]

## Create Azure Active DIrectory (AAD) Components

From the Azure Portal (portal.azure.com), open the **Azure Active Directory** page. From the left option menu select **App registrations**, then create a new registration. **Note the ClientID and TenantID.**

![Create a new registration][newRegistration]



## Configure (AAD) Components



## Deploy TinyBlazorAdmin

- Copy artifact from /deployment folder.

## Configure Backend and Frontend to Work Together


And update those values inside `TinyBlazorAdmin\wwwroot\appsettings.json`

```json
{
"AzureAd": {
"Authority": "https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx",
"ClientId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx",
"ValidateAuthority": true
}
}
```



[CreateBackend]: ../medias/CreateBackend.png
[newRegistration]: ../medias/newRegistration.png
[AddPolicy]: ../medias/AddPolicy.png
[EditKeyVault]: ../medias/EditKeyVault.png
[CreateSecrets]: ../medias/CreateSecrets.png
40 changes: 40 additions & 0 deletions deployment/web.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<remove fileExtension=".dat" />
<remove fileExtension=".dll" />
<remove fileExtension=".json" />
<remove fileExtension=".wasm" />
<remove fileExtension=".woff" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".dll" mimeType="application/octet-stream" />
<mimeMap fileExtension=".dat" mimeType="application/octet-stream" />
<mimeMap fileExtension=".json" mimeType="application/json" />
<mimeMap fileExtension=".wasm" mimeType="application/wasm" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff" />
</staticContent>
<httpCompression>
<dynamicTypes>
<add mimeType="application/octet-stream" enabled="true" />
<add mimeType="application/wasm" enabled="true" />
</dynamicTypes>
</httpCompression>
<rewrite>
<rules>
<rule name="Serve subdir">
<match url=".*" />
<action type="Rewrite" url="wwwroot\{R:0}" />
</rule>
<rule name="SPA fallback routing" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="wwwroot\" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added deployment/wwwroot/_framework/_bin/System.Xml.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added deployment/wwwroot/_framework/_bin/System.dll
Binary file not shown.
Binary file added deployment/wwwroot/_framework/_bin/System.dll.br
Binary file not shown.
Binary file added deployment/wwwroot/_framework/_bin/System.dll.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added deployment/wwwroot/_framework/_bin/mscorlib.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
63 changes: 63 additions & 0 deletions deployment/wwwroot/_framework/blazor.boot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"cacheBootResources": true,
"config": [
"appsettings.json"
],
"debugBuild": false,
"entryAssembly": "TinyBlazorAdmin",
"linkerEnabled": true,
"resources": {
"assembly": {
"Microsoft.AspNetCore.Authorization.dll": "sha256-\/pyoIlokAv7RG7E1mHvxAchWZwiKAEHPtMsFXR8Ea+M=",
"Microsoft.AspNetCore.Blazor.HttpClient.dll": "sha256-TzlM7hit2MuOxv4\/zIhKH3dTRhHtWccHbD9Bu3I8XdY=",
"Microsoft.AspNetCore.Components.Authorization.dll": "sha256-tedBo3bnG+xNDyyTlybiIotKH7BZNbawilrE5GMZG0w=",
"Microsoft.AspNetCore.Components.dll": "sha256-Avow0LhJy\/31Fv7ypAgznAc9MjxSRy8vY9K0ynvZop4=",
"Microsoft.AspNetCore.Components.Forms.dll": "sha256-d1h+oR4UNtjEr0Pt24kNg2J67\/Ys60It7Ub1+VD9pP8=",
"Microsoft.AspNetCore.Components.Web.dll": "sha256-xwKPz5Vm0qyqkHC8DlbgrpVO\/OGXPdJz9Zqxrv2IHgI=",
"Microsoft.AspNetCore.Components.WebAssembly.Authentication.dll": "sha256-38vUyQ+5Fsh\/g8Qt2+pJKZstNe9EWvpnGyYq93eq7Yk=",
"Microsoft.AspNetCore.Components.WebAssembly.dll": "sha256-rK94hP8DMH2TVBA5sTx57+6CsEfFZUoU+D5h6Dpv\/2o=",
"Microsoft.AspNetCore.Metadata.dll": "sha256-\/awLc1TPFrDL7E1HR1ByZsxfB7WAfaWHHTTOnkxfPkg=",
"Microsoft.Authentication.WebAssembly.Msal.dll": "sha256-+8ig5iVkbhbc4YcU0aLJM8NssPj5C7DpXMt8IzY9a5s=",
"Microsoft.Bcl.AsyncInterfaces.dll": "sha256-jzHgXWAvWMkKIGFjZoT84tbe72E+H7CvTr\/Dryh4QPs=",
"Microsoft.Extensions.Configuration.Abstractions.dll": "sha256-8zHYOHgpmjmKgW7FyIT3Xqbe5vztujil8wF\/eczIFqI=",
"Microsoft.Extensions.Configuration.Binder.dll": "sha256-GDHVaOsQLLaol6ZHS+hsTLSMs5zN5i8F61N0VmchoP0=",
"Microsoft.Extensions.Configuration.dll": "sha256-8I6\/VmGpwbccNpRwcSO9caQre9l9PRg\/5YiDB5zSy58=",
"Microsoft.Extensions.Configuration.Json.dll": "sha256-e1DPJZYizinu9io9GRoETrlRLHaJ1ojkxr4LLlox0lE=",
"Microsoft.Extensions.DependencyInjection.Abstractions.dll": "sha256-IXt025wRUhZ62UO2GJ1P\/+gUnWskMEe7A65gtb\/R88w=",
"Microsoft.Extensions.DependencyInjection.dll": "sha256-FkvEKh9Ot5qC3CoaJ7SMvg2tDwGiHS\/EvClL+sc3dXc=",
"Microsoft.Extensions.Http.dll": "sha256-xERyXPKLUBy8eG9SnAwAJWXYHt8QxsQh70tn+pqu4uo=",
"Microsoft.Extensions.Logging.Abstractions.dll": "sha256-vOLEhKJmsmogvpEVVO+YRUSc5rNhMH02QiXt871ZgQ0=",
"Microsoft.Extensions.Logging.dll": "sha256-S3nbRS2cYOYcLWNuNQQZe+JCIWaJHZr9hAU1ZiJQZFQ=",
"Microsoft.Extensions.Options.dll": "sha256-6D4chIR4zP2aTCoYT7\/\/h1wKQliUshE3M\/fwKnK1mHk=",
"Microsoft.Extensions.Primitives.dll": "sha256-b7UQlcrzrXEE6KH1tD3D+1HHuJO33UBO7zuLhveHWo4=",
"Microsoft.JSInterop.dll": "sha256-GFqkJmxwbf7WMrZ+MCRzaOADzSsVQ9tcMrMt19fsEeo=",
"Microsoft.JSInterop.WebAssembly.dll": "sha256-KyInWY\/LhOyM7vCsyaaRG4GwVUcRiObi8WrIrk1X3EQ=",
"Mono.Security.dll": "sha256-x3+6XJyIbNFBD93Ixv44LtLChcYlEMgmLn+swfaoSZU=",
"mscorlib.dll": "sha256-xm\/Gh2MVmqxQXxjwyIqp9ouMc\/GvKFZhTtKy1dhTvts=",
"Newtonsoft.Json.dll": "sha256-8+aWlQshkso8ei8xp5J0gn4ZNGRYRMqXzI+osKzgVYI=",
"System.ComponentModel.DataAnnotations.dll": "sha256-Db8XY2RftG9cjKaWPROmCDqzHWudArqQGKWlyVXRiSE=",
"System.Core.dll": "sha256-yaQnS6V3VCTnylJMV2aKRTtOIsbzhD1gDJZaAAXgbhs=",
"System.Data.dll": "sha256-yNL+Rbi9dpt7v5xosK8eg7Z4Wo+EChrq4H0S58e9mxo=",
"System.dll": "sha256-0vdnMDHtnYV\/\/FTkE4hWqvtA7q2mGc8eNNxsi4clMEo=",
"System.Net.Http.dll": "sha256-l3Jm85LI6GOpMGewJHNahW3yC+1UdC2J1sKTneb4UCc=",
"System.Net.Http.Json.dll": "sha256-tXLZo6VMWrU5JBvEJ6E4muk7xuVi9zBYXvP9Koa+JfE=",
"System.Net.Http.WebAssemblyHttpHandler.dll": "sha256-HOUcs8Cig37E+XhJKWWPkvHvO4+VRNaIwRsPtjhDC2E=",
"System.Numerics.dll": "sha256-1kez7Ov20ys9xzgQ81pwFEV1uRWIl4keOdGbXz6xLLw=",
"System.Runtime.CompilerServices.Unsafe.dll": "sha256-1JSJfAaLdPfJsB6g39AI9VnbopqPQSkX9oqkDmXLXPI=",
"System.Runtime.Serialization.dll": "sha256-2spmeyAyNTHseSwWlDo5rFqccbYQQwFM4UE3+wnMvjE=",
"System.Text.Encodings.Web.dll": "sha256-56SbPKmoJZWNufYM6biaRZ+BUgQysZ7Y295skEJ+LXc=",
"System.Text.Json.dll": "sha256-qxFl0bY15GrLgCBRfJrPK5qVWboNGOzi863ijlLJ7Zw=",
"System.Xml.dll": "sha256-NDHSI65HxydLro8XcEQi+mH3v3Uaxd8VNLx91zJsV8U=",
"System.Xml.Linq.dll": "sha256-lqhSfDTDpRhzj\/X3ZjIJU7XkVRmCFUARXBLtO91jgJ4=",
"TinyBlazorAdmin.dll": "sha256-9TENgHh2mu9U30h6mItF2yzgn+zoxITCVgpu4ZE\/bo8=",
"WebAssembly.Bindings.dll": "sha256-i6rX3GOQ+d\/xT28YxgrpnKnB8S7ZRXPH9++RIv\/nPHQ="
},
"pdb": null,
"runtime": {
"dotnet.3.2.0-preview5.20216.1.js": "sha256-gww0bLqGo0LNAahNiZcdEk\/kmDKmSFAFGtY8LL0fBcY=",
"dotnet.timezones.dat": "sha256-3S0qzYaBEKOBXarzVLNzNAFXlwJr6nI3lFlYUpQTPH8=",
"dotnet.wasm": "sha256-OSdheaBxNsYucYoLcmeBrZy9KLhKDvhCPNyd7ZvEIUc="
},
"satelliteResources": null
}
}
Binary file added deployment/wwwroot/_framework/blazor.boot.json.br
Binary file not shown.
Binary file added deployment/wwwroot/_framework/blazor.boot.json.gz
Binary file not shown.
1 change: 1 addition & 0 deletions deployment/wwwroot/_framework/blazor.webassembly.js

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
287 changes: 287 additions & 0 deletions deployment/wwwroot/_framework/wasm/dotnet.3.2.0-preview5.20216.1.js

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added deployment/wwwroot/_framework/wasm/dotnet.wasm
Binary file not shown.
Binary file not shown.
Binary file not shown.
11 changes: 11 additions & 0 deletions deployment/wwwroot/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"AzureAd": {
"Authority": "https://login.microsoftonline.com/206bad4c-d071-4c91-9181-ef7047e6590b",
"ClientId": "fcf72e46-0a43-48f6-86d5-e0969c146550",
"ValidateAuthority": true
},
"UrlShortenerSecuredService": {
"Endpoint": "https://tinyadminhmxyp.azurewebsites.net/"
}
}

Loading

0 comments on commit 760c2c0

Please sign in to comment.