3. 下载文件

预计完成时间:3 小时 (因下载速度而异)

可操作组件所有者:BUILD

3.1. 下载文件

如需下载 Distributed Cloud 分发版,您必须有权访问 Cloud Storage 存储桶

您必须先获得 Google 授予的 Distributed Cloud 软件版本访问权限,然后才能继续操作。

请向您的 Google 联系人 (POC) 提供每个运营商的电子邮件地址,以便为他们授予 Cloud Storage 存储桶的访问权限。

如需下载 Distributed Cloud 分发版,您需要以下命令行工具:

  • gcloud
  • OpenSSL(默认位于 /usr/local/ssl 中)

在 Google POC 确认您有权访问下载资源库后,请完成以下步骤:

  1. 与您的 Google POC 合作,确定下载是否适用于合作伙伴运营的 Distributed Cloud 部署,因此必须使用合作伙伴模型版本文件。

    PARTNER_OPERATED="IS_PARTNER_OPERATED"
    if [[ ${PARTNER_OPERATED:?} == "true" ]]; then
      RELEASE_SUFFIX="_partner"
      export GCS_BUCKET=private-cloud-release-partner
    else
      RELEASE_SUFFIX=""
      export GCS_BUCKET=private-cloud-release
    fi
    
  2. 验证您是否已从 Google POC 收到版本和相关的公钥信息。

  3. 如需访问 Cloud Storage 存储桶,请运行以下命令:

    gcloud auth login
    
  4. 如需验证并下载分布式云二进制文件,请使用您在第 1 步中获得的版本和摘要详细信息,如下所示:

    VERSION=<x.x.x-gdch.xxx>
    DOWNLOADER=gdch-downloader-prod${RELEASE_SUFFIX}-$VERSION.sh
    gcloud storage cp "gs://$GCS_BUCKET/$VERSION/$DOWNLOADER" .
    gcloud storage cp "gs://$GCS_BUCKET/$VERSION/${DOWNLOADER}.sig" .
    
    PUBLIC_KEY=$(cat <<-PUBEND
    -----BEGIN PUBLIC KEY-----
    MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEn46iVSyFXsvuKLZ4dVOr2AqlXDnR
    5cKztkpraexHDxn/ozq03EvrdkRmZkSACFfcaEFyitpraidgAx8sPjvzXQ==
    -----END PUBLIC KEY-----
    PUBEND
    )
    echo "${PUBLIC_KEY}" > "key.pub"
    
    md5sum key.pub
    # Output of this command should match "64aec8117d7502eaac63739939d11958  key.pub"
    
    openssl dgst -sha256 -verify "key.pub" -signature "${DOWNLOADER}.sig" "${DOWNLOADER}" && chmod +x $DOWNLOADER && ./$DOWNLOADER --skip-unzip
    

    输出应类似于以下示例:

    Skipping unzipping files.
    
    GDCH version x.x.x-gdch.xxx
    
    Downloading bootstrapper/bootstrapper.iso
    Downloading prod_gdch.tar.gz
    Downloading gdch-prod-x.x.x-gdch.xxx-sbom.tar.gz
    Downloading prod_IT_component_bundle.tar.gz
    Copying gs://private-cloud-release/x.x.x-gdch.xxx/prod_gdch.tar.gz...
    Copying gs://private-cloud-release/x.x.x-gdch.xxx/gdch-prod-x.x.x-gdch.xxx-sbom.tar.gz...
    Copying gs://private-cloud-release/x.x.x-gdch.xxx/bootstrapper/bootstrapper.iso...
    Copying gs://private-cloud-release/x.x.x-gdch.xxx/prod_IT_component_bundle.tar.gz...
    - [1/1 files][ 50.1 MiB/ 50.1 MiB] 100% Done
    Operation completed over 1 objects/50.1 MiB.
    - [1/1 files][  2.0 GiB/  2.0 GiB] 100% Done  26.3 KiB/s ETA 00:00:00
    Operation completed over 1 objects/2.0 GiB.
    | [1/1 files][ 84.7 GiB/ 84.7 GiB] 100% Done  52.4 MiB/s ETA 00:00:00
    Operation completed over 1 objects/84.7 GiB.
    | [1/1 files][242.3 GiB/242.3 GiB] 100% Done 108.1 MiB/s ETA 00:00:00
    Operation completed over 1 objects/242.3 GiB.
    Verifying bootstrapper/bootstrapper.iso
    Verified OK
    Verifying prod_gdch.tar.gz
    Verified OK
    Verifying gdch-prod-x.x.x-gdch.xxx-sbom.tar.gz
    Verified OK
    Verifying prod_IT_component_bundle.tar.gz
    Verified OK
    
    GDCH compressed files successfully downloaded.
    Find artifacts at /usr/local/home/test/gdch/x.x.x-gdch.xxx
    

    假设 RELEASE_SUFFIX 为空,则解压缩后的文件如下所示:

    • bootstrapper/bootstrapper.iso - 用于创建引导加载程序的 ISO 映像
    • prod_gdch.tar.gz - 主要软件包,其中包含 Distributed Cloud 软件、固件更新以及启动和运行 Distributed Cloud 所需的一切(引导加载程序和 OIC 除外)。任何 SecOps-P024 病毒签名或类似签名可能不是最新的。
    • gdch-prod-x.x.x-gdch.xxx-sbom.tar.gz - gdch tar 和引导加载程序中 Distributed Cloud 软件的 SBOM(软件物料清单)。
    • prod_IT_component_bundle.tar.gz - OIC(运营中心和支持工具)可操作的组件软件和制品。
  5. 仅用于下载合作伙伴模型发布文件,准备用于合作伙伴模型分发的软件包。

    1. 如需设置 Operations Suite 基础架构 (OI) 环境,请按照相关说明准备软件包。

    2. 如需引导启动 Distributed Cloud 环境,请按照相关说明准备软件包。

