23.11. cohesity - Cohesity Appliance Reinstall

The following documentation is for Cohesity Appliance Reinstall (cohesity) content package at version v4.5.6.

This content package provides RackN DRP resources to install Cohesity products from ISO through the network.

This current supports 6.3.1e and 6.5.1b ISOs.

23.11.1. Usage

To use this set of content, apply the cohesity-6.5.1b or cohesity-6.3.1e profiles to the machine and set a workflow that uses the install tasks, e.g. cohesity-basic-install. One could also add the cohesity-install stage to an existing workflow to do installation.

There are three tasks that need to be done.

1. Test for previous installation 1. Discover the hardware to define the disk layouts 1. Apply post-installation kickstart-based tasks.

The first task is a constant task and the other two are encapsulated within the cohesity-choose-version task. All releases currently share a common kickstart template.

23.11.1.1. Test for Previous Installation

The task, cohesity-install-check, is used to test if cohesity has already been installed. This can be overridden by setting the cohesity/allow-reinstall parameter to true. If not true and the disk has cohesity on it, it will not be installed and an error will be genereted. This task is always done by the cohesity-install stage.

23.11.1.2. Discover Hardware Layout

This task needs to run the “pre” section of the kickstart file on the iso. This generates three parameters on the machine that the kickstart file uses to setup partitions, bootloaders, and mount points. This is implemented as a task/template pair. See the cohesity-classify-node-6.5.1b task and the template, cohesity-classify-6.5.1b.tmpl.

This task is defined by the cohesity-classify-task parameter. This usually specified in the cohesity profile applied to the machine.

23.11.1.3. Apply Post-Installation Tasks

This is a set of tasks that are needed to finish the installation. These are tasks that are post tasks from the kickstart file within the iso. The cohesity-choose-version script will append these tasks to the post install part of the kickstart install process. This is a list of task specified in cohesity-post-install-tasks and is usually contained in the cohesity profile assigned to the machine.

A big change from 6.3 to 6.5 is that most of the post install tasks are moved into a single RPM install. There are example tasks for each release.

23.11.2. Adding New ISOs

To add a new iso support, you will need to do a set of things:

1. Create a new cohesity profile 1. Create a new bootenv for the ISO 1. Create a classify task/template from the kickstart. 1. Create a post-install tasks (hopefully reusing existing tasks). 1. Task and Iteratively Fix

All of this assumes that you have the ISO and get extract the kickstart file from the ISO.

23.11.2.1. Create Cohesity Profile

Starting with the closest release, clone the profile with the new release name.

The profile has the following parameters that need to be updated:

  • cohesity/install-version: This is the short version string it should match the ISO name. e.g. cohesity-6.5.1b
  • cohesity/release-package: This is the post-install software RPM. It should be the path to it on the ISO. e.g. postinstall/swrpms-6.5.1b_ent_release-20201220_b00dce0c.x86_64.rpm
  • cohesity/classify-task: This is name of the pre-install classification task. e.g. “cohesity-classify-node-6.5.1b”
  • cohesity/post-install-tasks: This is the post install task list. It is a space separated list. e.g. “cohesity-copy-and-install-release-6.5.1b”

23.11.2.2. Create BootEnv for ISO

Starting with the closest BootEnv to this release, clone it to a new name.

Update the name fields to match the new release. This is an example of the top part. All the templates can stay the same. Other than the name, the main fields to update are the IsoFile and the Sha256. These need to match the ISO name and the SHA256 sum of the iso. This is used like a normal bootenv to find the ISO to explode for installation. Remember the BootEnv Name must end in -install.

---
Name: cohesity-6.5.1b-install
Description: Install environment for Cohesity appliances.
Loaders:
  amd64-uefi: 'EFI/BOOT/BOOTX64.EFI'
OS:
  Name: cohesity-6.5.1b
  Family: "redhat"
  SupportedArchitectures:
    x86_64:
      IsoFile: cohesity-6.5.1b_ent_release-20201220_b00dce0c-centos.iso
      Sha256: 'd7b5b3c4977600e6c2dea8340cde933ed3a4f4e764e2bfa416be90598b8d09df'
      Kernel: images/pxeboot/vmlinuz
      Initrds:
        - "images/pxeboot/initrd.img"
      BootParams: >-
        ksdevice=bootif
        ks={{.Machine.Url}}/compute.ks
        method={{.Env.InstallUrl}}
        inst.geoloc=0
        {{.Param "kernel-options"}}
        --
        {{.Param "kernel-console"}}
