Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPAS 15 - AWS_EPAS_AMI doc #3884

Merged
merged 15 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 131 additions & 0 deletions product_docs/docs/epas/15/planning/deployment_options/aws_epas.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
---
title: "Deploying from an Amazon Machine Image on AWS "
navTitle: Deploying from an AMI
---


EDB Postgres Advanced Server Amazon Machine Image (AMI) is a preconfigured template with EDB Postgres Advanced Server installed on RHEL 8. You can purchase the EDB Postgres Advanced Server AMI from Amazon Marketplace.

With the EDB Postgres Advanced Server AMI, you can:
- Create an EDB Postgres Advanced Server 15 instance on AWS
- Connect to the instance
- Initialize and use an EDB Postgres Advanced Server cluster

## Creating an instance

To deploy an EDB Postgres Advanced Server instance on AWS:

1. Log into your AWS account.

1. On the AWS home page, navigate to EC2.

1. On the EC2 dashboard, navigate to **Instances** and select **Launch instance**.

1. On the **Launch an instance** page, select **Choose an Amazon Machine Image(AMI)**.

1. On the **Choose an Amazon Machine Image(AMI)** page, go to **AWS Marketplace AMIs** tab, type **EDB** in the search bar and choose the EDB Postgres Advanced Server image.

1. Select the **EDB Postgres Advanced Server image** and review the all the tabs:
- Overview
- Product details
- Pricing
- Usage
- Support

1. Select continue to go on the **Launch an instance** page, and specify the following:

- **Name and tags** — Provide the name of the server, for example, `EDB test server`.

- **Application and OS Images (Amazon Machine Image)** &mdash; The selected image name displays in the format `EDB-AS<x>-AWS-<y>`, where:

- `<x>` is the version of EDB Postgres Advanced Server.

- `<y>` is the version of the image.

For example, if the EDB Postgres Advanced Server version is 15.2 and the AMI version is 2.0.1, then the image name is `EDB-AS15.2-AWS-2.0.1`.

- **Instance type** &mdash; Select the instance type with the compute, memory, storage, and network capabilities you require.

- **Key pair (login)** &mdash; Select an existing key pair or create a new key pair. If you create a new key pair, enter a key-pair name, select a key-pair type, and select a private-key file format. Download the new key pair and move it to a location where you can access it. You need a key pair to securely connect to your instance.

- **Network settings** &mdash; For **Firewall**, select an existing security group or create a new security group. For more information, see [Network settings](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-networking.html).

- **Configure storage** &mdash; Allocate the amount of storage you need for your instance.

- **Advanced details** &mdash; Expand the section to view the fields and specify any additional parameters for the instance.

Review the instance details in the **Summary** section on the right panel, and select **Launch instance**.

At last, you see the success message along with the instance id. Select the instance id to view the instance and see the auto-assigned IP address.

## Connecting to an instance

You need the auto-assigned IP address to connect to your instance. To find the IP address, select **Instances** in the navigation pane on the EC2 home page. To view the complete details of your instance, including the IP address, select the instance ID next to your instance name.

1. Open a terminal window.

1. Navigate to the directory containing your key pair.

1. Change the permissions of the key pair:

```shell
chmod 0600 your_key_pair
```

1. Connect to your instance using the key pair:

```shell
ssh -i your_key_pair ec2-user@instance_ip_address
```

You are now connected to the AWS EC2 instance where EDB Postgres Advanced Server is installed.

## Getting started with a cluster

This example steps you through getting started with an EDB Postgres Advanced Server cluster. It includes logging in, ensuring the installation and initial configuration was successful, connecting to your cluster, and creating the user password.

```shell
# Initialize the database cluster
sudo PGSETUP_INITDB_OPTIONS="-E UTF-8" /usr/edb/as15/bin/edb-as-15-setup initdb

# Start the database cluster
sudo systemctl start edb-as-15

# To work in your cluster, login as the enterprisedb user
sudo su - enterprisedb

# Connect to the database server using the psql command line client
psql edb

# Assign a password to the database superuser the enterprisedb
ALTER ROLE enterprisedb IDENTIFIED BY password;

# Create a database (named hr)
CREATE DATABASE hr;

# Connect to the new database and create a table (named dept)
\c hr
CREATE TABLE public.dept (deptno numeric(2) NOT NULL CONSTRAINT dept_pk
PRIMARY KEY, dname varchar(14) CONSTRAINT dept_dname_uq UNIQUE, loc
varchar(13));

# Add data to the table
INSERT INTO dept VALUES (10,'ACCOUNTING','NEW YORK');
INSERT into dept VALUES (20,'RESEARCH','DALLAS');

# You can use simple SQL commands to query the database and retrieve
# information about the data you have added to the table
SELECT * FROM dept;
__OUTPUT__
deptno | dname | loc
--------+------------+----------
10 | ACCOUNTING | NEW YORK
20 | RESEARCH | DALLAS
(2 rows)
```

## Set up the repository

If you need to upgrade EDB Postgres Advanced Server or install any other EDB products, you need to set up the EDB repository. Setting up the repository is a one-time task.

To set up the repository, go to [EDB repositories](https://www.enterprisedb.com/repos-downloads) and follow the instructions provided there.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ redirects:
- /epas/latest/deployment_options/
---

You can deploy and install EDB products using the following methods:
You can deploy and install EDB Postgres Advanced Server using:

- [BigAnimal](/biganimal/latest) is a fully managed database-as-a-service with built-in Oracle compatibility, running in your cloud account and operated by the Postgres experts. BigAnimal makes it easy to set up, manage, and scale your databases. Provision PostgreSQL or EDB Postgres Advanced Server with Oracle compatibility.
- [BigAnimal](/biganimal/latest), a fully managed database-as-a-service with built-in Oracle compatibility. It runs in your cloud account and is operated by the Postgres experts. BigAnimal makes it easy to set up, manage, and scale your databases. Provision PostgreSQL or EDB Postgres Advanced Server with Oracle compatibility.

- [EDB PostgreSQL for Kubernetes](/postgres_for_kubernetes/latest/) is an operator designed by EnterpriseDB to manage PostgreSQL workloads on any supported Kubernetes cluster running in private, public, hybrid, or multi-cloud environments. EDB PostgreSQL for Kubernetes adheres to DevOps principles and concepts such as declarative configuration and immutable infrastructure.
- [EDB PostgreSQL for Kubernetes](/postgres_for_kubernetes/latest/), an operator designed by EnterpriseDB to manage PostgreSQL workloads on any supported Kubernetes cluster running in private, public, hybrid, or multi-cloud environments. EDB PostgreSQL for Kubernetes adheres to DevOps principles and concepts such as declarative configuration and immutable infrastructure.

- [Installation using native packages or installers](../../installing)
- [EDB Postgres Advanced Server AMI](aws_epas), which is an Amazon Machine Image containing EDB Postgres Advanced Server. It's available from Amazon Marketplace.

- Native packages or installers. See [Installing EDB Postgres Advanced Server](/epas/latest/installing).