Git Product home page Git Product logo

mcw-cloud-native-applications's Introduction

Cloud-native applications

This workshop is archived and no longer being maintained. Content is read-only.

Fabrikam Medical Conferences provides conference web site services, tailored to the medical community. Their business has grown and the management of many instances of the code base and change cycle per tenant has gotten out of control.

The goal of this workshop is to help them build a proof of concept (POC) that will migrate their code to a more manageable process that involves containerization of tenant code, a better DevOps workflow, and a simple lift-and-shift story for their database backend.

November 2021

Target Audience

  • Application developer
  • Infrastructure architect

Abstracts

Workshop

In this workshop, you will build a proof of concept (POC) that will transform an existing on-premises application to a container-based application. This POC will deliver a multi-tenant web app hosting solution leveraging Azure Kubernetes Service (AKS), Docker containers on Linux nodes, and a migration from MongoDB to CosmosDB.

At the end of this workshop, you will be better able to improve the reliability of and increase the release cadence of your container-based applications through time-tested DevOps practices.

Whiteboard Design Session

In this whiteboard design session, you will learn about the choices related to building and deploying containerized applications in Azure, critical decisions around this, and other aspects of the solution, including ways to lift-and-shift parts of the application to reduce applications changes.

By the end of this design session, you will be better able to design solutions that target Azure Kubernetes Service (AKS) and define a DevOps workflow for containerized applications.

Hands-on Lab

This hands-on lab will guide the student through deploying a web application and API microservice to a Kubernetes platform hosted on Azure Kubernetes Services (AKS). In addition, the lab will instruct the student on configuring the behavior of these services through dynamic service discovery, service scale-out, and high availability in the context of AKS-hosted services. By demonstrating crucial Kubernetes concepts, the student will gain experience with the Kubernetes deployment and service resource types. The student will create them manually through the Azure Portal and manipulate their configurations to scale the associated microservice instances up and down and manage their CPU and memory resource allocations with the Kubernetes cluster.

At the end of this lab, you have a solid understanding of how to build and deploy containerized applications to Azure Kubernetes Service and perform common DevOps tasks and procedures.

Azure services and related products

  • Azure Kubernetes Service (AKS)
  • Azure Container Registry
  • GitHub
  • Docker
  • Cosmos DB (including MongoDB API)

Related references

Help & Support

We welcome feedback and comments from Microsoft SMEs & learning partners who deliver MCWs.

Having trouble?

  • First, verify you have followed all written lab instructions (including the Before the Hands-on lab document).
  • Next, submit an issue with a detailed description of the problem.
  • Do not submit pull requests. Our content authors will make all changes and submit pull requests for approval.

If you are planning to present a workshop, review and test the materials early! We recommend at least two weeks prior.

Please allow 5 - 10 business days for review and resolution of issues.

mcw-cloud-native-applications's People

Contributors

bowencode avatar brittj-msft avatar carlfranklin avatar codingbandit avatar crpietschmann avatar daronyondem avatar dawnmariedesjardins avatar dependabot[bot] avatar dstrebel avatar dzaremba90 avatar elzouhery avatar emilysaeli avatar givenscj avatar hatboyzero avatar hopero929 avatar iamalexmang avatar jamesrcounts avatar joelhulen avatar js2lo avatar jstulo avatar kylebunting avatar mgray-solliance avatar michelebusta avatar microsoftopensource avatar mikaelweave avatar praveenanil avatar saimachi avatar timahenning avatar vraposo avatar waltermyersiii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mcw-cloud-native-applications's Issues

Use of Vi/Vim 🤯

I'm shocked (putting it mildly) that in 2019 we're asking people to edit code using Vi/Vim

  • Why Vi/Vim and not Nano, which is a much, much MUCH more friendly editor!
  • It's madness asking them to TYPE IN a Dockerfile rather than copy & paste it
  • Why not use the Azure DevOps Repos web UI to create/edit the files? You can create new files there, paste into the web file editor. Then commit and do a pull on the build VM

I'll admit creating code & files directly into the repo using the web UI is a little unorthodox, but it's no less strange than asking people to use Vi !

Update folder names

HOL to Hands on Lab
WDS to Whiteboard design session
Update header images
Create updated HTML files once folders are correctly named

HOL step-by-step

Task 4 step 6 has an extra "-" before the t argument.
Task 6 step 12 has a free-floating "c" before content-web. This will cause problems if not removed.
Task 7 step 4 has an extra "-" in front of both u & p in the sample bash command.

Error in Exercise 2 task 3 step 10

Deploying the web service cause this error

Cluster
Namespaces
Nodes
Persistent Volumes
Roles
Storage Classes

Namespace
default

Overview
Workloads
Cron Jobs
Daemon Sets
Deployments
Jobs
Pods
Replica Sets
Replication Controllers
Stateful Sets
Discovery and Load Balancing
Ingresses
Services
Config and Storage
Config Maps
Persistent Volume Claims
Secrets

