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

fix chef-automate test command exit error and ha cert doc update #7898

Merged
merged 29 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
dece5f5
fix automate test command
vivekshankar1 May 18, 2023
4f8bac5
doc changes for ha certificates
vivekshankar1 May 19, 2023
7ace093
changes for lb root ca
vivekshankar1 May 22, 2023
7d1e78a
added pages for rds and os
vivekshankar1 May 25, 2023
69cb525
added page tags
vivekshankar1 May 25, 2023
bb9457a
small formatting
vivekshankar1 May 25, 2023
ef9cb14
small changes
vivekshankar1 May 25, 2023
35ad174
formatted
vivekshankar1 May 25, 2023
3beeb99
typo
vivekshankar1 May 25, 2023
d89febe
updates create pg os references
vivekshankar1 May 26, 2023
7e8575d
updated link
vivekshankar1 May 26, 2023
4390a38
updated link
vivekshankar1 May 26, 2023
f6c9c62
updated link
vivekshankar1 May 26, 2023
3add1a1
updated title
vivekshankar1 May 29, 2023
363009c
updated version
vivekshankar1 May 29, 2023
5c714f8
aws doc link
vivekshankar1 May 29, 2023
8aea0b0
added more
vivekshankar1 May 30, 2023
337ee51
added more
vivekshankar1 May 30, 2023
5795c77
added small change
vivekshankar1 May 30, 2023
cf412f6
added small change
vivekshankar1 May 30, 2023
93d342c
added small change
vivekshankar1 May 30, 2023
ac7fa05
added small change
vivekshankar1 May 30, 2023
b97858c
link changes
vivekshankar1 May 30, 2023
78093c9
add export to infra restore
vivekshankar1 May 30, 2023
0a4d063
add export to infra restore
vivekshankar1 May 30, 2023
95ac71b
self managed pg text
vivekshankar1 May 30, 2023
d04a159
made some formattting changes
dishanktiwari2501 May 30, 2023
ed21011
change heading and format
vivekshankar1 May 30, 2023
da30068
change heading and format
vivekshankar1 May 30, 2023
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
96 changes: 54 additions & 42 deletions components/automate-cli/cmd/chef-automate/initConfigHaTmpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,13 @@ config_file = "configs/automate.toml"

# Set enable_custom_certs = true to provide custom certificates during deployment
enable_custom_certs = false
# Add Automate load balancer root-ca and keys
# root_ca = ""
# private_key = ""
# public_key = ""

# Add Automate Load Balancer root-ca
# root_ca = """root_ca_contents"""

# Add Automate node internal public and private keys
# private_key = """private_key_contents"""
# public_key = """public_key_contents"""


[chef_server.config]
Expand All @@ -79,9 +82,10 @@ instance_count = ""

# Set enable_custom_certs = true to provide custom certificates during deployment
enable_custom_certs = false
# Add Chef Server load balancer root-ca and keys
# private_key = ""
# public_key = ""

# Add Chef Server node internal public and private keys
# private_key = """private_key_contents"""
# public_key = """public_key_contents"""

## === ===

Expand All @@ -94,12 +98,13 @@ instance_count = ""

# Set enable_custom_certs = true to provide custom certificates during deployment
enable_custom_certs = false
# Add OpenSearch load balancer root-ca and keys
# root_ca = ""
# admin_key = ""
# admin_cert = ""
# private_key = ""
# public_key = ""

# Add OpenSearch root-ca and keys
# root_ca = """root_ca_contents"""
# admin_key = """admin_private_key_contents"""
# admin_cert = """admin_public_key_contents"""
# private_key = """private_key_contents"""
# public_key = """public_key_contents"""

## === ===

Expand All @@ -111,10 +116,11 @@ instance_count = ""

# Set enable_custom_certs = true to provide custom certificates during deployment
enable_custom_certs = false
# Add Postgresql load balancer root-ca and keys
# root_ca = ""
# private_key = ""
# public_key = ""

