Adding a New Node to the ODP Cluster
You can follow the below steps to add a new node to the ODP cluster.
Add the Amabri Repository
It must be the same as the existing cluster.
cat /etc/yum.repos.d/ambari.repo
[ambari]async = 1baseurl = https://mirror.odp.acceldata.dev/AMBARI/RHEL/2.7.9.2-1/gpgcheck = 0name = ambari Version - ambari-2.7.9.2.1Add Prerequisites
Make sure to meet the following prerequisites on each cluster node.
Make sure to link ODP on Hetzner.
- Configure the host file using the following command.
vim /etc/hosts- Set the hostname using the following command.
hostnamectl set-hostname ce05.acceldata.dvl- Run the command
vim /etc/resolv.confand configure as below.
search acceldata.dvlnameserver <ip-address>- Run the command
vim /etc/selinux/configand disable SELinux.
SELINUX=disabledInstall the Agent
yum clean all yum install ambari-agent* -yAdd the Server details to Agent
vim /etc/ambari-agent/conf/ambari-agent.ini
[server]hostname=ce04.acceldata.dvlStart the Agent
ambari-agent start ambari-agent status<Running>
Install Java
yum install java-11*Install Python
[root@ce16 ~]# python -V-bash: python: command not foundyum install python3.11 -yupdate-alternatives --config python[root@ce16 ~]# update-alternatives --config pythonThere are 3 programs which provide 'python'. Selection Command-----------------------------------------------* 1 /usr/libexec/no-python 2 /usr/bin/python3 + 3 /usr/bin/python3.11Enter to keep the current selection[+], or type selection number: 3Skip Users and Group creationSkip Users and Group Creation
Follow from the Ambari server node:
Template:
/var/lib/ambari-server/resources/scripts/configs.py --unsafe --user=[user-name] --password=[password] --port=[PORT] --protocol=[http | https] --action=get --host=[Ambari-server-hostname-FQDN] --cluster=[CLUSTER_NAME] --config-type=cluster-env/var/lib/ambari-server/resources/scripts/configs.py --unsafe --user=[user-name] --password=[password] --port=[PORT] --protocol=[http | https] --action=set --host=[Ambari-server-hostname-FQDN] --cluster=[CLUSTER_NAME] --config-type=cluster-env --key=sysprep_skip_create_users_and_groups --value=false/var/lib/ambari-server/resources/scripts/configs.py --unsafe --user=[user-name] --password=[password] --port=[PORT] --protocol=[http | https] --action=set --host=[Ambari-server-hostname-FQDN] --cluster=[CLUSTER_NAME] --config-type=cluster-env --key=ignore_groupsusers_create --value=falseExample:
/var/lib/ambari-server/resources/scripts/configs.py --unsafe --user=admin --password=admin --port=8080 --protocol=http --action=get --host=ce04.acceldata.dvl --cluster=ODP_322_darth --config-type=cluster-env/var/lib/ambari-server/resources/scripts/configs.py --unsafe --user=admin --password=admin --port=8080 --protocol=http --action=set --host=ce04.acceldata.dvl --cluster=ODP_322_darth --config-type=cluster-env --key=sysprep_skip_create_users_and_groups --value=false/var/lib/ambari-server/resources/scripts/configs.py --unsafe --user=admin --password=admin --port=8080 --protocol=http --action=set --host=ce04.acceldata.dvl --cluster=ODP_322_darth --config-type=cluster-env --key=ignore_groupsusers_create --value=falseResponse:
[root@ce04 resources]# /var/lib/ambari-server/resources/scripts/configs.py --unsafe --user=admin --password=admin --port=8080 --protocol=http --action=set --host=ce04.acceldata.dvl --cluster=ODP_322_darth --config-type=cluster-env --key=sysprep_skip_create_users_and_groups --value=false2024-09-19 13:00:12,742 INFO ### Performing "set":2024-09-19 13:00:12,742 INFO ### new property - "sysprep_skip_create_users_and_groups":"false"2024-09-19 13:00:12,755 INFO ### on (Site:cluster-env, Tag:70e63be9-dc4e-4116-a2f7-58911eea52e5)2024-09-19 13:00:12,762 INFO ### PUTting json into: doSet_version1726743612762815.json2024-09-19 13:00:12,778 INFO ### NEW Site:cluster-env, Tag:version1726743612762815and
[root@ce04 resources]# /var/lib/ambari-server/resources/scripts/configs.py --unsafe --user=admin --password=admin --port=8080 --protocol=http --action=set --host=ce04.acceldata.dvl --cluster=ODP_322_darth --config-type=cluster-env --key=ignore_groupsusers_create --value=false2024-09-19 13:00:29,339 INFO ### Performing "set":2024-09-19 13:00:29,339 INFO ### new property - "ignore_groupsusers_create":"false"2024-09-19 13:00:29,351 INFO ### on (Site:cluster-env, Tag:70e63be9-dc4e-4116-a2f7-58911eea52e5)2024-09-19 13:00:29,358 INFO ### PUTting json into: doSet_version1726743629358720.json2024-09-19 13:00:29,368 INFO ### NEW Site:cluster-env, Tag:version1726743629358720Install ODP Select manually on a New Host
Add the ODP-Repository
cat /etc/yum.repos.d/ambari-odp-1.repo
[ODP-3.6-repo-1]name=ODP-3.6-repo-1baseurl=https://mirror.odp.acceldata.dev/ODP/centos/3.3.6.2-1/path=/enabled=1gpgcheck=0[ODP-UTILS-1.1.0.22-repo-1]name=ODP-UTILS-1.1.0.22-repo-1baseurl=https://mirror.odp.acceldata.dev/ODP/centos/ODP-UTILS-1.1.0.22/rhel8/9/path=/enabled=1Install the ODP-Select
yum install odp-select* -yAdd an Agent from the Amabri UI