OptionalParams:
  - "operating-system-disk"
  - "provisioner-default-password-hash"
  - "kernel-console"
  - "kernel-options"
  - "proxy-servers"

23.11.2.3. Create Classify Task

This is required to build the kickstart partition table and bootloaders.

Clone the cohesity-classify-node-6.5.1b task and template files. The rename the name in the task and match the template file as well.

The template file needs to contain the %pre section from the kickstart file on the ISO, kickstart/kickstart.cfg.

This can be place almost completely in the template. You need to remove the initial test section (it is already handled by a different task). Additionally, there are two sections that can be removed, but don’t have to. These are around setting up networking and setting the root password. These are static and defined in the kickstart template already. You can just remove them.

An additional change is to remove the redirects to a file around the informational echos. This can be helpful for debugging inside the task job lob.

You will need to add the following lines to the end of the template.

echo "Finish preinstall script."
if [[ "$HOME" == "" ]] ; then
    export HOME=/root
fi
drpcli machines set {{.Machine.UUID}} param cohesity/bootloader-configuration to - < <(jq -Rsc '. |split ("\n")' < /tmp/create_bootloader_configuration)
drpcli machines set {{.Machine.UUID}} param cohesity/boot-partition-configuration to - < <(jq -Rsc '. |split ("\n")' < /tmp/create_boot_partition)
drpcli machines set {{.Machine.UUID}} param cohesity/install-partition-configuration to - < <(jq -Rsc '. |split ("\n")' < /tmp/create_install_partitions)

This will make sure the parameters are set correctly.

You can check the 6.5.1b versions for examples.

Make sure you remember to add the task name to the cohesity profile as the parameter, cohesity/classify-task.

23.11.2.4. Create Post-Install Tasks

In the 6.3 release, this was a set of tasks that created users, mount filesystems, and installed content.

In the 6.5 release, this was converted into a single RPM install. The 6.5.1b post-install task handles pulling the RPM to the system and installing it. Review the kickstart post install to make sure that the only actions being taken are:

  • Copy RPM to the local system.
  • Copy the module enable script to the local system.
  • Install the RPM and check for errors.

If this is still true, then the 6.5.1b post install task can be reused. If not, then additional work to build custom tasks is required. This is left to the reader.

To reuse this task, you will need to find the name of the RPM and place in the cohesity profile as parameter, cohesity/release-package. This needs to be relative to the top of the ISO. The task will put it in place and install the RPM.

Remember to set the post-install tasks in the cohesity profile with the cohesity/post-install-tasks parameter.

23.11.2.5. Test and Iteratively Fix

To test, add all the above content to the DRP endpoint, upload the iso to DRP, assign the cohesity profile to the machine, and set the machine’s workflow to one with the cohesity-install stage. Keep iterating through issues to get a functioning system.

23.11.3. Object Specific Documentation

23.11.3.1. params

The content package provides the following params.

23.11.3.1.1. cohesity/release-package

This param can be set to a URL containing a Cohesity release bundle. If unset, it will default to the postinstall directory at the OS install environment location on the provisioner.

23.11.3.2. stages

The content package provides the following stages.

23.11.3.2.1. cohesity-install

Check that it is OK to install Cohesity then kick off the install

23.11.3.3. tasks

The content package provides the following tasks.

23.11.3.3.1. cohesity-classify-node

This is a place holder for something that has gone away. It does nothing.

23.11.3.3.2. cohesity-classify-node-6.3.1

This consists of most of the %pre section of the kickstart from the Cohesity ISO. It should be further refactored into a series of smaller tasks and profiles, but this will do for now.

23.11.3.3.3. cohesity-classify-node-6.5.1b

This consists of most of the %pre section of the kickstart from the Cohesity ISO. It should be further refactored into a series of smaller tasks and profiles, but this will do for now.

23.11.3.3.4. cohesity-copy-release

This is a place holder for something that has gone away. It does nothing.

23.11.3.3.5. cohesity-disable-drpcli

During the Cohesity install, there is a race condition between the drpcli serrvices and the Cihesity netwok configuration steps. To fix this race condition, we will install the drpcli services and leave them dsiabled until after COhesity has berformed initial network configuration.

23.11.3.3.6. cohesity-partition-home

This is a place holder for something that has gone away. It does nothing.

23.11.3.3.7. cohesity-create-user

This is a place holder for something that has gone away. It does nothing.