Cohesity Appliance Reinstall¶
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.
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.
- Test for previous installation
- Discover the hardware to define the disk layouts
- 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.
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.
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.
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.
Adding New ISOs¶
To add a new iso support, you will need to do a set of things:
- Create a new cohesity profile
- Create a new bootenv for the ISO
- Create a classify task/template from the kickstart.
- Create a post-install tasks (hopefully reusing existing tasks).
- Task and Iteratively Fix
All of this assumes that you have the ISO and get extract the kickstart file from the ISO.
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.1bcohesity/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.rpmcohesity/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"
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"
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
.
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.
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.