Skip to content

Configure cluster from yaml #40

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

Merged
merged 13 commits into from
Apr 27, 2022

Conversation

Voloodya
Copy link
Contributor

No description provided.

@vrogach2020 vrogach2020 changed the title Congigur cluster from yaml Configure cluster from yaml Apr 26, 2022
throw new IllegalArgumentException("Topology configuration file must not be null or empty");
}
String instances = topologyConfigurationFile.substring(topologyConfigurationFile.lastIndexOf('.') + 1);
if (instances.equals("lua")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This condition is not needed here. Why not to set topologyConfigurationFile to yml ?
Maybe move this 'if' to setupTopology() ?

Copy link
Contributor Author

@Voloodya Voloodya Apr 27, 2022

Choose a reason for hiding this comment

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

Why not to set topologyConfigurationFile to yml ?

Because the user can transfer both yml and lua file whith topology to topologyConfigurationFile . And strategy we checkout depends type a file.

Maybe move this 'if' to setupTopology() ?

Because if we get lua file we must initialize the variable topologyConfigurationFile immediately in the constructor

if (topologyConfigurationFile == null) {
String runDirPath = null;
try {
Container.ExecResult envVariablesContainer = this.execInContainer("env");
Copy link
Contributor

Choose a reason for hiding this comment

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

Why you are getting container env ?
see withArguments()

You can just use System.getenv() or default to ./tmp/run

Copy link
Contributor Author

@Voloodya Voloodya Apr 27, 2022

Choose a reason for hiding this comment

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

You can just use System.getenv() or default to ./tmp/run

I try use System.getenv() - this doesn't work (haven't need env).
Default to ./tmp/run - would not like use hardcore

see withArguments()

We maybe don't pass "ENV_TARANTOOL_RUNDIR" in Argumets. This is env setup to Dockerfile.

@vrogach2020 vrogach2020 merged commit 871af8f into tarantool:master Apr 27, 2022
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