Skip to content

Terraform template to build a MariaDB ColumnStore server in CSC cPouta with SDD ZFS caching

Notifications You must be signed in to change notification settings

HPC-HD/pouta-mariadb-terraform

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploying a MariaDB Database on cPouta using Terraform

The aim of this repository is to set up a MariaDB database on cPouta using Terraform.

Note: The default variables will need to be modified or overridden using the -var flags

Installation

We need to install some tools before we start

OpenStack

Follow the instructions from the CSC documentation to install the OpenStack command line tools. Ensure you download the OpenStack RC file as described here and execute the following command to add the environment variables

source <project_name_here>-openrc.sh

You will be prompted to enter your CSC password.

To verify that the setup worked run

openstack flavor list

which will list all the available flavors as seen here.

Terraform

Install Terraform suitable to the operating system on your local device.

Deployment

There are three different stacks that can be deployed

  1. networking : The networking configuration that will be common. Needs to be run once
  2. cloud-volume: Creating a new persistent data volume
  3. server: Creating a server instance for Neo4J

Fresh Deployment

When deploying for the first time you will need to first create the floating IP address, the security group (and its rules) once.

First create a ssh keypair:

ssh-keygen -t rsa cloud.key

Then create the networking stack using the following commands:

cd networking
terraform init
terraform apply --var 'ssh_key_file=../cloud.key'

Note the floating ip address manually or by using terraform output -json > ./networking.json.

Next, create the cloud-volume stack by executing the following commands from the root directory to create 1600GB storage:

cd storage
terraform init 
terraform apply --var 'storage_size=1638400'

This will create a default persistent data volume. Save the name of the volume_id for the next steps either manually or by using terraform output -json > ./storage.json

Next, create the server stack by executing the following commands from the root directory:

cd server
terraform init
terraform apply 

This will ask the values the volume-id, floating-ip and other variables from the previous stacks.

Accessing the database

Use host -a <floating-ip-address> to find the DNS name of the IP. Use this as the host to connect to MariaDB from any SQL client like DBeaver.

About

Terraform template to build a MariaDB ColumnStore server in CSC cPouta with SDD ZFS caching

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 100.0%