Skip to content

Commit 5024bea

Browse files
authored
Merge pull request #2153 from sdcgsolutionslab/cms/sdcgsolutionslab/hpe-dev-portal/blog/highly-available-nfs-workload-on-hpe-greenlake-for-private-cloud-enterprise-using-serviceguard-for-linux
Update Blog “highly-available-nfs-workload-on-hpe-greenlake-for-private-cloud-enterprise-using-serviceguard-for-linux”
2 parents 77e508a + ec6db39 commit 5024bea

File tree

1 file changed

+26
-19
lines changed

1 file changed

+26
-19
lines changed

content/blog/highly-available-nfs-workload-on-hpe-greenlake-for-private-cloud-enterprise-using-serviceguard-for-linux.md

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,14 @@ Ansible Automation Platform is an end-to-end automation platform to configure sy
4040
The first step is to create a virtual machine that can act as a Jump Host and where you will execute your code. Virtual machines created in later steps will be reachable from your Jump Host if you configure your networking infrastructure appropriately.
4141
You can create a virtual machine in the Virtual Machines service of HPE GreenLake for Private Cloud Enterprise as follows:
4242

43-
1. Log into HPE GreenLake Central by navigating to https://client.greenlake.hpe.com
44-
2. Launch the Virtual Machines Service Console
45-
3. Select Provisioning --> Instances and create a Linux-based virtual machine using whichever VM (Virtual Machine) image, Plan, and the network you find most suitable.
43+
1. Log into **HPE GreenLake Central** by navigating to https://client.greenlake.hpe.com
44+
2. Launch the **Virtual Machines Service Console**
45+
3. Select **Provisioning --> Instances** and create a Linux-based virtual machine using whichever VM (Virtual Machine) image, Plan, and the network you find most suitable.
4646
4. (optional) Configure your virtual machine so you can access your GitHub or other code repository.
47-
5. Log into your virtual machine and install Terraform: Hashi Corp has provided a useful [tutorial ](<1. https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli>)on how to do this for various distributions of Linux
48-
6. Verify the installation:
49-
a. Execute this command: `terraform --help`
47+
5. Log into your virtual machine and install Terraform: Hashi Corp has provided a useful [tutorial](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) on how to do this for various distributions of Linux
48+
6. Verify the installation by executing this command: `terraform --help`
5049

51-
At this point, you are ready to start building your infrastructure description file.
50+
At this point, you are ready to start building your infrastructure description file.
5251

5352
## Building a Terraform configuration file from scratch
5453