# Add Postgresql root-ca and keys
# root_ca = """root_ca_contents"""
# private_key = """private_key_contents"""
# public_key = """public_key_contents"""

## === ===

Expand Down Expand Up @@ -368,14 +374,18 @@ config_file = "configs/automate.toml"

# Set enable_custom_certs = true to provide custom certificates during deployment
enable_custom_certs = false
# Add Automate load balancer root-ca and keys
# root_ca = ""
# private_key = ""
# public_key = ""

# Add Automate Load Balancer root-ca
# root_ca = """root_ca_contents"""

# Add Automate node internal public and private keys
# private_key = """private_key_contents"""
# public_key = """public_key_contents"""

# [[automate.config.certs_by_ip]]
# ip = ""
# private_key = ""
# public_key = ""
# private_key = """private_key_contents"""
# public_key = """public_key_contents"""

[chef_server.config]
## === INPUT NEEDED ===
Expand All @@ -385,13 +395,15 @@ instance_count = ""

# Set enable_custom_certs = true to provide custom certificates during deployment
enable_custom_certs = false
# Add Chef Server load balancer root-ca and keys
# private_key = ""
# public_key = ""

# Add Chef Server node internal public and private keys
# private_key = """private_key_contents"""
# public_key = """public_key_contents"""

# [[chef_server.config.certs_by_ip]]
# ip = ""
# private_key = ""
# public_key = ""
# private_key = """private_key_contents"""
# public_key = """public_key_contents"""

## === ===

Expand All @@ -403,16 +415,16 @@ instance_count = ""

# Set enable_custom_certs = true to provide custom certificates during deployment
enable_custom_certs = false
# Add OpenSearch load balancer root-ca and keys
# root_ca = ""
# admin_key = ""
# admin_cert = ""
# private_key = ""
# public_key = ""
# Add OpenSearch root-ca and keys
# root_ca = """root_ca_contents"""
# admin_key = """admin_private_key_contents"""
# admin_cert = """admin_public_key_contents"""
# private_key = """private_key_contents"""
# public_key = """public_key_contents"""
# [[opensearch.config.certs_by_ip]]
# ip = ""
# private_key = ""
# public_key = ""
# private_key = """private_key_contents"""
# public_key = """public_key_contents"""

## === ===

Expand All @@ -424,14 +436,14 @@ instance_count = ""

# Set enable_custom_certs = true to provide custom certificates during deployment
enable_custom_certs = false
# Add postgresql load balancer root-ca and keys
# root_ca = ""
# private_key = ""
# public_key = ""
# Add postgresql root-ca and keys
# root_ca = """root_ca_contents"""
# private_key = """private_key_contents"""
# public_key = """public_key_contents"""
# [[postgresql.config.certs_by_ip]]
# ip = ""
# private_key = ""
# public_key = ""
# private_key = """private_key_contents"""
# public_key = """public_key_contents"""

## === ===