3.1.1. 提取 Nessus 软件以激活许可

在完成分布式云下载后,以及在转移到与外界隔绝的环境之前,必须提取 Nessus 安装程序并保存以供日后执行 Nessus 许可激活 NES-G0004

  1. prod_gdch.tar.gz 中提取 nessus_amd64.deb 安装程序:

    tar zxf prod_gdch.tar.gz "./release/nessus_amd64.deb" --strip-components=2
    
  2. nessus_amd64.deb 保存到除气隙环境之外的安全共享位置。该文件将用于创建已激活许可且具有互联网连接的软件包。然后,将该软件包传输到您的网闸隔离环境,作为 Nessus 安装的要求。

3.2. 将 Distributed Cloud 下载内容转移到网闸隔离环境

分布式云下载完成后,使用便携式存储设备将所有文件(包括下载器)转移到您的隔离环境。您需要存储设备,因为引导加载程序无法访问气隙环境中的已下载文件。如需转移文件,请执行以下操作:

  1. 准备好云端硬盘。

  2. 使用 tar 中的 bootstrapper.iso 文件创建可启动的 USB。

  3. gdch 内容上传到云端硬盘。

  4. 将“生成配置文件”步骤生成的初始配置上传到云端硬盘。

  5. 验证内容并将文件提取到您的隔离环境中:

    VERSION=<x.x.x-gdch.xxx>
    DIGEST=<OBTAINED_DIGEST_INFORMATION_HERE>
    DOWNLOADER=gdch-downloader-prod${RELEASE_SUFFIX}-$VERSION.sh
    echo "$DIGEST $DOWNLOADER" | sha256sum -c && chmod +x $DOWNLOADER && ./$DOWNLOADER --skip-download
    

    输出应类似于以下示例:

    % tree -L 3 gdch/
    gdch
    └── x.x.x-gdch.xxx
        ├── bootstrapper
        │   ├── bootstrapper.iso
        │   └── bootstrapper.iso.sig
        ├── gdch-x.x.x-gdch.xxx-sbom.tar.gz
        ├── gdch-x.x.x-gdch.xxx-sbom.tar.gz.sig
        ├── gdch.tar.gz
        └── gdch.tar.gz.sig
    
    % echo "$DIGEST $DOWNLOADER" | sha256sum -c && chmod +x $DOWNLOADER && ./$DOWNLOADER --skip-download
    gdch-downloader-x.x.x-gdch.xxx.sh: OK
    Skipping download, assumes files already local
    
    GDCH version x.x.x-gdch.xxx
    
    Verifying gdch-x.x.x-gdch.xxx-sbom.tar.gz
    Verified OK
    Verifying bootstrapper/bootstrapper.iso
    Verified OK
    Verifying gdch.tar.gz
    Creating directory gdch/full-release-x.x.x-gdch.xxx
    Moving bootstrapper/bootstrapper.iso...
    Extracting gdch.tar.gz...
    Finished extracting gdch.tar.gz
    
    GDCH downloaded and unpacked successfully.
    Find artifacts at /usr/home/root/gdch/full-release-x.x.x-gdch.xxx
    
     % tree -L 2 gdch/
    gdch
    └── full-release-x.x.x-gdch.xxx
        ├── bootstrapper.iso
        ├── docs
        ├── examples
        ├── gdcloud
        ├── harbor
        ├── oci
        └── operations_center
    
  6. 如需仅使用合作伙伴模型版本文件设置 OI 环境,请按照相关说明加载合作伙伴模型分发的软件包。