Install the Clients



Troubleshooting Steps
Issue-1
If the user and group creation skipping is not performed, the following error appears.
File "/var/lib/ambari-agent/cache/stack-hooks/before-ANY/scripts/shared_initialization.py", line 50, in setup_users groups = params.user_to_groups_dict[user], KeyError: hbase' Error: Error: Unable to run the custom hook script ['/usr/bin/python', '/var/lib/ambari-agent/cache/stack-hooks/before-ANY/scripts/hook.py', 'ANY', '/var/lib/ambari-agent/data/command-63224.json', '/var/lib/ambari-agent/cache/stack-hooks/before-ANY', '/var/lib/ambari-agent/data/structured-out-63224.json', 'INFO', '/var/lib/ambari-agent/tmp', 'PROTOCOL_TLSv1_ 2', '']
Solution: Perform as suggested in Skip Users and Group Creation.
Issue-2
If odp-select is installed on new node before adding it to the cluster, the following error appears.
Unable to query for supported packages using /usr/bin/odp-select.
Solution: Add a repository as mentioned in Install ODP Select Manually on a New Host.\
Issue-3
Distro Module adding
====================Traceback (most recent call last): File "/usr/lib/ambari-agent/lib/ambari_agent/main.py", line 33, in <module> from ambari_agent import AmbariConfig File "/usr/lib/ambari-agent/lib/ambari_agent/AmbariConfig.py", line 30, in <module> from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl File "/usr/lib/ambari-agent/lib/ambari_commons/init.py", line 21, in <module> from ambari_commons.os_check import OSCheck, OSConst File "/usr/lib/ambari-agent/lib/ambari_commons/os_check.py", line 25, in <module> import distroModuleNotFoundError: No module named 'distro'Solution:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py /usr/bin/python3.11 get-pip.py /usr/bin/python3.11 -m pip install distro /usr/bin/python3.11 -c "import distro"