VK Cloud logo

Configuring an S3 gateway for the Cyber Backup Cloud service

The S3 gateway for the Cyber Backup Cloud service allows you to use the public cloud service VK Object Storage for storing backups.

As a configuration example, an S3 gateway will be created for the Cyber Backup Cloud service in a high-availability configuration with a storage cluster of three nodes.

Preparatory steps

  1. Contact technical support to create an account and an organization tenant for the S3 gateway, and to get the ability to connect partner storages to the tenant.
  2. Go to the VK Cloud management console.
  3. Make sure that the project has enough quotas to create a storage cluster of three VMs and three disks of 1 TB each, and that the limits allow this.
  4. Make sure that the OpenStack client is installed, and authenticate in the project.
  5. Create a key pair for connecting to the VM over SSH. For example, name it vk-ssh.

1. Prepare a VK Object Storage bucket

  1. Create a bucket and save its URL.
  2. Create and save the access keys to the bucket.

2. Create networks and subnets

  1. Create a network without internet access and without a router. In this example: private-storage-network.
  2. Edit the subnet created for this network, specifying the required parameters. In this example:
    • subnet name: private-storage-subnet;
    • subnet address: 192.168.0.0/24.
  3. Create a network with internet access and a router. In this example: public-storage-network.
  4. Edit the subnet created for this network, specifying the required parameters. In this example:
    • subnet name: public-storage-subnet;
    • subnet address: 10.0.0.0/24;
    • DHCP IP address pool: 10.0.0.10–10.0.0.250.

3. Create security groups and rules

  1. Create a security group with an easily recognizable name. In this example: cyber.

  2. Add inbound traffic rules to it:

    1. First rule:
    • Type: SSH,
    • Protocol: TCP,
    • Ports: 22,
    • Remote address: All IP addresses.
    1. Second rule:
    • Type: ALL TCP,
    • Protocol: TCP,
    • Ports: 8888,
    • Remote address: All IP addresses.
  3. Add an outbound traffic rule to the same security group:

    • Type: All protocols and ports,
    • Remote address: All IP addresses.

4. Create and configure a VM for the management node

  1. Download the Cyber Storage image — software that allows you to organize an S3 gateway and store backups from Cyber Backup solutions in public clouds.

  2. Import the image using the OpenStack CLI:

    openstack image create --progress \  --file cyber-storage.qcow2 \  --disk-format qcow2 \  --container-format bare \  Cyber-storage
  3. Create a virtual machine with the following parameters:

    • Operating system: the previously imported Cyber-storage image;
    • Name: any convenient name, in this example — cb-01;
    • VM type: STD3-4-8;
    • Availability zone: any suitable availability zone;
    • Disk size: 250 GB;
    • Disk type: SSD;
    • Network: public-storage-network;
    • VM key: vk-ssh;
    • Firewall settings: Default, cyber;
    • Assign external IP: option enabled.

    Wait until the created VM boots up and the login prompt appears.

  4. Connect the private-storage-network network to the VM. When connecting, specify:

    • a specific IP address from the available range of the private-storage-subnet subnet;
    • the All allowed (all) security group.
  5. In the availability zone selected for the VM, create a storage disk with the required size and connect it to the VM. Save the disk name.

5. Create and configure VMs for the subordinate nodes

  1. Create two virtual machines with the following parameters:

    • Operating system: the previously imported Cyber-storage image;
    • Name: any convenient names, in this example — cb-02 and cb-03;
    • VM type: STD3-4-8;
    • Availability zone: any suitable availability zone;
    • Disk size: 250 GB;
    • Disk type: SSD;
    • Network: public-storage-network;
    • VM key: vk-ssh;
    • Firewall settings: Default, cyber — both security groups for each VM;
    • Assign external IP: option disabled.

    Wait until each of the created VMs boots up and the login prompt appears.

  2. Connect the private-storage-network network to the created VMs. When connecting, specify for each VM:

    • a specific IP address from the available range of the subnet;
    • the All allowed (all) security group.
  3. In the selected availability zone, create disks of the same size as for the management node for each VM, and connect the disks to the corresponding VMs. Save the disk names.

