This section explains the creation of Avi Load Balancer Controller image.

To create the Controller image:

Procedure

  1. Download the Controller image for GCP from the Avi Load Balancer Networks customer portal.
  2. You can create a new bucket in the GCP storage project for uploading the SE images as follows:

    To re-use an existing bucket, skip the steps below and proceed to step 3.

    Note:

    This bucket will be deleted when the Controller image is successfully created in the Google Compute Engine.

    1. From the GCP Console, navigate to Cloud Storage > Bucket. Click Create.
    2. Specify the name of the bucket.
    3. Click Choose where to store your data. This permanent choice defines the geographic placement of your data and affects cost, performance, and availability. Select the location where the Controller virtual machine has to be created accordingly. The options availabe are Multi-region, Dual-region, Region.
    4. Click Choose a storage class for your data. A storage class sets costs for storage, retrieval, and operations, with minimal differences in uptime. Choose if you want objects to be managed automatically or specify a default storage class based on how long you plan to store your data and your workload or use case.
    5. Click Choose how to control access to objects.
    6. Click Choose how to protect object data to prevent data loss. Note that object versioning and retention policies cannot be used together.
    7. Click Create.
  3. Upload the Controller image gcp_controller.tar.gz into the Google Cloud Storage (GCS) bucket created. This will become the source for the Controller Google Compute Engine image. This can be done using the GCP Console or the CLI.

    To upload the image using GCP Console,

    1. From the GCP console, navigate to Cloud Storage > Bucket.

    2. Select the bucket created in GCS.

    3. Click Upload files and select the gcp_controller.tar.gz file to upload it to this bucket.

    To upload the image using the GCP CLI,

    1. Download and install the gsutil tool.

    2. Upload the gcp_controller.tar.gz to the bucket using the commands shown below:

      $ gsutil cp gcp_controller.tar.gz gs://avi-demo-bucket
      Copying file://gcp_controller.tar.gz [Content-Type=application/x-tar]...
      - [1 files][ 2.7 GiB/ 2.7 GiB] 29.3 MiB/s
      Operation completed over 1 objects/2.7 GiB.
    3. Verify the MD5 hash of the file uploaded in the bucket with the gcp_controller.tar.gz.md5 file available in the Avi Load Balancer customer portal as shown below:

      $ cat gcp_controller.tar.gz.md5
      5c4a4f35eea1a0bd97409fbfe6d90188
      $ gsutil hash -mh gs://avi-demo-bucket/gcp_controller.tar.gz
      Hashes [hex] for gcp_controller.tar.gz: 
      	Hash (md5): <value>   
  4. Create the image in the Google Compute Engine using the image uploaded in the bucket.
    1. Create the image in any GCP project where the Avi Load Balancer Controller will be installed or in any other project that can share images with the Controller Project. This can be done using the GCP console or the gcloud tool.

      To create the image using the GCP Console:

      1. From the GCP Console, navigate to Compute EngineImages.

      2. Click CREATE IMAGE.

      3. Enter the Name.

      4. Select Cloud Storage File option as the Source.

      5. Select the gcp_controller.tar.gz file in the Bucket which was uploaded.

      6. Select the location as Multi-regional or Regional.

      7. Click ADD LABEL to add key details.

      8. Select an encryption key management solution.

      9. Click Create.

      To create the image using the gcloud tool:

      $ gcloud compute images create avi-controller --project=controller-project --description="Avi Controller Image" --source-uri=https://storage.googleapis.com/avi-demo-bucket/gcp_controller.tar.gz
      Created [https://www.googleapis.com/compute/v1/projects/controller-project/global/images/avi-controller].
      NAME            PROJECT                 FAMILY  DEPRECATED  STATUS
      avi-controller  controller-project                      READY
    2. Delete the object and bucket that was created in GCS since they are no longer required.