Skip to main content

Automate the installation (Ubuntu or Debian)

Contributors netapp-lhalbert netapp-pcarriga

You can automate the installation of the StorageGRID host service and the configuration of grid nodes.

About this task

Automating the deployment might be useful in any of the following cases:

  • You already use a standard orchestration framework, such as Ansible, Puppet, or Chef, to deploy and configure physical or virtual hosts.

  • You intend to deploy multiple StorageGRID instances.

  • You are deploying a large, complex StorageGRID instance.

The StorageGRID host service is installed by a package and driven by configuration files that can be created interactively during a manual installation, or prepared ahead of time (or programmatically) to enable automated installation using standard orchestration frameworks. StorageGRID provides optional Python scripts for automating the configuration of StorageGRID appliances, and the whole StorageGRID system (the "grid"). You can use these scripts directly, or you can inspect them to learn how to use the StorageGRID Installation REST API in grid deployment and configuration tools you develop yourself.

Automate the installation and configuration of the StorageGRID host service

You can automate the installation of the StorageGRID host service using standard orchestration frameworks such as Ansible, Puppet, Chef, Fabric, or SaltStack.

The StorageGRID host service is packaged in a DEB and is driven by configuration files that can be prepared ahead of time (or programmatically) to enable automated installation. If you already use a standard orchestration framework to install and configure Ubuntu or Debian, adding StorageGRID to your playbooks or recipes should be straightforward.

You can automate these tasks:

  1. Installing Linux

  2. Configuring Linux

  3. Configuring host network interfaces to meet StorageGRID requirements

  4. Configuring host storage to meet StorageGRID requirements

  5. Installing Docker

  6. Installing the StorageGRID host service

  7. Creating StorageGRID node configuration files in /etc/storagegrid/nodes

  8. Validating StorageGRID node configuration files

  9. Starting the StorageGRID host service

Example Ansible role and playbook

Example Ansible role and playbook are supplied with the installation archive in the /extras folder. The Ansible playbook shows how the storagegrid role prepares the hosts and installs StorageGRID onto the target servers. You can customize the role or playbook as necessary.

Automate the configuration of StorageGRID

After deploying the grid nodes, you can automate the configuration of the StorageGRID system.

Before you begin
  • You know the location of the following files from the installation archive.

    Filename Description

    configure-storagegrid.py

    Python script used to automate the configuration

    configure-storagegrid.sample.json

    Example configuration file for use with the script

    configure-storagegrid.blank.json

    Blank configuration file for use with the script

  • You have created a configure-storagegrid.json configuration file. To create this file, you can modify the example configuration file (configure-storagegrid.sample.json) or the blank configuration file (configure-storagegrid.blank.json).

About this task

You can use the configure-storagegrid.py Python script and the configure-storagegrid.json configuration file to automate the configuration of your StorageGRID system.

Note You can also configure the system using the Grid Manager or the Installation API.
Steps
  1. Log in to the Linux machine you are using to run the Python script.

  2. Change to the directory where you extracted the installation archive.

    For example:

    cd StorageGRID-Webscale-version/platform

    where platform is debs, rpms, or vsphere.

  3. Run the Python script and use the configuration file you created.

    For example:

    ./configure-storagegrid.py ./configure-storagegrid.json --start-install
Result

A Recovery Package .zip file is generated during the configuration process, and it is downloaded to the directory where you are running the installation and configuration process. You must back up the Recovery Package file so that you can recover the StorageGRID system if one or more grid nodes fails. For example, copy it to a secure, backed up network location and to a secure cloud storage location.

Caution The Recovery Package file must be secured because it contains encryption keys and passwords that can be used to obtain data from the StorageGRID system.

If you specified that random passwords should be generated, open the Passwords.txt file and look for the passwords required to access your StorageGRID system.

######################################################################
##### The StorageGRID "Recovery Package" has been downloaded as: #####
#####           ./sgws-recovery-package-994078-rev1.zip          #####
#####   Safeguard this file as it will be needed in case of a    #####
#####                 StorageGRID node recovery.                 #####
######################################################################

Your StorageGRID system is installed and configured when a confirmation message is displayed.

StorageGRID has been configured and installed.
Related information

Installation REST API