Creating A Custom AWS AMI for the Denodo Platform¶
We provide an Amazon Machine Image (AMI) that includes 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, in the section Default region & Images or when you create a cluster in automated mode.
In this AMI we provide, the operating system is Amazon Linux 2. If you prefer to run Denodo on a different operating system or modify the default options of this AMI, you can create your own AMI.
This section explains how to create your own AMI, with the Denodo Platform configured to be managed by the Solution Manager.
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.
For security reasons, avoid using the “root” user to launch the servers or perform other operations with the Denodo Platform.
Launch an AWS instance based on one of the Linux distributions that Denodo supports. You can follow the steps of the section “Launching an EC2 Instance for the Solution” of the Quick Start Guide with Automated Cloud Mode for AWS.
Copy to this instance the installer of the Denodo Platform 8.0 and the latest update (if available).
Log in to this instance with the default account (when using Amazon Linux,
ec2-user) 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.
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.
The section Installing Updates and Hotfixes of the Installation Guide explains how to install an update.
Ensure Python version 3 is installed. To do this, execute this:
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
Execute this to install the required Python packages:
pip3 install requests boto3
This installs the packages requests and boto3.
Download the script
This script assumes you installed the Denodo Platform in
/opt/denodo/denodo-platform-8.0with the default user account
ec2-user. If not, edit the script.
The script uses the log file
/var/log/denodo.logthat has to be configured:
sudo touch /var/log/denodo.log sudo chown ec2-user:ec2-user /var/log/denodo.log
It is not mandatory to use this log file, you can store it in another file, but the provided script has to be edited to change it.
Execute this to copy this script to the directory
sudo cp denodo /etc/init.d/ sudo chmod +x /etc/init.d/denodo
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
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:
/usr/bin/python3 <DENODO_HOME>/tools/cloud/aws/aws_init_config.py start -DENODO_HOME=<DENODO_HOME> -logfile /var/log/denodo.log
The Python script
aws_init_config.py does this:
Reads the settings that the Solution Manager will pass to an instance based on this AMI.
Based on these settings, it starts the appropriate component of the Denodo Platform (i.e. Virtual DataPort or Data Catalog or Scheduler).
If 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
<DENODO_HOME> with the path to your installation. You can store the logfile in another file; it does not have to be
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.