Automate Cloud SQL Maintenance Upgrades on GCP

What’s this?

Organizations that use Cloud provider DBaaS solutions face a common scenario where they need to Upgrade there DB instances frequently due to patching process or Upgrading to Minor Patch.

This article talks about one of the way…


This content originally appeared on DEV Community and was authored by Gaurav Pande

What's this?

Organizations that use Cloud provider DBaaS solutions face a common scenario where they need to Upgrade there DB instances frequently due to patching process or Upgrading to Minor Patch.

This article talks about one of the way to automate and handle these types of Patch/Minor Version Upgrades on Google Cloud Platform using Automate Cloud SQL Maintenance.

Tools Used:

  • Github Actions for CD.
  • Slack Incoming Webhook for Alerting/Notification.

Pre-requisite:

  • The Github Action workflow uses GCP Workload Identity Federation thus would need a WIF Pool and Github OIDC provider setup along with a GCP Service Account with Cloud SQL Admin role. Check How to enable Github Action to use WIF for GCP

  • A Self Hosted Github Runner on your GCP Environment. Example can be Bastion GCE VM having gcloud cli installed can be used for this purpose.

  • An Incoming WebHook Enabled on slack and a Webhook Endpoint URL to post Notifications on Slack.

Workflow:

This uses Github Actions as a CD tool to achieve upgrade of GCP Cloud SQL instances by running action as a cronjob and checks if new version is available. If found it notifies user on slack and proceeds with an Upgrade to that new Version and once Upgrade is completed Notifies user again about completion on slack.


This content originally appeared on DEV Community and was authored by Gaurav Pande


Print Share Comment Cite Upload Translate Updates
APA

Gaurav Pande | Sciencx (2024-07-16T05:10:12+00:00) Automate Cloud SQL Maintenance Upgrades on GCP. Retrieved from https://www.scien.cx/2024/07/16/automate-cloud-sql-maintenance-upgrades-on-gcp/

MLA
" » Automate Cloud SQL Maintenance Upgrades on GCP." Gaurav Pande | Sciencx - Tuesday July 16, 2024, https://www.scien.cx/2024/07/16/automate-cloud-sql-maintenance-upgrades-on-gcp/
HARVARD
Gaurav Pande | Sciencx Tuesday July 16, 2024 » Automate Cloud SQL Maintenance Upgrades on GCP., viewed ,<https://www.scien.cx/2024/07/16/automate-cloud-sql-maintenance-upgrades-on-gcp/>
VANCOUVER
Gaurav Pande | Sciencx - » Automate Cloud SQL Maintenance Upgrades on GCP. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/07/16/automate-cloud-sql-maintenance-upgrades-on-gcp/
CHICAGO
" » Automate Cloud SQL Maintenance Upgrades on GCP." Gaurav Pande | Sciencx - Accessed . https://www.scien.cx/2024/07/16/automate-cloud-sql-maintenance-upgrades-on-gcp/
IEEE
" » Automate Cloud SQL Maintenance Upgrades on GCP." Gaurav Pande | Sciencx [Online]. Available: https://www.scien.cx/2024/07/16/automate-cloud-sql-maintenance-upgrades-on-gcp/. [Accessed: ]
rf:citation
» Automate Cloud SQL Maintenance Upgrades on GCP | Gaurav Pande | Sciencx | https://www.scien.cx/2024/07/16/automate-cloud-sql-maintenance-upgrades-on-gcp/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.