{"componentChunkName":"component---src-templates-blog-detail-tsx","path":"/blog/2021-01-04-jenkins","result":{"data":{"currentBlog":{"id":"f4a1a981-4264-5b35-962b-81080177ce9b","frontmatter":{"thumbnail":"https://main.qcloudimg.com/raw/0224e7668872267afcd65821e4640556.jpg","authors":["donghui"],"categories":["user-stories"],"date":"2021-01-04T00:00:00.000Z","title":"Jenkins + Serverless Framework 助力无服务器应用构建与部署","description":"本文将介绍如何使用 Jenkins 和 Serverless Framework 构建并部署 Serverless 应用","authorslink":["https://juejin.cn/post/6896656328974925832"],"translators":null,"translatorslink":null,"tags":["Serverless","Jenkins"],"keywords":null,"outdated":null},"wordCount":{"words":406,"sentences":73,"paragraphs":73},"fileAbsolutePath":"/opt/build/repo/content/blog/2021-01-04-jenkins.md","fields":{"slug":"/blog/2021-01-04-jenkins/","keywords":["java","nodejs","python","serverless","docker","插件","serverless","Jenkins","python","jenkins","nodejs","Docker"]},"html":"<p>近日，使用 Serverless 开发了一个应用。其中 CI/CD，是需要考虑的一个问题。这里用到了 Jenkins 和 Docker。并且 Jenkins Pipeline 运行在容器中。</p>\n<p>本文将介绍如何使用 Jenkins、Docker 和 Serverless Framework 构建并部署 Serverless 应用。</p>\n<h2 id=\"环境安装\"><a href=\"#%E7%8E%AF%E5%A2%83%E5%AE%89%E8%A3%85\" aria-label=\"环境安装 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>环境安装</h2>\n<p>需要安装的软件</p>\n<ul>\n<li>Docker</li>\n<li>Jenkins</li>\n<li>Serverless Framework</li>\n</ul>\n<p>笔者用的 MacBook，已经事先安装好了 Docker，并且由于从 DockerHub 下载镜像比较慢，为了加快镜像下载速度，设置了使用国内的 Docker 镜像源。</p>\n<p>Jenkins 有多种运行方式：</p>\n<ul>\n<li>jenkins.war  + Tomcat</li>\n<li>java -jar jenkins.war</li>\n<li>各种 linux 操作系统分发包（例如：rpm 包）</li>\n<li>Docker</li>\n<li>Kubernetes</li>\n<li>云厂商提供的解决方案</li>\n<li>…… </li>\n</ul>\n<p>笔者这里使用 Docker 运行 Jenkins，因为构建步骤也会运行在 Docker 中，需要将 docker.sock 和 docker 命令挂载到容器中，启动 jenkins 命令如下：</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">docker run -d -p 8080:8080 --name jenkins -e TZ=&quot;Asia/Shanghai&quot; -v jenkins_home:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock  -v $(which docker):$(which docker)  jenkins/jenkins:lts</code></pre></div>\n<p>注意：由于容器内 Jenkins 服务是由 jenkins 用户启动的，它无法访问 /var/run/docker.sock，因此我们需要更改这个文件的权限。 </p>\n<p><img src=\"https://oscimg.oschina.net/oscnet/e2ca604a-0f6f-4a60-b038-2a56100814dd.png\"></p>\n<p>在 Jenkins 启动后安装需要用到的插件：</p>\n<ul>\n<li>Localization: Chinese (Simplified) </li>\n<li>Git</li>\n<li>Pipeline</li>\n<li>Docker Pipeline</li>\n<li>Mask Passwords</li>\n</ul>\n<p>建议启动后只先安装 Localization: Chinese (Simplified)  插件（该插件由 Jenkins 中文社区维护）。</p>\n<p>等安装好 Localization: Chinese (Simplified)  插件，并设置好管理员账号后，再安装其他所需的插件。</p>\n<p><strong>为什么要这样做呢？</strong></p>\n<p>由于 Jenkins 插件服务器在国外，通常情况下因为网络问题，下载插件会比较慢，也经常会遇到插件下载失败的问题。</p>\n<p>为了解决这个痛点，Localization: Chinese (Simplified)  插件提供了使用国内 Jenkins 插件源的功能。</p>\n<p>因此，在安装好 Localization: Chinese (Simplified)  插件后，请立即设置使用国内的 Jenkins 插件源，这样之后其他插件的下载将变得快如闪电。 </p>\n<p><img src=\"https://oscimg.oschina.net/oscnet/b656fb16-c7c8-4889-ad56-6737214223fa.png\"></p>\n<h2 id=\"定制构建环境的-docker-镜像\"><a href=\"#%E5%AE%9A%E5%88%B6%E6%9E%84%E5%BB%BA%E7%8E%AF%E5%A2%83%E7%9A%84-docker-%E9%95%9C%E5%83%8F\" aria-label=\"定制构建环境的 docker 镜像 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>定制构建环境的 docker 镜像</h2>\n<p>本文使用 Serverless Framework 部署应用到腾讯云。在命令行中运行如下命令进行安装：</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">npm install -g serverless</code></pre></div>\n<p>serverless 命令行是使用 nodejs 开发的，所以会需要 nodejs 环境。此外，计划部署的应用是用 python 开发的，也会需要到 python 环境。</p>\n<p>应用构建部署是在 docker 容器中运行的，所以需要一个同时安装有 nodejs 和 python 的 docker 镜像。</p>\n<p>在 GitHub 上找到了 docker-python-nodejs 仓库：<a href=\"https://github.com/nikolaik/docker-python-nodejs%E3%80%82\">https://github.com/nikolaik/docker-python-nodejs。</a></p>\n<p>基于 nikolaik/python-nodejs 镜像构建了新镜像 python-nodejs-serverless，Dockerfile 如下：</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">FROM nikolaik/python-nodejs:python3.6-nodejs12\nRUN npm config set registry http://registry.npm.taobao.org&amp;&amp;npm install -g serverless</code></pre></div>\n<p>使用 docker build 命令构建镜像：</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">docker build -t python-nodejs-serverless .</code></pre></div>\n<h2 id=\"创建-jenkins-job-构建部署应用\"><a href=\"#%E5%88%9B%E5%BB%BA-jenkins-job-%E6%9E%84%E5%BB%BA%E9%83%A8%E7%BD%B2%E5%BA%94%E7%94%A8\" aria-label=\"创建 jenkins job 构建部署应用 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>创建 Jenkins Job 构建部署应用</h2>\n<p>创建一个 Pipeline 类型的 job，名称为：serverless-python-demo-pipeline，并开启参数化构建，增加两个密码参数：TENCENT<em>SECRET</em>ID 和 TENCENT<em>SECRET</em>KEY，用于自动登陆腾讯云。</p>\n<p><img src=\"https://oscimg.oschina.net/oscnet/c60f9bce-ccb8-4ec7-bc41-11c28ba6ff0d.png\"></p>\n<p>经过不断实践、不断完善，Jenkinsfile 最终内容如下：</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">pipeline {\n    agent {\n        docker { \n            image &#39;python-nodejs-serverless&#39; \n            args &#39;-e TZ=&quot;Asia/Shanghai&quot;&#39;\n        }\n    }\n    stages {\n        stage(&#39;Checkout&#39;) {\n            steps {\n                git branch: &#39;main&#39;, url: &#39;https://github.com/donhui/serverless-python-demo.git&#39;\n            }\n        }\n        stage(&#39;EnvSetUp&#39;) {\n            steps{\n                wrap([$class: &#39;MaskPasswordsBuildWrapper&#39;]) {\n                    sh &#39;touch .env&#39;\n                    sh &#39;echo TENCENT_SECRET_ID=${TENCENT_SECRET_ID} &gt;&gt; .env&#39;\n                    sh &#39;echo TENCENT_SECRET_KEY=${TENCENT_SECRET_KEY} &gt;&gt; .env&#39;\n                } \n            }\n        }\n        stage(&#39;Build&#39;) {\n            steps {\n                sh &#39;pip install -i https://pypi.douban.com/simple/ -r requirments.txt -t ./&#39;\n            }\n        }\n        stage(&#39;Deploy&#39;) {\n            steps {\n                sh &#39;serverless deploy&#39;\n            }\n        }\n    }\n    post{\n        always {\n                deleteDir()\n        }\n    }\n}</code></pre></div>\n<p>对于 Jenkinsfile 做如下说明：</p>\n<ul>\n<li>pipeline 由 agent 、stages 和 post 组成，其中 stages 下包括一系列 stage，而 stage 下又有 steps，steps 下则是一些指令</li>\n<li>\n<p>agent 为 docker 表示构建过程运行在 docker 容器中</p>\n<ul>\n<li>docker args 中 -u 0:0 表示以 root 用户运行 docker 容器，否则会出现一些权限问题</li>\n<li>docker args 中 TZ=\"Asia/Shanghai” 表示设置时区中国区，这样 serverless 命令行将会将应用部署到腾讯云，否则默认部署到 AWS</li>\n</ul>\n</li>\n<li>\n<p>stages 下包括多个 stage：Checkout、EnvSetUp、Build、Deploy</p>\n<ul>\n<li>Checkout 阶段用于检出代码，如果是私有仓库，还需要用到 Credentials 插件</li>\n<li>EnvSetUp 阶段用于生成 .env 文件，用于自动登录腾讯云，为了避免密码明文显示在控制台，这里用了 Mask Passwords 插件</li>\n<li>Build 阶段主要是用于构建，这里使用 pip 命令安装第三方库，其中用到了豆瓣的 python 源</li>\n<li>Deploy 阶段则是使用 serverless deploy 命令部署应用</li>\n</ul>\n</li>\n<li>post 用于 pipeline 或 stage 完成后执行后置操作，这里用来在 pipeline 完成后对工作区进行清理</li>\n</ul>\n<p>点击 Build With Parameters—>开始构建，运行 Job： </p>\n<p><img src=\"https://oscimg.oschina.net/oscnet/81240c23-5e5b-4462-ae0f-046b58e5bce7.png\"></p>\n<p>运行状态截图如下，从下图中可以看到每次构建各个 stage 的耗时：</p>\n<p><img src=\"https://oscimg.oschina.net/oscnet/381fbb5a-376e-453f-81fe-b557ffb36001.png\"></p>\n<p>查看 EnvSetUp stage 的日志，可以看到敏感信息已经被隐藏，保证了信息安全，这要归功于 Mask Passwords 插件： </p>\n<p><img src=\"https://oscimg.oschina.net/oscnet/349dc30b-6e43-4b36-863e-1fadde800995.png\"></p>\n<p>关于 Mask Passwords 插件的设置，在系统管理—>系统配置中，可以对 Mask Passwords 插件做一些全局设置，如下图所示： </p>\n<p><img src=\"https://oscimg.oschina.net/oscnet/b72d8500-b8b6-4080-baa6-26bafcbdcafe.png\"></p>\n<p>查看 Deploy 日志，可以看到部署成功的信息提示： </p>\n<p><img src=\"https://oscimg.oschina.net/oscnet/34af9a59-c6a7-44d5-bad3-8d955c6b6619.png\"></p>\n<p>打开应用控制台，serverless-python-demo 应用详细信息如下：</p>\n<p><img src=\"https://oscimg.oschina.net/oscnet/5f8dc55f-4253-4c4d-98d6-912a172c24f5.png\"></p>\n<h2 id=\"总结\"><a href=\"#%E6%80%BB%E7%BB%93\" aria-label=\"总结 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>总结</h2>\n<p>本文介绍了如何使用安装 Jenkins 及插件，如何定制构建环境的 Docker 镜像，并展开分析了 Jenkins Pipeline 的核心配置文件：Jenkinsfile。此外，还用到了 Mask Passwords 插件来隐藏敏感信息，保证了信息安全。</p>\n<p>本次实践使用 Jenkins + Docker 成功部署了 Serverless 应用，希望对看到这篇文章的读者带来一定的借鉴参考意义。 </p>\n<blockquote>\n<p><em>参考：</em></p>\n<ul>\n<li><a href=\"https://hackernoon.com/jenkins-docker-and-cicd-for-serverless-bw5p323d\">https://hackernoon.com/jenkins-docker-and-cicd-for-serverless-bw5p323d</a></li>\n<li><a href=\"https://github.com/nikolaik/docker-python-nodejs\">https://github.com/nikolaik/docker-python-nodejs</a></li>\n<li><a href=\"https://hub.docker.com/r/jenkins/jenkins\">https://hub.docker.com/r/jenkins/jenkins</a></li>\n<li><a href=\"https://github.com/jenkinsci/localization-zh-cn-plugin\">https://github.com/jenkinsci/localization-zh-cn-plugin</a></li>\n<li><a href=\"https://stackoverflow.com/questions/46659862/how-to-mask-a-password-field-in-jenkins-pipeline-project\">https://stackoverflow.com/questions/46659862/how-to-mask-a-password-field-in-jenkins-pipeline-project</a></li>\n<li><a href=\"https://www.jenkins.io/doc/book/pipeline/syntax/\">https://www.jenkins.io/doc/book/pipeline/syntax/</a></li>\n</ul>\n</blockquote>\n<hr>\n<hr>\n<div id='scf-deploy-iframe-or-md'></div>\n<hr>\n<blockquote>\n<p><strong>传送门：</strong></p>\n<ul>\n<li>GitHub: <a href=\"https://github.com/serverless/serverless/blob/master/README_CN.md\">github.com/serverless</a></li>\n<li>官网：<a href=\"https://serverless.com/\">serverless.com</a></li>\n</ul>\n</blockquote>\n<p>欢迎访问：<a href=\"https://serverlesscloud.cn/\">Serverless 中文网</a>，您可以在 <a href=\"https://serverlesscloud.cn/best-practice\">最佳实践</a> 里体验更多关于 Serverless 应用的开发！</p>","tableOfContents":"<ul>\n<li><a href=\"/blog/2021-01-04-jenkins/#%E7%8E%AF%E5%A2%83%E5%AE%89%E8%A3%85\">环境安装</a></li>\n<li><a href=\"/blog/2021-01-04-jenkins/#%E5%AE%9A%E5%88%B6%E6%9E%84%E5%BB%BA%E7%8E%AF%E5%A2%83%E7%9A%84-docker-%E9%95%9C%E5%83%8F\">定制构建环境的 docker 镜像</a></li>\n<li><a href=\"/blog/2021-01-04-jenkins/#%E5%88%9B%E5%BB%BA-jenkins-job-%E6%9E%84%E5%BB%BA%E9%83%A8%E7%BD%B2%E5%BA%94%E7%94%A8\">创建 Jenkins Job 构建部署应用</a></li>\n<li><a href=\"/blog/2021-01-04-jenkins/#%E6%80%BB%E7%BB%93\">总结</a></li>\n</ul>"},"previousBlog":{"id":"8c6c4641-f44e-5c54-bd00-79274bbd023e","frontmatter":{"thumbnail":"https://main.qcloudimg.com/raw/575428ce9eb5482d350ffc5e460b1ac2.jpg","authors":["ASW"],"categories":["news"],"date":"2021-01-22T00:00:00.000Z","title":"可视化编排云服务，工作流 ASW 开始公测！","description":"公测阶段免费提供服务，立即申请！","authorslink":null,"translators":null,"translatorslink":null,"tags":["Serverless","ASW"],"keywords":null,"outdated":null},"wordCount":{"words":157,"sentences":32,"paragraphs":32},"fileAbsolutePath":"/opt/build/repo/content/blog/2021-01-22-asw.md","fields":{"slug":"/blog/2021-01-22-asw/","keywords":["云函数","服务","编排","可视化","组件","模板","cos"]}},"nextBlog":{"id":"24fd0e11-1dfc-5de6-9f6d-87e17884087f","frontmatter":{"thumbnail":"https://main.qcloudimg.com/raw/90f04356cc057c88a5466fb379c2668b.jpg","authors":["Johann Schleier-Smith"],"categories":["engineering-culture"],"date":"2021-01-04T00:00:00.000Z","title":"伯克利谈 Serverless：服务器的存在，是云计算的大问题","description":"Johann 在 Techo 开发者大会 Serverless 分论坛发表的主题演讲","authorslink":null,"translators":null,"translatorslink":null,"tags":["Serverless","meetup"],"keywords":null,"outdated":null},"wordCount":{"words":765,"sentences":94,"paragraphs":93},"fileAbsolutePath":"/opt/build/repo/content/blog/2021-01-04-johann.md","fields":{"slug":"/blog/2021-01-04-johann/","keywords":["serverless","无服务器","云函数","云原生","image","byteimg","juejin","tos"]}},"recommendBlogs":{"edges":[{"node":{"id":"4300b21c-7209-5256-86ff-0d38e3daec9b","frontmatter":{"thumbnail":"https://main.qcloudimg.com/raw/14f1c8eed372e76c1b139703b2f6d0fa.jpg","authors":["KieranMcCarthy"],"categories":["user-stories","engineering-culture"],"date":"2018-01-09T00:00:00.000Z","title":"我是如何在四年时间里，从厨师转行为 Serverless 应用开发者","description":"我是厨师出身，现在成为了一名 Serverless 应用开发者。","authorslink":["https://serverless.com/author/kieranmccarthy/"],"translators":["Aceyclee"],"translatorslink":["https://www.zhihu.com/people/Aceyclee"],"tags":["应用开发","Serverless"],"keywords":"Serverless 应用开发,Serverless 管理,厨师转行为 Serverless 应用开发者","outdated":null},"wordCount":{"words":285,"sentences":38,"paragraphs":36},"fileAbsolutePath":"/opt/build/repo/content/blog/2018-01-09-from-chef-to-serverless-developer-in-4-years.md","fields":{"slug":"/blog/2018-01-09-from-chef-to-serverless-developer-in-4-years/","keywords":["无服务器","无服务器开发","云函数","学习","Serverless","构建","Framework","开发者","服务器","应用","学位","简历"]}}},{"node":{"id":"713a0563-4bf9-5721-bacb-3b4ef609fe4a","frontmatter":{"thumbnail":"https://s3-us-west-2.amazonaws.com/assets.blog.serverless.com/camp-fire/camp-fire-housing-thumb.jpg","authors":["EricWyne"],"categories":["guides-and-tutorials","user-stories"],"date":"2018-12-05T00:00:00.000Z","title":"Serverless Twitter 机器人帮助为坎普山火受灾者安置住房","description":"加利福尼亚州的坎普山火致使数千人流离失所，为此，我构建了一个简单的 Serverless Twitter 机器人来帮助将受灾者安置在临时住房！","authorslink":["https://serverless.com/author/ericwyne/"],"translators":["Aceyclee"],"translatorslink":["zhihu.com/people/Aceyclee"],"tags":null,"keywords":null,"outdated":null},"wordCount":{"words":157,"sentences":26,"paragraphs":26},"fileAbsolutePath":"/opt/build/repo/content/blog/2018-12-05-serverless-twitter-camp-fire.md","fields":{"slug":"/blog/2018-12-05-serverless-twitter-camp-fire/","keywords":["serverless","无服务器","云函数","Serverless","org","住房","Twitter","函数","受灾","机器人","山火"]}}},{"node":{"id":"98602143-b837-5f50-a24f-3b1ec76044d7","frontmatter":{"thumbnail":"https://s3-us-west-2.amazonaws.com/assets.blog.serverless.com/sqquid/sqquid-serverless-thumb.jpg","authors":["RonPeled"],"categories":["user-stories"],"date":"2018-12-17T00:00:00.000Z","title":"SQQUID：100% 无服务器初创公司","description":"SQQUID 将 AWS Lambda 和无服务器框架用于其核心产品和营销网站。我们来看看一个完全无服务器的初创公司是怎样的。","authorslink":null,"translators":null,"translatorslink":null,"tags":null,"keywords":null,"outdated":null},"wordCount":{"words":266,"sentences":42,"paragraphs":42},"fileAbsolutePath":"/opt/build/repo/content/blog/2018-12-17-sqquid-one-hundred-percent-serverless.md","fields":{"slug":"/blog/2018-12-17-sqquid-one-hundred-percent-serverless/","keywords":["go","serverless","无服务器","无服务器架构","服务器","架构","Lambda","集成","FaaS","串行","系统"]}}},{"node":{"id":"29dc2e58-d2ba-56f9-aee1-d21b0bc62e0e","frontmatter":{"thumbnail":"https://s3-us-west-2.amazonaws.com/assets.blog.serverless.com/ao-com-story/ao-serverless-thumbnail.png","authors":["NickGottlieb"],"categories":["user-stories"],"date":"2019-04-24T00:00:00.000Z","title":"AO.com：逐渐转向无服务器优先","description":"AO.com 的 SCV 团队率先尝试无服务器服务。折服于无服务器框架的快速周转时间和低维护成本，整个团队逐渐转向无服务器优先。","authorslink":null,"translators":null,"translatorslink":null,"tags":null,"keywords":null,"outdated":null},"wordCount":{"words":236,"sentences":42,"paragraphs":35},"fileAbsolutePath":"/opt/build/repo/content/blog/2019-04-24-ao-serverless-first.md","fields":{"slug":"/blog/2019-04-24-ao-serverless-first/","keywords":["serverless","无服务器","服务器","团队","Lambda","功能","构建"]}}},{"node":{"id":"752d08d1-387a-5bde-acf3-98141baab294","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/2020414/1586871710979-%E5%85%AC%E5%85%B1%E7%94%A8.png","authors":["Anycodes"],"categories":["user-stories"],"date":"2019-06-20T00:00:00.000Z","title":"如何用 Serverless 为 Python 云函数打包依赖","description":"在使用无服务器云函数SCF时通常会遇到导入第三方库的问题，很多小伙伴比较头疼是：应该如何打包进去？这里，推荐几个不错的方法。","authorslink":["https://zhuanlan.zhihu.com/ServerlessGo"],"translators":null,"translatorslink":null,"tags":["云函数","Serverless"],"keywords":"Serverless,Serverless应用,无服务器云函数","outdated":null},"wordCount":{"words":81,"sentences":43,"paragraphs":43},"fileAbsolutePath":"/opt/build/repo/content/blog/2019-06-20-for-python-cloud-functions.md","fields":{"slug":"/blog/2019-06-20-for-python-cloud-functions/","keywords":["java","serverless","无服务器","无服务器云函数","云函数","serverlesscloud","安装","serverless","pillowtest"]}}},{"node":{"id":"2dc78814-9d77-555b-a1bb-ad202c8ec2d1","frontmatter":{"thumbnail":"https://s3-us-west-2.amazonaws.com/assets.blog.serverless.com/cloudforecast/thumbnail.png","authors":["FrancoisLagier"],"categories":["user-stories"],"date":"2019-08-07T00:00:00.000Z","title":"Serverless：初创企业的理想选择？（CloudForecast 案例分析）","description":"CloudForecast 是 2018 年成立的一家独立初创企业，本文将介绍他们决定选择 Serverless 的原因。","authorslink":["https://serverless.com/author/francoislagier/"],"translators":["Aceyclee"],"translatorslink":["zhihu.com/people/Aceyclee"],"tags":null,"keywords":null,"outdated":null},"wordCount":{"words":211,"sentences":29,"paragraphs":29},"fileAbsolutePath":"/opt/build/repo/content/blog/2019-08-07-serverless-for-startups.md","fields":{"slug":"/blog/2019-08-07-serverless-for-startups/","keywords":["serverless","云函数","serverless","函数","Serverless","utm","Framework","blog","CloudForecast","cloudforecast"]}}},{"node":{"id":"97450b07-658b-5207-8216-1c7b9b51b115","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/2020114/1578988490344-v2-8b2cd2c5275aa2c5a3c5083a148a7a9f_1200x500.jpg","authors":["Anycodes"],"categories":["user-stories"],"date":"2019-09-01T00:00:00.000Z","title":"如何通过 Serverless 与自然语言处理，让搜索引擎「看」到你的博客","description":"Serverless 与自然语言处理结合的一个小应用","authorslink":["https://www.zhihu.com/people/liuyu-43-97"],"translators":null,"translatorslink":null,"tags":["个人博客","serverless"],"keywords":"Serverless 自然语言处理","outdated":null},"wordCount":{"words":106,"sentences":34,"paragraphs":34},"fileAbsolutePath":"/opt/build/repo/content/blog/2019-09-01-search-engine-blog.md","fields":{"slug":"/blog/2019-09-01-search-engine-blog/","keywords":["serverless","云函数","keywords","serverlesscloud","summary"]}}},{"node":{"id":"ae4fd2f8-515c-5aec-b584-38427ef33f7e","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/2020114/1578989800047-part-00492-780.jpg","authors":["Anycodes"],"categories":["guides-and-tutorials","user-stories"],"date":"2019-09-16T00:00:00.000Z","title":"突破传统 OJ 瓶颈，「判题姬」接入云函数","description":"通过 Serverless 实现在线编程","authorslink":["https://www.zhihu.com/people/liuyu-43-97"],"translators":null,"translatorslink":null,"tags":["在线编程","云函数"],"keywords":"Serverless 在线编程,Serverless OJ","outdated":null},"wordCount":{"words":169,"sentences":30,"paragraphs":30},"fileAbsolutePath":"/opt/build/repo/content/blog/2019-09-16-online-Judge.md","fields":{"slug":"/blog/2019-09-16-online-Judge/","keywords":["python","serverless","云函数","代码","函数","serverless"]}}}],"totalCount":64}},"pageContext":{"isCreatedByStatefulCreatePages":false,"blogId":"f4a1a981-4264-5b35-962b-81080177ce9b","previousBlogId":"8c6c4641-f44e-5c54-bd00-79274bbd023e","nextBlogId":"24fd0e11-1dfc-5de6-9f6d-87e17884087f","categories":["user-stories"]}}}