Repository: chef/automate
Pull request #8414 (2024-04-01 11:53:49)

Regenerating log files in specified location
### :nut_and_bolt: Description: What code changed, and why?
Regenerating automate.log file after it deleted from the specified path 

<!-- /!\ Please ensure that you are NOT disclosing any customer information without their consent /!\ -->

### :chains: Related Resources
https://chefio.atlassian.net/jira/software/c/projects/CHEF/boards/482?assignee=60746df1115da6006f1580da&assignee=712020%3Ad2c1e267-ff0f-4938-9184-e58d1eb78a2d&selectedIssue=CHEF-10976

### :+1: Definition of Done
Regenerating automate.log file after it deleted from the specified path

### :athletic_shoe: How to Build and Test the Change
rebuild components/automate-deployment/
rebuild components/automate-gateway/
rebuild components/automate-cli/

### :white_check_mark: Checklist

**All PRs** must tick these:

- [x] I have read the [CONTRIBUTING document](https://github.com/chef/automate/blob/master/CONTRIBUTING.md).
- [x] All commits signed-off for the [Developer Certification of Origin](https://github.com/chef/chef/blob/master/CONTRIBUTING.md#developer-certification-of-origin-dco).

With occasional exceptions, all PRs **from Progress employees** must tick these:

- [x] Is the code clear? *(complicated code or lots of comments--subdivide and use well-named methods, meaningful variable names, etc.)*
- [x] Consistency checked? *(user notifications, user prompts, visual patterns, code patterns, variable names)*
- [x] Repeated code blocks eliminated? *(adapt and reuse existing components, blocks, functions, etc.)*
- [x] Spelling, grammar, typos checked? *(at a minimum use `make spell` in any component directory)*
- [x] Code well-formatted? *(indents, line breaks, etc. improve rather than hinder readability)*

All PRs **from Progress employees** should tick these if appropriate:

- [ ] Tests added/updated? (all new code needs new tests)
- [ ] Docs added/updated? (all customer-facing changes)

*Please add a note next to any checkbox above if you are NOT ticking it.*

### :camera: Screenshots, if applicable

<img width="1728" alt="Screenshot 2024-04-02 at 1 08 48 PM" src="https://github.com/chef/automate/assets/145528613/23fadcda-83c9-4ecf-b825-95f93956e5ea">


https://progresssoftware-my.sharepoint.com/personal/swatign_progress_com/_layouts/15/stream.aspx?id=%2Fpersonal%2Fswatign%5Fprogress%5Fcom%2FDocuments%2FMicrosoft%20Teams%20Chat%20Files%2FRegenerating%20log%20file%20%2Emov&referrer=StreamWebApp%2EWeb&referrerScenario=AddressBarCopied%2Eview

netlify[bot]: ### <span aria-hidden="true">👷</span> Deploy Preview for *chef-automate* processing.


|  Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | c9f4654748f0a48fe851d24120dc34a2352e3079 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/sites/chef-automate/deploys/660aa04f3b1c540008c3b546 |
sonarqube-for-infrastructure-prod[bot]: **SonarQube Quality Gate**

[![Quality Gate failed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=8414)

[![Failed condition](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/FailedConditionIcon-16px.png 'Failed condition')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=8414) [![D](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/checks/RatingBadge/D-16px.png 'D')](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=8414) Maintainability Rating on New Code (is worse than A)  

[See analysis details on SonarQube](https://sonar.progress.com/dashboard?id=chef_automate_AYeOVEbqJ4YHsO5MtKWC&pullRequest=8414)

Fix issues before they fail your Quality Gate with [![SonarLint](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v97/common/sonarlint-16px.png 'SonarLint')](https://www.sonarqube.org/sonarlint/?referrer=pull-request) [SonarLint in your IDE](https://www.sonarqube.org/sonarlint/?referrer=pull-request).

Patch:
diff --git a/VERSION b/VERSION
index df4a8daca..0e5f15ae6 100644
--- a/VERSION
+++ b/VERSION
@@ -1,1 +1,1 @@
-4.12.86
\ No newline at end of file
+4.12.89
\ No newline at end of file
diff --git a/components/automate-backend-deployment/README.md b/components/automate-backend-deployment/README.md
index 9f52eb920..cd062d595 100644
--- a/components/automate-backend-deployment/README.md
+++ b/components/automate-backend-deployment/README.md
@@ -5,4 +5,4 @@ This provides the `automate-backend-deployment` package.
 
 This package will build a package using terraform/a2ha-terraform, inspecs, test, certs and Makefile.
 
-This is the heart of the a2ha because this component will set up a workspace for a2ha and all the a2ha command will get available after installing this package.
+This is the heart of the a2ha because this component will set up a workspace for a2ha and all the a2ha command will get available after installing this package.
\ No newline at end of file
diff --git a/components/automate-cli/cmd/chef-automate/config.go b/components/automate-cli/cmd/chef-automate/config.go
index 26058819e..eb07dc2ba 100644
--- a/components/automate-cli/cmd/chef-automate/config.go
+++ b/components/automate-cli/cmd/chef-automate/config.go
@@ -64,6 +64,10 @@ const (
 var configValid = "Config file must be a valid %s config"
 
 func init() {
+	err := fileutils.CreateHabTmpDir()
+	if err != nil {
+		writer.Errorln(fmt.Sprintf("Error while creating %s dir: %v", HAB_TMP_DIR, err))
+	}
 	configCmd.AddCommand(showConfigCmd)
 	configCmd.AddCommand(patchConfigCmd)
 	configCmd.AddCommand(setConfigCmd)
diff --git a/components/automate-cli/cmd/chef-automate/constants.go b/components/automate-cli/cmd/chef-automate/constants.go
index 8232a0a92..ebb9b5ab7 100644
--- a/components/automate-cli/cmd/chef-automate/constants.go
+++ b/components/automate-cli/cmd/chef-automate/constants.go
@@ -32,6 +32,7 @@ const (
 	OPENSEARCH_TOML                = "opensearch.config.toml"
 	OCID_SHOW_APP                  = "oc-id-show-app"
 	HOME_DIR                       = "/home"
+	HAB_TMP_DIR                    = "/hab/tmp"
 	TMP_DIR                        = "/tmp"
 	CERTIFICATE_TEMPLATE_TOML_FILE = "/hab/a2_deploy_workspace/certificate.toml"
 	CLUSTER                        = "cluster"
diff --git a/components/automate-deployment/pkg/server/automate_config.go b/components/automate-deployment/pkg/server/automate_config.go
index 404f45f5f..3be47bc24 100644
--- a/components/automate-deployment/pkg/server/automate_config.go
+++ b/components/automate-deployment/pkg/server/automate_config.go
@@ -270,6 +270,7 @@ func setConfigForRedirectLogs(req *api.PatchAutomateConfigRequest, existingCopy
 		if err != nil {
 			return status.Error(codes.Internal, err.Error())
 		}
+
 		err = restartSyslogService()
 		if err != nil {
 			return status.Error(codes.Internal, err.Error())
@@ -296,6 +297,12 @@ func setConfigForRedirectLogs(req *api.PatchAutomateConfigRequest, existingCopy
 
 		if req.GetConfig().GetGlobal().GetV1().GetLog().GetRedirectLogFilePath().GetValue() == existingCopy.GetGlobal().GetV1().GetLog().GetRedirectLogFilePath().GetValue() {
 
+			//to restart the log
+			err = restartSyslogService()
+			if err != nil {
+				return status.Error(codes.Internal, err.Error())
+			}
+
 			if err = runLogrotateConfig(res); err != nil {
 				logrus.Errorf("cannot configure log rotate with existing file path: %v", err)
 				return err
@@ -324,10 +331,12 @@ func setConfigForRedirectLogs(req *api.PatchAutomateConfigRequest, existingCopy
 	//Rollback the config if requested
 	if req.GetConfig().GetGlobal().GetV1().GetLog().GetRedirectSysLog() != nil && req.GetConfig().GetGlobal().GetV1().GetLog().GetRedirectSysLog().GetValue() == false &&
 		existingCopy.GetGlobal().GetV1().GetLog().GetRedirectSysLog().GetValue() == true {
+
 		err := removeConfigFileForAutomateSyslog()
 		if err != nil {
 			return status.Error(codes.Internal, "Failed to remove configuration into syslog")
 		}
+
 		err = restartSyslogService()
 		if err != nil {
 			return status.Error(codes.Internal, err.Error())
diff --git a/components/docs-chef-io/content/automate/chef_infra_in_chef_automate.md b/components/docs-chef-io/content/automate/chef_infra_in_chef_automate.md
index 35271cdee..65ada718a 100644
--- a/components/docs-chef-io/content/automate/chef_infra_in_chef_automate.md
+++ b/components/docs-chef-io/content/automate/chef_infra_in_chef_automate.md
@@ -80,4 +80,4 @@ The list of parameters are as follows:
 |bookshelf['vip']                                 |127.0.0.1                                  |127.0.0.1                            |```[bookshelf.v1.sys.bookshelf]```<br> ```virtual_ip = "127.0.0.1"```|
 | oc_chef_wm['health_ping_timeout']               | 400                                       | 400                                 | ```[erchef.v1.sys.health]```<br>```health_ping_timeout=400```         |
 
-Click [here](https://docs.chef.io/server/config_rb_server_optional_settings/) for the detailed description of a above parameters.
+To know more about the above parameters, see [chef-server.rb Optional Settings](https://docs.chef.io/server/config_rb_server_optional_settings/).
diff --git a/components/docs-chef-io/content/automate/datafeed.md b/components/docs-chef-io/content/automate/datafeed.md
index 1b5fbc36d..f250e4461 100644
--- a/components/docs-chef-io/content/automate/datafeed.md
+++ b/components/docs-chef-io/content/automate/datafeed.md
@@ -29,7 +29,7 @@ A Data Feed operates by doing the following:
 By default, only Admin users of Chef Automate may create and manage Data Feeds.
 
 {{< note >}}
-You should have **ServiceNow** installed in your platform. Click [here]({{< relref "servicenow_integration" >}}) to know more.
+You should have **ServiceNow** installed in your platform. For more information, see [ServiceNow Integration]({{< relref "servicenow_integration" >}}).
 {{< /note >}}
 
 ## Data Feed Integration
diff --git a/components/docs-chef-io/content/automate/ha_aws_deploy_steps.md b/components/docs-chef-io/content/automate/ha_aws_deploy_steps.md
index f8dee6f70..390631978 100644
--- a/components/docs-chef-io/content/automate/ha_aws_deploy_steps.md
+++ b/components/docs-chef-io/content/automate/ha_aws_deploy_steps.md
@@ -69,7 +69,7 @@ Run the following steps on Bastion Host Machine:
     chef-automate config gen config.toml
     ```
 
-    Click [here](/automate/ha_config_gen) to know more about generating config
+    Refer to the [Automate HA Config Generation](/automate/ha_config_gen) page to learn more about generating config.
 
     {{< note spaces=4 >}}
 
@@ -112,6 +112,7 @@ Run the following steps on Bastion Host Machine:
     ```
 
    To skip verification in the deployment command, use `--skip-verify` flag
+
     ```bash
      chef-automate deploy config.toml --airgap-bundle automate.aib --skip-verify
     ```
@@ -124,7 +125,7 @@ Run the following steps on Bastion Host Machine:
      chef-automate status summary
     ```
 
-1.  Get the service status from each node
+1. Get the service status from each node
 
     ```bash
      chef-automate status
@@ -180,9 +181,9 @@ Check if Chef Automate UI is accessible by going to (Domain used for Chef Automa
 
 After successful deployment, proceed with the following:
 
-   1. Create user and orgs, Click [here](/automate/ha_node_bootstraping/#create-users-and-organization) to learn more about user and org creation
-   1. Workstation setup, Click [here](/automate/ha_node_bootstraping/#workstation-setup) to learn more about workstation setup
-   1. Node bootstrapping, Click [here](/automate/ha_node_bootstraping/#bootstraping-a-node) to learn more about node bootstrapping.
+   1. [Create Users and Organization](/automate/ha_node_bootstraping/#create-users-and-organization) section on the Node Bootstrapping page.
+   1. See the [Workstation Setup](/automate/ha_node_bootstraping/#workstation-setup) section to learn more about workstation setup.
+   1. See the [Bootstraping a Node](/automate/ha_node_bootstraping/#bootstraping-a-node) section to learn more about node bootstrapping.
 
 ## Sample Config
 
diff --git a/components/docs-chef-io/content/automate/ha_aws_managed_deploy_steps.md b/components/docs-chef-io/content/automate/ha_aws_managed_deploy_steps.md
index be410211f..2f055fbea 100644
--- a/components/docs-chef-io/content/automate/ha_aws_managed_deploy_steps.md
+++ b/components/docs-chef-io/content/automate/ha_aws_managed_deploy_steps.md
@@ -57,7 +57,7 @@ Follow the steps below to deploy Chef Automate High Availability (HA) on AWS (Am
     chef-automate config gen config.toml
     ```
 
-    Click [here](/automate/ha_config_gen) to know more about generating config
+    To know more about on how to generate config, refer to the [Automate HA Config Generation](/automate/ha_config_gen) page.
 
     {{< note spaces=4 >}}
 
@@ -180,15 +180,15 @@ Check if Chef Automate UI is accessible by going to (Domain used for Chef Automa
 
 After successful deployment, proceed with the following:
 
-   1. Create user and orgs, Click [here](/automate/ha_node_bootstraping/#create-users-and-organization) to learn more about user and org creation
-   1. Workstation setup, Click [here](/automate/ha_node_bootstraping/#workstation-setup) to learn more about workstation setup
-   1. Node bootstrapping, Click [here](/automate/ha_node_bootstraping/#bootstraping-a-node) to learn more about node bootstrapping.
+   1. To know moe about the user and organization creation, check the [Create Users and Organization](/automate/ha_node_bootstraping/#create-users-and-organization) section in Node Bootstrapping page.
+   1. To know more about Workstation setup, see the [Workstation Setup](/automate/ha_node_bootstraping/#workstation-setup) section.
+   1. To know more about Node bootstrapping, see the [Bootstraping a Node](/automate/ha_node_bootstraping/#bootstraping-a-node) section.
 
 ## Sample Config
 
 {{< note >}}
 
-Assuming 8+1 nodes (1 bastion, 1 for Chef Automate UI, 1 for Chef Infra Server, Managed RDS Postgresql, and Managed OpenSearch) 
+Assuming 8+1 nodes (1 bastion, 1 for Chef Automate UI, 1 for Chef Infra Server, Managed RDS Postgresql, and Managed OpenSearch)
 
 {{< /note >}}
 
diff --git a/components/docs-chef-io/content/automate/ha_backup_restore_aws_efs.md b/components/docs-chef-io/content/automate/ha_backup_restore_aws_efs.md
index f60a8a1fb..6d3bdcd5e 100644
--- a/components/docs-chef-io/content/automate/ha_backup_restore_aws_efs.md
+++ b/components/docs-chef-io/content/automate/ha_backup_restore_aws_efs.md
@@ -29,7 +29,7 @@ A shared file system is always required to create **OpenSearch** snapshots. To r
 
 ### Setting up the backup configuration
 
-- Create an EFS file system, please refer sample steps [here](https://docs.aws.amazon.com/efs/latest/ug/gs-step-two-create-efs-resources.html)
+- To create an EFS file system, please refer to the sample steps on the [Create your Amazon EFS file system](https://docs.aws.amazon.com/efs/latest/ug/gs-step-two-create-efs-resources.html) page.
 
 - Let's create a folder structure `/mnt/automate_backups/` on all the Frontend and backend nodes, then we have to mount EFS to all the vm's manually. To do that please refer [this](https://docs.aws.amazon.com/efs/latest/ug/mounting-fs-mount-helper-ec2-linux.html)
 
diff --git a/components/docs-chef-io/content/automate/ha_cert_rotation.md b/components/docs-chef-io/content/automate/ha_cert_rotation.md
index 97d9916ba..90425f5d5 100644
--- a/components/docs-chef-io/content/automate/ha_cert_rotation.md
+++ b/components/docs-chef-io/content/automate/ha_cert_rotation.md
@@ -23,13 +23,13 @@ The certificate rotation is also required when the key for a node, client, or CA
 
 ## Prerequisites
 
-Either existing certificates can be used or to generate new ones, click [here](https://docs.chef.io/automate/ha_cert_selfsign/)
+[Existing certificates](https://docs.chef.io/automate/ha_cert_selfsign/) can be used to generate new ones.
 
 Generate the certificates using recommended tools and supported algorithms and versions mentioned below:
 
--   OpenSSL: 1.0.2zb-fips
--   OpenSSL Algorithms: PBE-SHA1-3DES, RSA (2048), SHA-256
--   Certificate Format: X509 V3(PEM format) ,Private key is in PKCS8 format
+- OpenSSL: 1.0.2zb-fips
+- OpenSSL Algorithms: PBE-SHA1-3DES, RSA (2048), SHA-256
+- Certificate Format: X509 V3(PEM format) ,Private key is in PKCS8 format
 
 To understand how to generate certificates, refer to the [Certificate Generation](/automate/ha_cert_selfsign/#creating-a-certificate) documentation.
 
diff --git a/components/docs-chef-io/content/automate/ha_config.md b/components/docs-chef-io/content/automate/ha_config.md
index 9cba014b6..ca01f537d 100644
--- a/components/docs-chef-io/content/automate/ha_config.md
+++ b/components/docs-chef-io/content/automate/ha_config.md
@@ -26,7 +26,7 @@ gh_repo = "automate"
 
 {{< warning >}}
 
-- For certificate rotation, don't use `config patch`. Instead, the `cert-rotate` command can be used. To know more about certificate rotation, click [here](/automate/ha_cert_rotation)
+- For certificate rotation, use the `cert-rotate` command instead of `config patch`. For more information, see [certificate rotation](/automate/ha_cert_rotation).
 - While patching the same from **the provision host**, structures such as TLS from the OpenSearch configuration .toml file and SSL from the PostgreSQL configuration toml file will be ignored.
 
 {{< /warning >}}
@@ -42,11 +42,15 @@ To show the configuration for Automate cluster, run the following command:
 ```bash
 chef-automate config show --automate
 ```
+
 or
+
 ```bash
 chef-automate config show -a
 ```
+
 or
+
 ```bash
 chef-automate config show --a2
 ```
@@ -58,11 +62,15 @@ To show the configuration for the Chef Server cluster, run the following command
 ```bash
 chef-automate config show --chef_server
 ```
+
 or
+
 ```bash
 chef-automate config show -c
 ```
+
 or
+
 ```bash
 chef-automate config show --cs
 ```
@@ -74,11 +82,15 @@ To show the configuration for the Postgresql cluster, run the following command:
 ```bash
 chef-automate config show --postgresql
 ```
+
 or
+
 ```bash
 chef-automate config show -p
 ```
+
 or
+
 ```bash
 chef-automate config show --pg
 ```
@@ -90,11 +102,15 @@ To show the configuration for the OpenSearch cluster, run the following command:
 ```bash
 chef-automate config show --opensearch
 ```
+
 or
+
 ```bash
 chef-automate config show -o
 ```
+
 or
+
 ```bash
 chef-automate config show --os
 ```
@@ -110,11 +126,15 @@ To patch configuration for the Frontend cluster (includes Automate and Chef Serv
 ```bash
 chef-automate config patch path/to/automate-config.toml --frontend
 ```
+
 or
+
 ```bash
 chef-automate config patch path/to/automate-config.toml -f
 ```
+
 or
+
 ```bash
 chef-automate config patch path/to/automate-config.toml --fe
 ```
@@ -126,11 +146,15 @@ To patch the configuration for Automate cluster, run the following command:
 ```bash
 chef-automate config patch path/to/automate-config.toml --automate
 ```
+
 or
+
 ```bash
 chef-automate config patch path/to/automate-config.toml -a
 ```
+
 or
+
 ```bash
 chef-automate config patch path/to/automate-config.toml --a2
 ```
@@ -142,11 +166,15 @@ To patch the configuration for the Chef Server cluster, run the following comman
 ```bash
 chef-automate config patch path/to/chef_server-config.toml --chef_server
 ```
+
 or
+
 ```bash
 chef-automate config patch path/to/chef_server-config.toml -c
 ```
+
 or
+
 ```bash
 chef-automate config patch path/to/chef_server-config.toml --cs
 ```
@@ -154,18 +182,23 @@ chef-automate config patch path/to/chef_server-config.toml --cs
 ### Patch Configuration for Postgresql cluster
 
 For Information on PostgreSQL node configs visit links below:
-- Click [here](/automate/config_postgresql) for PostgreSQL
+
+- To know more about PostgreSQL node configs, see [HA PostgreSQL Node Config](/automate/config_postgresql) page.
 
 To patch the configuration for the Postgresql cluster, run the following command:
 
 ```bash
 chef-automate config patch path/to/postgresql-config.toml --postgresql
 ```
+
 or
+
 ```bash
 chef-automate config patch path/to/postgresql-config.toml -p
 ```
+
 or
+
 ```bash
 chef-automate config patch path/to/postgresql-config.toml --pg
 ```
@@ -173,18 +206,23 @@ chef-automate config patch path/to/postgresql-config.toml --pg
 ### Patch Configuration for OpenSearch cluster
 
 For Information on OpenSearch node configs visit links below:
-- Click [here](/automate/config_opensearch) for OpenSearch
+
+- To know more about OpenSearch node configs, see [HA OpenSearch Node Config](/automate/config_opensearch) page.
 
 To patch the configuration for the OpenSearch cluster, run the following command:
 
 ```bash
 chef-automate config patch path/to/opensearch-config.toml --opensearch
 ```
+
 or
+
 ```bash
 chef-automate config patch path/to/opensearch-config.toml -o
 ```
+
 or
+
 ```bash
 chef-automate config patch path/to/opensearch-config.toml --os
 ```
@@ -200,11 +238,15 @@ To set the configuration for Automate cluster, run the following command:
 ```bash
 chef-automate config set path/to/automate-config.toml --automate
 ```
+
 or
+
 ```bash
 chef-automate config set path/to/automate-config.toml -a
 ```
+
 or
+
 ```bash
 chef-automate config set path/to/automate-config.toml --a2
 ```
@@ -216,11 +258,15 @@ To set the configuration for the Chef Server cluster, run the following command:
 ```bash
 chef-automate config set path/to/chef_server-config.toml --chef_server
 ```
+
 or
+
 ```bash
 chef-automate config set path/to/chef_server-config.toml -c
 ```
+
 or
+
 ```bash
 chef-automate config set path/to/chef_server-config.toml --cs
 ```
@@ -228,18 +274,23 @@ chef-automate config set path/to/chef_server-config.toml --cs
 ### Set Configuration for Postgresql cluster
 
 For Information on PostgreSQL node configs visit links below:
-- Click [here](/automate/config_postgresql) for PostgreSQL
+
+- To know more about PostgreSQL node configs, see [HA PostgreSQL Node Config](/automate/config_postgresql) page.
 
 To set the configuration for the Postgresql cluster, run the following command:
 
 ```bash
 chef-automate config set path/to/postgresql-config.toml --postgresql
 ```
+
 or
+
 ```bash
 chef-automate config set path/to/postgresql-config.toml -p
 ```
+
 or
+
 ```bash
 chef-automate config set path/to/postgresql-config.toml --pg
 ```
@@ -247,23 +298,29 @@ chef-automate config set path/to/postgresql-config.toml --pg
 ### Set Configuration for OpenSearch cluster
 
 For Information on OpenSearch node configs visit links below:
-- Click [here](/automate/config_opensearch) for OpenSearch
+
+- To know more about OpenSearch node configs, see [HA OpenSearch Node Config](/automate/config_opensearch) page.
 
 To set the configuration for the OpenSearch cluster, run the following command:
 
 ```bash
 chef-automate config set path/to/opensearch-config.toml --opensearch
 ```
+
 or
+
 ```bash
 chef-automate config set path/to/opensearch-config.toml -o
 ```
+
 or
+
 ```bash
 chef-automate config set path/to/opensearch-config.toml --os
 ```
 
 ### How to patch max shards per node for opensearch
+
 To configure OpenSearch max shard per node, create a TOML file that contains the partial configuration below. Change max_shards_per_node as needed, and then run [command]({{< relref "ha_config/#patch-configuration-for-opensearch-cluster" >}}) to apply change.
 
 ```toml
diff --git a/components/docs-chef-io/content/automate/ha_config_gen.md b/components/docs-chef-io/content/automate/ha_config_gen.md
index 37f83d05b..ab6eb3054 100644
--- a/components/docs-chef-io/content/automate/ha_config_gen.md
+++ b/components/docs-chef-io/content/automate/ha_config_gen.md
@@ -10,6 +10,7 @@ gh_repo = "automate"
     identifier = "automate/deploy_high_availability/manage_ha_cluster/ha_config_gen.md Automate Config Generation"
     weight = 220
 +++
+
 {{< warning >}}
  {{% automate/ha-warn %}}
 {{< /warning >}}
@@ -17,12 +18,12 @@ gh_repo = "automate"
 ## Command Usage
 
 ```bash
- chef-automate config gen config.toml
+chef-automate config gen config.toml
 ```
 
 `config.toml` is the file where all the generated config will be saved at the end, you can choose to not provide this then the output will be shown to stdout.
 
-Refer the fields below to generate Chef Automate High Availability (HA) configuration using `chef-automate config gen` command.
+Refer the fields below to generate Chef Automate High Availability (HA) configuration using `chef-automate config gen` command:
 
 ## Automate HA Topology
 
diff --git a/components/docs-chef-io/content/automate/ha_disaster_recovery_setup.md b/components/docs-chef-io/content/automate/ha_disaster_recovery_setup.md
index d0e5f89a2..62593b70f 100644
--- a/components/docs-chef-io/content/automate/ha_disaster_recovery_setup.md
+++ b/components/docs-chef-io/content/automate/ha_disaster_recovery_setup.md
@@ -45,7 +45,7 @@ When a failure of the primary cluster occurs, fail-over can be accomplished thro
 
 ### Set up the production and disaster recovery cluster
 
-1. Deploy the primary cluster following the deployment instructions by [clicking here](/automate/ha_onprim_deployment_procedure/#deploy-the-bastion-host).
+1. Deploy the Primary cluster. To know more, follow the [deployment instructions](/automate/ha_onprim_deployment_procedure/#Run-these-steps-on-Bastion-Host-Machine).
 
 1. Deploy the disaster recovery cluster into a different data center and region using the same steps as the primary cluster.
 
diff --git a/components/docs-chef-io/content/automate/ha_disaster_recovery_setup_AWS.md b/components/docs-chef-io/content/automate/ha_disaster_recovery_setup_AWS.md
index f1f7ac891..f0801f9cd 100644
--- a/components/docs-chef-io/content/automate/ha_disaster_recovery_setup_AWS.md
+++ b/components/docs-chef-io/content/automate/ha_disaster_recovery_setup_AWS.md
@@ -46,7 +46,7 @@ When the primary cluster fails, accomplish the fail-over by updating DNS records
 
 ### Steps to set up the Production and Disaster Recovery Cluster
 
-1. Deploy the Primary cluster following the deployment instructions by [clicking here](/automate/ha_aws_deploy_steps/#deployment).
+1. Deploy the Primary cluster. To know more, follow the [deployment instructions](/automate/ha_aws_deploy_steps/#deployment).
 
 1. Deploy the Disaster Recovery cluster into a different data center/region using the same steps as the Primary cluster
 
diff --git a/components/docs-chef-io/content/automate/ha_healthcheck.md b/components/docs-chef-io/content/automate/ha_healthcheck.md
index 6f708e68f..c0428782d 100644
--- a/components/docs-chef-io/content/automate/ha_healthcheck.md
+++ b/components/docs-chef-io/content/automate/ha_healthcheck.md
@@ -20,101 +20,110 @@ This page includes commands that can be executed for the Chef Automate cluster p
 
 ## Automate HA Service Commands
 
-- Get the Automate HA cluster Information 
-  
-   ```sh
-   chef-automate info 
-   ```
+- Get the Automate HA cluster Information
+
+```sh
+chef-automate info
+```
 
 - Post Deployment, run the smoke test cases on Automate HA cluster and run the command from the bastion node.
-  
-   ```sh
-   chef-automate test --full 
-   ```
+
+```sh
+chef-automate test --full
+```
 
 - Validate the cluster but skip "chef-automate diagnostic run" when performing the smoke tests
-  
-  ```sh
-   chef-automate test  
-  ```
-
-- Run the smoke test on specific cluster 
-  
-  ```sh
-   chef-automate test automate
-   chef-automate test chef_server
-   chef-automate test opensearch
-   chef-automate test postgresql 
-  ```
+
+```sh
+chef-automate test
+```
+
+- Run the smoke test on specific cluster
+
+```sh
+chef-automate test automate
+chef-automate test chef_server
+chef-automate test opensearch
+chef-automate test postgresql
+```
 
 - To get the status of the cluster, run the command from the bastion node.
-  
-  ```sh
-   chef-automate status 
-  ```
+
+```sh
+chef-automate status
+```
 
 - To check the service status on Automate nodes.
- ```sh 
- chef-automate status --automate
- chef-automate status --a2 
+
+```sh
+chef-automate status --automate
+chef-automate status --a2
 ```
 
 - To check the service status on Chef Infra Server nodes.
- ```sh 
- chef-automate status --chef_server
- chef-automate status --cs
+
+```sh
+chef-automate status --chef_server
+chef-automate status --cs
 ```
 
 - To check the service status on Postgres nodes.
- ```sh 
- chef-automate status --postgresql
- chef-automate status -pg
+
+```sh
+chef-automate status --postgresql
+chef-automate status -pg
 ```
 
 - To check the service status on Opensearch nodes.
-```sh 
- chef-automate status --opensearch
- chef-automate status --os
+
+```sh
+chef-automate status --opensearch
+chef-automate status --os
 ```
 
 - Patch a config to the Front end nodes (Automate)
   - create a config file `automate.toml`
-  
+
 ``` cmd
-    chef-automate config patch automate.toml --automate
+chef-automate config patch automate.toml --automate
 ```
+
 sorthands for --automate is --a2 and -a
 
 - Patch a config to the Front end nodes (Chef Server)
   - create a config file `chefserver.toml`
-  
+
 ``` cmd
- chef-automate config patch chefserver.toml --chef_server
+chef-automate config patch chefserver.toml --chef_server
 ```
+
 sorthands for --chef_server is --cs and -c
 
 - Patch a config to the all Front end nodes (Chef Server + Automate)
-  - create a config file `frontend.toml`
-  
+  - Create a config file `frontend.toml`
+
 ``` cmd
- chef-automate config patch frontend.toml --frontend
+chef-automate config patch frontend.toml --frontend
 ```
+
 sorthands for --chef_server is --fe and -f
 
 - Patch a config to the Back end nodes (Open Search)
-  - create a config file `opensearch.toml`
+  - Create a config file `opensearch.toml`
 
 ``` cmd
- chef-automate config patch opensearch.toml --opensearch
+chef-automate config patch opensearch.toml --opensearch
 ```
+
 sorthands for --opensearch is --os and -o
 
 - Patch a config to the Back end nodes (Postgresql)
-  - create a config file `postgresql.toml`
+  - Create a config file `postgresql.toml`
 
 ``` cmd
- chef-automate config patch postgresql.toml --postgresql
+chef-automate config patch postgresql.toml --postgresql
 ```
+
 sorthands for --postgresql is --pg and -p
 
 {{< note >}}
@@ -126,31 +135,31 @@ sorthands for --postgresql is --pg and -p
 
 {{< warning >}}
 
-- For certificate rotation, don't use config patch. Instead, the cert-rotate command can be used. To learn more about certificate rotation, click [here](/automate/ha_cert_rotaion)
+- For certificate rotation, don't use config patch. Instead, the cert-rotate command can be used. To learn more about certificate rotation, see [Certificate Rotation](/automate/ha_cert_rotation).
 - While patching the same from **the provision host**, structures such as TLS from OpenSearch configuration toml file and SSL from PostgreQL configuration toml file will be ignored.
 
 {{< /warning >}}
 
-- Collect the Gatherlogs for Automate HA cluster, and run the command from the bastion node.  
-  - logs are collected at `/var/tmp`
+- Collect the Gatherlogs for Automate HA cluster, and run the command from the bastion node.
+  - Logs are collected at `/var/tmp`
 
 ```sh
- chef-automate gather-logs
+chef-automate gather-logs
 ```
 
 - View the active Habitat gossiped toml config for any locally loaded service:
-  - ssh to the backend opensearch nodes `chef-automate ssh --hostname os`
+  - SSH to the backend opensearch nodes `chef-automate ssh --hostname os`
 
 ```sh
- source /hab/sup/default/SystemdEnvironmentFile.sh
- automate-backend-ctl show --svc=automate-ha-opensearch
+source /hab/sup/default/SystemdEnvironmentFile.sh
+automate-backend-ctl show --svc=automate-ha-opensearch
 ```
 
-- ssh to the backend postgres nodes `chef-automate ssh --hostname pg`
+- SSH to the backend postgres nodes `chef-automate ssh --hostname pg`
 
 ```sh
- source /hab/sup/default/SystemdEnvironmentFile.sh
- automate-backend-ctl show --svc=automate-ha-postgresql
+source /hab/sup/default/SystemdEnvironmentFile.sh
+automate-backend-ctl show --svc=automate-ha-postgresql
 ```
 
 - To Rotate the password for Postgres cluster, run the command from the bastion node
diff --git a/components/docs-chef-io/content/automate/ha_inplace_migration.md b/components/docs-chef-io/content/automate/ha_inplace_migration.md
index 4782b1d7e..0c826021a 100644
--- a/components/docs-chef-io/content/automate/ha_inplace_migration.md
+++ b/components/docs-chef-io/content/automate/ha_inplace_migration.md
@@ -129,23 +129,21 @@ done
 
 ## Installing the Latest Automate HA
 
-Follow Automate HA installation documentation. Click [here](/automate/ha_onprim_deployment_procedure/) to know more about `config.toml`,
-**provide** the same IPs and backup config in config.toml as in the  `a2ha.rb` file.
+Follow [Automate HA installation documentation](/automate/ha_onprim_deployment_procedure/) to know more about `config.toml` file and **provide** the same IPs and backup config in config.toml as in the  `a2ha.rb` file.
 
 ## File System backup configuration
 
-In case the backup configuration was skipped in the deployment config.toml, the User needs to configure EFS backup manually in Automate HA please click [here](/automate/ha_backup_restore_file_system/#configuration-for-automate-node-from-provision-host) to know more.
+In case the [backup configuration](/automate/ha_backup_restore_file_system/#configuration-for-automate-node-from-provision-host) was skipped in the deployment config.toml, the User needs to configure EFS backup manually in Automate HA.
 
 {{<note>}}
 
-While configuring the backup configuration provide the path of **Elasticsearch** instead of **Opensearch** as A2HA backup was in Elasticsearch directory
-like instead of `/mnt/automate_backups/opensearch/` it will be `/mnt/automate_backups/elasticsearch/`
+While configuring the backup configuration provide the path of **Elasticsearch** instead of **Opensearch** as A2HA backup was in Elasticsearch directory like instead of `/mnt/automate_backups/opensearch/` it will be `/mnt/automate_backups/elasticsearch/`.
 
 {{</note>}}
 
 ## Restore Backup
 
-Once deployment is successful, proceed with restoring the backup in Automate HA. Click [here](/automate/ha_backup_restore_file_system/) to know more.
+Once deployment is successful, proceed with restoring the backup in Automate HA. For more information, see [On-Premise Deployment using Filesystem](/automate/ha_backup_restore_file_system/).
 
 Login to one of automate nodes, and take **current_config.toml** file as shown below:
 
@@ -200,12 +198,12 @@ chef-automate config set applied_config.toml
 
 {{< /note >}}
 
-
-Click [here](/automate/ha_backup_restore_object_storage/) to know more about the usage of S3 backup.
+To know more about the usage of S3 backup, see [On-Premise Deployment using Object Storage page](/automate/ha_backup_restore_object_storage/).
 
 {{< note >}}
+
 1. Once Automate HA is up and running with restored data, We can remove old backed-up directories sudo `rm -rf hab-old`, freeing up acquired space.
-1. Reset the backup configuration path to Opensearch so that new backups will be stored in Opensearch directory, please click [here](/automate/ha_backup_restore_file_system/#configuration-for-automate-node-from-provision-host) to know more.
+1. Reset the backup configuration path to Opensearch so that new backups will be stored in Opensearch directory. For more information, see [configuration for automate node from provision host](/automate/ha_backup_restore_file_system/#configuration-for-automate-node-from-provision-host).
 {{< /note >}}
 
 ## Validate successful migration
@@ -247,10 +245,12 @@ Click [here](/automate/ha_backup_restore_object_storage/) to know more about the
 
 1. While installing the new Automate HA, if PostgreSQL is having any issues in starting, and in PostgreSQL instance `hab svc status` shows a secret key mismatch error, then try the cleanup command with new Automate HA CLI `chef-automate cleanup --onprem-deployment` and then remove `/bin/chef-automate` from all frontend nodes, now try the installation again.
 
-1. Click [here](/automate/ha_existing_a2ha_to_automate_ha/#troubleshooting) to know more if you encounter an error while restoring related to the ElasticSearch snapshot.
-2. While restoring the backup if an error related to backup directory occurs like
+1. See the [troubleshooting](/automate/ha_existing_a2ha_to_automate_ha/#troubleshooting) section to know more if you encounter an error while restoring related to the ElasticSearch snapshot.
+
+1. While restoring the backup if an error related to backup directory occurs like:
+
 > **Error in Automate node:** failed to create snapshot repository: Elasticsearch repository create request failed for repo**
 > OR
 > **Error in Opensearch node:** /mnt/automate_backups/backups/automate-elasticsearch-data/chef-automate-*-service] doesn't match any of the locations specified by path.repo
 
-please re-check your EFS backup configuration for the Automate and OpenSearch node, click [here](/automate/ha_backup_restore_file_system/#configuration-for-automate-node-from-provision-host) to know more.
+Please re-check your EFS backup [configuration](/automate/ha_backup_restore_file_system/#configuration-for-automate-node-from-provision-host) for the Automate and OpenSearch node.
diff --git a/components/docs-chef-io/content/automate/ha_node_bootstraping.md b/components/docs-chef-io/content/automate/ha_node_bootstraping.md
index 9b8045ddd..be22758b2 100644
--- a/components/docs-chef-io/content/automate/ha_node_bootstraping.md
+++ b/components/docs-chef-io/content/automate/ha_node_bootstraping.md
@@ -100,9 +100,9 @@ The Chef Infra Client installer puts everything into a unique directory (/opt/ch
     chef -v
     ```
 
-    Click [here](https://docs.chef.io/workstation/install_workstation/) for any additional information.
+    For additional information, see [Install Workstation](https://docs.chef.io/workstation/install_workstation/) page.
 
-    1. Generate chef-repo using `chef generate repo chef-repo`. Click [here]https://docs.chef.io/workstation/getting_started/ to know more.
+    1. Generate chef-repo using `chef generate repo chef-repo`. For more information, see the [getting station](https://docs.chef.io/workstation/getting_started/) page of Workstation.
 
     1. Paste `pem` files of user and organization inside `/root/.chef/`. For example: `Eg.: /root/.chef/johndoe.pem , /root/.chef/new_org.pem`
 
diff --git a/components/docs-chef-io/content/automate/ha_onprim_deployment_procedure.md b/components/docs-chef-io/content/automate/ha_onprim_deployment_procedure.md
index af2bff8e2..9c8b1abfe 100644
--- a/components/docs-chef-io/content/automate/ha_onprim_deployment_procedure.md
+++ b/components/docs-chef-io/content/automate/ha_onprim_deployment_procedure.md
@@ -69,7 +69,7 @@ Make sure you have all resources either on existing infrastructure or on existin
     sudo chef-automate config gen config.toml
     ```
 
-Click [here](/automate/ha_config_gen) to know more about generating config.
+To know more on how to generate config, see the [Automate HA Config Generation](/automate/ha_config_gen) page.
 
 You can also view the [Sample Config](#sample-config). You can also view the [Sample Config For 5 Node Cluster](#sample-config-for-5-nodes-cluster).
 
@@ -102,8 +102,9 @@ You can also generate a configuration file using the `init-config` subcommand.
     ```
 
    To skip verification during deployment, use `--skip-verify` flag
+
     ```bash
-     chef-automate deploy config.toml --airgap-bundle automate.aib --skip-verify
+    chef-automate deploy config.toml --airgap-bundle automate.aib --skip-verify
     ```
 
 ## Verify Deployment
@@ -114,7 +115,7 @@ You can also generate a configuration file using the `init-config` subcommand.
      chef-automate status summary
     ```
 
-1.  Get the service status from each node
+1. Get the service status from each node
 
     ```bash
      chef-automate status
@@ -134,9 +135,10 @@ You can also generate a configuration file using the `init-config` subcommand.
 
     Check if Chef Automate UI is accessible by going to (Domain used for Chef Automate) [https://chefautomate.example.com](https://chefautomate.example.com).
     After successful deployment, proceed with following...
-      1. Create user and orgs, Click [here](/automate/ha_node_bootstraping/#create-users-and-organization) to learn more about user and org creation
-      1. Workstation setup, Click [here](/automate/ha_node_bootstraping/#workstation-setup) to learn more about workstation setup
-      1. Node bootstrapping, Click [here](/automate/ha_node_bootstraping/#bootstraping-a-node) to learn more about node bootstrapping.
+
+      1. [Create users and organizations](/automate/ha_node_bootstraping/#create-users-and-organization) section in Node Bootstrapping page.
+      1. [Setup Chef Workstation](/automate/ha_node_bootstraping/#workstation-setup)
+      1. [Bootstrap nodes](/automate/ha_node_bootstraping/#bootstraping-a-node)
 
 ## Backup/Restore
 
diff --git a/components/docs-chef-io/content/automate/ha_onprim_deployment_with_aws_managed_deployment.md b/components/docs-chef-io/content/automate/ha_onprim_deployment_with_aws_managed_deployment.md
index 3a4fff40d..684046d30 100644
--- a/components/docs-chef-io/content/automate/ha_onprim_deployment_with_aws_managed_deployment.md
+++ b/components/docs-chef-io/content/automate/ha_onprim_deployment_with_aws_managed_deployment.md
@@ -23,20 +23,18 @@ This section will discuss deploying Chef Automate HA on-premise machines with AW
 
 {{< /warning >}}
 
-- Before proceeding with the deployment steps make sure to provision ,Click here to know more [details](automate/ha_onprim_deployment_procedure/#provisioning).
+- Before proceeding with the deployment steps make sure to [provision](/automate/ha_onprim_deployment_procedure/#provisioning).
 
-- See the steps [here](/automate/ha_onprim_deployment_procedure/#deploy-the-bastion-host) to run on bastion host to download the latest Automate CLI and Airgapped Bundle.
+- [Run on the Bastion host](/automate/ha_onprim_deployment_procedure/#deploy-the-bastion-host) to download the latest Automate CLI and Airgapped Bundle.
 
 ## Generate configuration file
 
-1. Generate config using the below command:
+1. [Generate config](/automate/ha_config_gen) using the below command:
 
 ```bash
 sudo chef-automate config gen config.toml
 ```
 
-Click [here](/automate/ha_config_gen) to know more about generating config.
-
 You can also view the [Sample Config](#sample-config-to-setup-on-premise-deployment-with-aws-managed-services).
 
 {{< note >}} You can also generate a configuration file using the `init-config` subcommand. The command is as shown below:
@@ -98,9 +96,9 @@ Check if Chef Automate UI is accessible by going to (Domain used for Chef Automa
 
 After successful deployment, proceed with the following:
 
-   1. Create user and orgs, Click [here](/automate/ha_node_bootstraping/#create-users-and-organization) to learn more about user and org creation
-   1. Workstation setup, Click [here](/automate/ha_node_bootstraping/#workstation-setup) to learn more about workstation setup
-   1. Node bootstrapping, Click [here](/automate/ha_node_bootstraping/#bootstraping-a-node) to learn more about node bootstrapping.
+   1. [Create users and organizations](/automate/ha_node_bootstraping/#create-users-and-organization)
+   1. [Workstation setup](/automate/ha_node_bootstraping/#workstation-setup)
+   1. [Node bootstrapping](/automate/ha_node_bootstraping/#bootstraping-a-node)
 
 ## Backup/Restore
 
diff --git a/components/docs-chef-io/content/automate/ha_onprim_deployment_with_customer_managed_deployment.md b/components/docs-chef-io/content/automate/ha_onprim_deployment_with_customer_managed_deployment.md
index 8eb2100dd..a8fcf01db 100644
--- a/components/docs-chef-io/content/automate/ha_onprim_deployment_with_customer_managed_deployment.md
+++ b/components/docs-chef-io/content/automate/ha_onprim_deployment_with_customer_managed_deployment.md
@@ -23,20 +23,18 @@ If SELinux is enabled, deployment with configure it to `permissive` (Usually in
 
 {{< /warning >}}
 
-- Before proceeding with deployment steps make sure to provision ,Click here to know more [details](automate/ha_onprim_deployment_procedure/#provisioning).
+- Before proceeding with deployment steps make sure to [provision](/automate/ha_onprim_deployment_procedure/#provisioning).
 
-- See the steps [here](/automate/ha_onprim_deployment_procedure/#deploy-the-bastion-host) to run on bastion host to download the latest Automate CLI and Airgapped Bundle.
+- [Run on the Bastion host](/automate/ha_onprim_deployment_procedure/#deploy-the-bastion-host) to download the latest Automate CLI and Airgapped Bundle.
 
 ## Generate Chef Automate config
 
-1. Generate the configuration file.
+1. [Generate](/automate/ha_config_gen) the configuration file.
 
     ```bash
     sudo chef-automate config gen config.toml
     ```
 
-    Click [here](/automate/ha_config_gen) to know more about generating config.
-
     You can also view the [Sample Config](#sample-config-to-setup-on-premises-deployment-with-self-managed-services).
 
     {{< note spaces=4 >}}
@@ -103,9 +101,9 @@ Check if Chef Automate UI is accessible by going to (Domain used for Chef Automa
 
 After successful deployment, proceed with the following:
 
-   1. Create user and orgs, Click [here](/automate/ha_node_bootstraping/#create-users-and-organization) to learn more about user and org creation
-   1. Workstation setup, Click [here](/automate/ha_node_bootstraping/#workstation-setup) to learn more about workstation setup
-   1. Node bootstrapping, Click [here](/automate/ha_node_bootstraping/#bootstraping-a-node) to learn more about node bootstrapping.
+   1. [Create users and organizations](/automate/ha_node_bootstraping/#create-users-and-organization)
+   1. [Workstation setup](/automate/ha_node_bootstraping/#workstation-setup)
+   1. [Node bootstrapping](/automate/ha_node_bootstraping/#bootstraping-a-node)
 
 ## Backup/Restore
 
diff --git a/components/docs-chef-io/content/automate/ha_remove_single_node_from_cluster.md b/components/docs-chef-io/content/automate/ha_remove_single_node_from_cluster.md
index 8e5e7c315..f11f57c7e 100644
--- a/components/docs-chef-io/content/automate/ha_remove_single_node_from_cluster.md
+++ b/components/docs-chef-io/content/automate/ha_remove_single_node_from_cluster.md
@@ -19,7 +19,8 @@ Chef Automate HA comes with five different types of deployment flows. This page
 
 {{< warning >}}
 
-- We do not recommend the removal of any node from the backend cluster, but replacing the node is recommended. For the replacement of a node, click [here](#replace-node-in-automate-ha-cluster) for reference.
+- We do not recommend removing any node from the backend cluster, but replacing it is recommended. To learn more, see the [replace node in automate ha cluster](#replace-node-in-automate-ha-cluster) section.
+
 - Removal of nodes for PostgreSQL or OpenSearch is at your own risk and may result in data loss. Consult your database administrator before trying to delete PostgreSQL or OpenSearch nodes.
 - Below process can be done for `chef-server` and `automate`.
 - Only one node can be removed simultaneously, irrespective of a node type.
diff --git a/components/docs-chef-io/content/automate/large_compliance_report.md b/components/docs-chef-io/content/automate/large_compliance_report.md
index 4e275eb11..4b082c453 100644
--- a/components/docs-chef-io/content/automate/large_compliance_report.md
+++ b/components/docs-chef-io/content/automate/large_compliance_report.md
@@ -59,9 +59,9 @@ Here is a benchmark test summary report run on
 
 ### MinIO
 
-MinIO is a High-Performance Object Storage released under GNU Affero General Public License v3.0. It is API compatible with the Amazon S3 cloud storage service. MinIO is the only object storage suite available on public cloud, every Kubernetes distribution, the private cloud, and the edge.
+MinIO is a High-Performance Object Storage released under GNU Affero General Public License v3.0. It is API compatible with the Amazon S3 cloud storage service. MinIO is the only object storage suite available on the public cloud, every Kubernetes distribution, the private cloud, and the edge.
 
-Click [here](https://min.io) to learn more about MinIO and [set up](https://docs.min.io/minio/baremetal/) the MinIO on a baremetal server.
+For more information on how to set up MinIO in the baremetal server, see how to [set up the MinIO](https://min.io/docs/minio/kubernetes/upstream/).
 
 ## Enable Automate to Ingest Large Compliance Report
 
diff --git a/components/docs-chef-io/content/automate/major_upgrade_4.x.md b/components/docs-chef-io/content/automate/major_upgrade_4.x.md
index 907fdded7..99021f229 100644
--- a/components/docs-chef-io/content/automate/major_upgrade_4.x.md
+++ b/components/docs-chef-io/content/automate/major_upgrade_4.x.md
@@ -659,13 +659,15 @@ After upgrading to version 4.x, Automate will have the configurations both for O
           total_limit = "95%"
 ```
 
-### Shard Failure 
+### Shard Failure
 
-```
+```sh
 [ERROR] Elasticsearch exception [type=validation_exception, reason=Validation Failed: 1: this action would add [5] total shards, but this cluster currently has [997]/[1000] maximum shards open;]
 ```
+
 To address the issue of shard limit hitting 1000, we need to increase the `max_shards_per_node`
 Update the Opensearch Config, using `chef-automate config patch <config_patch.toml>` 
+
 ```
 [opensearch]
   [opensearch.v1]
@@ -673,9 +675,12 @@ Update the Opensearch Config, using `chef-automate config patch <config_patch.to
       [opensearch.v1.sys.cluster]
          max_shards_per_node = "<NUMBER_OF_SHARD>"
 ```
+
 ### Proxy Setting issue
+
 If you are using Proxy Settings and have upgraded to a version between 4.0.27 and 4.2.10, then you might get this error when you upgrade:
-```
+
+```sh
 DeploymentServiceCallError: A request to the deployment-service failed: Request to get upgrade status failed: rpc error: code = Unknown desc = error in getting the versions from current channel: error in invoking the endpoint https://packages.chef.io/manifests/current/automate/versions.json: Get "https://packages.chef.io/manifests/current/automate/versions.json": dial tcp: lookup packages.chef.io on 10.2.72.20:53: read udp 10.1.97.98:59620->10.2.72.20:53: i/o timeout
 ```
 To move ahead with upgrade you can download latest CLI and Airgapped bundle using curl command with proxy settings:
@@ -686,10 +691,13 @@ curl -x http://proxy_server:proxy_port --proxy-user username:password -L https:/
 ```
 
 After downloading, run the upgrade command with airgapped bundle option:
+
 ```sh
 ./chef-automate upgrade run --airgap-bundle automate-latest.aib
 ```
+
 Output will look like this:
+
 ```sh
 Installing airgap install bundle
 Trying to restart Deployment Service...
@@ -732,6 +740,7 @@ Before trying the upgrade again, confirm whether all the services are up by runn
 ```sh
 sudo chef-automate status
 ```
+
 ### Migration Fails
 
  If Chef Automate fails to migrate your data to *OpenSearch 1.2.4* while running `chef-automate post-major-upgrade migrate --data=es`, restore the data using:
@@ -746,27 +755,28 @@ To restore your Air-Gapped bundle, run the following command:
 sudo chef-automate backup restore  --airgap-bundle </path/to/bundle> </path/to/backups/>BACKUP_ID
 ```
 
-Click [here](/automate/restore/) to know more about the Restore methods.
+For more information, see [Restore Methods](/automate/restore/).
 
 To start the upgrade, use the **backup ID** from the backup created. In case the restore fails even after upgrading the Chef Automate version, follow the steps given below:
 
 1. Uninstall Chef Automate.
 
-```sh
-sudo chef-automate uninstall
-```
+    ```sh
+    sudo chef-automate uninstall
+    ```
 
-2. Install the last major version (`3.0.49`) using the [air-gapped installation](/automate/airgapped_installation/) process.
+1. Install the last major version (`3.0.49`) using the [air-gapped installation](/automate/airgapped_installation/) process.
 
-3. Restore the backup:
+1. Restore the backup:
 
-```sh
-sudo chef-automate backup restore <backup_id>
-```
+    ```sh
+    sudo chef-automate backup restore <backup_id>
+    ```
 
-Refer to the [Chef Automate Restore](/automate/restore/) documentation.
+    Refer to the [Chef Automate Restore](/automate/restore/) documentation.
 
 {{< note >}} Remove the `/hab/svc/deployment-service/var/upgrade_metadata.json` file if the migration of data has been done using backup and restore method. {{< /note >}}
 
-### Adding Custom Configuration to optimize OpenSearch performance
+### Adding Custom Configuration to optimize OpenSearch Performance
+
 To add custom configurations or optimizing OpenSearch performance please refer to [Custom OpenSearch configuration docs](/automate/opensearch/#configure-embedded-opensearch).
diff --git a/components/docs-chef-io/content/automate/managed_services.md b/components/docs-chef-io/content/automate/managed_services.md
index c04374c86..f61ec81d8 100644
--- a/components/docs-chef-io/content/automate/managed_services.md
+++ b/components/docs-chef-io/content/automate/managed_services.md
@@ -16,7 +16,7 @@ gh_repo = "automate"
 
 ### PostgreSQL Setup
 
-- Setup PostgreSQL RDS DB instance in AWS. Click [here](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_GettingStarted.CreatingConnecting.PostgreSQL.html) to know more.
+- Setup [PostgreSQL RDS DB instance]](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_GettingStarted.CreatingConnecting.PostgreSQL.html) in AWS.
 
 - To connect to the DB instance, the DB instance should be associated with a security group that provides access to it. Ensure External RDS is accessible from Automate instances.
 
@@ -47,7 +47,7 @@ Apply the changes:
 
 ```bash
 sudo chef-automate config patch config.toml
-````
+```
 
 If you wish to reset to the default configuration or to modify the configuration:
 
@@ -57,7 +57,7 @@ If you wish to reset to the default configuration or to modify the configuration
 
 ### OpenSearch Setup
 
-- Create an Opensearch domain. Click [here](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html) to know more.
+- Create an [Opensearch domain](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html).
 
 To create the domain, follow the steps given below:
 
@@ -71,7 +71,8 @@ To create the domain, follow the steps given below:
 
 - Copy the `domain arn` of the newly created OpenSearch, example: `arn:aws:es:region:123456789012:domain/domain-name`
 
-#### Enabling OpenSearch Backup restore
+#### Enabling OpenSearch Backup Restore
+
 The steps to enable backup and restore in OpenSearch S3 is:
 
 - Create an IAM role with the Permission listed below. The rest of the document refers to the role as `TheSnapshotRole`.
@@ -92,6 +93,7 @@ The steps to enable backup and restore in OpenSearch S3 is:
     ]
   }
   ```
+
 - Copy the `arn` value of `TheSnapshotRole`, example: `arn:aws:iam::123456789012:role/TheSnapshotRole`
 - Create a IAM policy with the json as given below:
   - Replace the **iam:PassRole** resource with the snapshot role arn we copied previously and replace the **es:ESHttpPut** resource with your opensearch domain arn value which we had copied along with `/*` in the end:
@@ -113,6 +115,7 @@ The steps to enable backup and restore in OpenSearch S3 is:
       ]
     }
     ```
+
 - Now edit your snapshot role `TheSnapshotRole` and attach this newly created policy.
 - Create an IAM user and attach the above permission policy, which are added for `TheSnapshotRole`. Save the security credentials for this IAM user for S3 backup/restore. Also save the IAM user arn to be used on OpenSearch Dashboard.
 - Map the snapshot role in OpenSearch Dashboards.
@@ -121,9 +124,11 @@ The steps to enable backup and restore in OpenSearch S3 is:
   1. From the OpenSearch Dashboards, navigate to *Security* in the main menu and choose *Roles*, and then select the `manage_snapshots` role.
   1. Choose Mapped users, and select Manage mapping.
   1. Add the domain ARN of the user and role that has permissions to pass the newly created `TheSnapshotRole`. Put user ARNs under Users and role ARNs under Backend roles.
+
       ```bash
       arn:aws:iam::123456789123:user/user-name
       ```
+
       ```bash
       arn:aws:iam::123456789123:role/role-name
       ```
@@ -141,7 +146,7 @@ The steps to enable backup and restore in OpenSearch S3 is:
 
       {{< figure src="/images/automate/managed_services_os_dasboard_permission.png" alt="Managed Service OS Dashboard Permission">}}
 
-{{< note >}} To access the default installation of OpenSearch Dashboards for a domain that resides within a VPC, you must have access to the VPC. This process varies by network configuration but likely involves connecting to a VPN or managed network or using a proxy server or transit gateway. Click [here](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html#vpc-security) to know more.
+{{< note >}} To access the default installation of OpenSearch Dashboards for a domain that resides within a VPC, you must have access to the VPC. This process varies by network configuration but likely involves connecting to a VPN or managed network or using a proxy server or transit gateway. To know more, see the [OpenSearch VPC developer guide](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html#vpc-security).
 
 From the terminal, run the following command:
 
@@ -253,7 +258,6 @@ Create `postgresql.toml` file and add the following details of your AWS PostgreS
 {{% automate/char-warn %}}
 {{< /warning >}}
 
-
 ```toml
 [global.v1.external.postgresql]
 enable = true
@@ -473,7 +477,6 @@ Add the following settings to your `config.toml`:
 {{% automate/char-warn %}}
 {{< /warning >}}
 
-
 ```toml
 [global.v1.external.postgresql]
 enable = true
@@ -510,7 +513,6 @@ Add the following to your `config.toml` file:
 {{% automate/char-warn %}}
 {{< /warning >}}
 
-
 ```toml
 [global.v1.external.opensearch]
 enable = true
diff --git a/components/docs-chef-io/content/automate/node_integrations.md b/components/docs-chef-io/content/automate/node_integrations.md
index 807fce8dc..c5196c064 100644
--- a/components/docs-chef-io/content/automate/node_integrations.md
+++ b/components/docs-chef-io/content/automate/node_integrations.md
@@ -23,7 +23,7 @@ Access the _Node Integrations_ page from the **Settings** tab.
 
 Set up Chef Automate to detect and scan the nodes in your AWS EC2 account by providing your AWS Credentials and creating an _AWS EC2 Node Manager_ from the **Node Credentials** page in the **Settings** tab. Chef Automate requires your information to detect the nodes in your AWS EC2 account. Chef Automate creates a node reference for each EC2 instance in your account and collects all of the tags associated with each instance.
 
-InSpec 2+ supports running scan jobs against your AWS account configuration, such as CloudWatch or IAM, [see more here](https://docs.chef.io/inspec/resources/#aws). Set up Chef Automate to run these scan jobs by providing your AWS Credentials and creating an _AWS API Node Manager_ in the **Node Integrations** page in the **Settings**  tab.
+Chef InSpec has [resources](https://docs.chef.io/inspec/resources/#aws) you can use to run scan jobs against AWS services in your account, such as CloudWatch or IAM. Set up Chef Automate to run these scan jobs by providing your AWS Credentials and creating an _AWS API Node Manager_ in the **Node Integrations** page in the **Settings** tab.
 
 To create an AWS EC2 Node Manager, you need the following information:
 
diff --git a/components/docs-chef-io/content/automate/opensearch_external_upgrade.md b/components/docs-chef-io/content/automate/opensearch_external_upgrade.md
index 01b74011c..096e0ecca 100644
--- a/components/docs-chef-io/content/automate/opensearch_external_upgrade.md
+++ b/components/docs-chef-io/content/automate/opensearch_external_upgrade.md
@@ -14,14 +14,13 @@ This guide covers upgrading services used by Chef Automate.
 
 ## Upgrade Elasticsearch to OpenSearch
 
-On January 21, 2021, Elastic NV announced that they would change their software licensing strategy and not release new versions of Elasticsearch and Kibana under the permissive ALv2 license. Instead, Elastic is releasing Elasticsearch and Kibana under the Elastic license, with source code available under the Elastic License or Server Side Public License (SSPL). These licenses are not open source and do not offer users the same freedoms. Because of this, AWS made the decision to create and maintain a fork from the last ALv2 version of Elasticsearch and Kibana. The fork is called OpenSearch and is available under ALv2.
+On January 21, 2021, Elastic NV announced that they would change their software licensing strategy and not release new versions of Elasticsearch and Kibana under the permissive ALv2 license. Instead, Elastic is releasing Elasticsearch and Kibana under the Elastic license, with source code available under the Elastic License or Server Side Public License (SSPL). These licenses are not open source and do not offer users the same freedoms. Because of this, AWS decided to create and maintain a fork from the last ALv2 version of Elasticsearch and Kibana. The fork is called OpenSearch and is available under ALv2.
 
 To upgrade AWS Elasticsearch, please follow instructions on [Upgrading to AWS OpenSearch](https://aws.amazon.com/blogs/aws/amazon-elasticsearch-service-is-now-amazon-opensearch-service-and-supports-opensearch-10/)
 
-
 ### Migration Planning
 
-The upgrade process for Elasticsearch to OpenSearch requires a one-time downtime and takes about 10 mins. This process may take longer depending on your server hardware and the size of the node objects in Chef Automate.
+The upgrade process for Elasticsearch to OpenSearch requires a one-time downtime and takes about 10 minutes. This process may take longer depending on your server hardware and the size of the node objects in Chef Automate.
 
 ### Requirements
 
@@ -42,18 +41,17 @@ This upgrade guide is for systems running:
 **BACKUP CHEF AUTOMATE AND SECURE THE DATA**. Preserve your backup at all costs. Copy the backup to a second and separate location.
 {{< /danger >}}
 
-Database migrations have inherent risk to your system. Create a backup before beginning any migration or update. This ensures that you have a recoverable state in case any step in the process fails. Copy the backup to a another disk that is not connected to Chef Automate. This ensures that you have state to restore, in case of a failure in the upgrade process.
+Database migrations have inherent risks to your system. Create a backup before beginning any migration or update. This ensures that you have a recoverable state in case any step in the process fails. Copy the backup to another disk that is not connected to Chef Automate. This ensures that you have state to restore, in case of a failure in the upgrade process.
 
 Follow the [Backup]({{< relref "backup.md" >}}) documentation to make a copy of your Chef Automate data.
 
 ### Upgrade Chef Automate
 
-- Follow instructions to upgrade to Chef Automate 4.x or higher. OpenSearch support is available on Chef Automate version 4.x or higher. [Click here to know how to upgrade to Chef Automate 4.x]({{< ref "major_upgrade.md" >}})
-```
+- Follow the instructions to upgrade to Chef Automate 4.x or higher. OpenSearch support is available on [Chef Automate version 4.x]({{< ref "major_upgrade.md" >}}) or higher.
 
 ### Stop Chef Automate
 
-After successful upgrade, stop Chef Automate Services.
+After a successful upgrade, stop Chef Automate Services.
 
 ```bash
 sudo chef-automate stop
@@ -64,6 +62,7 @@ sudo chef-automate stop
 Chef Automate 4.x supports external OpenSearch. Please follow the migration section below to migrate from external Elasticsearch to external OpenSearch.
 
 Steps To Enable External OpenSearch
+
 - Set the `external.opensearch` `enable` attribute to false.
 - Set the `nodes` attribute to the external OpenSearch URL array.
 - Set the auth .
diff --git a/lib/io/fileutils/fileutils.go b/lib/io/fileutils/fileutils.go
index 163b2b4dd..55559c49f 100644
--- a/lib/io/fileutils/fileutils.go
+++ b/lib/io/fileutils/fileutils.go
@@ -20,6 +20,7 @@ import (
 const (
 	HAB_ROOT_CMD string = "HAB_LICENSE=accept-no-persist hab pkg path chef/deployment-service"
 	HAB_DIR      string = "/hab"
+	HAB_TMP_DIR  string = "/hab/tmp"
 )
 
 type FileUtils interface {
@@ -248,7 +249,7 @@ func RemoveFirstLine(filePath string) error {
 	defer file.Close()
 
 	// Create a temporary file to write the updated content
-	tempFile, err := os.CreateTemp("", "temp")
+	tempFile, err := os.CreateTemp(HAB_TMP_DIR, "temp")
 	if err != nil {
 		return err
 	}
@@ -313,3 +314,20 @@ func GetFilePermission(filePath string) (int64, error) {
 	}
 	return testint, nil
 }
+
+// CreateHabTmpDir creates a temporary directory in the hab directory
+func CreateHabTmpDir() error {
+	if _, err := os.Stat(HAB_TMP_DIR); os.IsNotExist(err) {
+		err = os.MkdirAll(HAB_TMP_DIR, os.ModePerm)
+		if err != nil {
+			return err
+		}
+
+		// Change the permissions from 0777 to 1777
+		err = os.Chmod(HAB_TMP_DIR, 1777|os.ModeSticky)
+		if err != nil {
+			return err
+		}
+	}
+	return nil
+}
diff --git a/terraform/a2ha-terraform/modules/automate/templates/provision.sh.tpl b/terraform/a2ha-terraform/modules/automate/templates/provision.sh.tpl
index cb3816e99..980272163 100644
--- a/terraform/a2ha-terraform/modules/automate/templates/provision.sh.tpl
+++ b/terraform/a2ha-terraform/modules/automate/templates/provision.sh.tpl
@@ -371,6 +371,9 @@ if [[ "${automate_role}" == "bootstrap_automate" ]]; then
   rm -f ${tmp_path}/bootstrap.abb
   chef-automate bootstrap bundle create ${tmp_path}/bootstrap.abb
   chown ${ssh_user} ${tmp_path}/bootstrap.abb
+  # creating skip_migration file to avoid db lock for restart on First Automate node
+  # this file will getting removed in upgrade flow at line #295
+  [ ! -f /hab/.skip_migration ] && echo "creating on bootstrap node " && touch /hab/.skip_migration
 fi
 
 save_space


Test patch:
diff --git a/lib/io/fileutils/fileutils_test.go b/lib/io/fileutils/fileutils_test.go
index d0c16efa8..9040d1fdf 100644
--- a/lib/io/fileutils/fileutils_test.go
+++ b/lib/io/fileutils/fileutils_test.go
@@ -144,6 +144,9 @@ func createTempDir(t *testing.T) string {
 func TestRemoveFirstLine(t *testing.T) {
 	content := "HeaderToBeRemoved\nabc"
 	filename := "file-name"
+	err := fileutils.CreateHabTmpDir()
+	require.NoError(t, err)
+	os.Setenv("TMPDIR", fileutils.HAB_TMP_DIR)
 
 	t.Run("Remove first line", func(t *testing.T) {
 		res, err := fileutils.CreateTempFile(content, filename)