<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # Runbooks > 原文:[https://docs.gitlab.com/ee/user/project/clusters/runbooks/](https://docs.gitlab.com/ee/user/project/clusters/runbooks/) * [Executable Runbooks](#executable-runbooks) * [Requirements](#requirements) * [Nurtch](#nurtch) * [Configure an executable runbook with GitLab](#configure-an-executable-runbook-with-gitlab) # Runbooks[](#runbooks "Permalink") Runbooks 是記錄在案的過程的集合,這些過程解釋了如何執行特定過程,包括啟動,停止,調試特定系統或對特定系統進行故障排除. 使用[Jupyter Notebook](https://jupyter.org/)和[Rubix 庫](https://github.com/Nurtch/rubix) ,用戶可以開始編寫自己的可執行運行手冊. 從歷史上看,運行手冊根據情況或系統采用決策樹或詳細的分步指南的形式. 現代的實現方式引入了"可執行的運行手冊"的概念,其中,操作員可以結合定義良好的流程在給定的環境中執行預寫的代碼塊或數據庫查詢. ## Executable Runbooks[](#executable-runbooks "Permalink") 在 GitLab 11.4 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/45912) . 通過 GitLab 的 Kubernetes 集成提供的 JupyterHub 應用程序現在隨 Nurtch 的 Rubix 庫一起提供,提供了一種創建 DevOps Runbook 的簡單方法. 提供了一個樣本運行手冊,其中展示了常見的操作. 雖然 Rubix 使創建常見的 Kubernetes 和 AWS 工作流變得簡單,但是您也可以不使用 Rubix 手動創建它們. 觀看此[視頻](https://www.youtube.com/watch?v=Q_OqHIIUPjE) ,了解如何在 GitLab 中完成此操作! ## Requirements[](#requirements "Permalink") 要創建可執行的運行本,您將需要: * **Kubernetes-**需要 Kubernetes 集群才能部署其余應用程序. 最簡單的入門方法是使用[GitLab 的集成](../add_remove_clusters.html#create-new-cluster)之一添加集群. * **入口** -入口可以提供負載平衡,SSL 終止和基于名稱的虛擬主機. 它充當您的應用程序的 Web 代理. * **JupyterHub** - [JupyterHub](https://jupyterhub.readthedocs.io/)是用于在團隊中管理筆記本的多用戶服務. Jupyter Notebook 提供了一個基于 Web 的交互式編程環境,用于數據分析,可視化和機器學習. ## Nurtch[](#nurtch "Permalink") Nurtch 是[Rubix 庫](https://github.com/Nurtch/rubix)背后的公司. Rubix 是一個開源 Python 庫,可輕松在 Jupyter Notebooks 中執行常見的 DevOps 任務. 繪制 Cloudwatch 指標和滾動 ECS / Kubernetes 應用之類的任務將簡化為幾行代碼. 有關更多信息,請參見[Nurtch 文檔](http://docs.nurtch.com/en/latest/) . ## Configure an executable runbook with GitLab[](#configure-an-executable-runbook-with-gitlab "Permalink") 遵循此分步指南,使用上述組件和預加載的演示運行本在 GitLab 中配置可執行運行本. 1. 遵循[創建新集群中](../add_remove_clusters.html#create-new-cluster)概述的步驟,將 Kubernetes 集群添加到您的項目中. 2. 單擊**Ingress**應用程序旁邊的" **安裝"**按鈕以安裝 Ingress. [![install ingress](https://img.kancloud.cn/1d/f5/1df5fd82cec36b78bfdf3a0383cb3f19_1017x276.png)](img/ingress-install.png) 3. 成功安裝 Ingress 后,單擊**JupyterHub**應用程序旁邊的" **安裝"**按鈕. **下一步,**您將需要此處提供的**Jupyter 主機名** . [![install JupyterHub](https://img.kancloud.cn/86/75/8675016013cc30835380d38846cf2b27_1016x298.png)](img/jupyterhub-install.png) 4. 成功安裝**JupyterHub 后** ,在瀏覽器中打開**Jupyter 主機名** . 單擊" **使用 GitLab 登錄"**按鈕登錄到 JupyterHub 并啟動服務器. 使用 OAuth2 為 GitLab 實例的任何用戶啟用身份驗證. 此按鈕將您重定向到 GitLab 上的頁面,請求 JupyterHub 授權使用您的 GitLab 帳戶. [![authorize Jupyter](https://img.kancloud.cn/d4/a0/d4a083780fe982fa5c72bd362afe261a_544x381.png)](img/authorize-jupyter.png) 5. 單擊**Authorize** ,您將被重定向到 JupyterHub 應用程序. 6. 單擊" **啟動我的服務器"** ,服務器將在幾秒鐘后啟動. 7. 要配置 Runbook 對 GitLab 項目的訪問,必須在演示 Runbook 的" **設置"**部分中輸入您的[GitLab 訪問令牌](../../../profile/personal_access_tokens.html)和項目 ID: 1. 雙擊左側面板上的**DevOps-Runbook-Demo**文件夾. [![demo runbook](https://img.kancloud.cn/28/e5/28e5f4f8eb3bae7f00e10feacb2e1c13_1766x1308.png)](img/demo-runbook.png) 2. 雙擊`Nurtch-DevOps-Demo.ipynb` . [![sample runbook](https://img.kancloud.cn/c2/53/c253562ba8509f0b180d81e2fde4789a_1636x1370.png)](img/sample-runbook.png) Jupyter 在屏幕右側顯示 Runbook 的內容. **設置**部分顯示您的`PRIVATE_TOKEN`和您的`PROJECT_ID` . 輸入這些值,并保持單引號如下: ``` PRIVATE_TOKEN = 'n671WNGecHugsdEDPsyo' PROJECT_ID = '1234567' ``` 3. Update the `VARIABLE_NAME` on the last line of this section to match the name of the variable you’re using for your access token. In this example, our variable name is `PRIVATE_TOKEN`. ``` VARIABLE_VALUE = project.variables.get('PRIVATE_TOKEN').value ``` 8. 要配置運行手冊的操作,請創建和配置變量: **注意:**對于此示例,我們使用示例**運行簿**中的**筆記本中**的**"運行 SQL 查詢"**部分來查詢 PostgreSQL 數據庫. 以下代碼塊的前四行定義了此查詢運行所需的變量: ``` %env DB_USER={project.variables.get('DB_USER').value} %env DB_PASSWORD={project.variables.get('DB_PASSWORD').value} %env DB_ENDPOINT={project.variables.get('DB_ENDPOINT').value} %env DB_NAME={project.variables.get('DB_NAME').value} ``` 1. 導航 **設置?CI / CD?變量**以在項目中創建變量. [![GitLab variables](https://img.kancloud.cn/86/a9/86a948c390a8980b12c441d1b66ae1ff_1948x800.png)](img/gitlab-variables.png) 2. Click **保存變量**. 3. 在 Jupyter 中,單擊**"筆記本"**標題中的**"運行 SQL 查詢"** ,然后單擊**"運行"** . 結果以內聯方式顯示如下: [![PostgreSQL query](https://img.kancloud.cn/71/23/7123f953d38f180e110f699a55ba3a7c_843x651.png)](img/postgres-query.png) 您可以嘗試其他操作,例如運行 Shell 腳本或與 Kubernetes 集群進行交互. 有關更多信息,請訪問[Nurtch 文檔](http://docs.nurtch.com/) .
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看