6. Configure Cyber Storage

  1. Connect to the cb-01 virtual machine, using the cloud-user username and the private key from the previously created key pair.

  2. Get and save the password for the Cyber Storage management panel:

    cat /.initial-admin-password

    Save this password.

  3. Go to the Cyber Storage management panel:

    1. Open the address <VM_EXTERNAL_IP_ADDRESS>:8888 in your browser.
    2. Enter the login admin and the password you obtained earlier.
  4. Go to the Infrastructure → Networks section and rename the Private network to Public.

  5. Click the Create Network button and create a Private network.

  6. Create a storage cluster:

    1. Go to the Infrastructure → Servers section.
    2. Click Create storage cluster.
    3. Specify the cluster name. For example, backupcloud.
    4. (Optional) Select the encryption type.
    5. Click the Create button.
  7. Connect additional nodes:

    1. Go to the Servers section and click the Connect Server button.

    2. Save the IP address and token for connecting the nodes.

    3. Connect over SSH to the cb-02 and cb-03 VMs one after another, and run the following command on each of them:

      sudo -i   /usr/libexec/init-ifaces   /usr/libexec/vstorage-ui-agent/bin/register-storage-node.sh -m <IP_ADDRESS> -t <TOKEN>
    4. Return to the Cyber Storage management panel and go to the Infrastructure → Servers section. Make sure that the server list contains three nodes: cb-01, cb-02, cb-03.

  8. Configure the network interfaces:

    1. Click the node name and go to the Network interfaces tab.

    2. Change the interface settings:

      1. Click more-icon for the interface and select Edit.
      2. Assign the Public network to the interface.
      3. Save the changes.
    3. Repeat these steps for each of the nodes.

  9. Join the additional nodes to the storage cluster:

    1. Go to the Infrastructure → Servers section.
    2. For the cb-02 and cb-03 nodes, click more-icon one after another and select Join cluster → Apply.
    3. Wait until all nodes have the "Healthy" status.
  10. Assign different traffic types to the networks:

    1. Go to the Infrastructure → Servers section.

    2. Using the Assign Networks and Assign to networks buttons, assign the following traffic types to the networks.

      • Storage;
      • Internal management;
      • OSTOR private;
      • Backup (ABGW) private.
  11. Initialize the disks and assign roles to them:

    1. Go to the Infrastructure → Servers section.
    2. Click the cb-01 node name, the Disks tab will open.
    3. Assign roles to the disks:
      • for vda — the Metadata role;
      • for vdb — the Storage role.
    4. Confirm the operation and wait for the node to finish being added to the cluster.
    5. Repeat the same steps for the cb-02 and cb-03 nodes.

