升级服务器安装

Nomad Launch Configuration

在升级之前到v2.19,跟随this guide更新Nomad启动配置。

Org Rename Script

If upgrading directly from v2.17 (or below) and you haveever had issues with renaming an organization within CircleCI或者你怀疑一个组织重命名可能发生在任何时候follow the steps below. If you are running Server v2.18.x already you can skip this section.
  1. SSH into your Services machine

  2. 换来工作流量导体通过运行以下操作:sudo docker exec-it workflows-digontor lein repl:connect 6005

  3. Go to this link for theorg重命名脚本。将此脚本复制/粘贴到repl会话中。它将运行迁移和输出当前进度。

  4. If anyERRORmessages are present in the output please report back to your CSM or reach out to support.

Upgrade Steps Overview

Follow these steps to upgrade your CircleCI Server version.

1.快照回滚

This step is optional but recommended

要拍摄您的安装快照:

  1. Go to the Management Console (e.g.your-circleci-hostname.com:8800.)然后单击“立即停止”以停止Circleci服务。

    Stop CircleCI
    图1.停止Circleci
  2. Ensure no jobs are running on the nomad clients – you can check this by runningNomad状态

  3. 导航到AWS EC2管理控制台,然后选择服务机器实例

  4. 选择操作>映像>创建图像 - 如果要在此时避免停机,请选择“无重启”选项。此图像创建步骤创建一个可以随时作为新的EC2实例启动的AMI来恢复您的安装。

    Snapshot Image Creation
    图2.快照图像创建
It is also possible to automate this process with the AWS API. Subsequent AMIs/snapshots are only as large as the difference (changed blocks) since the last snapshot, such that storage costs are not necessarily larger for more frequent snapshots, see Amazon’s EBS snapshot billing document for details. Once you have the snapshot you are free to make changes on the Services machine.

If you do need to rollback at any point, see our从备份中还原的指南

2.更新复制

一种。先决条件

  • Your installation is Ubuntu 14.04 or 16.04 based.

  • Your installation isnotAIRGAPPED,您可以从中访问Internet。

  • 我们将更新为复制v2.38.6,但首先,我们需要检查您的服务机器上至少运行v2.10.3。要检查此功能,请将ssh进入服务机器并运行以下内容:

    复制 -  version.

    如果您正在运行复制前v2.10.3版本,请访问support@www.drag240sx.com。如果您已经在V2.38.6或更高版本上,您可以跳过下一步并搬到升级Circleci应用程序

b. Preparations

Remember to take a snapshot (described above) before starting the Replicated update process
  1. Stop the CircleCI application by clicking the Stop Now button on the Dashboard. Application shutdown takes a few minutes. Wait for the status to become “Stopped” before continuing.

    停止Circleci应用程序
    Figure 3. Stop the CircleCI Application

    或者,您可以将SSH放入服务机器并从命令行停止Circleci应用程序:

    replicatedctl app stop

    You can check the status using the followng:

    replicatedctl app status inspect

    示例输出:

    [ { "AppID": "edd9471be0bc4ea04dfca94718ddf621", "Sequence": 2439, "State": "stopped", "DesiredState": "stopped", "Error": "", "IsCancellable": false, "IsTransitioning": false, "LastModifiedAt": "2018-10-23T22:00:21.314987894Z" } ]
  2. 对于成功的复制更新,有必要将Docker更新为推荐版本,17.12.1。检查您运行的版本Docker版本and if you need to update, follow these steps:

    sudo apt-get安装docker-ce = 17.12.1〜ce-0〜ubuntu
  3. 使用以下命令引导Docker版本:

    sudo apt-mark持有docker-ce

c. Perform Update

  1. 执行复制update by executing the update script as follows:

    curl -ssl“https://get.replation.com/docker?replation_tag=2.38.6”|sudo bash.

    仔细检查您的复制和Docker版本:

    RepliptionDCL版本#2.38.6 Docker -V#17.12.1
  2. Restart the app with

    replicatedctl app start

    申请需要几分钟才能旋转。您可以查看管理仪表板或执行中的进度;

    replicatedctl app status inspect

    Example output:

    [{“appid”:“edd9471be0bc4ea04dfca94718ddf621”,“序列”:2439,“state”:“启动”,“启动”,“启动”,“错误”:“错误”:“错误”:“错误”:“错误”:“错误”,“iscapclowable”:true,“istransitioning”:true,“LastModifiedat”:“2018-10-23T22:04:05.00374451z”}“

3. Upgrade CircleCI Server

  1. Once you are running the latest version of Replicated, click the View Update button in the Management Console dashboard.

    View Available Updates
    Figure 4. View Available Updates
  2. 单击要安装的版本旁边的安装。

    Please refresh your screen intermittently during the install process to avoid unnecessary waiting.
    View Available Releases
    Figure 5. View Available Releases

    安装过程可能需要几分钟,并且安装状态将显示在发行页面和主仪表板上。

  3. Once the installation is finished, navigate to the Dashboard to start your installation - Note the middle box on the Dashboard will read "CircleCI is up to date" when you are running the latest version.