Skip to content

Commit fa0123d

Browse files
Update Blog “highly-available-nfs-workload-on-hpe-greenlake-for-private-cloud-enterprise-using-serviceguard-for-linux”
1 parent da8bc81 commit fa0123d

File tree

1 file changed

+52
-25
lines changed

1 file changed

+52
-25
lines changed

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

Lines changed: 52 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -339,13 +339,27 @@ Terraform init
339339

340340

341341
Before you can use Terraform, you need to initialize it from the configuration file we have created. This is done with the following step:
342-
terraform init
342+
`terraform init`
343+
344+
##
343345
Terraform ready to plan
346+
347+
344348
To validate your configuration file, it is recommended to run the terraform validate command. Once ready, the terraform plan command will provide the a summary of the deployment that would be built when terraform apply method would be used.
345349
Once you agree with the plan and confirm, you can apply the configuration.
346-
Terraform ready to apply
347-
The command you need to use is now: terraform apply. This will rerun the plan command, then prompt you to confirm before it starts building what is in the plan:
350+
351+
352+
## Terraform ready to apply
353+
354+
355+
The command you need to use is now:
356+
357+
`terraform apply`
358+
359+
This will rerun the plan command, then prompt you to confirm before it starts building what is in the plan:
348360
Here is some sample output from the terraform apply command:
361+
362+
```
349363
Do you want to perform these actions?
350364
Terraform will perform the actions described above.
351365
Only 'yes' will be accepted to approve.
@@ -364,37 +378,48 @@ hpegl_vmaas_instance.my_drbd\[0]: Creation complete after 2m8s \[id=3111]
364378
hpegl_vmaas_instance.my_quorum\[0]: Creation complete after 2m8s \[id=3108]
365379
366380
Apply complete! Resources: 4 added, 0 changed, 0 destroyed.
381+
```
382+
383+
384+
367385
Once the command completes, your virtual machines are ready.
368386

369-
Configuring a Highly Available NFS solution
387+
# Configuring a Highly Available NFS solution
370388

371389
Now that the VMs are provisioned, we can now deploy HPE Serviceguard for Linux on these VMs to create a cluster to provide high availability for the applications running on the VMs, NFS server in this case.
372390

373-
Installing Serviceguard for Linux
391+
## Installing Serviceguard for Linux
392+
393+
374394
Serviceguard and all its components can be installed using Ansible playbooks
375395
Clone the repository on ansible control node.
396+
397+
398+
```
376399
git clone https://github.com/HewlettPackard/serviceguard.git
377400
cd serviceguard/ansible-sglx
401+
```
402+
378403
Checkout the stable branch. For ex: to checkout branch 1.0,
379-
git checkout Stable-v1.0
404+
`git checkout Stable-v1.0 `
380405

381406
To upgrade to the latest version of the playbooks:
382-
git pull https://github.com/HewlettPackard/serviceguard.git
383-
Master playbook site.yml contains the roles which will be executed for the inventory defined in hosts.
407+
`git pull https://github.com/HewlettPackard/serviceguard.git`
408+
Master playbook` site.yml `contains the roles which will be executed for the inventory defined in hosts.
384409
When the master playbook is run, version specified in the parameters file will be installed. The parameters for the master playbook, roles are configured in group_vars/all.yml. We will now look into some of the fields in this file which needs to be configured.
385410
We should configure the version of Serviceguard to be installed, in this case SGLX 15.10.00 will be installed.
386-
sglx_version : 15.10.00
411+
`sglx_version : 15.10.00`
387412
Now provide the Serviceguard for Linux ISO location on the controller node
388-
sglx_inst_upg_mode: iso
413+
`sglx_inst_upg_mode: iso
389414
sglx_inst_upg_additional_params:
390415
..
391416
iso_params:
392-
iso_location: <absolute path of the iso on ansible controller node>
417+
iso_location: <absolute path of the iso on ansible controller node>`
393418
Next, install Serviceguard NFS add-on.
394-
sglx_add_on_inst_upg_params:
419+
`sglx_add_on_inst_upg_params:
395420
sglx_addon: nfs
396-
Serviceguard installation mandates a replicated user configuration. As part of the installation, a replicated user for Serviceguard Manager (sgmgr) is created on the hosts and the password for the same can be configured under the below parameter.
397-
sglx_sgmgr_password: "{{ vault_sglx_sgmgr_password }}"
421+
`Serviceguard installation mandates a replicated user configuration. As part of the installation, a replicated user for Serviceguard Manager (sgmgr) is created on the hosts and the password for the same can be configured under the below parameter.
422+
`sglx_sgmgr_password: "{{ vault_sglx_sgmgr_password }}"
398423
Ansible vault will be used to encrypt this password, run the command as below
399424
ansible-vault encrypt_string 'your_password' --name 'vault_sglx_sgmgr_password'
400425
The generated output must be substituted in
@@ -404,25 +429,27 @@ vault_sglx_sgmgr_password: !vault |
404429
6639383863383633643035656336336639373161323663380a303331306337396435366535313663
405430
31336636333862303462346234336138393135393363323739633661653534306162323565646561
406431
6662396366333534350a663033303862646331613765306433353632316435306630343761623237
407-
3863
432+
3863`
408433
Once these parameters are populated, one can modify the hosts file to add the 2 VMs that were provisioned earlier where the cluster will be formed, and the quorum server that was provisioned earlier. In this case, it’s as shown below
409-
\[sglx-storage-flex-add-on-hosts]
434+
`[sglx-storage-flex-add-on-hosts]
410435
drbd-0-808
411-
drbd-1-808\
412-
\[sglx-cluster-hosts:children]
436+
drbd-1-808`\
437+
`[sglx-cluster-hosts:children]
413438
sglx-storage-flex-add-on-hosts
414-
\[quorum-server-hosts]
439+
[quorum-server-hosts]
415440
drbd-0-qs-808
416-
\[primary]
441+
[primary]
417442
drbd-0-808
418-
\[secondary]
419-
drbd-1-808
443+
[secondary]
444+
drbd-1-808`
420445
When the parameters specified above are configured, playbook site.yml can be run from the directory where the repository is cloned on the ansible control node.
421-
cd serviceguard/ansible-sglx
422-
ansible-playbook -i hosts -v --vault-password-file <path_to_vault_password_file> site.yml
446+
`cd serviceguard/ansible-sglx
447+
ansible-playbook -i hosts -v --vault-password-file <path_to_vault_password_file> site.yml`
423448
This completes the Serviceguard software installation.
424449

425-
Configuring data replication using Serviceguard flex Storage Add-on
450+
## Configuring data replication using Serviceguard flex Storage Add-on
451+
452+
426453
Serviceguard for Linux Flex Storage Add-on is a software-based, shared-nothing, replicated storage solution that mirrors the content of block devices. NFS server export data will be replicated to all Serviceguard cluster nodes using this add-on. Ansible snippet below can be used to configure the replication.
427454

428455
* hosts: sglx-storage-flex-add-on-hosts

0 commit comments

Comments
 (0)