4

Deploying Percona Monitoring and Management With Terraform

 1 year ago
source link: https://www.percona.com/blog/deploying-percona-monitoring-and-management-with-terraform/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Deploying Percona Monitoring and Management With Terraform

February 14, 2023

Recently, we released Percona Monitoring and Management 2.34 (PMM) which includes upgrades for backup and Database as a Service (DBaaS) features, and we are seeking ways to simplify PMM deployment.

Previously I wrote about our Terraform provider to deploy Percona Server for MySQL — Percona Server for MySQL: Automatic Cloud Deployment with Terraform — and now we added capabilities to deploy PMM with Terraform.

You need the provider version 0.9.10 and PMM can be deployed as:

Shell
resource "percona_pmm" "pmm" {
  instance_type            = "t3.micro"                    
  key_pair_name            = "sshKey1"                    
  path_to_key_pair_storage = "/tmp/"                      
  volume_type              = "gp2"                        

Overall I like using Terraform as it offers the following benefits:

  1. Automation: Terraform automates the process of creating, updating, and managing infrastructure, reducing the risk of errors and increasing efficiency.
  2. Versioning: Terraform allows you to version control your infrastructure, making it easier to track changes and collaborate with others.
  3. Scalability: Terraform makes it easy to scale infrastructure up or down, so you can quickly adapt to changing needs.
  4. Reusability: Terraform provides reusable infrastructure components, so you don’t have to recreate the same infrastructure for different projects or environments.
  5. Portability: Terraform’s infrastructure as code approach makes it easy to move infrastructure between different cloud providers or data centers.
  6. Improved Collaboration: Terraform enables multiple team members to work together on infrastructure projects, improving collaboration and reducing the risk of configuration drift.

As another example, we also added PMM monitoring when deploying Percona Server for MySQL instances with Terraform:

Shell
resource "percona_ps" "ps" {
  count = 1
  instance_type            = "t3.micro" # for AWS
  key_pair_name            = "sshKey1"
  password                 = "password"
  replication_type         = "async"                          
  replication_password         = "replicaPassword"
  cluster_size             = 3
  path_to_key_pair_storage = "/tmp/"
  pmm_address              = "http://admin:[email protected]"    

The source code for our Terraform provider is here:

Percona-Lab/terraform-provider-percona: Terraform modules to deploy Percona Server and Percona XtraDB Cluster (github.com)

And you are welcome to use our prepackaged binaries from Percona-Lab/percona | Terraform Registry.

Percona Monitoring and Management is a best-of-breed open source database monitoring solution. It helps you reduce complexity, optimize performance, and improve the security of your business-critical database environments, no matter where they are located or deployed.

Download Percona Monitoring and Management Today

Subscribe
Connect with
guest
Label
0 Comments

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK