Skip to content

Commit

Permalink
Add TE,TEF & TED related install and updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rajlearner17 committed Jul 17, 2024
1 parent 57b046c commit 27f612b
Show file tree
Hide file tree
Showing 20 changed files with 484 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
94 changes: 94 additions & 0 deletions docs/runbooks/enterprise-install/installing_te.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Runbook: Installing TE

## Introduction

**Purpose**: This runbook guides administrators through the process of installing TE.

**Prerequisites**:
- Access to the Guardrails master account.
- Administrator privileges.
- Familiarity with AWS Console, Service Catalog, and CloudFormation services.

---

## Procedure

### Step 1: Access AWS Console

Open the AWS Console and navigate to the Service Catalog service in the region to deploy TE.

<!-- ![AWS Console Home Page](screenshot_aws_console.png) -->

---

### Step 2: Navigate to Products

Select the hamburger menu in the top left and click on `Products`.

<!-- ![Navigation Menu](screenshot_navigation_menu.png) -->

---

### Step 3: Identify the TE Product

Select `Turbot Guardrails Enterprise` from the products list and click `Launch Product`.

<!-- ![Service Catalog Products List](screenshot_service_catalog_products_list.png) -->

---

### Step 4: Name the TE Product

Select the desired version and name the provisioned product with the version number prefixed with `te`.

<!-- ![Provisioned Product Naming](screenshot_provisioned_product_naming.png) -->

---

### Step 5: Verify Parameters

Ensure all parameters are correct. Generally, these can be left as default.

<!-- ![Parameters Verification Page](screenshot_parameters_verification.png) -->

---

### Step 6: Launch Product

Verify the parameters again and select `Launch product`.

<!-- ![Update Confirmation Page](screenshot_update_confirmation.png) -->

---

### Step 7: Monitor Installation

The installed TE version should appear in `Provisioned products` with the status `Under change` and a new CloudFormation stack should be created with the status `CREATING`.

<!-- ![Verification Page](screenshot_verification_page.png) -->

---

## Validation

The TE provisioned product status should change to `Available` and the CloudFormation stack status should be `CREATE_COMPLETE` to ensure the installation completed successfully.

<!-- ![CloudFormation Stack Update Status](screenshot_stack_update_status.png) -->

---

## Troubleshooting

**Common Issues**:
1. **Installation fails or takes too long**:
- Solution: Check the CloudFormation events tab for errors or issues.
2. **Parameters need adjustment**:
- Solution: Review the parameters and consult the product documentation for correct values.

---

## Conclusion

**Summary**: You have successfully installed the TE Service Catalog product.

**Next Steps**: Monitor the product for any issues post-installation and document any anomalies.
186 changes: 186 additions & 0 deletions docs/runbooks/enterprise-install/mod_installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
# Runbook: Installing Mods

## Introduction

**Purpose**: This runbook guides administrators through the process of installing mods in the Guardrails environment.

