This commit is contained in:
Родитель
d3cb4bf90d
Коммит
5565f6afb0
Двоичный файл не отображается.
|
@ -0,0 +1,31 @@
|
|||
|
||||
# Contributing
|
||||
|
||||
This project welcomes contributions and suggestions. Most contributions require you to agree to a
|
||||
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
|
||||
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
|
||||
|
||||
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
|
||||
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
|
||||
provided by the bot. You will only need to do this once across all repos using our CLA.
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
||||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
|
||||
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
|
||||
# Legal Notices
|
||||
|
||||
Microsoft and any contributors grant you a license to the Microsoft documentation and other content
|
||||
in this repository under the [Creative Commons Attribution 4.0 International Public License](https://creativecommons.org/licenses/by/4.0/legalcode),
|
||||
see the [LICENSE](LICENSE) file, and grant you a license to any code in the repository under the [MIT License](https://opensource.org/licenses/MIT), see the
|
||||
[LICENSE-CODE](LICENSE-CODE) file.
|
||||
|
||||
Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation
|
||||
may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries.
|
||||
The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks.
|
||||
Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.
|
||||
|
||||
Privacy information can be found at https://privacy.microsoft.com/en-us/
|
||||
|
||||
Microsoft and any contributors reserve all other rights, whether under their respective copyrights, patents,
|
||||
or trademarks, whether by implication, estoppel or otherwise.
|
36
README.md
36
README.md
|
@ -1,31 +1,7 @@
|
|||
# Modernizing Data, Applications, and APIs to the Cloud
|
||||
|
||||
# Contributing
|
||||
|
||||
This project welcomes contributions and suggestions. Most contributions require you to agree to a
|
||||
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
|
||||
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
|
||||
|
||||
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
|
||||
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
|
||||
provided by the bot. You will only need to do this once across all repos using our CLA.
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
||||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
|
||||
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
|
||||
# Legal Notices
|
||||
|
||||
Microsoft and any contributors grant you a license to the Microsoft documentation and other content
|
||||
in this repository under the [Creative Commons Attribution 4.0 International Public License](https://creativecommons.org/licenses/by/4.0/legalcode),
|
||||
see the [LICENSE](LICENSE) file, and grant you a license to any code in the repository under the [MIT License](https://opensource.org/licenses/MIT), see the
|
||||
[LICENSE-CODE](LICENSE-CODE) file.
|
||||
|
||||
Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation
|
||||
may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries.
|
||||
The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks.
|
||||
Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.
|
||||
|
||||
Privacy information can be found at https://privacy.microsoft.com/en-us/
|
||||
|
||||
Microsoft and any contributors reserve all other rights, whether under their respective copyrights, patents,
|
||||
or trademarks, whether by implication, estoppel or otherwise.
|
||||
- [MOD10: Migrating Web Applications to Azure](./mod10/README.md)
|
||||
- [MOD20: Moving Your Database to Azure](./mod20/README.md)
|
||||
- [MOD30: Modernizing Your Application with Containers](./mod30/README.md)
|
||||
- [MOD40: Consolidating Infrastructure with Azure Kubernetes Service](./mod40/README.md)
|
||||
- [MOD50: Debugging and Interacting with Production Applications](./mod50/README.md)
|
|
@ -0,0 +1,220 @@
|
|||
# MOD10 Demo instructions
|
||||
|
||||
|
||||
** The creds below have been obscured. You will need to ensure you have an MSSQL and Cosmos MongoDB API instance prior to start of demo **
|
||||
|
||||
# Abstract
|
||||
|
||||
_When Tailwind Traders acquired Northwind earlier this year, they decided to consolidate their on-premises applications with Tailwind Traders' current applications running on Azure. Their goal: vastly simplify the complexity that comes with an on-premises installation._
|
||||
|
||||
_In this session, you'll examine how a cloud architecture frees you up to focus on your applications, instead of your infrastructure. Then, you'll see the options to "lift and shift" a web application to Azure, including: how to deploy, manage, monitor, and backup both a Node.js and .NET Core API, using Virtual Machines and Azure App Service._
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### The intro
|
||||
|
||||
**Welcome to the MOD track of Microsoft Ignite the tour**
|
||||
|
||||
Goals:
|
||||
|
||||
1. We'll spent time in each session learning about how to modernize our applications we may have already been running in a datacenter
|
||||
2. As the day continues and you go further along the learning path you'll find new ways to simplify your hosting ops for your applications with Azure.
|
||||
|
||||
### Migrations are a big part of moving to the cloud:
|
||||
|
||||
Big time goals in your journey will be to:
|
||||
|
||||
- Assess (who's going to be involved, what will the costs be?)
|
||||
- Migrate (move to a new hosting environment)
|
||||
- Optimize (ensure we're doing the most for what we're spending)
|
||||
- Secure (ensure that you're making the most out of the security options in Azure)
|
||||
|
||||
|
||||
# Migrate and modernize
|
||||
|
||||
- Rehost – lift and shift (we'll focus on that today)
|
||||
- Refactor – repackaging, but no major code changes
|
||||
- Rearchitect – modernizing your code -breaking monoliths (implementing devops practices)
|
||||
|
||||
# Cloud Native
|
||||
|
||||
- Rebuild completely for cloud native – (logic apps, serverless, k8s)
|
||||
|
||||
|
||||
|
||||
# Move into tailwind traders talk:
|
||||
|
||||
**Big news**
|
||||
|
||||
Tailwind traders has decided it was time to break out of the datacenter and modernize by migrating their apps to Azure. By doing this, the team will be able to begin their path to becoming a completely cloud-first environment. To get there we'll get started by "lifting and shifting" their application
|
||||
|
||||
# The App:
|
||||
|
||||
Right now it's a monolithic app
|
||||
|
||||
- Runs .Net core for API and React for front end
|
||||
- Both run on a single server now
|
||||
- Uses MongoDB and MSSQL for database (talks directly to it to store information about products, users and orders)
|
||||
|
||||
# What we'll do
|
||||
|
||||
1. We'll build a resource group to host
|
||||
**A container that holds related resources for an Azure solution. The resource group includes those resources that you want to manage as a group. You decide how to allocate resources to resource groups based on what makes the most sense for your organization.**
|
||||
|
||||
2. **Why does a resource group need a location? And, if the resources can have different locations than the resource group, why does the resource group location matter at all?" The resource group stores metadata about the resources. Therefore, when you specify a location for the resource group, you're specifying where that metadata is stored. For compliance reasons, you may need to ensure that your data is stored in a particular region. **
|
||||
|
||||
3. We'll create a VNET
|
||||
Virtual Network ( **VNet** ) is a representation of your own network in the cloud. It is a logical isolation of the **Azure** cloud dedicated to your subscription. Each **VNet** you create has its own CIDR block
|
||||
- can be linked to other VNets and on-premises networks as long as the CIDR blocks do not overlap.
|
||||
|
||||
4. Create a VM (linux)
|
||||
- A full infrastructure as a service virtualized server
|
||||
- Can be modified to grow or shrink as we move along on our modernization journey
|
||||
|
||||
Our old Server was a a 4 CPU server with 14GB ram, so we'll use a lift and shift comparable VM size, Standard\_DS3\_v2
|
||||
|
||||
1. Git clone app
|
||||
2. Install dependencies
|
||||
3. Configure Env Variables
|
||||
4. Start app
|
||||
4. Browse to app
|
||||
|
||||
|
||||
__(Explain to stick around for MOD20 to learn about the strategy for migrating our databases.)__
|
||||
|
||||
|
||||
# What we'll use:
|
||||
|
||||
1. Cloud Shell
|
||||
2. Azure Portal
|
||||
3. VNET, VM
|
||||
4. Git
|
||||
5. Nodejs/dotnet core
|
||||
6. MongoDB
|
||||
7. MS SQL
|
||||
|
||||
Demo:
|
||||
|
||||
1. Open portal
|
||||
2. Open cloud shell
|
||||
3. Create a resource group
|
||||
|
||||
**SPOKEN** "We're goung to create a resource group, in this command I'll name it ignitemod10, put it in my subscription specific to my app and then provide a location where our metadata for our resource group will be held"
|
||||
|
||||
```
|
||||
az group create --subscription "Ignite The Tour" --name ignitemod10 --location eastus
|
||||
```
|
||||
|
||||
4. VNET creation
|
||||
|
||||
**SPOKEN** "Now it's time to create our virtual network, this will replace all network gear you used to have to maintain. Rather than configuring switchports and replacing failed line-cards, you can manage your network from the commandline or portal.
|
||||
|
||||
```
|
||||
az network vnet create --name ignitemod10vnet --subscription "Ignite The Tour" --resource-group ignitemod10 --subnet-name default
|
||||
```
|
||||
|
||||
5. Show VNET in portal
|
||||
|
||||
**Navigate to Resource Group**
|
||||
|
||||
![vnet](images/rg-vnet.png)
|
||||
|
||||
6. VM Creation
|
||||
|
||||
**SPOKEN** "I've created a resource group, I have a network for our applications, now it's time we build a virtual machine for our application to be installed on."
|
||||
|
||||
```
|
||||
az vm create --subscription "Ignite The Tour" --resource-group ignitemod10 --name twtweb --public-ip-address-dns-name twtweb --image UbuntuLTS --admin-username ubuntu --generate-ssh-keys --vnet-name ignitemod10vnet --size Standard\_DS3\_v2
|
||||
```
|
||||
|
||||
8. Networking ports open:
|
||||
|
||||
**SPOKEN** Now that the server is built, it's time to permit network access to both the web app and SSH, we'll close up SSH when we finalize production.
|
||||
|
||||
```
|
||||
az vm open-port --subscription "Ignite The Tour" --resource-group ignitemod10 --name twtweb --port 80 --priority "201"
|
||||
|
||||
az vm open-port --subscription "Ignite The Tour" --resource-group ignitemod10 --name twtweb --port 443 --priority "202"
|
||||
|
||||
az vm open-port --subscription "Ignite The Tour" --resource-group ignitemod10 --name twtweb --port 22 --priority "203"
|
||||
```
|
||||
|
||||
# SSH in and begin installing our dependencies
|
||||
|
||||
```
|
||||
ssh ubuntu@twtweb.eastus.cloudapp.azure.com
|
||||
```
|
||||
|
||||
### Clone app, switch to branch
|
||||
|
||||
```
|
||||
sudo su
|
||||
git clone https://github.com/anthonychu/TailwindTraders-Website.git /tailwind
|
||||
cd /tailwind
|
||||
git checkout monolith
|
||||
```
|
||||
|
||||
### Install dotnet 2.2
|
||||
|
||||
```
|
||||
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
|
||||
dpkg -i packages-microsoft-prod.deb
|
||||
add-apt-repository universe
|
||||
apt-get update
|
||||
apt-get install apt-transport-https
|
||||
apt-get install dotnet-sdk-2.2=2.2.102-1 -y
|
||||
```
|
||||
|
||||
### Install node / npm
|
||||
```
|
||||
apt install npm nodejs -y
|
||||
```
|
||||
|
||||
### Export ENV Vars
|
||||
|
||||
```
|
||||
export apiUrl=/api/v1
|
||||
export ApiUrlShoppingCart=/api/v1
|
||||
```
|
||||
|
||||
### SQL Server
|
||||
|
||||
```
|
||||
export SqlConnectionString="Server=tcp:twtsqlmod20.database.windows.net,1433;Initial Catalog=twtmod10;Persist Security Info=False;User ID=twtmod10;Password=;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
|
||||
```
|
||||
|
||||
### MongoDB Server
|
||||
|
||||
```
|
||||
export MongoConnectionString="mongodb://:Hi5L2yajHopNUTDZRU8uDQf6hXYrK7WUPM4FVgk4P9h2VIRHircIkyKB7NFH0bTqC9WPBvHXc1YGGn2Y8XrHPw==@twtnosql.documents.azure.com:10255/?ssl=true&replicaSet=globaldb"
|
||||
```
|
||||
|
||||
### Publish and start application
|
||||
|
||||
```
|
||||
screen
|
||||
cd /tailwind/Source/Tailwind.Traders.Web
|
||||
dotnet publish -c Release
|
||||
dotnet bin/Release/netcoreapp2.1/publish/Tailwind.Traders.Web.dll
|
||||
CTRL A-D
|
||||
```
|
||||
|
||||
### nginx
|
||||
|
||||
```
|
||||
git clone https://github.com/neilpeterson/tailwind-reference-deployment.git
|
||||
apt-get install nginx -y
|
||||
service nginx start
|
||||
rm /etc/nginx/sites-available/default
|
||||
curl https://raw.githubusercontent.com/neilpeterson/tailwind-reference-deployment/master/deployment-artifacts-standalone-azure-linux-vm/default > /etc/nginx/sites-available/default
|
||||
nginx -t
|
||||
nginx -s reload
|
||||
```
|
||||
|
||||
# Close
|
||||
|
||||
Ready to move forward on your next step to modernization? Head over to Mod 20 where you'll learn to migrate your SQL and NoSQL data into managed services.
|
||||
|
||||
There's tons for you to learn here at MS Ignite the Tour, make sure you're up to date on all the sessions by going to
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Credentials
|
||||
azureResourceGroup=ignitemod10
|
||||
adminUser=twtadmin
|
||||
adminPassword=twtmod10pD
|
||||
subname=cd400f31-6f94-40ab-863a-673192a3c0d0
|
||||
location=eastus
|
||||
|
||||
# DB Name
|
||||
|
||||
cosmosdbname=twtnosql
|
||||
sqldbname=twtsql
|
||||
|
||||
# Create Resource Group
|
||||
az group create --subscription $subname --name $azureResourceGroup --location $location
|
||||
|
||||
# Create Azure Cosmos DB
|
||||
az cosmosdb create --name $cosmosdbname --resource-group $azureResourceGroup --kind MongoDB --subscription $subname
|
||||
|
||||
cosmosConnectionString=$(az cosmosdb list-connection-strings --name $cosmosdbname --resource-group $azureResourceGroup --query connectionStrings[0].connectionString -o tsv --subscription $subname)
|
||||
|
||||
# Create Azure SQL Insance
|
||||
az sql server create --location $location --resource-group $azureResourceGroup --name $sqldbname --admin-user $adminUser --admin-password $adminPassword --subscription $subname
|
||||
az sql server firewall-rule create --resource-group $azureResourceGroup --server $sqldbname --name azure --start-ip-address 0.0.0.0 --end-ip-address 0.0.0.0 --subscription $subname
|
||||
az sql db create --resource-group $azureResourceGroup --server $sqldbname --name tailwind --subscription $subname
|
||||
sqlConnectionString=$(az sql db show-connection-string --server $sqldbname --name tailwind -c ado.net --subscription $subname)
|
||||
|
||||
|
||||
echo $cosmosConnectionString
|
||||
echo $sqlConnectionString
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 104 KiB |
|
@ -0,0 +1 @@
|
|||
# Moving Your Database to Azure
|
|
@ -0,0 +1 @@
|
|||
# Modernizing Your Application with Containers
|
|
@ -0,0 +1 @@
|
|||
# Consolidating Infrastructure with Azure Kubernetes Service
|
|
@ -0,0 +1,62 @@
|
|||
# MOD10: Debugging and Interacting with Production Applications
|
||||
|
||||
## Session Abstract
|
||||
|
||||
In recent months, Tailwind Traders has been having issues with keeping their sprawling IaaS VM deployment under control, leading to mismanaged resources and inefficient processes.
|
||||
|
||||
In this session, you’ll look into how Tailwind Traders can ensure their VMs are properly managed and maintained with the same care in Azure as they were in Tailwind Trader's on-premises data centers.
|
||||
|
||||
The session [Ignite Learning Paths - APPS10](https://github.com/microsoft/ignite-learning-paths/tree/master/mod/mod10).
|
||||
|
||||
## How To Use
|
||||
|
||||
Welcome, Presenter!
|
||||
|
||||
We're glad you are here and look forward to your delivery of this amazing content. As an experienced presenter, we know you know HOW to present so this guide will focus on WHAT you need to present. It will provide you a full run-through of the presentation created by the presentation design team.
|
||||
|
||||
Along with the video of the presentation, this document will link to all the assets you need to successfully present including PowerPoint slides and demo instructions &
|
||||
code.
|
||||
|
||||
1. Read document in its entirety.
|
||||
2. Watch the video presentation
|
||||
3. Ask questions of the Lead Presenter
|
||||
|
||||
|
||||
## Assets in Train-The-Trainer kit
|
||||
|
||||
- This guide
|
||||
- [PowerPoint presentation](https://#)
|
||||
- [Full-length recording of presentation](https://#)
|
||||
- [Full-length recording of presentation - Director Cut](https://youtu.be/0kGGhoEB-48)
|
||||
- [Demo Instructions](https://#)
|
||||
|
||||
|
||||
## Become a Presenter
|
||||
|
||||
To become a certified presenter, contact [scalablecontent@microsoft.com](mailto:scalablecontent@microsoft.com). In your email please include:
|
||||
|
||||
- Complete name:
|
||||
- The code of this presentation: ops40
|
||||
- Link (ex: unlisted YouTube video) to a video of you presenting (~10 minutes).
|
||||
> It doesn't need to be this content, the important is to show your presenter skills
|
||||
|
||||
A mentor will get back to you with the information on the process.
|
||||
|
||||
## Certified Presenters
|
||||
|
||||
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
||||
<!-- prettier-ignore -->
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center"><a href="http://cloud5mins.com/">
|
||||
<img src="https://avatars2.githubusercontent.com/u/2404846?s=460&v=4" width="100px;" alt="Frank Boucher"/><br />
|
||||
<sub><b>Frank Boucher</b></sub></a><br />
|
||||
<a href="https://github.com/neilpeterson/ignite-tour-fy20/commits?author=fboucher" title="talk">📢</a>
|
||||
<a href="https://github.com/neilpeterson/ignite-tour-fy20/commits?author=fboucher" title="Documentation">📖</a>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
Загрузка…
Ссылка в новой задаче