[Azure][CLI][02]Basic OPS
#区域 浏览
azure vm location list
China East
China North
#云服务 浏览
azure service list
#云服务 创建
azure service create "T-BJ-OPS" --location "China North"
#存储账号 浏览
azure storage account list
azure storage account show sbjops01
https://management.core.chinacloudapi.cn/201516b6-6a40-43b5-92b2-b42105f5e8bb/services/storageservices/sbjops01
#存储账号 创建
azure storage account create "sbjops01" --type "LRS" --location "China North"
#虚拟网络 浏览
azure network vnet list
BJ-Vnet
SH-Vnet
#虚拟子网 浏览
azure network vnet subnet list "BJ-Vnet"
SubNetwork01
SubNetwork02
SubNetwork03
#虚拟机 浏览
azure vm list --dns-name "T-BJ-AD"
#虚拟机 删除
azure vm delete --blob-delete --quiet "T-BJ-OPS-01"
#虚拟机 镜像浏览
azure vm image list
f1179221e23b4dbb89e39d70e5bc9e72__OpenLogic-CentOS-73-20170104
55bc2b193643443bb879a78bda516fc8__Windows-Server-2016-Datacenter-20161213-zh.cn-127GB.vhd
55bc2b193643443bb879a78bda516fc8__Windows-Server-2012-Datacenter-20170111-zh.cn-127GB.vhd
#虚拟机 创建
azure vm create --userName "teld" --password "Teld@teld.cn1" --connect "T-BJ-OPS" --blob-url "https://sbjops01.blob.core.chinacloudapi.cn/vhds/T-BJ-OPS-01.vhd" --vm-size "Large" --vm-name "T-BJ-OPS-01" --rdp --virtual-network-name "BJ-Vnet" --subnet-names "SubNetwork01" --availability-set "T-BJ-OPS" "
55bc2b193643443bb879a78bda516fc8__Windows-Server-2016-Datacenter-20161213-zh.cn-127GB.vhd
azure vm create --userName "demouser" --password "demopassword" --connect "T-BJ-OPS" --blob-url "https://sbjops01.blob.core.chinacloudapi.cn/vhds/T-BJ-OPS-01.vhd" --vm-size "Large" --vm-name "T-BJ-OPS-01" --ssh --virtual-network-name "BJ-Vnet" --subnet-names "SubNetwork01" --availability-set "T-BJ-OPS" "f1179221e23b4dbb89e39d70e5bc9e72__OpenLogic-CentOS-73-20170104"
#终结点 浏览
azure vm endpoint list "T-BJ-OPS-01"
#终结点 创建
azure vm endpoint create --name "HTTP" --local-port "80" --protocol "TCP" "T-BJ-OPS-01" 80
#终结点 NLB 创建
azure vm endpoint create --name "HTTP8080" --local-port "8080" --protocol "TCP" --probe-port "8080" --probe-protocol "TCP" --load-balanced-set-name "HTTP8080" "T-BJ-OPS-01" 8080
#终结点 NLB 附加
azure vm endpoint set --probe-port "8081" --probe-protocol "TCP" --load-balanced-set-name "HTTP8081" "T-BJ-OPS-01" "HTTP8081"
#终结点 NLB 多条
azure vm endpoint create-multiple --endpoints-config <public-port>:<local-port>:<protocol>:<idle-timeout>:<direct-server-return>:<probe-protocol>:<probe-port>:<probe-path>:<probe-interval>:<probe-timeout>:<load-balanced-set-name>:<internal-load-balancer-name>:<load-balancer-distribution> <vm-name>
azure vm endpoint create-multiple --endpoints-config "8080":"8080":"TCP":::"TCP":"8080"::::"HTTP8080"::,"8081":"8081":"TCP":::"TCP":"8081"::::"HTTP8081":: "T-BJ-OPS-02"
#云服务 ILB 浏览
azure service internal-load-balancer list "T-SH-TK"
#云服务 ILB 创建
azure service internal-load-balancer add --serviceName "T-BJ-OPS" --internalLBName "ILB-BJ-OPS" --subnet-name "SubNetwork01" --static-virtualnetwork-ipaddress "192.168.0.250"
#终结点 ILB 创建
azure vm endpoint create --name "HTTP9000" --local-port "9000" --protocol "TCP" --probe-port "9000" --probe-protocol "TCP" --load-balanced-set-name "HTTP9000" --internal-load-balancer-name "ILB-BJ-OPS" "T-BJ-OPS-01" "9000"
#网络 固定外网IP 查看
azure network reserved-ip list
#网络 固定外网IP 创建
azure network reserved-ip create "t-bj-ops-ReservedIP" "China North"
#网络 固定内网IP 查看
azure vm static-ip show “T-BJ-AD-01”
#网络 固定内网IP 创建 (重启VM)
azure vm static-ip set "T-BJ-OPS-01" "192.168.0.59"