Skip to content

Commit b5d8bff

Browse files
authored
Readme (#73)
1 parent f331d99 commit b5d8bff

File tree

4 files changed

+38
-29
lines changed

4 files changed

+38
-29
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ An Azure subscription; if you don't already have an Azure subscription, you can
1010

1111
In addition, you will need all of the following components before you go through the steps in this README:
1212

13-
| [Azure CLI](http://docs.microsoft.com/cli/azure/overview) | [Java 8](http://java.oracle.com/) | [Maven 3](http://maven.apache.org/) | [Git](https://github.com/) |
13+
| [Azure CLI](http://docs.microsoft.com/cli/azure/overview) | [Java 8](https://azul.com/downloads/azure-only/zulu) | [Maven 3](http://maven.apache.org/) | [Git](https://github.com/) |
1414

1515
**NOTE**: There are additional requirements in the *[~/deployment/README.md](deployment/README.md)* file which are required in order to setup your development environment; other required components will be installed automatically by the provisioning scripts.
1616

@@ -36,6 +36,7 @@ The following diagram illustrates the full topology for this sample application
3636
## Create and Deploy the Inventory Hub ##
3737

3838
<a name="create-the-initial-build"></a>
39+
3940
### Create the initial build ###
4041

4142
1. Open a command prompt and navigate to the *~/deployment/* folder of your local repo.
@@ -80,8 +81,7 @@ The following diagram illustrates the full topology for this sample application
8081

8182
Open the Inventory Hub Web app ...
8283

83-
![](./media/product-dashboard.jpg)
84-
![](./media/transactions-arriving.jpg)
84+
![](./media/inventory-hub-dashboard.jpg)
8585

8686
# Contributing
8787

dashboard-web-app/README.md

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
# Deploy Inventory Hub Java Web App =TO=> Azure App Service
22

3-
This Inventory Hub app is a Java application. It display product
3+
This Inventory Hub app is a Java application. It display real-time product
44
inventory using AngularJS code.
5+
56
Behind the scene, the inventory data store
6-
is [Azure CosmosDB DocumentDB](https://docs.microsoft.com/en-us/azure/cosmos-db/documentdb-introduction).
7-
This application uses [Azure CosmosDB DocumentDB Spring Boot Starter](https://github.com/Microsoft/azure-spring-boot/tree/master/azure-starters/azure-documentdb-spring-boot-starter)
8-
and AngularJS to interact with Azure. This sample application
9-
provides several deployment options to deploy to Azure, pls
10-
see deployment section below. With Azure support in Spring
11-
Starters, maven plugins and Eclipse / IntelliJ plugins,
12-
Java application development and deployment on Azure
13-
are effortless now.
7+
is [Azure CosmosDB](https://docs.microsoft.com/en-us/azure/cosmos-db/documentdb-introduction).
8+
9+
This application uses [Azure CosmosDB Spring Boot Starter](https://github.com/Microsoft/azure-spring-boot/tree/master/azure-starters/azure-documentdb-spring-boot-starter)
10+
and AngularJS to interact with Azure.
1411

1512

1613
## TOC
@@ -27,7 +24,7 @@ are effortless now.
2724

2825
## Requirements
2926

30-
* [JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) 1.8 and above
27+
* [JDK](https://azul.com/downloads/azure-only/zulu) 1.8 and above
3128
* [Maven](https://maven.apache.org/) 3.0 and above
3229

3330
## Create Azure Cosmos DB and Event Hub
@@ -36,11 +33,12 @@ You can follow steps described in the [deployment folder][../deployment/README.m
3633

3734
## Configuration
3835

39-
Note down your DocumentDB uri and key from last step,
40-
specify a database name but no need to create it. Pick an
36+
Note down your Cosmos DB uri and key from the last step.
37+
Be prepared to specify a database name but there is no need to create it.
38+
Pick an
4139
Azure Resource Group name and Web app name for App Service -
4240
you can use an existing resource group and Web
43-
app or let the Maven plugin create these for you.
41+
app or let the Maven plugin create one for you.
4442
Set these values in system environment variables:
4543

4644
``` txt
@@ -49,15 +47,20 @@ COSMOSDB_KEY=put-your-COSMOSDB-key-here
4947
COSMOSDB_DBNAME=put-your-COSMOSDB-databasename-here
5048
5149
NOTIFICATIONS_EVENT_HUB_NAME=put-your-eventhub-for-notifications
50+
NOTIFICATIONS_EVENT_HUB_FQDN=put-your-eventhub-fqdn
5251
NOTIFICATIONS_EVENT_HUB_CONSUMER_GROUP_NAME=$(uuidgen)
5352
NOTIFICATIONS_EVENT_HUB_CONNECTION_STRING=put-your-event-hub-connection-string
53+
NOTIFICATION_ERRORS_EVENT_HUB_NAME=put-your-event-hub-name-for-errors
54+
5455
NOTIFICATIONS_STORAGE_CONTAINER_NAME=put-your-storage-container-name
5556
NOTIFICATIONS_STORAGE_CONNECTION_STRING=put-your-storage-connection-string
5657
5758
WEBAPP_RESOURCEGROUP_NAME=put-your-resourcegroup-name-here
5859
WEBAPP_NAME=put-your-webapp-name-here
5960
WEBAPP_REGION=put-your-region-here
6061
62+
APPINSIGHTS_INSTRUMENTATIONKEY=put-your-app-insights-instrumentation-key
63+
6164
DOLLAR=\$
6265
```
6366

@@ -69,18 +72,19 @@ DOLLAR=\$
6972
- [Create a sign-up and sign-in user flow](https://docs.microsoft.com/en-us/azure/active-directory-b2c/tutorial-create-user-flows).
7073
- You can also use external identity providers, such as [Google](https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-setup-goog-app), [LinkedIn](https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-setup-li-app), [Microsoft Account](https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-setup-msa-app), and [Facebook](https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-setup-fb-app).
7174

72-
### Configure AAD B2C related properties in `application-aad.properties`
73-
```properties
74-
azure.activedirectory.b2c.enabled=true
75-
azure.activedirectory.b2c.tenant=put-your-b2c-tenant-name-here
76-
azure.activedirectory.b2c.oidc-enabled=true
77-
azure.activedirectory.b2c.client-id=put-your-registered-application-client-id-here
78-
azure.activedirectory.b2c.client-secret=put-your-registered-application-client-secret-here
79-
azure.activedirectory.b2c.reply-url=<your-app-url-copied-from-App-Service-Portal>/home
80-
azure.activedirectory.b2c.logout-success-url=<your-app-url-copied-from-App-Service-Portal>/login
81-
azure.activedirectory.b2c.user-flows.sign-up-or-sign-in=put-your-b2c-sign-up-sign-in-user-flow-name-here
82-
server.use-forward-headers=true
83-
```
75+
### Configuration
76+
77+
Note down your AAD B2C configuration settings and set the following values in
78+
your environment:
79+
80+
```text
81+
TENANT_NAME=put-your-aad-b2c-tenant-name-here
82+
B2C_CLIENT_ID=put-your-registered-aad-application-b2c-client-id-here
83+
B2C_CLIENT_SECRET=put-your-registered-aad-application-b2c-client-secret
84+
B2C_REPLY_URL=<put-your-application-url>/home
85+
B2C_LOGOUT_SUCCESS_URL=<put-your-application-url>/login
86+
USER_FLOW_SIGNUP_SIGNIN=<put-your-aad-b2c-sign-up-sign-in-user-flow-name-here>
87+
```
8488

8589
## Build Inventory Hub Web App - JAR
8690

@@ -141,7 +145,12 @@ mvn azure-webapp:deploy
141145

142146
Open it in a browser
143147

144-
![](./media/inventory-hub-app.jpg)
148+
![](../media/inventory-hub-dashboard.jpg)
149+
150+
If you turned on the `aad` profile using `-Dspring.profiles.active-aad`, it
151+
will look like this:
152+
153+
![](../media/inventory-hub-dashboard-aad.jpg)
145154

146155
## Clean up
147156

624 KB
Loading

media/inventory-hub-dashboard.jpg

620 KB
Loading

0 commit comments

Comments
 (0)