Creating A Custom AMI for the Denodo Platform

We provide an AMI for the Denodo Platform 8.0 that is specially configured to be managed with the Solution Manager. That is the AMI you select in the page Configuration > Automated mode > AWS, in the section Default region & AMIs or when you create a cluster in automated mode.

Instead of using the official AMI, you can create your own; this is also supported. For example, if you prefer to run Denodo on a different operating system (the Denodo AMI runs the operating system AWS Linux 2).

This section explains how to create your own AMI that runs Linux, with the Denodo Platform configured to be managed by the Solution Manager. For Windows, the steps are similar.

Important

If you create an AMI and just install the Denodo Platform on it, the Solution Manager will not be able to manage it (i.e. create an instance based on this AMI and start the Denodo components, stop them, etc.). You need to create the AMI following these steps.

  1. Launch an AWS instance based on the Linux distribution of your choice. You can follow the steps of the section “Launching an EC2 Instance for the Solution” of the Denodo 8: Quick Start Guide with Automated Cloud Mode.

    When choosing the type of instance, consider the hardware and software requirements of the Denodo Platform.

  2. Connect to this instance and create the user account denodo.

    This is not strictly necessary but we recommend doing to isolate this installation from other applications. The script provided below assumes you do.

  3. Copy to this instance the installer of the Denodo Platform 8.0 and the latest update (if available).

  4. Log in to this instance with the account denodo and execute this.

unzip denodo-install-8.0-linux64.zip

sudo mkdir /opt/denodo
sudo chown --recursive ec2-user:ec2-user /opt/denodo/

unset DISPLAY
cd ~/denodo-install-8.0
chmod +x installer_cli.sh
./installer_cli.sh install

This creates the folder to install the Denodo Platform and launches the installer.

During the installation, do this:

  • Choose express setup. The default settings are valid for almost all situations.

  • Installation path: /opt/denodo/denodo-platform-8.0.

Important

Use this installation path. If you use a different one to create this AMI, you have to modify the script we provide below.

  • License path: press Enter (do not provide anything).

    This instance will connect to the License Manager to obtain a license.

  • For all the components, enter full.

  • For License Manager Server host and License Manager Server port, just press the Enter.

    When the Solution Manager starts this instance, it will initialize these two parameters automatically.

  1. Ensure Python version 3 is installed. To do this, execute this:

    which python3
    

    If you get an error like this, you need to install Python version 3.

    /usr/bin/which: no python3 in (/usr/local/bin:/bin:/usr/bin:...
    

    The steps to install Python 3 may be different on the Linux distribution you use. For distributions based on RPM like CentOS, execute this:

    sudo yum install python3
    
  2. Execute this to install the required Python packages:

    pip3 install --user requests boto3
    

    This install the packages requests and boto3 for the account denodo.

  3. Download the script denodo.

    Important

    This script assumes you installed the Denodo Platform in /opt/denodo/denodo-platform-8.0 with the user account denodo. If not, edit the script.

  4. Execute this to copy this script to the directory /etc/init.d.

    sudo cp denodo /etc/init.d/
    sudo chmod +x /etc/init.d/denodo
    
  5. Execute the following commands so the operating system execute this script during the startup process.

    sudo chkconfig --add denodo
    sudo chkconfig --level 2345 denodo on
    
  6. Go back to the EC2 Management Console of AWS. Then, right-click the instance in which you just installed the Denodo Platform > Image > Create image.

Enter an Image name. E.g. Denodo Platform 8.0 GA - custom

Make sure No reboot is cleared.

The goal of the steps #8 and #9 is to configure the operating system to run the script “denodo” when the operating system starts. This script launches this:

<DENODO_HOME>/tools/cloud/aws/aws_init_config.py start -DENODO_HOME=<DENODO_HOME> -logfile <DENODO_HOME>/denodo.log

The Python script aws_init_config.py does this:

  1. Reads the settings that the Solution Manager will pass to an instance based on this AMI.

  2. Based on these settings, it starts the appropriate component of the Denodo Platform (i.e. Virtual DataPort or Data Catalog or Scheduler).

If the operating system is Windows or you do not want to use the System V initialization tools, configure the operating system to run this command during the startup process:

<DENODO_HOME>/tools/cloud/aws/aws_init_config.py start -DENODO_HOME=<DENODO_HOME> -logfile <DENODO_HOME>/denodo.log

Replace <DENODO_HOME> with the path to your installation. You can store the logfile in another file; it does not have to be <DENODO_HOME>/denodo.log.

Note

Before using this AMI on production, we suggest you follow the AWS Guidelines for shared Linux AMIs to reduce the possibility of an attack surface and improve its reliability.