Settings
About
Logs from
web

in
web-6698dcf8fd-z9hdl

format_color_text text_fields timer_off refresh

exposure_zero file_download

> [email protected] start /usr/src/app
> node server.js

/usr/src/app/data-access/index.js:52
var contentApiUrl = process.env.CONTENT_API_URL;
^

SyntaxError: Identifier 'contentApiUrl' has already been declared
at new Script (vm.js:74:7)
at createScript (vm.js:246:10)
at Object.runInThisContext (vm.js:298:10)
at Module._compile (internal/modules/cjs/loader.js:657:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-07-13T22_37_06_583Z-debug.log

Lab Suggestions

Hey all,

I ran the lab last week before running the class in London and it took over 8 hours. I have seen some feedback from the class in Ireland and they made the same comment. I have found that there are a few bugs, including administrator permissions not set for the ssh administrator initially on the ubuntu vm. I ran the following command ($sudo chown -R .config).
I also ran into a problem with Azure DevOps, where I could not create a Build Pipeline, because the classic interface does not allow the use of ubuntu 18.04, instead 16.04, so a yaml configuration file would need to be created.
I found that all the commands needed to be precise and were way too long for the 3-4 hours allotted. I had to run the lab 4x on my own before I could get to the last part of Exercise 1 before I realized that I could not get the DevOps pipeline to work. I hope that these comments help with the future releases.

Sincerely,
Becky Isserman

Task 13 Git push fails

Is there a missing configuration step or have things changed since I create the repo, and set origin and when I try to push, it fails with:
XXXadmin@fabmedical-XX:~/FabMedical/content-web$ git push -u origin --all
Password for 'https://[email protected]':
fatal: Authentication failed for 'https://[email protected]/fabmedical-XX/fabmedical/_git/content-web/'

I tried changing the password until it locked me out of changing it anymore in 24 h period, so pretty sure there's no type there.

Azure DevOps repos and Linux require SSH. HTTPS does not work.

I spent the last 2-3 hours trying to get Git to authenticate and remember its setting with Azure DevOps repos for this lab.

I tried every trick in the book and had some random things to work (ie "git clone" worked using a personal access token instead of password, but trying a "git pull" immediately after made git ask for username and passord AGAIN and whatever I type it will not do anything then say "Fatal : Authentication failed for https://dev.azure.com/...")

I checked with others and they where clear that Linux with Azure DevOps - DO NOT USE HTTPS, but use SSH as described here https://docs.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=azure-devops

I think this should be integrated into the documentation.

Before the HOL

Please review alt-text on line 280. It just says "Settings" Is that correct?
Line 722 - alt-text is just "Clone" Is that correct?

Whiteboard design session

Student Guide -
Please see line 172 - image not showing correctly. I tried taking out a space but that didn't work.

Trainer Guide -
Line 300 - image not showing correctly.

Verify links in HOLs

Folder and document names have been updated. Please check your HOL documents for links that use folder names in their path and make sure they are still valid and working.

Update readme

The readme doc is missing the bulleted portion for the HOL and WDS abstracts. Please update to the following:

HOL
This hands-on lab is designed to guide you through the process of building and deploying Docker images to the Kubernetes platform hosted on Azure Container Services (AKS) in addition to learning how to work with dynamic service discovery, service scale-out and HA. The goal of the lab is to provide a foundation for the following:
• Creating the following Azure resources:
o Azure Container Registry
o Azure Container Services (AKS)
• Setting up an environment to do the following:
o Build Docker images
o Connect to Azure Container Registry
o Connect to an Azure Container Services (AKS) cluster
• Perform the following actions:
o Building Docker images locally and pushing them to Azure Container Registry
o Deploying containers to a Kubernetes cluster
o Load balancing containers with and without Azure Load Balancer
o Working with service discovery
o Performing rolling upgrades for services with zero downtime
o Scaling services

WDS
This whiteboard design session is designed to help attendees understand the choices related to building and deploying containerized applications in Azure, critical decisions around this and other aspects of the solution including ways to lift-and-shift parts of the application to reduce applications changes. In addition,
• Create and run a Docker Application
• Deploy to the Azure Container Service (AKS)
• Implement load balancing and service discovery
• Scale the application and test availability

Missing answer - WDS trainer guide

Missing answer (Line 592)
Automating DevOps workflows

  1. Describe how VSTS can help the customer automate their continuous integration and deployment workflows and the Azure Kubernetes Service (AKS) infrastructure.

TODO:new content coming

AKS Name & Version

Hello! AKS is now "Azure Kubernetes Service" and it is in GA (not preview anymore). So the content of this workshop (including WB & HOL) should be updated accordingly.

Improvements to DevOps coverage in trainer guide preferred solution

The preferred solution mentions little about how to address the DevOps concerns.

Some suggestions could be:

  • Mention helm and draft and Dev Spaces tooling and how these fit into the dev, test and deploy workflow
  • Show how Helm can be used to deploy containers for each tenant from one or more common Helm charts using the same base containers (e.g. multiple deployments from same chart with parameters from the environment to handle tenant-specific differences for content, static asset files, etc.)
  • CI/CD pipeline diagram to show how to deploy changes into the AKS cluster using VSTS (the HOL shows the CI build part but not how to handle deployments from the pipeline).
  • Address how each tenant could have their own deployment (different options here, for example tenant static assets could be pulled from git repos via sidecar containers or from blob storage published during the CI build process). The idea would be to use convention over configuration and pass in environment variables for each tenant in VSTS CI/CD pipeline.

The whiteboard trainer guide could be updated with diagrams and some descriptions. The HOL could be extended to include draft, helm, and Dev Spaces.

I think the preferred solution should at least be expanded since it is called "Containers and DevOps".

Feedback is welcome on this idea.

Setup markdown

In the Setup.md file, task 8 step 2 talks about the settings to create Azure Container Registry. The instructions say to Enable Admin user but the screen capture shows Disable.

Exercise 2, Task 4 - step 2 Missing content-init image from ACR

The init.job.yml is referencing an image from ACR that was not initially pushed. To fix this, Exercise 1, Task 7 - step 5 needs the following line added:

docker tag content-init [LOGINSERVER]/content-init

Task 7 - step 7 needs the following line added:

docker push [LOGINSERVER]/content-init

step 10 needs the following line added (optional):
docker tag [LOGINSERVER]/content-init:latest [LOGINSERVER]/content-init:v1

Before the lab doc

Line 596 forward
There's a grey box around the steps and the images aren't showing. Not sure what code is causing that.

Error while testing the content-web

Hello -

Getting the Error while testing the content-web in Task #1

Error

$ nodejs ./server.js &
[2] 19404
$ /home/sowmyans/content-web/node_modules/debug/src/node.js:132
let val = process.env[key];
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (/home/sowmyans/content-web/node_modules/debug/src/index.js:9:19)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)

