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. python之MySQL MySQLdb 推荐使用姿势,解决中文乱码

    0.目录 2.setup(1) 安装步骤,可以顺带安装mysql administrator和mysql query browser(2) 安装完毕,修改 my.ini(3) 重启 mysql 服务: ...

  2. ionic2项目中实现md5加密

    1. 安装插件 npm i ts-md5 --save 2. 在项目中引用 import { Md5 } from 'ts-md5/dist/md5'; ... ionViewDidLoad() { ...

  3. JS对象的拷贝

    1:对数据进行备份的时候,如果这个数据是基本的数据类型,那么很好办,通过赋值实现复制即可. 赋值与浅拷贝的区别 var obj1 = { 'name' : 'zhangsan', 'age' : '1 ...

  4. 一份详细的asyncio入门教程

    asyncio模块提供了使用协程构建并发应用的工具.它使用一种单线程单进程的的方式实现并发,应用的各个部分彼此合作, 可以显示的切换任务,一般会在程序阻塞I/O操作的时候发生上下文切换如等待读写文件, ...

  5. request请求携带证书,如:微信企业零钱付款

    const Promise = require('bluebird') const request = Promise.promisifyAll(require('request')) const w ...

  6. 新浪云SAE 关于部分函数不能使用的做法

    例如:file_put_contents("test.txt","Hello World. Testing!"); 可以这样写: file_put_conten ...

  7. day13_H5_CSS_2

    一.css样式引用优先级,最高的是标签中写的样式,一标签为基准,有内而外,有下到上依次应用 2.样式隐藏,插入小知识,宽度可以写百分比(如:100%就是宽度两边占满) 3.加大加粗 4.水平垂直居中 ...

  8. [LeetCode] Shortest Distance to a Character 到字符的最短距离

    Given a string S and a character C, return an array of integers representing the shortest distance f ...

  9. 双向数据绑定原生js

    let data = {} const input = document.getElementsByClassName('input')[0]; Object.defineProperty(data, ...

  10. if-else案例–开关灯

    首先,创建一个html页面,添加一个div盒子,用css设置相应的样式,用js获取盒子的元素,通过点击事件,设置body的背景颜色,用if..else来判断当什么状态设置相应的颜色,(swith... ...