Expand Down
2 changes: 1 addition & 1 deletion components/automate-cli/cmd/chef-automate/testHA.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func runTestCmd(cmd *cobra.Command, args []string) error {
if testCommandFlags.full {
args = append(args, "--full")
}
return executeAutomateClusterCtlCommandAsync("test", args, testHAHelpDocs, true)
return executeAutomateClusterCtlCommandAsync("test", args, testHAHelpDocs, false)
} else {
return status.Wrap(errors.New(AUTOMATE_HA_INVALID_BASTION), status.ConfigError, testHAHelpDocs)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
+++
title = "Create an Amazon OpenSearch Cluster and Obtain Connection Details"

draft = false
gh_repo = "automate"

[menu]
[menu.automate]
title = "Create Amazon OpenSearch"
parent = "automate/deploy_high_availability/reference"
identifier = "automate/deploy_high_availability/reference/create_amazon_opensearch.md Create Amazon OpenSearch"
weight = 204
+++

{{< warning >}}
{{% automate/ha-warn %}}
{{< /warning >}}

You can follow the AWS documentation directly for detailed steps on [how to create an Amazon OpenSearch Cluster](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_GettingStarted.CreatingConnecting.PostgreSQL.html).

Below is our guide on the steps required to create an Amazon OpenSearch cluster. This guide will walk you through creating an Amazon OpenSearch cluster and retrieving the necessary connection details, including the hostname, username, and password.

## Prerequisites

Before proceeding, make sure you have the following prerequisites in place:

- An active AWS account
- Sufficient permissions to create Amazon OpenSearch clusters

## Step 1: Sign in to the AWS Management Console

1. Open your preferred web browser and go to the [AWS Management Console](https://console.aws.amazon.com/).
1. Sign in to your AWS account using your credentials.

## Step 2: Navigate to the Amazon OpenSearch Service Dashboard

1. Once logged in to the AWS Management Console, search for **OpenSearch** in the search bar at the top of the page.
1. Click on the **Amazon OpenSearch Service** service from the search results to open the Amazon OpenSearch Service dashboard.

## Step 3: Create a New Amazon OpenSearch 1.3 Cluster

1. Click the **Create a new domain** button in the Amazon OpenSearch Service dashboard.
1. Enter a new **Domain name** for your OpenSearch cluster
1. In **Domain creation method**, select **Standard create**
1. Choose the appropriate deployment configuration, such as development or production, based on your requirements.
1. Under the **Engine options** section, select **1.3** as the version for your cluster.
1. In the **Networks** section, provide the following information:
- **VPC**: Select the VPC in which you have your automate cluster
- **Subnets**: Select all three private subnets available in your VPC
- **Security groups**: Select a security block with incoming access from your VPC CIDR range.
1. In **Fine-grained access control**,
- Enable **Fine-grained access control**
- Choose **Create master user**
- Enter the **Master username** and **Master password** you want to create
1. In **Access policy**,
- Select **Configure domain level access policy**
- Choose action **Allow**.
1. Configure the remaining settings per your requirements, such as the number of nodes and storage options.
1. Review all the settings and make sure they are accurate.
1. Click the **Confirm** button to start the cluster creation process.

## Step 4: Wait for the Amazon OpenSearch Cluster to be Created

1. The Amazon OpenSearch cluster creation process may take several minutes. Wait for the process to complete.
1. You can monitor the progress of the cluster creation on the Amazon OpenSearch Service dashboard.

## Step 5: Retrieve Connection Details

You can obtain the necessary connection details once the Amazon OpenSearch 1.3 cluster is created successfully.

1. Go to the Amazon OpenSearch Service dashboard.
1. Find and select your newly created cluster from the list.
1. In the cluster details view, navigate to the **Endpoint** tab.
1. Here, you will find the following connection details:
- **Domain name**: This is the domain name we gave for this OpenSearch cluster.
- **Domain URL**: This is the endpoint or hostname of your OpenSearch cluster. It will look something like `my-opensearch-cluster-1234567890.us-east-1.es.amazonaws.com`.
- **Username**: The username for accessing your OpenSearch cluster.
- **Password**: The password for the specified username.

## Step 6: Connect to Your Amazon OpenSearch 1.3 Cluster

Using the connection details obtained in the previous step, you can now connect to your Amazon OpenSearch 1.3 cluster from Automate.
Congratulations! You have successfully created an Amazon OpenSearch 1.3 cluster, and it's ready to be used with Automate.
93 changes: 93 additions & 0 deletions components/docs-chef-io/content/automate/create_amazon_rds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
+++
title = "Create an Amazon RDS PostgreSQL Instance and Obtain Connection Details"

draft = false
gh_repo = "automate"

[menu]
[menu.automate]
title = "Create Amazon RDS"
parent = "automate/deploy_high_availability/reference"
identifier = "automate/deploy_high_availability/reference/create_amazon_rds.md Create Amazon RDS"
weight = 208
+++

{{< warning >}}
{{% automate/ha-warn %}}
{{< /warning >}}

You can follow the AWS documentation directly for detailed steps on [how to create an Amazon RDS PostgreSQL Instance](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html).

Below is our guide on the steps required to create an Amazon RDS PostgreSQL instance. This guide will walk you through creating an Amazon RDS PostgreSQL instance and retrieving the necessary connection details, including the hostname, port, username, and password.

## Prerequisites

Before proceeding, make sure you have the following prerequisites in place:

- An active AWS account
- Sufficient permissions to create Amazon RDS instances

## Step 1: Sign in to the AWS Management Console

1. Open your preferred web browser and go to the [AWS Management Console](https://console.aws.amazon.com/).
1. Sign in to your AWS account using your credentials.

## Step 2: Navigate to the Amazon RDS Dashboard

1. Once logged in to the AWS Management Console, search for **RDS** in the search bar at the top of the page.
1. Click on the **Amazon RDS** service from the search results to open the Amazon RDS dashboard.

## Step 3: Create a New Amazon RDS PostgreSQL Instance

1. Click the **Create database** button in the Amazon RDS dashboard.
1. On the **Choose a database creation method** page, select the **Standard Create** option.
1. Under the **Engine options** section, select **PostgreSQL** as the database engine.
1. Choose **PostgreSQL 13.5-R1**.
1. Under the **Templates** section, select the template that suits your needs or choose the default template.
1. In the **Settings** section, provide the following information:
- **DB instance identifier**: Enter a unique identifier for your RDS instance.
- **Master username**: Specify the username for the master user account.
- **Master password**: Set a secure password for the master user account.
1. In the **Instance configuration** section, select the appropriate instance size for your needs.
1. In the **Connectivity** section,
- In **Compute resource**, select **Don't connect to an EC2 compute resource**.
- Select **Network type** as per your requirements.
- In **Virtual private cloud**, select the VPC you want to use for your Automate cluster.
- In **DB subnet group**, choose any private subnet available in your VPC.
- In **Public Access** select **NO**
1. Configure the remaining settings as per your requirements.
1. Review all the settings and make sure they are accurate.
1. Click on the **Create database** button to start the creation process.

## Step 4: Wait for the Amazon RDS Instance to be Created

1. The RDS instance creation process may take a few minutes. Wait for the process to complete.
1. You can monitor the progress of the instance creation on the Amazon RDS dashboard.

## Step 5: Open the port in the RDS security group

1. Go to the Amazon RDS dashboard.
1. Find and select your newly created PostgreSQL instance from the list.
1. In the instance details view, navigate to the **Connectivity & security** tab.
1. Open the Security Group under **VPC security groups**
1. Under **Inbound Rules**, edit and select **Type** as **PostgreSQL**
1. Select **Source** as **custom** and give appropriate cidr block for your VPC
1. Click **Save Rules**

## Step 6: Retrieve Connection Details

Once the Amazon RDS PostgreSQL instance is created successfully, you can obtain the necessary connection details.

1. Go to the Amazon RDS dashboard.
1. Find and select your newly created PostgreSQL instance from the list.
1. In the instance details view, navigate to the **Connectivity & security** tab.
1. Here, you will find the following connection details:
- **Instance URL**: This is the endpoint or hostname of your RDS instance. It will look something like `my-rds-instance.abcdefg12345.us-east-1.rds.amazonaws.com`.
- **Port**: The port number your PostgreSQL instance listens to. The default port is usually `5432`.
- **Username**: The username of the master user account you specified during instance creation.
- **Password**: The password for the master user account.

## Step 7: Connect to Your Amazon RDS PostgreSQL Instance

Using the connection details obtained in the previous step, you can now connect to your Amazon RDS PostgreSQL instance from Automate.
Congratulations! You have successfully created an Amazon RDS PostgreSQL instance, and it's ready to be used with Automate.
Loading