@@ -74,7 +73,8 @@ terraform {
7473

7574
You can find out more about the HPE GreenLake Terraform provider from its [Terraform Registry page](https://registry.terraform.io/providers/HPE/hpegl/latest). This page also provides a link to the GitHub repository corresponding to this provider.
7675
The docs folder is your best source of information for using the different data sources and resources provided by the provider. If you navigate to the resources section, you will see that one resource you can configure with this provider is a VM instance. This article will focus on this resource.
77-
Note: Because this is open source, do not hesitate to open issues, or even a pull request, if you identify an issue.
76+
77+
***Note:*** Because this is open source, do not hesitate to open issues, or even a pull request, if you identify an issue.
7878

7979
### Setting up the Terraform provider
8080

@@ -91,7 +91,9 @@ provider "hpegl" {
9191
```
9292

9393
The rest (such as tenant id, user id and user secret key) can be placed in a RC file, which you can source before running your Terraform command.
94-
You can find your location and your space name from the HPE GreenLake for Private Cloud Enterprise Overview. In the example shown below, FTC06 is our location:
94+
You can find your location and your space name from the HPE GreenLake for Private Cloud Enterprise Overview.
95+
96+
In the example shown below, FTC06 is our location:
9597

9698
![](/img/picture1.png)
9799

@@ -101,7 +103,7 @@ In the capture below, Default is the space you will use for your work with Terra
101103

102104
## Setting up API Client access
103105

104-
Next, you need to create a new API Client access dedicated to Terraform. You can do this from the HPE GreenLake console under your settings icon, select User Management and then the API Clients tab.
106+
Next, you need to create a new API Client access dedicated to Terraform. You can do this from the HPE GreenLake console under your settings icon, select **User Management** and then the **API Clients** tab.
105107

106108
![](/img/picture3.png)
107109

@@ -126,14 +128,19 @@ And execute it on your machine to set these environment variables.
126128
Once your API Client has been created, you need to assign a Role and a Space. You can assign a Role and a Space by clicking on your new API Client and then clicking the Create Assignment button.
127129
Since intent is to use this API Client to create resources in the Virtual Machines Service, we need to assign an appropriate Virtual Machines Role. Choose a Role like ‘Private Cloud Tenant Contributor’ and choose the same Space as used earlier, I.e., ‘Default.’
128130

129-
Note: More details on HPE GreenLake user roles can be found in the HPE GreenLake documentation.
131+
***Note:*** More details on HPE GreenLake user roles can be found in the [HPE GreenLake documentation](https://support.hpe.com/hpesc/public/docDisplay?docId=a00120892en_us).
130132

131133
### Set API Client Usernames and Passwords
132134

133135
When a user creates virtual machines using the HPE GreenLake for Private Cloud Enterprise: Virtual Machines user interface, they first set the Linux and Windows username and password. Once this is done, any virtual machines subsequently created by that user will inherit these credentials. The user can later use these credentials to log into these virtual machines.
136+
134137
API Clients which are used to create virtual machines can also set Linux and Windows username and password values. Since the API Client does not use the HPE GreenLake for Private Cloud Enterprise: Virtual Machines user interface, this must be done via an API call.
135-
Here is a sample script which reads the VM_USERNAME and VM_PASSWORD environment variables and uses the values for Linux and Windows username and password for the API Client. The script assumes a Location value of ‘FTC06’ and Space value of ‘Default’.
136-
To execute this script, first set appropriate values for the VM_USERNAME and VM_PASSWORD environment variables. Next, execute the resource file, which was created earlier, which sets the HPEGL\*\* environment variables for your API Client. Finally, execute the script below.
138+
139+
Here is a sample script which reads the VM\_USERNAME and VM\_PASSWORD environment variables and uses the values for Linux and Windows username and password for the API Client. The script assumes a Location value of ‘FTC06’ and Space value of ‘Default’.
140+
141+
To execute this script, first set appropriate values for the VM\_USERNAME and VM\_PASSWORD environment variables. Next, execute the resource file, which was created earlier, which sets the HPEGL\*\* environment variables for your API Client.
142+
143+
Finally, execute the script below:
137144

138145
```shell
139146
#!/bin/bash
@@ -191,7 +198,7 @@ Your next step with the TF file is to query the HPE GreenLake provider to collec
191198

192199
• Folder Code
193200

194-
For this, you will use the Terraform data statements. For example, the following statement retrieves the Cloud ID and stores it (in variable called cloud), which we can later retrieve using: data.hpegl_vmass_cloud.cloud.id
201+
For this, you will use the Terraform data statements. For example, the following statement retrieves the Cloud ID and stores it (in variable called cloud), which we can later retrieve using: data.hpegl\_vmass\_cloud.cloud.id
195202

196203
```json
197204
# Retrieve cloud id
@@ -324,9 +331,9 @@ resource "hpegl_vmaas_instance" "my_quorum" {
324331

325332
3 VMs need to be created to setup SGLX. 2 VMs will be used to create Serviceguard for Linux nodes where the NFS service will be up and running. The third VM will act as a quorum server for the Serviceguard cluster to ensure that split brain of the cluster does not impact the availability of the monitored workload.
326333

327-
**Note:** You can get information about each of the resource statements supported by the hpegl provider from [GitHub](https://github.com/hpe/terraform-provider-hpegl/tree/main/docs/resources).
334+
***Note:*** You can get information about each of the resource statements supported by the hpegl provider from [GitHub](https://github.com/hpe/terraform-provider-hpegl/tree/main/docs/resources).
328335

329-
**Note:** An existing Serviceguard Quorum Server in your environment can be used instead of provisioning a third VM, provided the Quorum Server is reachable to the 2 VM’s that were created.
336+
***Note:*** An existing Serviceguard Quorum Server in your environment can be used instead of provisioning a third VM, provided the Quorum Server is reachable to the 2 VM’s that were created.
330337

331338
### Terraform init
332339

@@ -349,7 +356,7 @@ terraform apply
349356

350357
This will rerun the plan command, then prompt you to confirm before it starts building what is in the plan. Here is some sample output from the `terraform apply` command:
351358

352-
```
359+
```markdown
353360
Do you want to perform these actions?
354361
Terraform will perform the actions described above.
355362
Only 'yes' will be accepted to approve.
@@ -554,7 +561,7 @@ Serviceguard for Linux Flex Storage Add-on is a software-based, shared-nothing,
554561

555562
## Configuring LVM
556563

557-
Once data replication is configured on the nodes, you can configure LVM on top of the DRBD disk /dev/drbd0. The following Ansible snippet can be used to configure the LVM volume group named nfsvg and logical volume names nfsvol of size 45GB.
564+
Once data replication is configured on the nodes, you can configure LVM on top of the DRBD disk _/dev/drbd0_. The following Ansible snippet can be used to configure the LVM volume group named nfsvg and logical volume names nfsvol of size 45GB.
558565

559566
```yaml
560567
---
@@ -760,4 +767,4 @@ In this blog, you learned how to use platforms like Terraform and Ansible to eas
760767

761768
Serviceguard for Linux has high availability and disaster recovery solutions available for various applications such as SAP, Oracle, SQL Server On Linux, EDB Postgres, etc. For more information regarding these solutions you can refer to the HPE Serviceguard for Linux operational guide for workloads and solutions available at https://www.hpe.com/info/linux-serviceguard-docs
762769

763-
Check back on the HPE Developer Community blog for more articles on HPE GreenLake for Private Cloud.
770+
Check back on the [HPE Developer Community blog](https://developer.hpe.com/blog) for more articles on HPE GreenLake for Private Cloud.

0 commit comments

Comments
 (0)