Git Product home page Git Product logo

mcw-oss-paas-and-devops's Introduction

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

OSS PaaS and DevOps

Best For You Organics Company is one of the leading online health food suppliers in North America, serving customers in Canada, Mexico, and the United States. They launched their highly-successful e-commerce website, which sells subscriptions to their meal service, in 2016, and have been steadily increasing their subscriber-base since. Their service caters to working professionals looking for convenient, reliable access to healthy meal choices, and pre-packaged recipes without having to spend too much time preparing the meals.

Their CIO is a big proponent of open-source software, and their web application uses the MERN stack (MongoDB, Express.js, React.JS, Node.js). They host their code in a private GitHub repository. They currently have a continuous integration workflow, triggered by each code check-in/commit in GitHub, using Jenkins.

As their service has grown, they have found that the management of VM and server infrastructure is a real challenge. They want to learn more about how Platform as a Service (PaaS) solutions for OSS applications on Azure might be able to help. Their goal is to focus their expenditures and efforts on their core business, rather than infrastructure. The development team at Best For You Organics has indicated they have some experience with Docker. They are interested in what options might be available for using containers to deploy their application into a cloud environment. They are also interested in learning more about identity management.

The development team has also expressed that they would like to continue using GitHub as their code repository but is interested in improving upon their DevOps pipeline. They currently use Jenkins for their builds and are interested in any tools available in a cloud offering that could help with release management, or other aspects of a fully-integrated, modern DevOps pipeline. Ultimately, their goal is to automate and simplify deployments through CI/CD capabilities and deliver updates faster and more reliably.

June 2020

Target audience

  • Application developers
  • DevOps engineers

Abstracts

Workshop

This workshop is designed to help you gain a better understanding of how to integrate and deploy complex open-source software (OSS) workloads into Azure Platform-as-a-Service (PaaS). You will migrate an existing MERN (MongoDB, Express.js, React.js, Node.js) stack application from a hosted environment into Azure PaaS services, and fully embrace modern DevOps tools.

At the end of this workshop, you will learn how to provision Web App for Containers for hosting OSS applications, migrate a MongoDB instance into Cosmos DB, implement serverless technologies, such as Logic Apps and Azure Functions, to enhance OSS app functionality, provision an Azure Container Registry, build Docker images and push them into the Azure Container Registry, and enable continuous deployment with Jenkins.

Whiteboard design session

In this whiteboard design session, you work with a group to design a solution for integrating and deploying complex open-source software (OSS) workloads into Azure PaaS. Your solution should handle the migration of an existing MERN (MongoDB, Express.js, React.js, Node.js) stack application. The application will be migrated from a hosted environment into Azure PaaS services, including migrating an existing MongoDB instance into Cosmos DB, enhancing application functionality using serverless technologies, and fully embracing modern DevOps tools.

At the end of this whiteboard design session, you will be better able to design solutions for migrating OSS applications into Azure PaaS using modern DevOps methodologies.

Hands-on Lab

In this hands-on lab, you implement a solution for integrating and deploying complex open-source software (OSS) workloads into Azure PaaS. You migrate an existing MERN (MongoDB, Express.js, React.js, Node.js) stack application from a hosted environment into Azure Web App for Containers, migrate a MongoDB instance into Cosmos DB, enhance application functionality using serverless technologies, and fully embrace modern DevOps tools.

At the end of this hands-on lab, you will be better able to migrate and deploy OSS applications into Azure PaaS using modern DevOps methodologies and Docker containers.

Azure services and related products

  • Azure Container Registry
  • Azure DevOps
  • Azure Functions
  • Azure CLI
  • Cosmos DB
  • Docker
  • GitHub
  • Jenkins VM
  • MongoDB
  • Logic App
  • Visual Studio Code
  • Web App for Containers
  • Azure Cognitive Search
  • Azure Active Directory B2C
  • SendGrid

Azure solutions

  • DevOps
  • App Modernization

Related references

mcw-oss-paas-and-devops's People

Contributors

codingbandit avatar dawnmariedesjardins avatar ddesjardins2 avatar js2lo avatar jstulo avatar kylebunting avatar microsoftopensource avatar msftgits avatar mwasham avatar snpdev 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

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

mcw-oss-paas-and-devops's Issues

Exercise 6 Task 3: Cosmos DB trigger function Error

In Exercise 6, Task 3 - Upon creating the Cosmos DB trigger function, the following message is displayed:

Error: Failed to start language worker process for: node.

image

To resolve the problem I followed the instructions at MicrosoftDocs/azure-docs#17295, namely to change the Application Settings, WEBSITE_NODE_DEFAULT_VALUE value from 10.14.1 to 8.11.1.

I recommend that a note be added to the step by step instructions.

Dependabot security alert

Received security alert - labeling as a dependency for next update.

Bump lodash from 4.17.15 to 4.17.19 in /Hands-on lab/lab-files dependencies
#39 opened 19 days ago by dependabot bot
1 lodash vulnerability found in …/lab-files/package-lock.json 20 days ago
Remediation
Upgrade lodash to version 4.17.19 or later. For example:

