@@ -20,16 +20,7 @@ Follow the steps in the sections below to prepare an
2020[ AWS Aurora PostgreSQL] ( https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_GettingStartedAurora.CreatingConnecting.AuroraPostgreSQL.html )
2121database to work with RDI.
2222
23- ## 1. Create an Amazon Elastic Compute Cloud instance
24-
25- Follow the instructions in
26- [ Amazon's documentation] ( https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_GettingStartedAurora.CreatingConnecting.AuroraPostgreSQL.html#CHAP_GettingStarted.Creating.AuroraPostgreSQL.EC2 )
27- to create an Elastic Compute Cloud (EC2) instance for the database, if you don't
28- already have one available. If you want to run the RDI PostgreSQL demo,
29- you should select "Docker on Ubuntu 20.04 LTS" as the Amazon Machine Image (AMI)
30- and specify a disk size of 50GB.
31-
32- ## 2. Create a parameter group
23+ ## 1. Create a parameter group
3324
3425In the [ Relational Database Service (RDS) console] ( https://console.aws.amazon.com/rds/ ) ,
3526navigate to ** Parameter groups > Create parameter group** . You will see the panel shown
@@ -49,7 +40,7 @@ Enter the following information:
4940
5041Select ** Create** to create the parameter group.
5142
52- ## 3 . Edit the parameter group
43+ ## 2 . Edit the parameter group
5344
5445Navigate to ** Parameter groups** in the console. Select the ` rdi-aurora-pg `
5546group you have just created and then select ** Edit** . You will see this panel:
@@ -59,118 +50,9 @@ group you have just created and then select **Edit** . You will see this panel:
5950Search for the ` rds.logical_replication ` parameter and set its value to 1. Then,
6051select ** Save Changes** .
6152
62- ## 4. Create the Aurora PostgreSQL DB cluster
63-
64- In the navigation pane of the console, select ** Databases** and then
65- select ** Create Database** . You will see the panel shown below:
66-
67- {{<image filename =" images/rdi/ingest/prepsrc/aurora-pgsql/CreateDB1.jpg " alt =" Create Database panel " >}}
68-
69- Select the ** Standard Create** option and select ** Aurora (PostgreSQL compatible)**
70- from the ** Engine Options** . Leave the ** Available Versions** popup menu with
71- its default value.
72-
73- In the panel shown below, select ** Dev/Test** from the ** Templates** . In the
74- ** Settings** , set the ** DB cluster identifier** to ` gvb-database ` and set the
75- ** Master Password** . Make sure your password is verified as very strong or
76- use the ** Auto generate password** option.
77-
78- {{<image filename =" images/rdi/ingest/prepsrc/aurora-pgsql/CreateDB2.jpg " alt =" Templates panel " >}}
79-
80- Next, scroll down to ** Cluster Storage Configuration** (shown below). Ensure that
81- ** Aurora Standard** is selected in the ** Configuration Options** . In the
82- ** Instance Configuration** , ensure ** Memory optimized classes** is selected.
83-
84- {{<image filename =" images/rdi/ingest/prepsrc/aurora-pgsql/CreateDB3.jpg " alt =" Cluster Storage Configuration panel " >}}
85-
86- Then, in ** Availability and Durability** (shown below), ensure ** Don't create an Aurora replica**
87- is selected. In ** Connectivity** , ensure ** Connect to an EC2 compute resource** is selected.
53+ ## 3. Select the new parameter group
8854
89- {{<image filename =" images/rdi/ingest/prepsrc/aurora-pgsql/CreateDB4.jpg " alt =" Availability and Durability panel " >}}
90-
91- Further down, under ** DB Subnet Group** , select ** Automatic Setup** .
92- For the ** VPC Security Group** , select ** Create New** and add ` gvb-aurora-pg ` as the
93- ** New VPC security group name** .
94-
95- {{<image filename =" images/rdi/ingest/prepsrc/aurora-pgsql/CreateDB5.jpg " alt =" DB Subnet Group panel " >}}
96-
97- Scrolling down to ** Additional Configuration** set the ** DB Cluster Parameter Group**
98- to the value ` gvb-aurora-pg ` that you added earlier:
55+ Scroll down to ** Additional Configuration** . Set the ** DB Cluster Parameter Group**
56+ to the value ` rdi-aurora-pg ` that you have just added:
9957
10058{{<image filename =" images/rdi/ingest/prepsrc/aurora-pgsql/CreateDB6.jpg " alt =" Additional Configuration panel " >}}
101-
102- The final panel shows the estimated monthly costs for the database. If you are happy
103- that the configuration is correct, select ** Create Database** .
104-
105- ## 5. Install PostgreSQL on Ubuntu 20.04
106-
107- First, ensure your system is up-to-date by running the following commands:
108-
109- ``` bash
110- sudo apt update
111- sudo apt upgrade
112- ```
113-
114- Then, install some packages that will be needed during installation:
115-
116- ``` bash
117- sudo apt install dirmngr ca-certificates software-properties-common apt-transport-https lsb-release curl -y
118- ```
119-
120- To begin installing PostgreSQL, import the GPG key to verify the installation package:
121-
122- ``` bash
123- curl -fSsL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /usr/share/keyrings/postgresql.gpg > /dev/null
124- ```
125-
126- Then, import the stable version of the PostgreSQL 15 APT repository:
127-
128- ``` bash
129- echo deb [arch= amd64,arm64,ppc64el signed-by= /usr/share/keyrings/postgresql.gpg] http://apt.postgresql.org/pub/repos/apt/ $( lsb_release -cs) -pgdg main | sudo tee /etc/apt/sources.list.d/postgresql.list
130- ```
131-
132- Finally, update the repository and proceed with the PostgreSQL installation:
133-
134- ``` bash
135- sudo apt update
136- sudo apt install -y postgresql-client-15 postgresql-15
137- ```
138-
139- ## 6. Get the database endpoint
140-
141- In the navigation pane of the console, select ** Databases** and then
142- select ` gvb-database ` , which we have just created. Copy the ` writer `
143- endpoint name (highlighted in the screenshot):
144-
145- {{<image filename =" images/rdi/ingest/prepsrc/aurora-pgsql/GetDBEndpoint.jpg " alt =" Get Database endpoint panel " >}}
146-
147- ## 7. Connect to the database
148-
149- You can now connect to the Aurora PostgreSQL with the PostgreSQL client
150- (installed in [ step 5] ( #5-install-postgresql-on-ubuntu-2004 ) ) using the
151- following command. The endpoint name is the one you just copied in
152- step 6 above.
153-
154- ``` bash
155- psql --host=< copied-endpoint-name> --dbname=postgres --username=postgres
156- ```
157-
158- ## 8. Create and populate the Chinook test database (optional)
159-
160- We provide a test database schema and data set called ` chinook ` ,
161- which is useful for learning about RDI and understanding the
162- [ job file examples] ({{< relref "/integrate/redis-data-integration/data-pipelines/transform-examples" >}}).
163-
164- To install ` chinook ` on your Aurora PostgreSQL instance,
165- first create the database with the following command:
166-
167- ``` bash
168- psql -h < your-endpoint-name> -U postgres postgres -f ./chinook-create-db.sql
169- ```
170-
171- You can then populate the new database with our data set using this
172- command:
173-
174- ``` bash
175- psql -h gvb-database.cluster-cdrk45f3oozw.eu-west-2.rds.amazonaws.com -U postgres chinook -f ./chinook-init-db.sql
176- ```
0 commit comments