Creating a virtual network

Virtual Storage Platform One SDS Cloud for Google Cloud Platform Setup and Configuration

Version
1.18.x
Audience
anonymous
Part Number
MK-24VSP1SDS011-02

Create a virtual network for setting up VSP One SDS Block.

  1. Log in with a Google account that meets the conditions described in Google account permissions.
  2. Log in to the VM (for example, Cloud Shell) that allows for running gcloud CLI and Terraform.
  3. Place the template files for creating the virtual network (VNetConfiguration) in any empty directory of the VM, and then unzip it.

    The command to copy a file existing in a bucket to a VM is as follows:

    gsutil cp gs://[bucket-name]/[file-path] .
    Note:

    Run the terraform command in the directory in which a cloud configuration file package is located in the succeeding steps. This directory in which a cloud configuration file package is located is called the Terraform working directory.

    The Terraform working directory contains terraform template files (VNetConfiguration), packages, and virtual network control information.

    If you create multiple virtual networks, create an empty working directory for each virtual network.

  4. Among the extracted template files, edit two files, backend.auto.tfvars and terraform.tfvars.

    Edit the following parameters for each file.

    backend.auto.tfvars

    Item name Setting
    bucket

    Bucket name of Cloud Storage in which a terraform state file is to be stored.

    Setting requirements are as follows:

    • Do not add a slash ("/") at the end.

    prefix

    Folder name of Cloud Storage in which a terraform state file is to be stored. Specify the folder created beforehand.

    When creating multiple virtual networks, specify an empty folder for each virtual network.

    Setting requirements are as follows:

    • Do not add a slash ("/") at the end.

    • No file exists in the specified folder.

    terraform.tfvars

    Item name Setting
    namePrefix

    Prefix assigned to the name of the virtual network.

    Setting requirements are as follows:

    • The number of characters must be from 1 to 43.

    • Characters must be lowercase alphabetical characters, numbers, and symbols ("-").

    • The first character must be lowercase alphabetical.

    controlNetworkMtu

    MTU of the virtual control network.

    Setting requirements are as follows:

    • The capacity must be from 1500 to 8896 [bytes].

    Note that this value cannot be changed after storage cluster setup is complete.

    internodeNetworkMtu

    MTU of the virtual internode network.

    Setting requirements are as follows:

    • The capacity must be from 1500 to 8896 [bytes].

    Note that this value cannot be changed after storage cluster setup is complete.

    computeNetworkMtu

    MTU of the virtual compute network.

    Setting requirements are as follows:

    • The capacity must be from 1500 to 8896 [bytes].

    Note that this value cannot be changed after storage cluster setup is complete.

    When using the Universal Replicator function, set the MTU value according to your environment. For details, see the VSP One SDS Block and SDS Cloud Universal Replicator.

    configureULAInternalIpv6Range

    Sets whether to set internal IPv6 for Unique Local Addresses (ULAs).

    Setting requirements are as follows:

    • When IPv6 is set: true

    • When IPv6 is not set: false

    ulaInternalIpv6Range

    Sets an internal IPv6 range for ULAs.

    Setting requirements are as follows:

    • This is enabled only when configureULAInternalIpv6Range is set to true.

    • You can manually specify a necessary /48 range from the ULA prefix fd20::/20 defined by Google.

    • If you specify empty string ("") when configureULAInternalIpv6Range is set to true, Google Cloud automatically assigns an IPv6 range.

    project

    ID of the project in which the virtual network is to be created.

    Be careful not to specify a project name.

    For conditions other than those indicated in this table, see Terraform and Google Cloud documentation.

  5. Run the following command in the directory in which the template files exists.
    terraform init -backend-config="backend.auto.tfvars"

    Verify that Terraform has been successfully initialized! is displayed.

    Also, verify that a file whose name is default.tfstate has been created in the Cloud Storage bucket that you specified for backend.auto.tfvars.

  6. Confirm the changes accompanying creation of a virtual network based on the information of the terraform.tfvars file.

    Run the following command to confirm the changes.

    terraform plan

    If Plan: x to add, y to change, z to destroy. is displayed and no error is output after running the command, there is no problem. The number of resources to be added is shown in x, the number of resources to be changed is shown in y, and the number of resources to be deleted is shown in z.

    If entry is prompted or an error is output in the middle of processing, review the template files.

    Note:

    In some cases of running the command, the beginning of the displayed output might not be visible because a large number of output lines cannot fit in a single screen. To view all the output contents, try output to a text file, for example.

  7. If there is no problem as a result of confirmation by using the terraform plan command, create a virtual network.
    1. Run the following command.
      terraform apply
    2. When Enter a value: is displayed after running the command, enter yes.
      If Apply complete! is output after running the command, creation of a virtual network has been completed.
      Note:
      • If Cloud Shell is disconnected or the window is inadvertently closed while the virtual network is being created, you can confirm the latest result by using the terraform output command.

      • If the terraform apply command results in failure, creation of the virtual network might have resulted in unnecessary resources. Verify that there is no problem with the template files and other items, and then run the terraform apply command again.

  8. Confirm the created virtual network from the VPC network of Google Cloud.

    The character string you set for namePrefix is to be used as a name prefix of the following resources.

    Resource Name
    Virtual control network <namePrefix>-control-network
    Virtual internode network <namePrefix>-internode-network
    Virtual compute network <namePrefix>-compute-network

    This completes creation of the virtual network.