Create a PostgreSQL server in BlueXP workload factory
Creating a new PostgreSQL server, or database host, in BlueXP workload factory for Databases requires an FSx for ONTAP file system deployment and resources for Active Directory.
Before creating a PostgreSQL server from BlueXP workload factory, learn about the available storage deployment types for the database host configuration, workload factory modes of operation, and the requirements to complete this operation.
- FSx for ONTAP file system deployments
-
Creating a new PostgreSQL server requires an FSx for ONTAP file system as the storage backend. You can use an existing FSx for ONTAP file system or create a new file system. If you select an existing FSx for ONTAP file system as your database server storage backend, we create a new storage VM for the PostgreSQL workloads.
FSx for ONTAP file systems have two PostgreSQL server deployment models: High Availability (HA) or single instance. Different resources are created for the FSx for ONTAP file system depending on the FSx for ONTAP deployment model you select.
-
High Availability (HA) deployment: A Multiple Availability Zone FSx for NetApp ONTAP file system is deployed when a new FSx for ONTAP file system is selected for HA deployment. Separate volumes and LUNs are created for data, log, and tempdb files for an HA deployment. An additional volume and LUN are created for Quorum or witness disk for Windows cluster. HA deployment configures Streaming replication between the primary and secondary PostgreSQL servers.
-
Single instance deployment: A Single Availability Zone FSx for ONTAP file system is created when a new PostgreSQL server is created. In addition, separate volumes and LUNs are created for data, log, and tempdb files.
-
- Workload factory operation modes
-
Workload factory offers three operational modes depending on how comfortable you are with letting workload factory manage your AWS resources.
Basic mode: in this mode of operation, you don't need to associate any AWS account credentials in workload factory. You can copy or download a partially filled YAML template from the Codebox to be completed outside workload factory.
Read mode: in this mode of operation, you provide AWS account credentials with read permissions which lets you complete the Quick create or Advanced create form and then copy or download it. You can also redirect to CloudFormation from workload factory with the completed form details. And you will be able to manage the deployed database server in workload factory.
Automate mode: in this mode of operation, you provide AWS account credentials with automate permissions which lets you create and manage AWS resources within workload factory.
Ensure you have the following prerequisites before you create a new database host.
- Credentials and permissions
-
You must have AWS account credentials and automate mode permissions to create a new database host in workload factory.
Create a database server
You can use Quick create or Advanced create deployment modes to complete this task in workload factory with Automate mode permissions. You can also use the following tools available in the Codebox: REST API, AWS CLI, AWS CloudFormation, and Terraform. Learn how to use Codebox for automation.
|
When using Terraform from Codebox, the code you copy or download hides fsxadmin and vsadmin passwords. You'll need to re-enter the passwords when you run the code. You'll need to include the following permissions for the user account in addition to Automate mode permissions: iam:TagRole and iam:TagInstanceProfile . Learn how to use Terraform from Codebox.
|
|
In Quick create, HA is the default deployment model, Windows 2016 is the default Windows version, and SQL 2019 Standard Edition is the default SQL version. |
-
Log in using one of the console experiences.
-
In the Databases tile, select Deploy database host and then select PostgreSQL Server from the dropdown menu.
-
Select Quick create.
-
Under Landing zone, provide the following:
-
AWS credentials: Select AWS credentials with automate permissions to deploy the new database host.
AWS credentials with automate permissions let workload factory deploy and manage the new database host from your AWS account within workload factory.
AWS credentials with read permissions let workload factory generate a CloudFormation template for you to use in the AWS CloudFormation console.
If you don't have AWS credentials associated in workload factory and you want to create the new server in workload factory, follow Option 1 to go to the Credentials page. Manually add the required credentials and permissions for automate mode for Database workloads.
If you want to complete the create new server form in workload factory so you can download a complete YAML file template for deployment in AWS CloudFormation, follow Option 2 to ensure you have the required permissions to create the new server within AWS CloudFormation. Manually add the required credentials and permissions for read mode for Database workloads.
Optionally, you can download a partially completed YAML file template from the Codebox to create the stack outside workload factory without any credentials or permissions. Select CloudFormation from the dropdown in the Codebox to download the YAML file.
-
Region & VPC: Select a Region and VPC network.
Ensure security groups for an existing interface endpoint allow access to HTTPS (443) protocol to the selected subnets.
AWS service interface endpoints (SQS, FSx, EC2, CloudWatch, CloudFormation, SSM) and the S3 gateway endpoint are created during deployment if not found.
VPC DNS attributes
EnableDnsSupport
andEnableDnsHostnames
are modified to enable endpoint address resolution if they aren't already set totrue
. -
Availability zones: Select availability zones and subnets.
HA deployments are only supported on Multiple Availability Zone (MAZ) FSx for ONTAP configurations. Subnets should not share the same route table for high availability.
-
In the Cluster configuration - Node 1 field, select the primary availability zone for the MAZ FSx for ONTAP configuration from the Availability zone dropdown menu and a subnet from the primary availability zone from the Subnet dropdown menu.
-
In the Cluster configuration - Node 2 field, select the secondary availability zone for the MAZ FSx for ONTAP configuration from the Availability zone dropdown menu and a subnet from the secondary availability zone from the Subnet dropdown menu.
-
-
-
Under Application settings, enter a user name and password for Database credentials.
-
Under Connectivity, select a key pair to connect securely to your instance.
-
Under Infrastructure settings, provide the following:
-
FSx for ONTAP system: Create a new FSx for ONTAP file system or use an existing FSx for ONTAP file system.
-
Create new FSx for ONTAP: Enter user name and password.
A new FSx for ONTAP file system may add 30 minutes or more of installation time.
-
Select an existing FSx for ONTAP: Select FSx for ONTAP name from the dropdown menu, and enter a user name and password for the file system.
For existing FSx for ONTAP file systems, ensure the following:
-
The routing group attached to FSx for ONTAP allows routes to the subnets to be used for deployment.
-
The security group allows traffic from the subnets used for deployment, specifically HTTPS (443) and iSCSI (3260) TCP ports.
-
-
-
Data drive size: Enter the data drive capacity and select the capacity unit.
-
-
Summary:
-
Preview default: Review the default configurations set by Quick create.
-
Estimated cost: Provides an estimate of charges that you might incur if you deployed the resources shown.
-
-
Click Create.
Alternatively, if you want to change any of these default settings now, create the database server with Advanced create.
You can also select Save configuration to deploy the host later.
You can manually configure users, remote access, and databases on the deployed PostgreSQL server.