Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbour committed Nov 8, 2018
1 parent c5574db commit f2d3bc1
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 3 deletions.
1 change: 1 addition & 0 deletions _entries/01 introduction.md
Expand Up @@ -2,6 +2,7 @@
sectionid: intro
sectionclass: h1
title: The Azure Kubernetes Challenge
type: nocount
is-parent: yes
---

Expand Down
65 changes: 65 additions & 0 deletions _entries/02-01 application.md
@@ -0,0 +1,65 @@
---

sectionclass: h2
title: Application Overview
parent-id: intro
---

You will be deploying a customer-facing order placement and fulfilment application that is containerised and is architected for a microservice implementation.

![Application diagram](media/302a7509f056cd57093c7a3de32dbb04.png)

The application consists of 5 components, namely:

* A public facing Order Capture swagger enabled API
* A messaging queue to provide reliable message delivery
* An event listener that picks up events from the messaging queue and brokers requests to a 'legacy application'
* An internal Order Fulfill legacy API.
* A MongoDB database

> **Hint:** The Order Capture API exposes the following endpoint for health-checks: `http://[PublicEndpoint]:[port]/healthz`
In the table below, you will find the Docker container images provided by the development team on Docker Hub as well as their corresponding source code on GitHub.

### Container images and source code

| Component | Docker Image | Source Code |
|------------------------------|------------------------------------------------------------------|-------------------------------------------------------------------|
| Order Capture API | [azch/captureorder](https://hub.docker.com/r/azch/captureorder/) | [source-code](https://github.com/Azure/azch-captureorder) |
| Order Fulfillment API | [azch/fulfillorder](https://hub.docker.com/r/azch/fulfillorder/) | [source-code](https://github.com/Azure/azch-fulfillorder) |
| Event Listener (RabbitMQ) | [azch/rabbitmqlistener](https://hub.docker.com/r/azch/rabbitmqlistener/) | [source-code](https://github.com/Azure/azch-rabbitmqlistener) |
| Event Listener (Event Hub) | [azch/eventhublistener](https://hub.docker.com/r/azch/eventhublistener/) | [source-code](https://github.com/Azure/azch-eventhublistener) |

> **Hint:** You will not be using all container images at the same time.
### Environment variables

Each container image requires certain environment variables to properly run and track your progress.

Make sure you set those environment variables.

* **All Containers**
* `TEAMNAME="[YourTeamName]"`
* Track your team's progress. Use your assigned team name
* `CHALLENGEAPPINSIGHTS_KEY="[AsSpecifiedAtTheEvent]"`
* Application Insights key provided by proctors
* `APPINSIGHTS_KEY="[YourOwnKey]"`
* Your own Application Insights key, if you want to track application metrics
* **Order Capture API**
* `MONGOURL="mongodb://[mongoinstance].[namespace]"`
* MongoDB connection endpoint. Don't forget to set the username/password
* `AMQPURL="amqp://[url]:5672"`
* RabbitMQ connection endpoint
* **Order Fulfillment API**
* `MONGOURL="mongodb://[mongoinstance].[namespace]"`
* MongoDB connection endpoint. Don't forget to set the username/password
* **Event Listener (RabbitMQ)**
* `AMQPURL="amqp://[url]:5672"`
* RabbitMQ connection endpoint
* `PROCESSENDPOINT="http://[yourfulfillordername].[namespace]:8080/v1/order"`
* Order Fulfillment API endpoint
* **Event Listener (Event Hub)**
* `EVENTHUBCONNSTRING="Endpoint=sb://[youreventhub].servicebus.windows.net/;SharedAccessKeyName=[keyname];SharedAccessKey=[key]"`
* Azure Event Hub connection endpoint. **Make sure your policy key is URL Encoded. Use a tool like: <https://www.url-encode-decode.com/>**
* `PROCESSENDPOINT="http://[yourfulfillordername].[namespace]:8080/v1/order"`
* Order Fulfillment API endpoint
3 changes: 1 addition & 2 deletions _entries/03-01 acr.md
Expand Up @@ -5,8 +5,7 @@ parent-id: enhancing
title: Create private highly available container registry
---

Instead of using the public dockerhub registry, create your own private container registry using Azure Container Registry (ACR).
Make sure your registry is highly redundant
Instead of using the public Docker Hub registry, create your own private container registry using Azure Container Registry (ACR).


Azure Container Registry Documentation
Expand Down
2 changes: 1 addition & 1 deletion _includes/header.html
@@ -1,3 +1,3 @@
<header>
<!-- <span>{{ site.name }} by {{ site.author }} {{ site.version }}</span> -->
<p class="build">#BUILD_ID#</span>
</header>
9 changes: 9 additions & 0 deletions _sass/partials/_general.scss
Expand Up @@ -20,6 +20,15 @@ body{
font-size: 18px;
}


.build {
text-align: right;
padding: 10px 10px;
font-family: monospace;
font-size: x-small;
color: #ffffff;
}

.content{
counter-reset: h1-counter;
width: calc(100% - 350px);
Expand Down
3 changes: 3 additions & 0 deletions azure-pipelines.yml
Expand Up @@ -11,6 +11,9 @@ variables:
imageName: '$(dockerId)/site'

steps:
- script: sed -i 's/#BUILD_ID#/$(build.buildNumber)/g' _includes/header.html
displayName: 'update site with build number'

- script: docker build -f Dockerfile -t $(imageName) .
displayName: 'docker build'

Expand Down
4 changes: 4 additions & 0 deletions index.html
Expand Up @@ -9,7 +9,11 @@
<section id="{{ entry.sectionid }}" class="{{ entry.sectionclass }}">
{% case entry.sectionclass %}
{% when 'h1' %}
{% if entry.type == 'nocount'%}
<h1 class="nocount">{{ entry.title }}</h1>
{% else %}
<h1>{{ entry.title }}</h1>
{% endif %}
{% when 'h2' %}
<h2>{{ entry.title }}</h2>
{% when 'h3' %}
Expand Down

0 comments on commit f2d3bc1

Please sign in to comment.