简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。

7. 部署 Anthos 管理工作站

提供者 kevin-hoke

管理工作站是部署在 NetApp HCI 环境中的 vSphere VM ,它预安装了在 VMware 解决方案上管理 Anthos 所需的所有工具。按照本节中的说明部署 Anthos 管理工作站。

要部署 Anthos 管理工作站,请完成以下步骤:

  1. 将 gkeadm 二进制文件下载到工作目录中

    [user@rhel7 anthos-install]$ gsutil cp gs://gke-on-prem-release/gkeadm/1.6.1-gke.1/linux/gkeadm ./
    [user@rhel7 anthos-install]$ chmod +x gkeadm
  2. 使用 gkeadm 工具创建管理工作站配置文件。

    [user@rhel7 anthos-install]$ ./gkeadm create config
  3. 此时将创建两个文件: credential 。 yamladmin-ws-config.yaml 。填写每个文件。

    1. credential 。 yaml 包含您的 VMware vCenter 服务器用户名和密码。

      kind: CredentialFile
      items:
      - name: vCenter
        username: "administrator@vsphere.local"
        password: "vSphereAdminPassword"
    2. admin-ws-config.yaml 包含有关您的 vSphere 环境以及管理工作站 VM 的物理和网络选项的其他信息。

      gcp:
        # Path of the whitelisted service account's JSON key file
        whitelistedServiceAccountKeyPath: "/home/anthos-install/service-keys/access-key.json"
      # Specify which vCenter resources to use
      vCenter:
        # The credentials and address GKE On-Prem should use to connect to vCenter
        credentials:
          address: "anthos-vc.cie.netapp.com"
          datacenter: "NetApp-HCI-Datacenter-01"
          datastore: "VM_Datastore"
          cluster: "NetApp-HCI-Cluster-01"
          network: "VM_Network"
          resourcePool: "Anthos-Resource-Pool"
      # Provide the path to vCenter CA certificate pub key for SSL verification
          caCertPath: "/home/anthos-install/vcenter.pem"
      # The URL of the proxy for the jump host
      proxyUrl: ""
      adminWorkstation:
        name: gke-admin-ws-200915-151421
        cpus: 4
        memoryMB: 8192
      #The boot disk size of the admin workstation in GB. It is recommended to use a disk with at least 50 GB to host images decompressed from the bundle.
        diskGB: 50
      # Name for the persistent disk to be mounted to the home directory (ending in
      .vmdk).
      # Any directory in the supplied path must be created before deployment.
        dataDiskName: gke-on-prem-admin-workstation-data-disk/gke-admin-ws-200915-151421-data-disk.vmdk
      # The size of the data disk in MB.
        dataDiskMB: 512
        network:
      # The IP allocation mode: 'dhcp' or 'static'
          ipAllocationMode: "dhcp"
      # # The host config in static IP mode. Do not include if using DHCP
        # hostConfig:
          #   # The IPv4 static IP address for the admin workstation
          #   ip: ""
          #   # The IP address of the default gateway of the subnet in which the admin workstation
          #   # is to be created
          #   gateway: ""
          #   # The subnet mask of the network where you want to create your admin workstation
          #   netmask: ""
          #   # The list of DNS nameservers to be used by the admin workstation
          #   dns:
          #   - ""
        # The URL of the proxy for the admin workstation
        proxyUrl: ""
        ntpServer: ntp.ubuntu.com
  4. 创建管理工作站。

    [user@rhel7 anthos-install]$ ./gkeadm create admin-workstation
    The output will be verbose as the workstation is created. In the end you will be prompted with the IP address to login to the workstation if you chose DHCP.
    ...
    Getting ... service account...
    ...
    ********************************************************************
    Admin workstation is ready to use.
    
    Admin workstation information saved to /usr/local/google/home/me/my-admin-workstation
    This file is required for future upgrades
    SSH into the admin workstation with the following command:
    ssh -i /home/user/.ssh/gke-admin-workstation ubuntu@10.63.172.10
    ********************************************************************