Google Cloud Platform (GCP)

edit

The following steps describe how to create an instance group with virtual machines on Google Compute Engine in preparation for installing Elastic Cloud Enterprise.

To learn more about the concepts used in this section, check Google Cloud Platform Documentation.

To set up your GCP instance group with virtual machines:

  1. Log into the Google Cloud Platform console.
  2. Create an instance template:

    1. Under Instance Templates, select CREATE INSTANCE TEMPLATE and name your template.
    2. Select a machine type, one of the supported Linux distributions as the boot disk, and specify enough storage. Make sure that the template meets the prerequisites for Elastic Cloud Enterprise.
    3. Set the Firewall to allow both HTTP and HTTPS access.
    4. On the Networking tab, set IP forwarding to on.
    5. On the SSH keys tab, add your public SSH key.
    6. Select Create:
  3. Add a firewall rule:

    1. Under Instance Templates, select the name of the new template and under Network, select default.
    2. Select Add firewall rule, then Allow from any source (0.0.0.0/0). Enter the following allowed protocols and ports:

      tcp:7000; tcp:12375; tcp:12400; tcp:12443;
      tcp:22191-22195; tcp:12191-12301; tcp:12898-12908;
      tcp:13898-13908; tcp:2112; tcp:18000-20000;
      tcp:9200; tcp:9243; tcp:9300; tcp:9343; tcp:9400;
    3. Select Create:
    4. NOTE: While these firewall rules make it easy for you to get started with your deployment, we recommend locking down your production infrastructure. Firewall rules need to be adapted to your environment. While all of the ports of the preceding list need to be open for internal communication, only ports 12443 (ECE Cloud UI) and 9243 (Elasticsearch) need to be exposed to the outside world.
  4. Create an instance group:

    1. Return to the Compute Engine panel through the Products & services menu.
    2. Select the Instance groups panel, then Create instance group, and name your group.
    3. Under Location, select Multi-zone and select a region.
    4. Select Specify port name mapping and add port 9243, which is the port used by Kibana and Elasticsearch for HTTPS access.

      If you are using a load balancer or firewall, consider adding port 443. To add a port, select Add item. On each host in the Elastic Cloud Enterprise cluster, run sudo iptables -A PREROUTING -t nat -p tcp --dport 443 -j REDIRECT --to-ports 9243.

    5. Select the instance template you created earlier.
    6. Specify the number of instances to create. For high availability, select at least three instances. These instances are placed into separate zones. Check the various deployment options for how many instances you might need to bring up a production Elastic Cloud Enterprise installation.
    7. Select Create:

      Creating the instance group can take a few minutes. After the instances have been created, they appear under VM instances.

  5. Add a disk to use with XFS to each instance:

    We recommend that you add disks with a minimum of 100GB of storage each to avoid performance bottlenecks due to GCP IOPS provisioning. To learn more about how increasing your persistent disk size on GCP also increases IOPS and throughput, check Optimizing Persistent Disk and Local SSD Performance. If you use XFS, you must use XFS on all allocators.

    1. Under VM instances, select one of the instances and choose EDIT.
    2. Under Additional disk, select to add an item and then select the Name dropdown to create a new disk.
    3. Name your disk. If you plan to use the configuration script in a subsequent step, make sure that the additional disks are named esdata-1, esdata-2, and so forth.
    4. Specify the storage type you need for your type of workload.
    5. Create a blank disk by selecting None (blank disk) for the source type.
    6. Select Create to create the new disks.
    7. Select Save to add the new disk to your instance.

      Don’t forget to save your updated instance after adding the disk to make sure it is available for use. You will set up XFS when you configure the instances.

    8. Repeat these steps until you have added disks to all instances.
  6. Configure the new instances with a user ID that has sudo permission.

When your Google Compute Engine virtual machines are up and running, you can connect to them and install Elastic Cloud Enterprise. Afterwards, add your load balancer. To learn more about load balancing that is available with GCP, check Google Cloud Load Balancing.

GCP load balancer

edit

The following steps show you how to configure HTTPS load balancing for your instance group on GCP. Elastic Cloud Enterprise is designed to be used in conjunction with at least one load balancer.

To learn more about how HTTPS load balancing works on GCP, check Google Cloud Load Balancing and Creating Cross-Region Load Balancing.

These steps require that you already have a signed SSL certificate that you can use with a wildcard DNS certificate.

To set up a load balancer with GCP:

  1. Log into the Google Cloud Platform console.
  2. Go to the Networking panel through the Products & services menu and select Load balancing.
  3. Select Create load balancer and select Start configuration under HTTP(S) Load Balancing.
  4. Name your new load balancer.
  5. Configure the backend service:

    1. Select Backend Configuration and then select Create a new backend service.
    2. Name the new service and under New Backend select the instance group you created earlier.
    3. When prompted, select USE EXISTING PORT NAME.
    4. Under Health Check, select the dropdown menu to create a health check:
    5. Set the port to 9200 and leave the other fields at their defaults.
    6. Select Save and continue.
  6. Set the host and path rules:

    1. Under Backends, select the backend you just configured.
  7. Configure the frontend:

    1. Select Frontend Configuration, set the protocol to HTTTPS, and for the IP select to Create IP address.
    2. When prompted, name the new static IP address and select RESERVE.
    3. Under Certificate, select Create a new certificate.
    4. Name the new certificate and upload your wild card certificate details, then select Create.
  8. Select Create to create the new load balancer:

    Load balancing configured on GCP

    Creating the load balancer takes a few moments.

Next steps: If you use a wildcard DNS record, update the record to point to the IP address of the load balancer. The IP address can be found on the Load balancing tab when you select the load balancer you just created.

With a load balancer, connecting to your Elasticsearch and Kibana endpoints might require you to omit the port number from the endpoint URL. For example, if the endpoint shown for Elasticsearch is https://32807b51a8f34832935d52393.mydomain.com:9243, you might need to connect to the cluster at https://32807b51a8f34832935d52393.mydomain.com instead.