"dependencies": {
"lodash": ">=4.17.19"
}
or…
"devDependencies": {
"lodash": ">=4.17.19"
}
Always verify the validity and compatibility of suggestions with your codebase.

Details
CVE-2020-8203

low severity

Vulnerable versions: < 4.17.19
Patched version: 4.17.19
Versions of lodash prior to 4.17.19 are vulnerable to Prototype Pollution. The function zipObjectDeep allows a malicious user to modify the prototype of Object if the property identifiers are user-supplied. Being affected by this issue requires zipping objects based on user-provided property arrays.

This vulnerability causes the addition or modification of an existing property that will exist on all objects and may lead to Denial of Service or Code Execution under specific circumstances.

Exercise 7 Task 1: Twilio, Address Required

After step 11 of Exercise 7 Task 1, "Select Choose this Number", there is an Address Required step prior to step 12 "Select Done on the Congratulations dialog."

I entered an address, but it would not move me to a next step in the phone number selection workflow. The impression I have is that I would need to buy a phone number.

Given this issue, and that lab users may not be OK with opening a Twilio account (IMHO), perhaps this service should be replaced with something less intrusive?

March 2019 - Scheduled content update

@joelhulen @kylebunting
Solliance team -
This workshop is scheduled for an update in March. We will be combining this workshop with the OSS DevOps workshop. Please update this issue with suggested content changes. Once done, we'll assign to our SME team for review and additional feedback.

Dependabot security alert

Received security alert - labeling as a dependency for next update.

Bump elliptic from 6.5.2 to 6.5.3 in /Hands-on lab/lab-files dependencies
#40 opened 6 days ago by dependabot bot
1 elliptic vulnerability found in …/lab-files/package-lock.json 7 days ago
Remediation
Upgrade elliptic to version 6.5.3 or later. For example:

"dependencies": {
"elliptic": ">=6.5.3"
}
or…
"devDependencies": {
"elliptic": ">=6.5.3"
}
Always verify the validity and compatibility of suggestions with your codebase.

Details
CVE-2020-13822

high severity

Vulnerable versions: < 6.5.3
Patched version: 6.5.3
The Elliptic package before version 6.5.3 for Node.js allows ECDSA signature malleability via variations in encoding, leading '\0' bytes, or integer overflows. This could conceivably have a security-relevant impact if an application relied on a single canonical signature.

1.6.2. Task 2: Update database connection string- step 7

Following the lab sequence, at this stage (step 6 and 7) we didn't create the collection database so the database name "best-for-you-organics" may confuse users to use the cosmosdb name instead.

I highly recommend:

  • Either mention that this will be the collection database created later in this lab (Task 3)

  • Or move step 6 and 7 under task 3 after step 14

MongoDB doesn't autostart on LabVM

At one point in the lab directions (after granting the user permissions to use docker), the lab instructs the user to "reboot" if in doubt. However, MongoDB does not automatically start on boot. So you must manually run "sudo service mongod start" before continuing with the lab (and again anytime you reboot). Ideally, the service should be autostarting.

Adding "Contributing" section

In the Readme file let's add a section before "References" outline the how people can contribute with a link.

Contributing
If you'd like to contribute to this sample, see CONTRIBUTING.MD.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

November test/fix QC

Hi Jay,
QC for the November test/fix is complete, thank you! I've merged your PR, deleted the Nov test/fix branch and updated the HTML links. Can you please take a look at the open issues #11 #9 #8 #7 #6 for me? I think some may have been resolved with your test/fix and can be closed. If they need to wait for a full update, please label them either Improvement or Enhancement (whichever applies). I'm working on #10 so nothing for you to do there.

Issue with Loading Web App while implementing Continuous Deployment

In Exercise 5 -> Task 9 -> Step 10 , the web page shows “Not Found” with the image build done via CD Pipeline. The release log in VSTS is showing as successful.

If I use the private image tagged as latest ( which was built locally in the VM and pushed to ACR ) it is working fine.
I was able to complete the rest of the exercises using the locally pushed image in ACR.

Security Alerts - for next review

GitHub security alerts, closed as acceptable risk to project for now, please review and incorporate into next test/fix or update.

Annotation 2020-04-06 113657

Exercise 6: Unable to deploy Function app in Hands-on-lab-RG

  1. In Exercise 4 : We need to provision Web app for Containers with Linux OS in RG hands-on-lab-RG.
  2. In Exercise 6 we need to provision a Function App with Windows OS in same RG hands-on-lab-RG , but we are unable to provision Function app due to below mentioned error:

"The requested service plan can not be created in the current resource group because it is hosting Linux apps. Please choose a different resource group or create a new one."

image

  1. When we are deploying Web App for Containers In the lab guide its mentioned to select the default App Service Plan SKU, but in the RBAC/Policy we need provide specify the SKU. Can you please update the instructions for creating a App Service plan mentioning the specific SKU such as B1.

Can you please check fix this ASAP.

Thanks,
Amal Gireesh

Use of ARM Templates vs. Azure Portal

