{"id":6230,"date":"2024-07-04T20:16:51","date_gmt":"2024-07-04T12:16:51","guid":{"rendered":"https:\/\/t.n-years.com\/?p=6230"},"modified":"2024-07-04T20:48:29","modified_gmt":"2024-07-04T12:48:29","slug":"azure-%e5%93%aa%e4%b8%aa%e4%ba%91%e6%9c%8d%e5%8a%a1%e5%8f%af%e4%bb%a5%e9%83%a8%e7%bd%b2-go-%e7%9a%84%e5%90%8e%e7%ab%af%e7%a8%8b%e5%ba%8f","status":"publish","type":"post","link":"https:\/\/t.n-years.com\/?p=6230","title":{"rendered":"Azure \u54ea\u4e2a\u4e91\u670d\u52a1\u53ef\u4ee5\u90e8\u7f72 go \u7684\u540e\u7aef\u7a0b\u5e8f"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u5fae\u8f6f Azure \u63d0\u4f9b\u591a\u79cd\u4e91\u670d\u52a1\uff0c\u53ef\u4ee5\u7528\u6765\u90e8\u7f72 Go \u7684\u540e\u7aef\u7a0b\u5e8f\u3002\u4ee5\u4e0b\u662f\u51e0\u4e2a\u9002\u5408\u7684\u670d\u52a1\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Azure App Service<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Azure App Service<\/strong> \u662f\u4e00\u4e2a\u5b8c\u5168\u6258\u7ba1\u7684\u5e73\u53f0\u5373\u670d\u52a1\uff08PaaS\uff09\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u5305\u62ec Go\u3002\u5b83\u7b80\u5316\u4e86\u90e8\u7f72\u3001\u7ba1\u7406\u548c\u6269\u5c55 Web \u5e94\u7528\u3001API \u548c\u79fb\u52a8\u540e\u7aef\u7684\u8fc7\u7a0b\u3002<\/li>\n\n\n\n<li><strong>\u4f18\u70b9<\/strong>\uff1a<\/li>\n\n\n\n<li>\u652f\u6301\u81ea\u52a8\u6269\u5c55\u548c\u8d1f\u8f7d\u5747\u8861\u3002<\/li>\n\n\n\n<li>\u63d0\u4f9b\u6301\u7eed\u96c6\u6210\u548c\u90e8\u7f72\uff08CI\/CD\uff09\u652f\u6301\u3002<\/li>\n\n\n\n<li>\u7b80\u5316\u4e86\u5e94\u7528\u7a0b\u5e8f\u7684\u7ba1\u7406\u548c\u76d1\u63a7\u3002<\/li>\n\n\n\n<li><strong>\u5982\u4f55\u4f7f\u7528<\/strong>\uff1a<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Azure App Service\u3002<\/li>\n\n\n\n<li>\u9009\u62e9\u8fd0\u884c\u65f6\u5806\u6808\u65f6\u9009\u62e9\u81ea\u5b9a\u4e49\u5bb9\u5668\uff08\u5982\u679c\u4f7f\u7528 Docker \u5bb9\u5668\uff09\u6216\u914d\u7f6e Go \u73af\u5883\u3002<\/li>\n\n\n\n<li>\u90e8\u7f72\u60a8\u7684 Go \u5e94\u7528\u7a0b\u5e8f\u4ee3\u7801\uff0c\u53ef\u4ee5\u901a\u8fc7 Git\u3001FTP \u6216 Docker \u5bb9\u5668\u7b49\u65b9\u5f0f\u8fdb\u884c\u90e8\u7f72\u3002<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">2. Azure Kubernetes Service (AKS)<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Azure Kubernetes Service (AKS)<\/strong> \u662f\u4e00\u4e2a\u6258\u7ba1\u7684 Kubernetes \u670d\u52a1\uff0c\u9002\u5408\u9700\u8981\u9ad8\u53ef\u7528\u6027\u548c\u53ef\u6269\u5c55\u6027\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/li>\n\n\n\n<li><strong>\u4f18\u70b9<\/strong>\uff1a<\/li>\n\n\n\n<li>\u5b8c\u5168\u6258\u7ba1\u7684 Kubernetes \u96c6\u7fa4\uff0c\u7b80\u5316\u4e86 Kubernetes \u7684\u64cd\u4f5c\u548c\u7ba1\u7406\u3002<\/li>\n\n\n\n<li>\u63d0\u4f9b\u81ea\u52a8\u6269\u5c55\u3001\u8d1f\u8f7d\u5747\u8861\u548c\u6301\u7eed\u96c6\u6210\/\u6301\u7eed\u4ea4\u4ed8\uff08CI\/CD\uff09\u652f\u6301\u3002<\/li>\n\n\n\n<li>\u9ad8\u5ea6\u53ef\u6269\u5c55\uff0c\u9002\u5408\u5927\u89c4\u6a21\u5e94\u7528\u7a0b\u5e8f\u7684\u90e8\u7f72\u3002<\/li>\n\n\n\n<li><strong>\u5982\u4f55\u4f7f\u7528<\/strong>\uff1a<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 AKS \u96c6\u7fa4\u3002<\/li>\n\n\n\n<li>\u6784\u5efa\u548c\u63a8\u9001 Go \u5e94\u7528\u7a0b\u5e8f\u7684 Docker \u955c\u50cf\u5230 Azure \u5bb9\u5668\u6ce8\u518c\u8868\uff08ACR\uff09\u6216 Docker Hub\u3002<\/li>\n\n\n\n<li>\u90e8\u7f72\u5bb9\u5668\u5230 AKS \u96c6\u7fa4\uff0c\u53ef\u4ee5\u4f7f\u7528 Helm \u6216 Kubernetes \u6e05\u5355\u6587\u4ef6\u3002<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">3. Azure Functions<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Azure Functions<\/strong> \u662f\u4e00\u4e2a\u65e0\u670d\u52a1\u5668\u8ba1\u7b97\u5e73\u53f0\uff0c\u652f\u6301\u4e8b\u4ef6\u9a71\u52a8\u7684\u67b6\u6784\uff0c\u975e\u5e38\u9002\u5408\u6784\u5efa\u5fae\u670d\u52a1\u548c\u5904\u7406\u77ed\u6682\u4efb\u52a1\u3002<\/li>\n\n\n\n<li><strong>\u4f18\u70b9<\/strong>\uff1a<\/li>\n\n\n\n<li>\u65e0\u9700\u7ba1\u7406\u670d\u52a1\u5668\uff0c\u6309\u9700\u6269\u5c55\u3002<\/li>\n\n\n\n<li>\u652f\u6301\u591a\u79cd\u89e6\u53d1\u5668\u548c\u7ed1\u5b9a\uff08\u5982 HTTP \u89e6\u53d1\u5668\u3001\u5b9a\u65f6\u89e6\u53d1\u5668\u7b49\uff09\u3002<\/li>\n\n\n\n<li>\u63d0\u4f9b\u7b80\u5316\u7684\u5f00\u53d1\u548c\u90e8\u7f72\u4f53\u9a8c\u3002<\/li>\n\n\n\n<li><strong>\u5982\u4f55\u4f7f\u7528<\/strong>\uff1a<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Azure Functions \u5e94\u7528\u3002<\/li>\n\n\n\n<li>\u914d\u7f6e\u51fd\u6570\u5e94\u7528\u4ee5\u652f\u6301 Go \u8fd0\u884c\u65f6\u3002<\/li>\n\n\n\n<li>\u90e8\u7f72 Go \u4ee3\u7801\uff0c\u53ef\u4ee5\u901a\u8fc7 Azure CLI \u6216\u8005 VS Code \u7b49\u5de5\u5177\u8fdb\u884c\u90e8\u7f72\u3002<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">4. Azure Virtual Machines<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Azure Virtual Machines (VMs)<\/strong> \u63d0\u4f9b\u4e86\u7075\u6d3b\u7684\u865a\u62df\u673a\u89e3\u51b3\u65b9\u6848\uff0c\u9002\u5408\u9700\u8981\u5b8c\u5168\u63a7\u5236\u64cd\u4f5c\u7cfb\u7edf\u548c\u8f6f\u4ef6\u5806\u6808\u7684\u5e94\u7528\u3002<\/li>\n\n\n\n<li><strong>\u4f18\u70b9<\/strong>\uff1a<\/li>\n\n\n\n<li>\u5b8c\u5168\u63a7\u5236\u548c\u81ea\u5b9a\u4e49 VM \u73af\u5883\u3002<\/li>\n\n\n\n<li>\u9002\u7528\u4e8e\u9700\u8981\u7279\u5b9a\u64cd\u4f5c\u7cfb\u7edf\u914d\u7f6e\u6216\u81ea\u5b9a\u4e49\u8f6f\u4ef6\u7684\u5e94\u7528\u3002<\/li>\n\n\n\n<li>\u53ef\u4ee5\u9009\u62e9\u4e0d\u540c\u89c4\u683c\u548c\u64cd\u4f5c\u7cfb\u7edf\u7684\u865a\u62df\u673a\uff0c\u6ee1\u8db3\u4e0d\u540c\u7684\u6027\u80fd\u548c\u6210\u672c\u9700\u6c42\u3002<\/li>\n\n\n\n<li><strong>\u5982\u4f55\u4f7f\u7528<\/strong>\uff1a<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Azure \u865a\u62df\u673a\uff0c\u9009\u62e9\u9002\u5408\u7684\u64cd\u4f5c\u7cfb\u7edf\uff08\u5982 Ubuntu \u6216 Windows\uff09\u3002<\/li>\n\n\n\n<li>\u901a\u8fc7 SSH \u6216 RDP \u8fde\u63a5\u5230\u865a\u62df\u673a\uff0c\u5b89\u88c5 Go \u73af\u5883\u548c\u6240\u9700\u7684\u4f9d\u8d56\u3002<\/li>\n\n\n\n<li>\u90e8\u7f72\u548c\u8fd0\u884c Go \u5e94\u7528\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u4f7f\u7528\u5e38\u89c1\u7684\u90e8\u7f72\u5de5\u5177\u548c\u811a\u672c\u3002<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u9009\u62e9\u5efa\u8bae<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5982\u679c\u5e0c\u671b\u5feb\u901f\u7b80\u4fbf\u5730\u90e8\u7f72\u548c\u7ba1\u7406 Go \u540e\u7aef\u5e94\u7528\uff0c<strong>Azure App Service<\/strong> \u662f\u4e00\u4e2a\u5f88\u597d\u7684\u9009\u62e9\u3002<\/li>\n\n\n\n<li>\u5982\u679c\u9700\u8981\u9ad8\u5ea6\u53ef\u6269\u5c55\u6027\u548c\u7075\u6d3b\u6027\uff0c\u5e76\u4e14\u719f\u6089\u5bb9\u5668\u5316\u6280\u672f\uff0c<strong>Azure Kubernetes Service (AKS)<\/strong> \u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u9009\u9879\u3002<\/li>\n\n\n\n<li>\u5982\u679c\u5e94\u7528\u7a0b\u5e8f\u662f\u4e8b\u4ef6\u9a71\u52a8\u7684\u5e76\u4e14\u4e0d\u9700\u8981\u957f\u65f6\u95f4\u8fd0\u884c\uff0c<strong>Azure Functions<\/strong> \u662f\u4e00\u4e2a\u65e0\u670d\u52a1\u5668\u8ba1\u7b97\u7684\u597d\u9009\u62e9\u3002<\/li>\n\n\n\n<li>\u5982\u679c\u9700\u8981\u5b8c\u5168\u63a7\u5236\u548c\u81ea\u5b9a\u4e49\u73af\u5883\uff0c<strong>Azure Virtual Machines<\/strong> \u63d0\u4f9b\u4e86\u6700\u5927\u7684\u7075\u6d3b\u6027\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u6839\u636e\u5177\u4f53\u9700\u6c42\u548c\u5e94\u7528\u7684\u7279\u6027\u9009\u62e9\u9002\u5408\u7684 Azure \u670d\u52a1\uff0c\u53ef\u4ee5\u786e\u4fdd\u90e8\u7f72\u7684 Go \u540e\u7aef\u7a0b\u5e8f\u5728\u6027\u80fd\u548c\u53ef\u6269\u5c55\u6027\u65b9\u9762\u8fbe\u5230\u6700\u4f73\u6548\u679c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5fae\u8f6f Azure \u63d0\u4f9b\u591a\u79cd\u4e91\u670d\u52a1\uff0c\u53ef\u4ee5\u7528\u6765\u90e8\u7f72 Go \u7684\u540e\u7aef\u7a0b\u5e8f\u3002\u4ee5\u4e0b\u662f\u51e0\u4e2a\u9002\u5408\u7684\u670d\u52a1\uff1a 1. Azure A&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/t.n-years.com\/?p=6230\">\u9605\u8bfb\u66f4\u591a<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[103],"class_list":["post-6230","post","type-post","status-publish","format-standard","hentry","category-5","tag-103"],"_links":{"self":[{"href":"https:\/\/t.n-years.com\/index.php?rest_route=\/wp\/v2\/posts\/6230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/t.n-years.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/t.n-years.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/t.n-years.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/t.n-years.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6230"}],"version-history":[{"count":2,"href":"https:\/\/t.n-years.com\/index.php?rest_route=\/wp\/v2\/posts\/6230\/revisions"}],"predecessor-version":[{"id":6232,"href":"https:\/\/t.n-years.com\/index.php?rest_route=\/wp\/v2\/posts\/6230\/revisions\/6232"}],"wp:attachment":[{"href":"https:\/\/t.n-years.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/t.n-years.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/t.n-years.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}