Installing the HKT CLI

To successfully deploy you will need a few tools installed and we'd recommend getting some environment variables created as well to make life easier.

Supporting Tools

To deploy Hydrolix in GCP you will need to have some supporting tools installed. You should make sure these are installed first.

Hydrolix GCP uses Kubernetes and you will need the Google Cloud CLI and kubectl installed.

You can check if they are installed by:

which kubectl
which gcloud

Set-up Environment Variables

We'd also recommend setting up some environment variables using a env.sh script, to make the installation easier:

cat <<<<EOT >>>> env.sh
export CLIENT_ID=hdxcli-abcd1234
export [email protected]
export OWNER=admin
export HYDROLIX_HOST=data
export HYDROLIX_DOMAIN=company.com
export CLOUD=gcp
export REGION=us-central1
export HKT_VERSION=v3.15.1
export HYDROLIX_NAMESPACE=${CLIENT_ID}
export HYDROLIX_DB_BUCKET=${CLIENT_ID}
EOT

More information on each of the values are below.

Variable

Description

Example

CLIENT_ID

The Hydrolix CLIENT_ID is a unique identifier used to generate bucket names and differentiate between clusters.

Client ID may be any 8 alphanumeric characters, but please be careful to avoid collisions.

hdxcli-asdf1234

ADMIN_EMAIL

Initial login credentials will be send this email address.

[email protected]

OWNER

Legacy setting - leave as admin

admin

HYDROLIX_HOST

The hostname you will use to access your hydrolix cluster.

hydrolix

HYDROLIX_DOMAIN

The domain name you will use to access your hydrolix cluster.

mycompany.com

CLOUD

Currently supported values are aws or gcp. For other S3-compatible platforms (eg, Linode or MinIO), use aws.

gcp

REGION

Select a location for your cloud provider storage bucket

us-central1

PROJECT_ID

The Google Project ID for the project you will be deploying into.

prod-1234

HKT_VERSION

The version of HKT you wish to use.

v3.8.2

HYDROLIX_NAMESPACE

The Namespace name you wish to use. We suggest leaving this as the ${CLIENT_ID}.

${CLIENT_ID}

HYDROLIX_DB_BUCKET

The Bucket the Database is held in. We suggest leaving this as ${CLIENT_ID}. If you do change its often easier to keep both the bucket and Namespace the same name.

${CLIENT_ID}

To add the variables to your environment you can use the following command.

source env.sh

If you want to check the environment variables are set.

printenv | sort

Install hkt - Hydrolix Kubernetes Toolkit

The final tool you should install is hkt.

This tool is a binary which helps to generate the yaml configuration files you will need to deploy your Hydrolix platform. These configuration files include:

👍

Get the latest version of hkt

$curl -s -o hkt https://hdx-infrastructure.s3.amazonaws.com/hkt/hkt-${HKT_VERSION} && chmod +x hkt

👍

Move the binary to your local bin folder

$ sudo mv hkt ~/.local/bin/

OR

$ sudo mv hkt /usr/local/bin/

Verify the installation by typing hkt:

$ hkt
Usage: python -m hkt [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  get-resources
  hydrolix-cluster
  operator-resources
  scale-defaults

📘

Hydrolix makes updates to the service and software regularly and it is advisable to check for the newest release. Release notes and previous versions can be found on the current release notes page

Congratulations that's the boring bit done! The next step is to deploy the platform! Huzzah!


Did this page help you?