Install Apache Ambari.
Set up the service that manages the installation and administration of the TDP Datacenter cluster.
Ambari Server is installed with the installation script, or with tdpctl, configured with ambari-server setup, and started with ambari-server start. Once installed, Apache Ambari creates the Big Data Cluster through its web page or through the REST API. The metadata databases that many TDP services need are created beforehand in PostgreSQL.
Your environment
If you fill in your environment details here, the examples and commands on the page use what you provided. Repository and database usernames and passwords do not go here: they stay as placeholders in the commands.
Check that the minimum requirements are met, that all machines in the environment are prepared, and that the installation packages are available.
Scenarios
- 1 · Install with the script
- 2 · Install with tdpctl
- 3 · Configure Ambari Server
- 4 · Start and access
- 5 · Metadata databases
The installation script, with the Tecnisys Public Package Repository or with a local repository.
Ambari Server is installed with the installation script, on a utility or edge machine. The script receives the base URL of the component packages and, when the repository requires it, the access credentials. The example changes depending on whether the packages come from the Tecnisys Public Package Repository or from a local repository.
On a utility or edge machine. Utility machines usually serve auxiliary tasks, such as cluster management, while Edge machines are dedicated to graphical interfaces or components used by users at the "edge" of the environment.
The username (-u) and password (-p) parameters are optional. Provide them only when the package repository requires access credentials, as is the case with the Tecnisys Public Package Repository.
Without the -c option, the script installs Ambari Server.
Installation script options
Available options of the ambari-tdp-installer-el-9.sh script:
| Option | What it sets | Default |
|---|---|---|
-b, --baseurl | Base URL for the component packages. | https://repo.tecnisys.com.br/yum/tdp/ambari/3.0/el-9-x86_64 |
-u, --username | Username to access the package repository. Provide it when using the Tecnisys Package Repository URL. | — |
-p, --password | Password to access the package repository. Provide it when using the Tecnisys Package Repository URL. | — |
-c, --ambari-component (agent | server | all) | Apache Ambari component to install. | server |
Have the script on the Ambari Server machine
The installation script available on the utility or edge machine.
Download the installation script to the machine that will host Ambari Server, as described in Installation Packages.
Run the script with your environment's repository
Ambari Server installed from the packages of the chosen repository.
Choose the example that matches your scenario:
Installation using the Tecnisys Public Package Repository:
sh /repo/yum/tdp/installer/3.0/el-9-x86_64/ambari-tdp-installer-el-9.sh --username "<REPO_USERNAME>" --password "<REPO_PASSWORD>"
You define the access credentials (username and password) when you register for free on the Tecnisys Website. Replace the placeholders with your username and password. They stay only in the command.
Installation using a local package repository:
sh /repo/yum/tdp/installer/3.0/el-9-x86_64/ambari-tdp-installer-el-9.sh --baseurl "file:///opt/repo/tdp/ambari/3.0/el-9-x86_64"
Installation using a local package repository on the <LOCAL_REPO_HOST> machine, accessible through HTTP:
sh /repo/yum/tdp/installer/3.0/el-9-x86_64/ambari-tdp-installer-el-9.sh --baseurl "http://<LOCAL_REPO_HOST>/tdp/ambari/3.0/el-9-x86_64"
How to create the local repository: Creating a Local Package Repository.
The same options as the script, through the TDP command-line interface.
You prefer to install Ambari Server with tdpctl, the TDP command-line interface, instead of the installation script. The options and the information requested are the same as the script's.
tdpctl installed on the machine. To install tdpctl, follow the instructions in TDPCTL Installation.
The same as the installation script: Installation script options.
Check the tdpctl install options
The options of the Ambari Server installation command.
You can also install Ambari Server with tdpctl, the TDP command-line interface:
tdpctl install --help
The available options, as well as the information needed to install Ambari Server, are the same as those requested by the installation script.
It worked when
tdpctl install options, the same as the installation script's.$ tdpctl install --help
Usage: tdpctl install [OPTIONS]
Install the Apache Ambari of Tecnisys Data Platform (TDP).
Options:
-b, --baseurl TEXT The base URL of the TDP repository.
-u, --user TEXT The username (email address) to access the
TDP repository.
-p, --password TEXT The password to access the TDP repository.
-c, --ambari-component [server|agent|all]
Ambari component to install.
-y, --yes Confirm the installation.
-t, --trace Show the traceback of the error.
--help Show this message and exit.Set the component
The Apache Ambari component to install.
Set the desired component with the -c or --ambari-component option (agent | server | all).
It worked when
tdpctl install ends with the message that the Ambari component(s) were installed successfully. Only then go on to scenario 3.$ tdpctl install -c server
✔ Arquivo de repositório do Ambari criado com sucesso
✔ Componente(s) do Ambari instalado(s) com sucessoThe JDBC driver and the ambari-server setup prompts, including the Ambari metadata database.
With Ambari Server installed, it is configured with ambari-server setup: first the JDBC driver it uses to connect to the metadata database, then the information requested at the prompt. The last question decides the Ambari metadata database: a PostgreSQL instance that Ambari itself initializes, or a database whose connection information you provide.
The PostgreSQL one, also available in the public/ambari/3.0.0.4 directory of the Tecnisys Package Repository.
Without the Advanced Database Configuration (default answer), Ambari initializes a PostgreSQL instance, an installation dependency of Ambari Server, and creates its own metadata database in it.
Configure the JDBC driver
Ambari Server knows which driver to use to connect to the metadata database.
Configure the JDBC driver that Ambari Server uses to connect to the metadata database:
ambari-server setup --jdbc-db=postgres --jdbc-driver=postgresql-42.2.16.jar
It worked when
JDBC driver was successfully initialized.
Ambari Server 'setup' completed successfully.The PostgreSQL JDBC driver is also available in the public/ambari/3.0.0.4 directory of the Tecnisys Package Repository.
Run ambari-server setup and answer the prompt
The Ambari Server settings defined.
Configure Ambari Server:
ambari-server setup
Next, provide the information that the prompt requests:
| Question | Default | What to answer |
|---|---|---|
| SELinux | y | If SELinux is active, an alert appears. Confirm whether SELinux can be changed to permissive mode and temporarily disabled. |
| OS user for the daemon | n | Confirm whether you want to use a custom OS user for the Ambari Server daemon. If so (y), enter the desired user. |
| Firewall (iptables) | y | If the Firewall (iptables) is active, an alert appears. Confirm that the ports used by Ambari are accessible. |
| JDK | 1 | Choose the JDK to use. Option (1) is OpenJDK 64-Bit Server VM (Temurin), downloaded automatically, together with the JCE (Java Cryptography Extension) policy files, from the public/ambari/3.0.0.4 directory of the Tecnisys Public Package Repository. With it, confirm that you accept the license terms (default y). Choose option (2) to enter the JAVA_HOME path of a different JDK. |
| LZO compression | n | Confirm whether you want Ambari Server to download and install additional LZO compression packages. |
| Advanced Database Configuration | n | Confirm whether you want to proceed with the Advanced Database Configuration. See the next step. |
It worked when
ambari-server setup goes through the questions in the table and ends without aborting.Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.If there is a port conflict
With the Firewall (iptables) active, a port conflict generates an error and aborts the configuration.
Decide the Ambari metadata database
The answer to the Advanced Database Configuration question.
Answer n (default). Ambari automatically initializes a PostgreSQL instance (an installation dependency of Ambari Server) and creates its own metadata database, schema, user, metadata tables, and so on.
It worked when
ambari-server setup ends without asking for database connection information. Only then go on to scenario 4.Enter advanced database configuration [y/n] (n)? n
Configuring database...
Default properties detected. Using built-in database.Answer y. The setup asks for the database connection information, such as the Database Management System (DBMS), hostname, port, and name of the Ambari database, so that Ambari Server connects and automatically creates its metadata tables and other structures.
It worked when
ambari-server setup requests the database connection information and ends without aborting. Only then go on to scenario 4.The Ambari Server daemon and the Ambari web page.
With Ambari Server configured, you start the daemon and access the Ambari web page, where you continue with the creation of the Big Data Cluster.
8080, by default.
In the /etc/ambari-server/conf/ambari.properties file, if needed.
Start Ambari Server
The Ambari Server daemon running.
Start the Ambari Server daemon:
ambari-server start
It worked when
ambari-server start ends with Ambari Server 'start' completed successfully.$ ambari-server start
Server started listening on 8080
DB configs consistency check: no errors and warnings were found.
Ambari Server 'start' completed successfully.Access the Ambari web page
The Ambari web interface open in the browser.
After Ambari Server starts, the Ambari web page is accessible on the Ambari Server machine, on the web interface port:
http://<AMBARI_SERVER_HOST>:<AMBARI_PORT>
It worked when
Sign in and the Username and Password fields.If needed, the Ambari web interface port can be changed in the /etc/ambari-server/conf/ambari.properties file.
The service databases in PostgreSQL and the instance configuration.
Many services and components of the TDP Platform need databases to persist metadata. These databases are created beforehand in PostgreSQL (the default DBMS of Ambari Server), and the instance is configured to receive them. If you chose another DBMS for your environment, see its official documentation.
The user and database names are only suggestions. Feel free to change them. Use strong passwords in your environment.
The configuration file paths include the PostgreSQL major version (/var/lib/pgsql/14/data). Check the version in the commands and change it if needed.
Pay attention to the collation (locale and encoding settings, for example: en_US.UTF-8 and pt_BR.UTF-8) of the metadata databases: if it is not configured correctly, some components may not work correctly or may show problems in the display, comparison, and sorting of data and information.
Service metadata databases
Create the user and database for each service
A user with a password and a database owned by that user, for each service.
For each service in the table, create the user, set its password, and create the database:
su -c 'createuser -s -d -l <DATABASE_USER>' - postgres;
su -c "psql -U postgres -c \"alter user <DATABASE_USER> with password '<DATABASE_PASSWORD>'\"" - postgres;
su -c 'createdb -O <DATABASE_USER> <DATABASE_NAME>' - postgres;
| Service | Suggested user | Suggested database |
|---|---|---|
| Apache Airflow | airflow | airflow |
| Apache Druid | druid | druid |
| Apache Hive | hive | hive |
| JupyterHub | jupyterhub | jupyterhub |
| OpenMetadata | openmetadata | openmetadata |
| Apache Ranger | ranger | ranger |
| Ranger KMS | rangerkms | rangerkms |
| Apache Superset | superset | superset |
Apache Airflow metadata database, with the suggested names:
su -c 'createuser -s -d -l airflow' - postgres;
su -c "psql -U postgres -c \"alter user airflow with password '<DATABASE_PASSWORD>'\"" - postgres;
su -c 'createdb -O airflow airflow' - postgres;
su -c "psql -U postgres -l" - postgres
It worked when
Owner column.$ su -c "psql -U postgres -l" - postgres
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
--------------+--------------+----------+-------------+-------------+-----------------------
airflow | airflow | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
ambari | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres +
| | | | | postgres=CTc/postgres+
| | | | | ambari=CTc/postgres
druid | druid | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
hive | hive | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
jupyterhub | jupyterhub | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
oozie | oozie | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
openmetadata | openmetadata | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
ranger | ranger | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
rangerkms | rangerkms | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
superset | superset | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
(13 rows)PostgreSQL instance configuration
Guidance and code examples for configuring access rules and properties of PostgreSQL (the default DBMS of Ambari Server). If you chose another DBMS for your environment, see its official documentation.
Add the databases to the Ambari access rule
The service databases in the pg_hba.conf access rule.
Add the other databases to the Ambari access rule. The command uses the names suggested in the databases table:
sed -i 's/ambari,mapred/ambari,druid,jupyterhub,openmetadata,airflow,ranger,rangerkms,hive,superset,mapred/g' /var/lib/pgsql/14/data/pg_hba.conf
grep ambari /var/lib/pgsql/14/data/pg_hba.conf
It worked when
ambari and mapred.Accept connections on all network interfaces
The instance listening on all interfaces.
Configure the PostgreSQL instance to accept connections on all network interfaces:
sed -i "s/#listen_addresses = 'localhost'/listen_addresses = '*'/g" /var/lib/pgsql/14/data/postgresql.conf
grep "^listen_addresses" /var/lib/pgsql/14/data/postgresql.conf
It worked when
listen_addresses line appears without the # and with '*'.$ grep "^listen_addresses" /var/lib/pgsql/14/data/postgresql.conf
listen_addresses = '*' # what IP address(es) to listen on;Increase the maximum number of connections
More simultaneous connections accepted by the instance, in max_connections.
Increase the maximum number of connections that the PostgreSQL instance accepts:
sed -i "s/max_connections = 100/max_connections = 500/g" /var/lib/pgsql/14/data/postgresql.conf
grep "^max_connections" /var/lib/pgsql/14/data/postgresql.conf
It worked when
max_connections line shows the new value.$ grep "^max_connections" /var/lib/pgsql/14/data/postgresql.conf
max_connections = 500 # (change requires restart)Restart PostgreSQL
All changes in effect.
Restart the PostgreSQL service to apply all changes:
systemctl restart postgresql-14
systemctl is-active postgresql-14
It worked when
active, with the changes already applied.$ systemctl is-active postgresql-14
activeEvaluate the impact of these settings on the security and performance of your environment. If you need support, contact us.
When something goes wrong
Troubleshooting
Paste the message or pick the symptom.
- SELinux alert in ambari-server setup. Cause: SELinux is active. What to do: Confirm (default y) whether SELinux can be changed to permissive mode and temporarily disabled.
- Firewall (iptables) alert in ambari-server setup. Cause: The Firewall (iptables) is active. What to do: Confirm (default y) that the ports used by Ambari are accessible.
- Port conflict error; the configuration was aborted. Cause: There is a conflict with a port used by Ambari, with the Firewall (iptables) active. What to do: Check that the ports used by Ambari are accessible and run ambari-server setup again.
- Problems displaying, comparing, or sorting data. Cause: The collation (locale and encoding settings) of the metadata databases is not configured correctly. What to do: Check the collation of the metadata databases, for example en_US.UTF-8 and pt_BR.UTF-8.
Next steps
Next step
Cluster Creation and Component Installation
Through the Ambari web page, the creation of the cluster and the installation of the TDP components.
Repository
Installation Packages
The download of the packages and the installation script, and the creation of a local repository.