Skip to content

Commit

Permalink
Merge pull request #58 from hmcts/DTSPO-18032-RHEL-7-ELS
Browse files Browse the repository at this point in the history
Dtspo 18032 rhel 7 els
  • Loading branch information
SalimKainos authored Jul 2, 2024
2 parents 672b91d + 20e5dc1 commit ac88095
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 1 deletion.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,32 @@ A virtual machine or virtual machine scale set.
| <a name="input_virtual_machine_id"></a> [virtual\_machine\_id](#input\_virtual\_machine\_id) | Virtual machine resource id. | `string` | `null` | no |
| <a name="input_virtual_machine_scale_set_id"></a> [virtual\_machine\_scale\_set\_id](#input\_virtual\_machine\_scale\_set\_id) | Virtual machine scale set resource id. | `string` | `null` | no |
| <a name="input_virtual_machine_type"></a> [virtual\_machine\_type](#input\_virtual\_machine\_type) | vm or vmss. | `string` | n/a | yes |
<!-- END_TF_DOCS -->
<!-- END_TF_DOCS -->

## Redhat ELS for RHEL 7.*
This README provides instructions for logging into Redhat ELS, checking the Subscription Manager and Insights-client, and other relevant details.

## Logging into Redhat
To log into Redhat, use the following credentials stored in the Key Vault (KV):

Username: [email protected]
Password: https://portal.azure.com/#@HMCTS.NET/asset/Microsoft_Azure_KeyVault/Secret/https://acmedcdcnpdev.vault.azure.net/secrets/redhat-portal/cd61d615bffe415f8dd6c1907df3115b


## Certificate Information
The certificate is placed under the following directory:
/etc/pki/product/204.pem

## Checking Subscription Manager and Insights-client Installation
Ensure that both the Subscription Manager and Insights-client are installed correctly and show an active status.

## Inventory Check
You can verify the status of both Subscription Manager and Insights-client by visiting the following inventory link:

https://console.redhat.com/insights/inventory

Both Subscription Manager and Insights-client should display an active status.

Documentation links - https://tools.hmcts.net/confluence/display/~thomas.thornton/RHEL+7+ELS+Support

For more detailed documentation, please refer to the RHEL 7 ELS Support Documentation.
31 changes: 31 additions & 0 deletions scripts/bootstrap_vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,34 @@ if [ "${NESSUS_INSTALL}" = "true" ]
then
install_nessus "${NESSUS_SERVER}" "${NESSUS_KEY}" "${NESSUS_GROUPS}"
fi

# Change the permission and ownership of this file.
restorecon -Rv /etc/pki/product
chown root.root /etc/pki/product/204.pem
chmod 644 /etc/pki/product/204.pem
rct cat-cert /etc/pki/product/204.pem

# Check if the OS is RHEL 7
if [[ "$OS_TYPE" == *"Red Hat Enterprise"* && "$OS_TYPE" == *"7."* ]]; then
echo "This is Red Hat Enterprise Linux 7."

# Register the system and attach a subscription pool
subscription-manager register --org=7324337 --activationkey=Rhel-els


# Refresh subscription-manager and verify identity
subscription-manager refresh
subscription-manager identity

# Install insights-client and register it
yum install -y insights-client
insights-client --register

# Enable repositories
subscription-manager config --rhsm.manage_repos=1
subscription-manager repos --enable rhel-7-server-els-rpms

echo "Configuration completed successfully."
else
echo "This script is intended for Red Hat Enterprise Linux 7 only."
fi
1 change: 1 addition & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -316,3 +316,4 @@ variable "soc_vault_name" {
type = string
default = "soc-prod"
}

0 comments on commit ac88095

Please sign in to comment.