{"id":10020671,"date":"2025-03-17T21:46:45","date_gmt":"2025-03-17T13:46:45","guid":{"rendered":"https:\/\/itmax.cn\/?p=10020671"},"modified":"2025-03-17T21:46:45","modified_gmt":"2025-03-17T13:46:45","slug":"%e5%a6%82%e4%bd%95%e5%87%8f%e5%b0%91%e8%b7%a8%e5%9b%a2%e9%98%9f%e4%ba%a4%e4%bb%98%e6%91%a9%e6%93%a6%ef%bc%9f-%e5%9f%ba%e4%ba%8e-devops-%e4%b8%8e%e6%95%8f%e6%8d%b7%e7%9a%84%e6%9c%80","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10020671","title":{"rendered":"\u5982\u4f55\u51cf\u5c11\u8de8\u56e2\u961f\u4ea4\u4ed8\u6469\u64e6\uff1f\u2014\u2014\u57fa\u4e8e DevOps \u4e0e\u654f\u6377\u7684\u6700\u4f73\u5b9e\u8df5"},"content":{"rendered":"<h2>\u6458\u8981<\/h2>\n<p>\u5728\u73b0\u4ee3\u8f6f\u4ef6\u5f00\u53d1\u4e2d\uff0c\u8de8\u56e2\u961f\u534f\u4f5c\u7684\u6311\u6218\u4e3b\u8981\u4f53\u73b0\u5728\u00a0<strong>\u9700\u6c42\u53d8\u66f4\u3001\u6d4b\u8bd5\u73af\u5883\u4e0d\u5339\u914d\u3001\u6c9f\u901a\u4e0d\u7545<\/strong>\uff0c\u8fd9\u4e9b\u95ee\u9898\u5f80\u5f80\u5bfc\u81f4\u4ea4\u4ed8\u5ef6\u8fdf\u3002\u672c\u6587\u5c06\u63a2\u8ba8\u5982\u4f55\u901a\u8fc7\u00a0<strong>DevOps\u3001Scrum \u4ee5\u53ca\u534f\u4f5c\u6587\u6863<\/strong>\u00a0\u6765\u63d0\u5347\u8de8\u56e2\u961f\u534f\u4f5c\u6548\u7387\uff0c\u5e76\u63d0\u4f9b\u00a0<strong>\u53ef\u8fd0\u884c\u7684 Demo \u4ee3\u7801\u6a21\u5757<\/strong>\uff0c\u5e2e\u52a9\u8bfb\u8005\u843d\u5730\u6700\u4f73\u5b9e\u8df5\u3002<\/p>\n<h2>\u5f15\u8a00<\/h2>\n<p>\u5728\u4f01\u4e1a\u8f6f\u4ef6\u5f00\u53d1\u4e2d\uff0c\u4ea7\u54c1\u3001\u5f00\u53d1\u3001\u6d4b\u8bd5\u3001\u8fd0\u7ef4\u3001\u8bbe\u8ba1\u56e2\u961f\u4e4b\u95f4\u7684\u4ea4\u4ed8\u6469\u64e6\u662f\u5e38\u89c1\u95ee\u9898\u3002\u9020\u6210\u8fd9\u4e9b\u6469\u64e6\u7684\u6838\u5fc3\u539f\u56e0\u5305\u62ec\uff1a<\/p>\n<ol>\n<li><strong>\u9700\u6c42\u53d8\u66f4\u9891\u7e41<\/strong>\uff1a\u9700\u6c42\u6587\u6863\u672a\u540c\u6b65\uff0c\u5f00\u53d1\u4e0e\u4ea7\u54c1\u7406\u89e3\u504f\u5dee\u3002<\/li>\n<li><strong>\u6d4b\u8bd5\u73af\u5883\u4e0d\u5339\u914d<\/strong>\uff1a\u6d4b\u8bd5\u73af\u5883\u4e0e\u751f\u4ea7\u73af\u5883\u4e0d\u4e00\u81f4\uff0cBug \u590d\u73b0\u56f0\u96be\u3002<\/li>\n<li><strong>\u6c9f\u901a\u4e0d\u7545<\/strong>\uff1a\u56e2\u961f\u76ee\u6807\u4e0d\u4e00\u81f4\uff0c\u4fe1\u606f\u6d41\u901a\u53d7\u963b\u3002<\/li>\n<\/ol>\n<p>\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\uff0c\u6211\u4eec\u9700\u8981\u4ece\u00a0<strong>\u65b9\u6cd5\u8bba\uff08Scrum\u3001DevOps\uff09<\/strong>\u3001<strong>\u6280\u672f\u624b\u6bb5\uff08CI\/CD\u3001\u81ea\u52a8\u5316\u6d4b\u8bd5\uff09<\/strong>\u00a0\u548c\u00a0<strong>\u534f\u4f5c\u5de5\u5177\uff08\u534f\u4f5c\u6587\u6863\u3001API \u5408\u7ea6\uff09<\/strong>\u00a0\u4e09\u4e2a\u65b9\u9762\u5165\u624b\uff0c\u6784\u5efa\u9ad8\u6548\u7684\u8de8\u56e2\u961f\u534f\u4f5c\u4f53\u7cfb\u3002<\/p>\n<h2>\u91c7\u7528\u654f\u6377\u65b9\u6cd5\u51cf\u5c11\u9700\u6c42\u53d8\u66f4\u7684\u5f71\u54cd<\/h2>\n<h3>\u91c7\u7528 Scrum \u8fdb\u884c\u9700\u6c42\u7ba1\u7406<\/h3>\n<p>Scrum \u662f\u4e00\u79cd\u654f\u6377\u5f00\u53d1\u6846\u67b6\uff0c\u5b83\u901a\u8fc7\u00a0<strong>\u8fed\u4ee3\u5f00\u53d1\u3001\u6bcf\u65e5\u7ad9\u4f1a\u3001\u56de\u987e\u4f1a\u8bae<\/strong>\u00a0\u7b49\u65b9\u5f0f\uff0c\u4f7f\u9700\u6c42\u53d8\u66f4\u53ef\u63a7\uff0c\u5e76\u63d0\u9ad8\u56e2\u961f\u900f\u660e\u5ea6\u3002<\/p>\n<p><strong>\u5173\u952e\u5b9e\u8df5\uff1a<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u4ea7\u54c1\u9700\u6c42\u8bc4\u5ba1\uff08Backlog Grooming\uff09<\/strong><\/p>\n<ul>\n<li>\u7531\u4ea7\u54c1\u7ecf\u7406\u3001\u5f00\u53d1\u3001\u6d4b\u8bd5\u5171\u540c\u53c2\u4e0e\uff0c\u786e\u4fdd\u9700\u6c42\u7406\u89e3\u4e00\u81f4\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u7528\u6237\u6545\u4e8b\u62c6\u89e3<\/strong><\/p>\n<ul>\n<li>\u91c7\u7528\u00a0<strong>INVEST \u539f\u5219<\/strong>\uff08\u72ec\u7acb\u3001\u53ef\u534f\u5546\u3001\u53ef\u6d4b\u8bd5\u7b49\uff09\u62c6\u89e3\u9700\u6c42\uff0c\u4f7f\u5f00\u53d1\u66f4\u5177\u53ef\u884c\u6027\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u5b9a\u4e49\u5b8c\u6210\u6807\u51c6\uff08Definition of Done, DoD\uff09<\/strong><\/p>\n<ul>\n<li>\u786e\u4fdd\u4ea4\u4ed8\u7684\u8f6f\u4ef6\u8fbe\u5230\u65e2\u5b9a\u8d28\u91cf\u8981\u6c42\uff0c\u5982\u4ee3\u7801\u8bc4\u5ba1\u3001\u81ea\u52a8\u5316\u6d4b\u8bd5\u901a\u8fc7\u3001\u6587\u6863\u66f4\u65b0\u7b49\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Scrum \u4efb\u52a1\u7ba1\u7406\u5de5\u5177<\/h3>\n<p>\u4f7f\u7528\u00a0<strong>Jira API<\/strong>\u00a0\u521b\u5efa\u4e00\u4e2a\u81ea\u52a8\u540c\u6b65\u4efb\u52a1\u72b6\u6001\u7684\u811a\u672c\uff0c\u907f\u514d\u624b\u52a8\u540c\u6b65\u5e26\u6765\u7684\u6c9f\u901a\u6210\u672c\u3002<\/p>\n<pre><code class=\"python\">import requests\n\nJIRA_URL = &quot;https:\/\/your-jira-instance.atlassian.net\/rest\/api\/3\/issue&quot;\nJIRA_AUTH = (&quot;email@example.com&quot;, &quot;your-api-token&quot;)\n\ndef update_jira_status(issue_id, status):\n    &quot;&quot;&quot; \u66f4\u65b0 Jira \u4efb\u52a1\u72b6\u6001 &quot;&quot;&quot;\n    payload = {\n        &quot;fields&quot;: {\n            &quot;status&quot;: {&quot;name&quot;: status}\n        }\n    }\n    response = requests.put(f&quot;{JIRA_URL}\/{issue_id}&quot;, json=payload, auth=JIRA_AUTH)\n    return response.json()\n\n# \u793a\u4f8b\uff1a\u5c06\u4efb\u52a1 &quot;TEST-123&quot; \u6807\u8bb0\u4e3a &quot;In Progress&quot;\nprint(update_jira_status(&quot;TEST-123&quot;, &quot;In Progress&quot;))<\/code><\/pre>\n<h2>\u901a\u8fc7 DevOps \u4fdd\u969c\u73af\u5883\u4e00\u81f4\u6027<\/h2>\n<h3>\u57fa\u7840\u8bbe\u65bd\u5373\u4ee3\u7801\uff08Infrastructure as Code, IaC\uff09<\/h3>\n<p>\u6d4b\u8bd5\u73af\u5883\u4e0e\u751f\u4ea7\u73af\u5883\u4e0d\u5339\u914d\u662f\u5bfc\u81f4 Bug \u590d\u73b0\u56f0\u96be\u7684\u4e3b\u8981\u539f\u56e0\u3002\u4f7f\u7528\u00a0<strong>Terraform<\/strong>\u00a0\u6216\u00a0<strong>Docker Compose<\/strong>\u00a0\u8fdb\u884c\u73af\u5883\u7ba1\u7406\uff0c\u53ef\u786e\u4fdd\u73af\u5883\u4e00\u81f4\u3002<\/p>\n<h3>\u4f7f\u7528 Docker Compose \u521b\u5efa\u7edf\u4e00\u5f00\u53d1\/\u6d4b\u8bd5\u73af\u5883<\/h3>\n<pre><code class=\"yaml\">version: '3'\nservices:\n  app:\n    image: my-app:latest\n    ports:\n      - &quot;5000:5000&quot;\n    environment:\n      - ENV=staging\n  db:\n    image: postgres:13\n    environment:\n      - POSTGRES_USER=admin\n      - POSTGRES_PASSWORD=secret<\/code><\/pre>\n<p><strong>\u5e94\u7528\u573a\u666f<\/strong>\uff1a<\/p>\n<ul>\n<li>\u5f00\u53d1\u4eba\u5458\u5728\u672c\u5730\u8fd0\u884c\u00a0<code>docker-compose up<\/code>\uff0c\u73af\u5883\u5373\u4e0e\u6d4b\u8bd5\/\u751f\u4ea7\u4fdd\u6301\u4e00\u81f4\u3002<\/li>\n<li>\u907f\u514d\u201c\u672c\u5730\u8fd0\u884c\u6ca1\u95ee\u9898\uff0c\u6d4b\u8bd5\u73af\u5883\u6302\u6389\u201d\u7684\u60c5\u51b5\u3002<\/li>\n<\/ul>\n<h3>CI\/CD \u5b9e\u73b0\u81ea\u52a8\u5316\u90e8\u7f72<\/h3>\n<p>\u4f7f\u7528\u00a0<strong>GitHub Actions \u6216 GitLab CI\/CD<\/strong>\u00a0\u8fdb\u884c\u81ea\u52a8\u5316\u6784\u5efa\u3001\u6d4b\u8bd5\u548c\u90e8\u7f72\u3002\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"yaml\">name: CI\/CD Pipeline\n\non:\n  push:\n    branches:\n      - main\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - name: \u62c9\u53d6\u4ee3\u7801\n        uses: actions\/checkout@v3\n\n      - name: \u6784\u5efa Docker \u955c\u50cf\n        run: docker build -t my-app:latest .\n\n      - name: \u8fd0\u884c\u5355\u5143\u6d4b\u8bd5\n        run: docker run --rm my-app pytest<\/code><\/pre>\n<p><strong>\u5173\u952e\u6536\u76ca<\/strong>\uff1a<\/p>\n<ul>\n<li><strong>\u81ea\u52a8\u5316\u6d4b\u8bd5<\/strong>\u00a0\u786e\u4fdd\u4ee3\u7801\u53d8\u66f4\u4e0d\u4f1a\u5f15\u5165\u65b0\u95ee\u9898\u3002<\/li>\n<li><strong>\u81ea\u52a8\u90e8\u7f72<\/strong>\u00a0\u8ba9\u5f00\u53d1\u3001\u6d4b\u8bd5\u3001\u8fd0\u7ef4\u56e2\u961f\u5171\u4eab\u540c\u4e00\u73af\u5883\uff0c\u51cf\u5c11\u624b\u52a8\u64cd\u4f5c\u8bef\u5dee\u3002<\/li>\n<\/ul>\n<h2>\u901a\u8fc7\u534f\u4f5c\u6587\u6863\u63d0\u5347\u6c9f\u901a\u6548\u7387<\/h2>\n<h3>API \u5408\u7ea6\uff08Contract-First API Development\uff09<\/h3>\n<p>\u4e0d\u540c\u56e2\u961f\u5728 API \u5f00\u53d1\u4e0a\u5bb9\u6613\u4ea7\u751f\u7406\u89e3\u504f\u5dee\uff0c\u5bfc\u81f4\u8054\u8c03\u56f0\u96be\u3002\u91c7\u7528\u00a0<strong>API \u5408\u7ea6<\/strong>\uff08\u5982 OpenAPI \u89c4\u8303\uff09\u53ef\u786e\u4fdd\u4ea7\u54c1\u3001\u524d\u7aef\u3001\u540e\u7aef\u3001\u6d4b\u8bd5\u56e2\u961f\u5bf9 API \u4e00\u81f4\u7406\u89e3\u3002<\/p>\n<h3>\u5b9a\u4e49 OpenAPI \u6587\u6863<\/h3>\n<pre><code class=\"yaml\">openapi: 3.0.0\ninfo:\n  title: User API\n  version: 1.0.0\npaths:\n  \/users\/{id}:\n    get:\n      summary: \u83b7\u53d6\u7528\u6237\u4fe1\u606f\n      parameters:\n        - name: id\n          in: path\n          required: true\n          schema:\n            type: integer\n      responses:\n        '200':\n          description: \u6210\u529f\n          content:\n            application\/json:\n              schema:\n                type: object\n                properties:\n                  id:\n                    type: integer\n                  name:\n                    type: string<\/code><\/pre>\n<p><strong>\u6536\u76ca<\/strong>\uff1a<\/p>\n<ul>\n<li>\u5f00\u53d1\u524d\uff0c\u524d\u540e\u7aef\u56e2\u961f\u660e\u786e API \u89c4\u8303\uff0c\u51cf\u5c11\u6c9f\u901a\u6210\u672c\u3002<\/li>\n<li>\u6d4b\u8bd5\u56e2\u961f\u53ef\u57fa\u4e8e\u8be5\u6587\u6863\u7f16\u5199\u81ea\u52a8\u5316\u6d4b\u8bd5\u3002<\/li>\n<\/ul>\n<h2>QA \u73af\u8282<\/h2>\n<h3>\u9700\u6c42\u53d8\u66f4\u540e\uff0c\u5982\u4f55\u786e\u4fdd\u5f00\u53d1\u56e2\u961f\u53ca\u65f6\u54cd\u5e94\uff1f<\/h3>\n<ul>\n<li>\u91c7\u7528\u00a0<strong>Scrum Sprint Review<\/strong>\u00a0\u4f1a\u8bae\uff0c\u4ea7\u54c1\u56e2\u961f\u63d0\u524d\u901a\u77e5\u53ef\u80fd\u7684\u53d8\u66f4\u3002<\/li>\n<li>\u9700\u6c42\u53d8\u66f4\u5fc5\u987b\u66f4\u65b0\u5230\u00a0<strong>Jira\/Confluence<\/strong>\uff0c\u5f00\u53d1\u4eba\u5458\u53ef\u53ca\u65f6\u540c\u6b65\u3002<\/li>\n<\/ul>\n<h3>\u5982\u4f55\u9632\u6b62\u6d4b\u8bd5\u73af\u5883\u4e0e\u751f\u4ea7\u73af\u5883\u4e0d\u4e00\u81f4\uff1f<\/h3>\n<ul>\n<li>\u4f7f\u7528\u00a0<strong>Docker\/Kubernetes<\/strong>\u00a0\u7edf\u4e00\u73af\u5883\u7ba1\u7406\u3002<\/li>\n<li>\u91c7\u7528\u00a0<strong>IaC\uff08Terraform\/Ansible\uff09<\/strong>\u00a0\u786e\u4fdd\u57fa\u7840\u8bbe\u65bd\u4e00\u81f4\u6027\u3002<\/li>\n<\/ul>\n<h3>\u5982\u4f55\u4f18\u5316\u8de8\u56e2\u961f\u7684\u6c9f\u901a\uff1f<\/h3>\n<ul>\n<li>\u91c7\u7528\u00a0<strong>API \u5408\u7ea6<\/strong>\uff0c\u786e\u4fdd\u524d\u540e\u7aef\u56e2\u961f\u5bf9\u63a5\u53e3\u7406\u89e3\u4e00\u81f4\u3002<\/li>\n<li>\u4f7f\u7528\u00a0<strong>\u534f\u4f5c\u5de5\u5177<\/strong>\uff08\u5982 Notion\u3001Confluence\uff09\u7ef4\u62a4\u6700\u65b0\u9700\u6c42\u3002<\/li>\n<\/ul>\n<h2>\u603b\u7ed3<\/h2>\n<p>\u51cf\u5c11\u8de8\u56e2\u961f\u4ea4\u4ed8\u6469\u64e6\uff0c\u9700\u8981\u4ece\u00a0<strong>\u6d41\u7a0b\u4f18\u5316\u3001\u81ea\u52a8\u5316\u5de5\u5177\u3001\u534f\u4f5c\u65b9\u5f0f<\/strong>\u00a0\u4e09\u4e2a\u7ef4\u5ea6\u5165\u624b\uff1a<\/p>\n<ol>\n<li><strong>Scrum \u8fed\u4ee3\u5f00\u53d1<\/strong>\u00a0\u63a7\u5236\u9700\u6c42\u53d8\u66f4\u5f71\u54cd\u3002<\/li>\n<li><strong>DevOps CI\/CD<\/strong>\u00a0\u786e\u4fdd\u73af\u5883\u4e00\u81f4\uff0c\u51cf\u5c11\u4eba\u4e3a\u9519\u8bef\u3002<\/li>\n<li><strong>API \u5408\u7ea6\u4e0e\u534f\u4f5c\u6587\u6863<\/strong>\u00a0\u8ba9\u56e2\u961f\u4fe1\u606f\u540c\u6b65\uff0c\u907f\u514d\u6c9f\u901a\u969c\u788d\u3002<\/li>\n<\/ol>\n<h2>\u53c2\u8003\u8d44\u6599<\/h2>\n<ol>\n<li><strong>Scrum \u6307\u5357<\/strong>\u00a0&#8211;\u00a0<a href=\"https:\/\/link.segmentfault.com\/?enc=%2BTjApg0w%2BHsopSZtGMfc9w%3D%3D.kTW3OP9hhLqc31pRxaHembM5JFmUjDbH1ru7vQSbGJs%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">https:\/\/scrumguides.org\/<\/a><\/li>\n<li><strong>DevOps \u5b9e\u8df5<\/strong>\u00a0&#8211;\u00a0<a href=\"https:\/\/link.segmentfault.com\/?enc=Tgi1Edd55afuMtb35WOnvA%3D%3D.5QclkgYHJC3Os7KhoJ%2BHQZdZxWiInGDfotL9nGziE6Q%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">https:\/\/devops.com\/<\/a><\/li>\n<li><strong>OpenAPI \u89c4\u8303<\/strong>\u00a0&#8211;\u00a0<a href=\"https:\/\/link.segmentfault.com\/?enc=YPjBKL5KFhPWZIguTsC3sA%3D%3D.GSu1Vrpr%2B2IZFeHON2NEFWPnA%2BJoLLfknmkDbdya2MfFEyJFF1ydkBVr2d5Xxnjx\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">https:\/\/swagger.io\/specification\/<\/a><\/li>\n<\/ol>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000046224420\">https:\/\/segmentfault.com\/a\/1190000046224420<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6458\u8981 \u5728\u73b0\u4ee3\u8f6f\u4ef6\u5f00\u53d1\u4e2d\uff0c\u8de8\u56e2\u961f\u534f\u4f5c\u7684\u6311\u6218\u4e3b\u8981\u4f53\u73b0\u5728\u00a0\u9700\u6c42\u53d8\u66f4\u3001\u6d4b\u8bd5\u73af\u5883\u4e0d\u5339\u914d\u3001\u6c9f\u901a\u4e0d\u7545\uff0c\u8fd9\u4e9b\u95ee\u9898\u5f80\u5f80\u5bfc\u81f4\u4ea4\u4ed8\u5ef6 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-10020671","post","type-post","status-publish","format-standard","hentry","category-share"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10020671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10020671"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10020671\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10020671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10020671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10020671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}