influxdata / google-deployment-manager-influxdb-enterprise

GCP Deployment Manager templates for InfluxDB Enterprise.

Home Page:https://console.cloud.google.com/marketplace/details/influxdata-public/influxdb-enterprise-vm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

InfluxDB Enterprise on Google Cloud Platform

Deploy an InfluxDB Enterprise cluster on Google Cloud Platform (GCP) Compute Engine virtual machines with Google Deployment Manager (DM) templates.

Getting started

There are two ways to use the templates in this repository:

Deploy with a marketplace subscription

Subscribe to InfluxDB Enterprise on GCP Marketplace. After subscribing, all VMs deployed using InfluxDB Enterprise images from GCP Marketplace will automatically include a license billed to the associated GCP account.

After subscribing to the offer, a cluster can be deployed directly from the GCP console UI.

Alternatively, the templates in this repository can also be used to deploy an InfluxDB Enterprise cluster from the command line using Google Cloud Shell or the gcloud CLI tool from the Google Cloud SDK, which also required cloning this repo.

Open in Cloud Shell

Then run the following command to deploy a cluster:

git clone https://github.com/influxdata/google-deployment-manager-influxdb-enterprise.git
cd google-deployment-manager-influxdb-enterprise
gcloud deployment-manager deployments create influxdb-enterprise-0 \
    --template src/influxdb-enterprise.jinja \
    --automatic-rollback-on-error

Note: gcloud must have an active configuration with a project and compute zone name defined.

Once the cluster has successfully deployed, learn how to access and manage InfluxDB Enterprise on GCP.

Deploy with a license key

If you have InfluxDB Enterprise license key from InfluxData or a trial sign-up, the templates in this repository can be used to deploy a cluster in Google Cloud Platform (no GCP Marketplace subscription required).

Prerequisites

Build images

You will need to build images for InfluxDB Enterprise in your GCP account using Hashicorp's Packer tool and the templates in the packer/ directory.

Run the following commands to generate a Google service account key for Packer and then build the images:

# Replace "your-gcp-project" with the name of the Google Cloud project
export GOOGLE_CLOUD_PROJECT="your-gcp-project"

# File where the Google Service Account key will be stored
export GOOGLE_SERVICE_ACCOUNT_KEY="key.json"

# Ensure the Google Cloud SDK is authenticated
gcloud auth login

# Generate a Google Service Account for Packer with the
# "compute.instanceAdmin.v1" and "iam.serviceAccountUser" roles
./packer/generate-google-service-account-key.sh "${GOOGLE_CLOUD_PROJECT}" "${GOOGLE_SERVICE_ACCOUNT_KEY}"

# Build images
packer build packer/influxdb.json

Once the build is complete, Packer outputs the InfluxDB Enterprise image names to the terminal and the manifest.json file.

==> Builds finished. The artifacts of successful builds are:
--> enterprise-data: A disk image was created: influxdb-enterprise-data-1-8-2-ubuntu-1611160220
--> enterprise-meta: A disk image was created: influxdb-enterprise-meta-1-8-2-ubuntu-1611160220

The portion of the image name after influxdb-enterprise-data- can be used as the sourceImageVersion property when deploying the DM templates, e.g. 1-8-2-ubuntu-1611160220.

Deploy a cluster

Run the following command to deploy an InfluxDB Enterprise cluster with the images created by Packer.

# Replace "your-gcp-project" with the name of the Google Cloud project
export GOOGLE_CLOUD_PROJECT="your-gcp-project"

# Set this to your InfluxDB Enterprise license key
export INFLUXDB_ENTERPRISE_LICENSE_KEY="xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx"

# Set this to the version string obtained when building the images
export INFLUXDB_ENTERPRISE_IMAGE_VERSION="1-8-2-ubuntu-xxxxxxxx"

gcloud deployment-manager deployments create influxdb-enterprise-0 \
    --template src/influxdb-enterprise.jinja \
    --properties "licenseKey:'${INFLUXDB_ENTERPRISE_LICENSE_KEY}',\
                  sourceImageProject:'${GOOGLE_CLOUD_PROJECT}',\
                  sourceImageVersion:'${INFLUXDB_ENTERPRISE_IMAGE_NAME}'" \
    --automatic-rollback-on-error

Delete the cluster

To delete the cluster, run the following command:

gcloud deployment-manager delete influxdb-enterprise-0

About

GCP Deployment Manager templates for InfluxDB Enterprise.

https://console.cloud.google.com/marketplace/details/influxdata-public/influxdb-enterprise-vm

License:MIT License


Languages

Language:HTML 44.6%Language:Shell 43.5%Language:Python 12.0%