Setup markdown - AKS

In the setup.md file, Task 10 talks about setting up ALS but the instructions and screen captures are outdated. New instructions should be added with updated screen captures.

Task 12 of Before Hands of Lab

Command "az acs" is (will be) deprecated, so please update Task 12 from "sudo az acs kubernetes install-cli --install-location /usr/local/bin/kubectl" to "sudo az aks install-cli ..."... Thanks!

web container shows error making calls to the api when

After running the entire workshop, I found that after deploying the web container to AKS, it was showing 500 errors when making calls to the api container.

This turned out to be an error in the instructions not indicating to commit a change made in Task 6, Step 4 - After this step code should be committed and pushed to the repo.

November test/fix

Please complete a test/fix and reference this issue when you submit your PR.

SyntaxError - Exercise 1, Task 1, no 13

When I tried to run the application as background using "nodejs ./server.js &" the following errors were occurred.

"SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode"

image

In "Before-HOL", I think we should change "Ubuntu 16.04" to "Ubuntu 18.04". In "Ubuntu 18.04" these command will be worked successfully.

March 2019 - Scheduled content update

@ZoinerTejada @joelhulen @kylebunting
Solliance team -
This workshop is scheduled for an update in March. On top of updating the current information, we will be adding an Infra WDS and lab version. Please update this issue with suggested content changes. Once done, we'll assign to our SME team for review and additional feedback.

Hands-on-lab - unguided

Workshop does not follow template

Example:
Exercise 1: Azure data, storage, and serverless environment setup
Help references
Task 1: Provision the storage account
Tasks to complete
Exit criteria
Task 2: Provision the Function Apps
Tasks to complete
Exit criteria

Exercise 4: Task 5: Step 10: helm cert-manager install fails

Exercise 4: Task 5: Step 10: helm cert-manager install fails

Latest version of cert-manager (v0.6+) has a bug with rbac.create=false flags, install fails: cert-manager/cert-manager#1283

If you install the newer version, you then can’t uninstall it cleanly to install v0.5.2, which is the latest version that works: helm/charts#9289

But running these commands cleans up the install:

helm delete cert-manager
kubectl delete customresourcedefinitions.apiextensions.k8s.io certificates.certmanager.k8s.io clusterissuers.certmanager.k8s.io issuers.certmanager.k8s.io

Then you can run install with the older version:

helm install --name cert-manager --namespace kube-system --set rbac.create=false --version v0.5.2 stable/cert-manager

Install Bower NPM Warn message

HOL -> Before the HOL -> Task 7 -> Step 10
Add a short text that you receive a NPM warning message when you try to install Bower. User can ignore the NPM warning.
npm warn message

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.