**Prerequisites**:
- `Turbot/Owner` permissions at Turbot resource level.
- Guardrails CLI [Installed and configured](https://turbot.com/guardrails/docs/reference/cli/installation)
- Terraform with configured [Turbot Guardrails Terraform provider](https://registry.terraform.io/providers/turbot/turbot/latest/docs)
- Familiarity with Guardrails Console, Terraform, and Guardrails CLI.

---

## Procedure

### Install Mod via Guardrails Console

#### Step 1: Access Guardrails Console

Log into the Guardrails console and click the gear icon for the Admin page.

<img src="images/mod_install/guardrails_console.png" alt="Guardrails Console" width="500"/>

#### Step 2: Navigate to Mods

Click on the `Mods` tab.

<img src="images/mod_install/guardrails_mod_tab.png" alt="Guardrails Mod Tab" width="400"/>

#### Step 3: Install Mod

Click `Install Mod`. This launches the Install Mod dialog

<img src="images/mod_install/install_mod_action.png" alt="Mod Install" width="400"/>

Browse or search for the mod, select it, and click `Install Mod`.

<img src="images/mod_install/install_mod_dialog.png" alt="Mod Install Dialog" width="400"/>

#### Step 4: Verify Installation

The mod will appear in the list and the status icon changes to a green check when installation is complete.

<img src="images/mod_install/install_mod_success.png" alt="Mod Install Success" width="400"/>

## Install Mod via CLI

#### Step 1: Install Mod

Run this command to install the desired mod (e.g., `aws-s3`):

```bash
turbot install @turbot/aws-s3
```
Syntax will be similar across other mod types, such as @turbot/aws-sns, @turbot/gcp, etc.

#### Step 2: Verify Installation

The mod will appear on the Guardrails console installed mods list.

<img src="images/mod_install/mod_install_cli_success.png" alt="Mod Install CLI Success" width="400"/>

## Install Mod via Terraform

Use the `turbot_mod` resource to install, uninstall, and update mods across an environment.

#### Example Terraform Code

**To use the latest version:**

```hcl
resource "turbot_mod" "aws_s3" {
parent = "tmod:@turbot/turbot#/"
org = "turbot"
mod = "aws-s3"
}
```

Run `terraform plan` to Verify the actions to be performed.

```
Terraform will perform the following actions:
# turbot_mod.aws-s3 will be created
+ resource "turbot_mod" "aws_s3" {
+ id = (known after apply)
+ mod = "aws-s3"
+ org = "turbot"
+ parent = "tmod:@turbot/turbot#/"
+ parent_akas = (known after apply)
+ uri = (known after apply)
+ version = "*"
+ version_current = "5.24.0"
+ version_latest = (known after apply)
}
Plan: 1 to add, 0 to change, 0 to destroy.
```

Run `terraform apply`

```
turbot_mod.aws-s3: Creating...
turbot_mod.aws-s3: Still creating... [10s elapsed]
turbot_mod.aws-s3: Creation complete after 11s [id=321961374574169]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
```

**To install a pinned mod version**

Note: Ensure to set `Turbot > Mod > Auto Update` policy to `Skip` on the Guardrails console when using pinned versions.

```hcl
resource "turbot_mod" "aws_s3" {
parent = "tmod:@turbot/turbot#/"
org = "turbot"
mod = "aws-s3"
version = "5.5.2"
}
```

**To install mod with dependencies**

The dependent mods should be available prior or installed together.

```hcl
resource "turbot_mod" "aws_s3" {
parent = "tmod:@turbot/turbot#/"
depends_on = [turbot_mod.aws, turbot_mod.aws_iam, turbot_mod.aws_kms]
org = "turbot"
mod = "aws-s3"
}
```

<details>
<summary>Complete Terraform code with dependencies</summary>

```hcl
resource "turbot_mod" "aws" {
parent = "tmod:@turbot/turbot#/"
org = "turbot"
mod = "aws"
}
resource "turbot_mod" "aws_iam" {
parent = "tmod:@turbot/turbot#/"
org = "turbot"
mod = "aws-iam"
}
resource "turbot_mod" "aws_kms" {
parent = "tmod:@turbot/turbot#/"
org = "turbot"
mod = "aws-kms"
}
resource "turbot_mod" "aws_s3" {
parent = "tmod:@turbot/turbot#/"
depends_on = [
turbot_mod.aws,
turbot_mod.aws_iam,
turbot_mod.aws_kms
]
org = "turbot"
mod = "aws-s3"
}
```
</details>

## Troubleshooting

**Common Issues**:
1. **Mod installed is in error state**:
- Solution: Click the mod name to verify its details, including dependent controls, upgrade history, and dependencies.
2. **Terraform installation failed**:
- Solution: Review the resource type, dependencies and environment config.
3. **Large AWS environments (>100 accounts) accounts for AWS Event Handler churn**
- Solution: Refer to [Mod Installation in Large Environments](https://turbot.com/guardrails/docs/mods/guide/troubleshooting#mod-management-in-large-environments) instructions.

## Conclusion

**Summary**: You have successfully installed a mod.

**Next Steps**: Monitor the mod for any issues post-installation and document any anomalies.
101 changes: 101 additions & 0 deletions docs/runbooks/enterprise-install/updating_ted.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Runbook: Updating TED

## Introduction

**Purpose**: This runbook guides administrators through the process of updating TED.

**Prerequisites**:
- Access to the Guardrails master account.
- Administrator privileges.
- Familiarity with AWS Console, Service Catalog, and CloudFormation services.

---

## Procedure

### Step 1: Access AWS Console

Open the AWS Console and navigate to the Service Catalog service in the region where the TED is deployed.

<!-- ![AWS Console Home Page](screenshot_aws_console.png) -->

---

### Step 2: Navigate to Provisioned Products

Select the hamburger menu in the top left and click on `Provisioned products`.

<!-- ![Navigation Menu](screenshot_navigation_menu.png) -->

---

### Step 3: Identify TED Product

There should be three or more provisioned products: TED product(s), a TEF product, and TE product(s). The TED is identifiable by a postfix that matches the database hive name.

<!-- ![Provisioned Products List](screenshot_provisioned_products_list.png) -->

---

### Step 4: Update TED Product

Select the TED product. Click `Actions` and then `Update`.

<!-- ![TED Product Details and Actions Menu](screenshot_ted_product_details.png) -->

---

### Step 5: Select Version

Choose the desired version from the `Product versions`.

<!-- ![Version Selection Page](screenshot_version_selection.png) -->

---

### Step 6: Verify Parameters

Ensure all parameters are correct. Generally, these can be left as default.

<!-- ![Parameters Verification Page](screenshot_parameters_verification.png) -->

---

### Step 7: Confirm Update

Verify the parameters again and select `Update`.

<!-- ![Update Confirmation Page](screenshot_update_confirmation.png) -->

---

### Step 8: Monitor Update

The TED provisioned product status should change to `Under Change` and the TED stack in CloudFormation will begin updating. This process typically takes a couple of minutes.

<!-- ![CloudFormation Stack Update Status](screenshot_stack_update_status.png) -->

---

## Validation

- The status of the TED stack in CloudFormation should be `UPDATE_COMPLETE` which ensures the update completed successfully.
- Confirm that the TED product `Version name` reflects the update and the status moves back to `Available`.

---

## Troubleshooting

**Common Issues**:
1. **The update process takes longer than expected**:
- Solution: Check the CloudFormation events tab for errors or issues.
2. **Parameters need to be adjusted**:
- Solution: Review the parameters and consult the product documentation for correct values.

---

## Conclusion

**Summary**: You have successfully updated the TED Service Catalog product.

**Next Steps**: Monitor the product for any issues post-update and document any anomalies.
Loading

0 comments on commit 27f612b

Please sign in to comment.