Deploying a server can be a time-consuming process, but with the help of Terraform, it’s easier than ever. Terraform is an open-source tool that automates the deployment and management of infrastructure, making it an ideal choice for quickly and efficiently setting up a Striim server in the cloud or on-premise. With the help of Striim‘s streaming Extract, Transform, and Load (ETL) data platform, data can be replicated and transformed in real-time, with zero downtime, from a source database to one or more target database systems. Striim enables your analytics team to work more efficiently and migrate critical database systems.
In this blog post, we’ll walk through the steps of how to use Terraform to automate the deployment of a Striim server in AWS.
Access to an AWS account including the Access Key ID and Secret Access Key.
Have an available Linux machine.
General understanding of what Striim is.
A Striim license. For free trials, go to https://go2.striim.com/free-trial.
Install and Setup Terraform
In order to automate the deployment of a Striim server, we’ll first need to install Terraform on our CentOS Linux machine.
Let’s log in to it and enter the following commands into the terminal:
sudo yum install -y yum-utils
sudo yum-config-manager – add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
sudo yum -y install terraform
If you’re using a different operating system, please find the appropriate instructions in this link: https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli
We’ll be using Terraform version 1.3.6 in this tutorial. Please verify the version by running this command:
Terraform v1.3.6 on linux_amd64If
Once the installation is successful, we can authenticate to our AWS account by exporting the AWS_ACCESS_KEY_ID , AWS_SECRET_ACCESS_KEY and AWS_REGION environment variables:
For more information about getting your AWS access keys from an IAM user, please visit this link: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html
After the installation process, we can create a directory named striim_server_tf and add the following files inside:
main.tf — will include the primary set of configuration for your module. Additionally, you can create additional configuration files and arrange them in a way that makes sense for your project:
variables.tf — will contain the variable definitions for your module:
As was mentioned above in the “Striim Credentials and License Information” section from the variables.tf file, we will need to set Striim’s license information and user passwords as environment variables since they are confidential values:
Terraform will then be instructed to search for the variable’s value in the environment variable by the TF_VAR_ prefix. More information: https://developer.hashicorp.com/terraform/cli/config/environment-variables
Once we have these files created, we should see a directory and file structure like this:
At this point, we have configured our Terraform environment to deploy a Striim server to our AWS account and written Terraform code to define the server. To deploy it, we can now execute the two Terraform commands, terraform plan and terraform apply, inside of the striim_server_tf directory.
The terraform plan command lets the user preview the changes (create, destroy, and modify) that Terraform plans to make to your overall infrastructure.
The terraform apply command executes the actions proposed in a Terraform plan.
If these commands executions are successful, you should see a message at the end of your terminal with the following message:
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Verify the Deployment
To verify the Striim server deployment, navigate to the AWS EC2 console and search for striim-server:
Make sure it’s in a Running state and Status check is 2/2 checks passed.
Next, enter the public IP address of the server with :9080 at the end of the url in a web browser and check to see if Striim is up and running:
Enter your credentials and verify you can log in to Striim console:
By leveraging Terraform and its Infrastructure-as-Code approach, deploying a Striim server can be automated with ease. It allows organizations to save time and money by quickly spinning up Striim servers, which can be used for data migration or zero downtime replication. This blog post provided an overview of how to use Terraform to set up and deploy a Striim server, as well as how to verify that the deployment was successful. With Terraform, it is possible to automate the entire process, making it easier than ever to deploy and manage cloud infrastructure. In addition to this, using Striim Cloud can fully automate this entire process. Visit the Striim Cloud page for a fully managed SaaS service/solution and Pay As You Go option to reduce total cost of ownership.