7. Configure high availability and load balancing for the cluster

  1. Get the list of ports of the public-storage-subnet subnet. Write down the port IDs of the cb-01, cb-02, and cb-03 VMs in this subnet.

  2. Create a port in the public-storage-network network and the public-storage-subnet subnet, specifying a specific IP address from the subnet's address pool and the port name. In this example — 10.0.0.252.

    openstack port create -network <NETWORK_ID> -fixed-ip subnet=<SUBNET_ID>,ip-address=10.0.0.252 <PORT_NAME>
  3. Add this IP address to the list of allowed addresses for the ports of the VMs directed to the public-storage-subnet subnet:

    openstack port set --allowed-address ip-address=10.0.0.252 <CB-01_VM_PORT_ID>openstack port set --allowed-address ip-address=10.0.0.252 <CB-02_VM_PORT_ID>openstack port set --allowed-address ip-address=10.0.0.252 <CB-03_VM_PORT_ID>
  4. Create a load balancer with the following parameters:

    • Load balancer name: cb-balancer;
    • Network: public-storage-network;
    • Assign external IP: option enabled.
  5. Wait for the load balancer to be created and save its external IP address.

  6. Add a rule for this load balancer:

    1. Create a listener:

      openstack loadbalancer listener create --name <LISTENER_NAME> \ --protocol TCP --protocol-port 8888 <LOAD_BALANCER_ID>
    2. Create a balancing pool:

      openstack loadbalancer pool create --name <POOL_NAME> \ --protocol TCP --lb-algorithm ROUND_ROBIN --listener <LISTENER_NAME>
    3. Add pool members:

      openstack loadbalancer member create --address 10.0.0.252 \ --subnet-id <PUBLIC-STORAGE-SUBNET_ID> --protocol-port 8888 <POOL_NAME>
    4. Create a health check:

      openstack loadbalancer healthmonitor create --type TCP \ --delay 5 --timeout 3 --max-retries 3 <POOL_NAME>
  7. Go to the Cyber Storage management panel and open the Settings → Management Server → High Availability section.

  8. Select the three created nodes and click the Create high availability configuration button, then click Continue.

  9. For the public-storage-subnet subnet, specify the virtual IP address 10.0.0.252.

  10. Confirm the configuration creation.

  11. Check the availability of the management server at the external IP address of the load balancer by entering https://<LOAD_BALANCER_EXTERNAL_IP_ADDRESS>:8888 in your browser's address bar.

  12. (Optional) Delete the public IP address assigned to the cb-01 VM. You can now go to the Cyber Storage management panel using the external IP address of the load balancer.

  13. Add a rule with the following parameters to the previously created load balancer:

    • Balancing protocol: TCP;
    • Port: 44445;
    • Apply to the following instances: cb-01, cb-02, cb-03.
  14. Assign an external domain name to the external IP address of the load balancer.

8. Register the gateway

  1. Go to the Cyber Storage management panel.

  2. Go to the Services → Backups section and click the Create backup storage button.

  3. At the Backup destination step, select Cloud service and click the Next button.

  4. At the Servers step, select all nodes for storage and click the Next button.

  5. At the Cloud service step:

    1. Select the object storage type: AuthV2-compatible (S3).
    2. Enter the VK Object Storage endpoint URL:
      • https://hb.vkcloud-storage.ru or https://hb.ru-msk.vkcloud-storage.ru — for the Moscow region;
      • https://hb.kz-ast.vkcloud-storage.ru — for the Kazakhstan region.
    3. Enter the bucket name and its access keys.
    4. Enable the Allow self-signed certificate to the endpoint option.
    5. Click the Next button.
  6. At the Storage policies step:

    1. Select the Node failure domain.
    2. Select the redundancy mode that matches your organization's policies.
    3. Click the Next button.
  7. At the DNS step:

    1. Specify the external domain name assigned to the load balancer.
    2. Make sure that your DNS server configuration matches the example shown in the interface. Change it if necessary.
    3. Click the Next button.
  8. At the Cyberprotect account step:

    1. Specify the cloud console URL: https://ru01-cloud.cyberprotect.ru.

    2. Enter the login and password for accessing the organization's tenant, obtained from technical support.

    3. Click the Next button.

  9. At the Summary step, review the configuration, click the Create button, and wait for the gateway to be created.

9. Add users

  1. Log in at https://ru01-cloud.cyberprotect.ru.
  2. Create users and administrators.
  3. Delegate the connected gateway for backups in the user settings when creating or editing a user.
  4. Go to the Clients section.
  5. Create client tenants in the organization tenant, and specify the new S3 backup storage for them.

10. Check functionality

  1. Create a backup in the Cyber Backup Cloud service.
  2. Make sure that the backup is saved in the VK Object Storage bucket.

Delete unused resources

A running service infrastructure consumes compute resources. If you no longer need the S3 gateway and the storage cluster, delete them:

  1. Delete the virtual machines.
  2. Make sure that all disks were deleted together with the VMs; if not, delete them.
  3. Delete the router.
  4. Delete the load balancer.
  5. Delete the public IP addresses.
Was this article helpful?