For the March 2019 - Scheduled content update, has thought been given to the use of ARM Templates for resource provisioning, as opposed to Azure Portal? This is in reference to:

In the DevOps spirit, I think we should encourage infrastructure as code as much as possible.

Given the depth of this workshop, as a facilitator I not would expect people to build the ARM Templates, but at least review them and update parameters. For a workshop featuring ARM Template programming, I would turn to Continuous delivery in Azure DevOps.

GitHub Security Alerts

Merging the Feb 2020 test/fix resulted in 3 GitHub security alerts (and 2 automatic PRs). Please review and advise.

Security Alert 1 - Moderate severity, corresponds with PR #30 - mongoose

mongoose
Open
GitHub opened this alert 9 minutes ago

Bump mongoose from 5.4.21 to 5.7.5 in /Hands-on lab/lab-files dependencies
#30 opened 9 minutes ago by dependabot bot

1 mongoose vulnerability found in …/lab-files/package-lock.json 9 minutes ago
Remediation
Upgrade mongoose to version 5.7.5 or later. For example:
"dependencies": {
"mongoose": ">=5.7.5"
}
or…
"devDependencies": {
"mongoose": ">=5.7.5"
}
Always verify the validity and compatibility of suggestions with your codebase.

Details
CVE-2019-17426
moderate severity
Vulnerable versions: < 5.7.5
Patched version: 5.7.5
Automattic Mongoose through 5.7.4 allows attackers to bypass access control (in some applications) because any query object with a _bsontype attribute is ignored. For example, adding "_bsontype":"a" can sometimes interfere with a query filter. NOTE: this CVE is about Mongoose's failure to work around this _bsontype special case that exists in older versions of the bson parser (aka the mongodb/js-bson project).

Security alert 2 - serialize-JavaScript - moderate severity

serialize-javascript
Open
GitHub opened this alert 12 minutes ago
Dependabot cannot update to the required version
View details about this error or learn more about automated security updates.
1 serialize-javascript vulnerability found in …/lab-files/package-lock.json 12 minutes ago
Remediation
Upgrade serialize-javascript to version 2.1.1 or later. For example:
"dependencies": {
"serialize-javascript": ">=2.1.1"
}
or…
"devDependencies": {
"serialize-javascript": ">=2.1.1"
}
Always verify the validity and compatibility of suggestions with your codebase.

Details
GHSA-h9rv-jmmf-4pgx
moderate severity
Vulnerable versions: < 2.1.1
Patched version: 2.1.1
regular expressions Cross-Site Scripting (XSS) vulnerability
Impact
Affected versions of this package are vulnerable to Cross-site Scripting (XSS). It does not properly mitigate against unsafe characters in serialized regular expressions.
This vulnerability is not affected on Node.js environment since Node.js's implementation of RegExp.prototype.toString() backslash-escapes all forward slashes in regular expressions.
If serialized data of regular expression objects are used in an environment other than Node.js, it is affected by this vulnerability.
Patches
This was patched in v2.1.1.

Security Alert 3 - handlebars - High severity, corresponds with PR #31

handlebars
Open
GitHub opened this alert 14 minutes ago

Bump handlebars from 4.1.2 to 4.7.3 in /Hands-on lab/lab-files dependencies
#31 opened 13 minutes ago by dependabot bot

1 handlebars vulnerability found in …/lab-files/package-lock.json 14 minutes ago
Remediation
Upgrade handlebars to version 4.3.0 or later. For example:
"dependencies": {
"handlebars": ">=4.3.0"
}
or…
"devDependencies": {
"handlebars": ">=4.3.0"
}
Always verify the validity and compatibility of suggestions with your codebase.

Details
CVE-2019-19919
high severity
Vulnerable versions: < 4.3.0
Patched version: 4.3.0
Versions of handlebars prior to 4.3.0 are vulnerable to Prototype Pollution leading to Remote Code Execution. Templates may alter an Object's proto and defineGetter properties, which may allow an attacker to execute arbitrary code through crafted payloads.

New LabVM Doesn't Get Proper Desktop Config

I'm doing this lab now and wasn't able to RDP to my LabVM after using the ARM Template (the 1-click deployment from the lab doc) to deploy it.

I then SSH'd into the box to investigate. It appeared that parts of labvmconfig.sh ran/worked (e.g. all the packages were installed). However, there was no sign of the first two sections of labvmconfig.sh having run properly. There was no ~/.xsession file, no /etc/X11/Xwrapper.config, and lxde was not installed.

Running the first part of the labvmconfig.sh manually fixed everything:

export DEBIAN_FRONTEND=noninteractive
# Install LXDE lxde.org and xrdp - (make sure to open 3389 on the NSG of the azure vm)
apt-get update
apt-get install -y lxde
apt-get install -y xrdp
/etc/init.d/xrdp start

# Prepare XWindows System
sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config
sudo touch ~/.xsession
echo "startlxde" > ~/.xsession

Everything beyond this part in the script was in-place already.

Before the HOL

I've updated the document to match most current templates.
Please check that my changing the name to Before the HOL does not break any links in the labs.
Please add a TOC to the document

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.