Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Make RPM Installation of Demo Configuration Optional #4199

Open
eseglem opened this issue Mar 25, 2024 · 7 comments
Open

Request: Make RPM Installation of Demo Configuration Optional #4199

eseglem opened this issue Mar 25, 2024 · 7 comments
Labels
enhancement New feature or request triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable.

Comments

@eseglem
Copy link

eseglem commented Mar 25, 2024

Is your feature request related to a problem? Please describe

The RPMs are very useful and take care of a lot of important details making installation much more streamline. Unfortunately, they automatically install the demo configuration. Even if you have your own configuration ready to go, you must set an OPENSEARCH_INITIAL_ADMIN_PASSWORD and let it go through all those steps only to delete everything it does and install your own configuration.

Describe the solution you'd like

To be honest, I do not the think the RPM should be installing the demo configuration at all by default. But, if that is set in stone, then it should at least take the DISABLE_INSTALL_DEMO_CONFIG variable that is used throughout various parts within the opensearch ecosystem.

Describe alternatives you've considered

No response

Additional context

I think it is a really bad workaround, but I just discovered that if you set a weak password the demo installation script will fail out and the package has installed enough by that point to be usable. It would be preferable to have a clean way to do it though.

@eseglem eseglem added enhancement New feature or request untriaged Require the attention of the repository maintainers and may need to be prioritized labels Mar 25, 2024
@rishabh6788
Copy link

Moving to security team to provide an update.

@rishabh6788 rishabh6788 removed the untriaged Require the attention of the repository maintainers and may need to be prioritized label Apr 1, 2024
@rishabh6788 rishabh6788 transferred this issue from opensearch-project/opensearch-build Apr 1, 2024
@github-actions github-actions bot added the untriaged Require the attention of the repository maintainers and may need to be prioritized label Apr 1, 2024
@peterzhuamazon
Copy link
Member

peterzhuamazon commented Apr 1, 2024

Just to add context in deb/rpm packages, the demo install script runs during installation, not during startup. It is logical to move this logic to run from postinstall to systemd service.

This was suggested to security team when the implementation happens in 2.12.0, that we can move such behavior to systemd. But due to concerns of breaking the existing systemd service file, and time concerns, this change is not implemented at the time. @DarshitChanpura @derek-ho

@eseglem
Copy link
Author

eseglem commented Apr 1, 2024

I did at least skim through that thread while digging into this. That discussion seemed to revolve around where to have the variable set and when the demo install is ran. It seems set on running the demo install automatically. And my issue is with the demo install being ran at all. To me, running the demo install should be an additional process ran by the user if they chose to, not by default. Or at least have a way to opt out of it like the disable install variable used elsewhere.

Without knowing the history behind the decision to run the demo install automatically it is very confusing to me. It seems like the RPM is being treated as just a way to spin up a local demo rather than something that may be used to install the application on a production system. I have not come across another RPM that does it this way. It has always always been install the rpm then run these other commands to get started.

@cwperks
Copy link
Member

cwperks commented Apr 8, 2024

[Triage] @DarshitChanpura Can you take a look at this issue and see if this is the appropriate repo for this issue? Please transfer back to opensearch-build if the changes to not run the install_demo_configuration script would take place in opensearch-build

@DarshitChanpura
Copy link
Member

RPM installation should run demo install script only if a DISABLE_INSTALL_DEMO_CONFIG is set to false, i.e. this block should be modified to do so.

See docker entrypoint for example: https://github.com/opensearch-project/opensearch-build/blob/main/docker/release/config/opensearch/opensearch-docker-entrypoint-2.x.sh#L33-L49

Since this issue is not related to security, but related to distribution setup, @opensearch-project/triage please transfer this issue back to opensearch-build repo.

@stephen-crawford stephen-crawford removed the untriaged Require the attention of the repository maintainers and may need to be prioritized label Apr 15, 2024
@stephen-crawford
Copy link
Contributor

@DarshitChanpura would you be able to make the small change to this script to allow this configuration?

@stephen-crawford stephen-crawford added the triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable. label Apr 22, 2024
@Leo1003
Copy link

Leo1003 commented Jul 27, 2024

I have using my own Ansible playbook to automate the deploying and upgrading process of OpenSearch, the demo configuration is meaningless for me. And I have to add a task to remove those demo configs to make things work.

2.12.0 requiring admins to set OPENSEARCH_INITIAL_ADMIN_PASSWORD also breaks my playbook and makes things more complex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable.
Projects
None yet
Development

No branches or pull requests

7 participants