A Terraform module to create an Exasol cluster with default settings for testing on Amazon AWS.
See Terraform module.
This module is based on terraform-aws-exasol. In addition, it adds the following functionality:
- Use random generated passwords
- Create a VPC, Subnet, and Security Group
- Generate an SSH key for public key authentication
- Write the credentials and keys on local disk
By that, this module allows you to quickly create an Exasol cluster for testing.
-
Create a folder for your terraform configuration. E.g.
exasolClusterSetup
-
Create a
exasolClusterSetup.tf
provider "aws" { region = "eu-central-1" } module "exasol_setup" { source = "exasol/exasol-test-setup/aws" version = "<LATEST VERSION>" # Replace this with the latest version of terraform-aws-exasol-test-setup. owner = "<YOU_EMAIL>" deputy = "<DEPUTY_EMAIL>" datanode_count = 1 project = "<PROJECT_SHORT_TAG>" }
The value of
owner
anddeputy
will be added to all tags asexa:owner
andexa:deputy
. By that you know whom this cluster belongs to. -
Create a
.gitignore
file in the current directoryterraform.tfstate .terraform *.lic *.info terraform.tfstate.backup *.tfvars *.lock.hcl generated/
-
Now run
terraform init
andterraform apply
. Terraform will now create the cluster. That takes about half an hour.Additionally it might be required to specify your AWS profile selected in file
~/.aws/config
:AWS_DEFAULT_PROFILE=<NAME OF PROFILE> terraform apply
-
After that you can connect to the cluster. You can find the credentials in
generated/testConfig.json
.
This module only exposes the SSH port (and currently 443 due to a limitation in terraform-aws-exasol). That means that you and attackers can't directly access the SQL interface from outside the VPC. So if you want to connect to the database from you PC you need an SSH-tunnel.
The module generates some script to set up these tunnels:
generated/sshTunnelAdminPage.sh
: Create an SSH tunnel for ExaOperation. You can connect to localhost:443 afterwards.generated/sshTunnelSql.sh
: Create an SSH tunnel for the SQL interface. You can connect to localhost:8562 afterwards.generated/sshToCluster.sh
: Just opens an SSH connection so that you can run commands in the database.