Module 3 - 微软云 Azure - Web Apps

1. Create new Web application in the Azure Portal

Azure Portal -> App Services -> Add -> Web App。

在这个过程中,Azure Portal 会要求你创建一个 Resource Group(资源组),在资源组里面,你会看到 App Service, App Service Plan, Application Insights(Optional)。

2. Deploy your application from Visual Studio to Azure by using deployment slot

首先在个人电脑上安装 Microsfot Visual Studio Community 2019;

然后按照教程 在Azure中创建ASP.net Core Web App 一步一步操作即可。

完成之后,在 Azure Portal 选中你所创建的 App Service,再选择 Deployment Slot,再选择 Add Slot,即可创建一个Slot(插槽)。

比如说,你可以为 Dev、SIT、UAT、PreProd(Staging)、PROD、BCP等分别创建不同的插槽。插槽的妙处在于你可以在类似生产的环境进行验证之后,然后对 Staging 和 Production 的内容进行交换(Swap)。

Add Slot

3. Move you project to Version Control system (Git or TFS) and set up Continuous Deployment process from your VC system to Azure

我选择的仓库托管中心是 GitHub,所以首先确保在 github.com 拥有自己的账号。

并且在个人电脑上安装 Git 的客户端。确保可以在本地磁盘打开 Git Bash。

Git 中 SSH key 生成步骤  按照该文章的说明,运行 ssh-keygen -t rsa -C "youremail@example.com" 在 ~/.ssh 目录下生成私钥 id_rsa 和公钥  id_rsa.pub,

并且需要把公钥的内容配置到 GitHub 网站。

在 GitHub 上新建一个仓库,名字和我的 Visual Studio 的项目的名字一致 myFirstAzureWebApp。

然后在本地磁盘的 myFirstAzureWebApp 项目文件夹下打开 Git Bash,

通过以下命令建立 本地库 和 远程库 之间的联系。

echo "# myFirstAzureWebApp" >> README.md
git init
git status
git add --all
git commit -m "first commit" -a
git remote add origin git@github.com:kingmax-chan/myFirstAzureWebApp.git
git push -u origin master

以后的新增开发一般通过 git status, git add, git commit, git push 等命令,就可以满足基本需求。

在 GitHub 授权给 Azure App Service。

通过 Azure Portal -> App Services -> Deployment Center -> Source Control -> Build Provider -> Configure -> Summary,

可以建立 GitHub 的特定代码库 到 Azure的特定App Service 或 Web App 之间的联系。

建立本地库--》远程库--》Azure Web Serice 的联系之后,以后每次在本地进行 git push 操作,都会向远程库推送,进而触发Azure中对应的App Service的 Build 和 Deploy 的操作。

而这一系列的动作,除了 git push,都是自动进行的。

Deployment Center ---> Source Control

Deployment Center ---> Build Provider

Deployment Center ---> Configure

Deployment Center ---> Summary

Module 3 - Azure - Web Apps的更多相关文章

  1. 免费电子书:Azure Web Apps开发者入门

    (此文章同时发表在本人微信公众号"dotNET每日精华文章",欢迎右边二维码来关注.) 题记:之前介绍过微软正在逐步出版一个名为Azure Essential的入门系列教程,最近刚 ...

  2. Windows Azure Web Site (7) Web Site配置

    <Windows Azure Platform 系列文章目录> 在上一章内容中,我们已经部署了Azure WebSite.我们可以在Web Site配置页面进行配置.如下图: 另外,我们还 ...

  3. 如何修改Windows Azure Web App的时区

    Windows Azure的时区默认使用UTC,如果是VM可以直接修改,但Azure Web Apps的隔离性导致我们无法进行设置.应用系统使用DateTime.Now的地方很多,不可能做出一一修改. ...

  4. 尝鲜一试,Azure静态网站应用服务(Azure Static Web Apps) 免费预览,协同Github自动发布静态SPA

    背景 最近在浏览微软的文档的时候发现,微软喜欢用Hugo这个文档框架,有些技术产品的文档页面就用Hugo来做的,同时搭配Github + Azure Static Web Apps Service这个 ...

  5. Microsoft Azure Web Sites应用与实践【2】—— 通过本地IIS 远程管理Microsoft Azure Web Site

    Microsoft Azure Web Sites应用与实践 系列: [1]—— 打造你的第一个Microsoft Azure Website [2]—— 通过本地IIS 远程管理Microsoft ...

  6. Windows Azure Web Site (1) 用户手册

    <Windows Azure Platform 系列文章目录> 下载地址: Web Apps用户手册

  7. Building Modern Web Apps-构建现代的 Web 应用程序

    Building Modern Web Apps-构建现代的 Web 应用程序 视频长度:1 小时左右 视频作者:Scott Hunter 和 Scott Hanselman 视频背景:Visual ...

  8. Java create azure web app

    create a certificate <java-install-dir>/bin/ keytool -genkey -alias <keystore-id> -keyst ...

  9. Microsoft Azure Web Sites应用与实践【4】—— Microsoft Azure网站的“后门”

    Microsoft Azure Web Sites应用与实践 系列: [1]—— 打造你的第一个Microsoft Azure Website [2]—— 通过本地IIS 远程管理Microsoft ...

随机推荐

  1. javac编译后运行提示找不到或无法加载主类

    第一种常见错误: package demo_01; public class hello { public static void main(String[] args) { System.out.p ...

  2. ORACLE 根据 sql_id 查询绑定变量的传入值

    查询当前查询: select b.NAME,b.POSITION,b.DATATYPE_STRING,b.VALUE_STRING,b.LAST_CAPTUREDfrom v$sql_bind_cap ...

  3. Java Spring Boot VS .NetCore (一)来一个简单的 Hello World

    系列文章 Java Spring Boot VS .NetCore (一)来一个简单的 Hello World Java Spring Boot VS .NetCore (二)实现一个过滤器Filte ...

  4. [转] Vue + Webpack 组件式开发(练习环境)

    前言 研究了下别人的 vue 多页面框架, 都是直接复制 package.json 文件,然后在本地 npm install 一下即可, 或者使用官网 vue-cli 工具生成一个项目, 觉得这样虽然 ...

  5. ABP给WebApi添加性能分析组件Miniprofiler

    在ABP的WebApi中,对其性能进行分析监测是很有必要的.而悲剧的是,MVC项目中可以使用的MiniProfiler或Glimpse等,这些都不支持WebApi项目,而且WebApi项目通常也没有界 ...

  6. Python学习(三十七)—— 模板语言之自定义filter和中间件

    一.模板语言之自定义filter 自定义filter文件存放位置 模板中自定义函数 - 在已注册的app中创建一个名字叫 templatetags 文件夹 - 任意创建一个py文件 - 创建名字交 r ...

  7. fillder--修改返回数据

    fillder面板中抓到想要的URL后: ①.在需要修改的url---右键------UNclocking For Editing(解除编辑功能) ②.承接上步,在数据结果的TextView模式下,返 ...

  8. python 爬虫与数据可视化--爬虫基础知识

    一.python中的模块 模块的安装:pip install 模块名 导入模块与函数:import requests . from pymongo import MongoClient json模块的 ...

  9. Android SQL数据库应用实践 “问题点”“疑难点”“解析”

    应用 Android SQL 数据库时,遇到的问题: 场景1:Android SQL查询后,获取到Cursor并查询数据:遇到以下问题:"android.database.CursorInd ...

  10. MyBatis入门(一)SqlSessionFactory

    (1)新建数据库 CREATE TABLE emp ( id INT ( 10 ) PRIMARY KEY auto_increment, last_name VARCHAR(255), gender ...