Skip to content

Conversation

@ssulav
Copy link
Contributor

@ssulav ssulav commented Nov 4, 2025

What changes were proposed in this pull request?

HDDS-13870: Bare Metal Ozone Installer with support for multiple node deployment.

Please describe your PR in detail:

Single node support
HA mode support
Service User creation
Passwordless SSH
JAVA 17/21 Configure Installation

What is the link to the Apache JIRA

HDDS-13870

(Please replace this section with the link to the Apache JIRA)

How was this patch tested?

Deployed Debian 3 node cluster and tested the installation.
Triggered via Python script :

> ./ozone_installer.py -H "ozone-dep-{1..3}.<domain>" --clean
Deployment type (ha|non-ha) [ha]: 
Ozone version (e.g., 2.0.0 | local) [2.0.0]: 
JDK major (17|21) [17]: 
Install base directory [/opt/ozone]: 
Data base directory [/data/ozone]: 
Auth method (key|password) [password]: 
SSH username [root]: 
SSH password: 
Service user [ozone]: 
Service group [ozone]: 
Running: ansible-playbook -i /var/folders/l5/j8n4hsgd17g07v7g2v1mp1n80000gn/T/tmpqlith61c/hosts.ini /Users/ssulav/Work/github/ssulav/ozone/tools/installer/playbooks/cleanup.yml -e @/var/folders/l5/j8n4hsgd17g07v7g2v1mp1n80000gn/T/tmpqlith61c/vars.json -k --become
...
...
...
TASK [ozone_service_ha : Show OM/SCM/Datanode/Recon UI endpoints] *************************************************************************
ok: [ozone-dep-1.<domain>] => 
  msg:
  - 'OM UI: [''http://ozone-dep-1.<domain>:9874'', ''http://ozone-dep-2.<domain>:9874'', ''http://ozone-dep-3.<domain>:9874'']'
  - 'SCM UI: [''http://ozone-dep-1.<domain>:9876'', ''http://ozone-dep-2.<domain>:9876'', ''http://ozone-dep-3.<domain>:9876'']'
  - 'Datanode UI (first 3): [''http://ozone-dep-1.<domain>:9878'', ''http://ozone-dep-2.<domain>:9878'', ''http://ozone-dep-3.<domain>:9878'']'
  - 'Recon UI: [''http://ozone-dep-1.<domain>:9888'']'

PLAY RECAP ********************************************************************************************************************************
ozone-dep-1.<domain> : ok=41   changed=21   unreachable=0    failed=0    skipped=8    rescued=0    ignored=0   
ozone-dep-2.<domain> : ok=29   changed=11   unreachable=0    failed=0    skipped=8    rescued=0    ignored=0   
ozone-dep-3.<domain> : ok=29   changed=11   unreachable=0    failed=0    skipped=8    rescued=0    ignored=0   

Playbook run took 0 days, 0 hours, 4 minutes, 1 seconds
Friday 26 December 2025  13:58:46 +0530 (0:00:00.020)       0:04:01.262 ******* 
=============================================================================== 
java : Install OpenJDK on Debian/Ubuntu family ------------------------------------------------------------------------------------ 23.80s
ozone_fetch : Upstream | Download tarball ----------------------------------------------------------------------------------------- 23.03s
ozone_fetch : Upstream | Unarchive to install_base -------------------------------------------------------------------------------- 18.88s
ozone_service_ha : SCM bootstrap on remaining SCMs -------------------------------------------------------------------------------- 12.97s
ozone_service_ha : Initialize first SCM ------------------------------------------------------------------------------------------- 11.58s
ozone_service_ha : Start Datanode on all datanodes -------------------------------------------------------------------------------- 11.18s
ozone_service_ha : OM init on remaining OMs --------------------------------------------------------------------------------------- 10.13s
ssh_bootstrap : Add passwordless SSH config for users ----------------------------------------------------------------------------- 10.07s
Pre-install: Ensure python3 present ------------------------------------------------------------------------------------------------ 9.53s
ozone_config : Render ozone-hosts.yaml --------------------------------------------------------------------------------------------- 9.36s
ozone_config : Render ozone-site.xml ----------------------------------------------------------------------------------------------- 9.08s
ozone_config : Render core-site.xml ------------------------------------------------------------------------------------------------ 9.08s
ozone_config : Render ozone-env.sh ------------------------------------------------------------------------------------------------- 8.93s
ozone_config : Render workers file for datanodes ----------------------------------------------------------------------------------- 8.90s
ozone_service_ha : Start OM on remaining OMs --------------------------------------------------------------------------------------- 7.47s
ozone_service_ha : Start SCM on remaining SCMs ------------------------------------------------------------------------------------- 7.37s
java : Detect JAVA_HOME candidate -------------------------------------------------------------------------------------------------- 6.94s
ozone_service_ha : Initialize first OM --------------------------------------------------------------------------------------------- 5.05s
ozone_layout : Create install and data directories --------------------------------------------------------------------------------- 4.10s
ozone_service_ha : Start first OM -------------------------------------------------------------------------------------------------- 3.78s

@ssulav ssulav changed the title HDDS-13870: Bare Metal Ozone Installer with support for multiple node deployment. HDDS-13870. Bare Metal Ozone Installer with support for multiple node deployment. Nov 4, 2025
@ssulav ssulav marked this pull request as draft November 4, 2025 16:55
@ssulav ssulav marked this pull request as ready for review November 6, 2025 06:47
@yandrey321
Copy link

IMHO it would be better to implement installer in python or go, I'm not sure if it would be easy to maintain/extend over the time.

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days.

@github-actions github-actions bot added the stale label Dec 4, 2025
@github-actions
Copy link

Thank you for your contribution. This PR is being closed due to inactivity. If needed, feel free to reopen it.

@github-actions github-actions bot closed this Dec 11, 2025
@ssulav ssulav reopened this Dec 14, 2025
@ssulav ssulav removed the stale label Dec 14, 2025
@ssulav ssulav marked this pull request as ready for review December 26, 2025 08:30
@ssulav
Copy link
Contributor Author

ssulav commented Dec 26, 2025

@yandrey321 - Refactored the code to ansible.
Please review when you get time. Thanks

line += f"# line: {lineno}\n"
if role_name:
line += f"# role: {role_name}\n"
with open(self._out_file, "w", encoding="utf-8") as f:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use logger instead of writing directly to the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a persisted file that is used by the next rerun and I don't think logger is the right choice for such use cases.
I don't see any problem with "with open" for handling persisted file.

Let me know if you still feel there is an issue with using above way of writing file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you want to implement state machine please use state machine FW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants