Hello and welcome! In this article, we're taking a deep dive into an exciting new method of scaling the Azure Database for PostgreSQL Flexible Server with the help of Azure Automation Tasks.
But before we begin, let's first understand what Azure Database for PostgreSQL Flexible Server is. This service is a fully managed database offering from Microsoft Azure that combines the power, flexibility, and reliability of the open-source PostgreSQL database system with the administrative ease and robust features of Azure. It offers flexible compute and storage options, enabling you to adjust resources according to your application needs. Moreover, it also supports high availability and automatic backups, ensuring your data is secure and readily accessible. To learn more, refer What is Azure Database for PostgreSQL Flexible Server.
A brief on Automation Tasks
Automation Tasks, a groundbreaking feature introduced by Microsoft Azure, primarily aims at designing resource-specific tasks on a per-resource basis. Ranging from day-to-day operations on virtual machines such as power cycling to deletion of old blobs from a storage account, these tasks can be customized to suit a plethora of resources including virtual machines, storage accounts, and resource groups.
While Azure Automation Tasks is still in its nascent stage, its potential to build an extensive database of generic tasks for different resources is undeniable and something we are excited to witness unfold. For more information, refer What is Azure Automation.
Integrating Azure Automation Tasks with PostgreSQL Flexible Server
The beauty of Azure Automation Tasks lies in its simplicity and adaptability. It seamlessly integrates with Azure Database for PostgreSQL Flexible Server to streamline operations. For instance, let's consider a scenario where there's a need to scale server resources at predetermined time intervals. With Azure Automation Tasks, you can program this operation to be executed automatically, eliminating any manual intervention. This degree of automation not only enhances the efficiency of managing server resources but also minimizes the risk of human error.
Create an automation task to scale server resources: A Step-by-Step Guide
- In the Azure portal, find the PostgreSQL Flexible Server resource that you want to manage.
- On the resource navigation menu, in the Automation section, select Tasks.
- On the Tasks pane, select Add a task to select a task template. Select Scale PostgreSQL Flexible Server
- Under Authenticate, in the Connections section, select Create for every connection that appears in the task so that you can provide authentication credentials for all the connections. The types of connections in each task vary based on the task.
- When you're prompted, sign in with your Azure account credentials.
- Each successfully authenticated connection looks similar to this example.
- After you authenticate all the connections, select Next: Configure.
- Under Configure, provide a name for the task and any other information required for the task. When you're done, select Review + create.
- Tasks that send email notifications require an email address.
After creation, the Automation Task is associated with the server and functions in the background as a Logic App, which can be accessed and modified if necessary. The task you've created, which is automatically live and running, will appear on the Tasks list.
- To view a task's history of runs along with their status:
- In the Azure portal, find the PostgreSQL Flexible Server resource that you want to manage.
- On the resource navigation menu, in the Automation section, select Tasks.
- In the tasks list, find the task that you want to review. In that task's Runs column, select View.
What's more about Azure Automation Tasks?
Azure Automation Tasks are dynamic and extend well beyond just scaling servers. As of writing this post, you can accomplish following using Automation Tasks:
- Start / Stop PostgreSQL Flexible Server – Refer ‘Step-by-Step tutorial for Start/Stop Server using Automation Tasks’.
- Send monthly cost of resource – Refer ‘Monitor costs by using Automation Tasks’.
In Conclusion
Azure Automation Tasks signify a significant leap in Azure resource management. As the feature evolves, we anticipate it becoming an indispensable tool for all Azure users, simplifying tasks and boosting efficiency. Please note that Automation Tasks leverage Logic App pricing, hence there is a nominal cost incurred each time a task is triggered. However, the advantages in terms of automation and resource management greatly offset this minimal cost.
We invite you to experience Azure Automation Tasks with your own subscription and share your thoughts with us. You can always reach out to our team of Postgres experts at Ask Azure DB for PostgreSQL.
Updated Oct 15, 2024
Version 3.0varun-dhawan
Microsoft
Joined August 26, 2022
Azure Database for PostgreSQL Blog
Follow this blog board to get notified when there's new activity