Skip to content
New issue

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

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

Already on GitHub? # to your account

Machine Add the possibility to force broker to always assign the same machine to a user #312

Merged
merged 7 commits into from
Oct 4, 2016

Conversation

corentindrouet
Copy link
Contributor

@corentindrouet corentindrouet commented Sep 30, 2016

Add a configuration variable to set this option.

If set to true, no machines are terminated. If a machine expire, it is just stopped, and started again when the user want to use it.

Fixes #294

@@ -29,6 +29,8 @@ to avoid commiting those changes
- machinesName (Defaults to 'Nanocloud Exec Server') default name for machines
- plazaURI (Defaults to https://s3-eu-west-1.amazonaws.com/nanocloud/plaza/1.0.0/windows/amd64/plaza.exe) URL to download plaza from
- plazaPort (Defaults to 9090) port to communicate with plaza
- neverTerminateMachine (Defaults to false) if set to true, machines are
never destroyed, users have always the same machine all times.
Copy link
Contributor

Choose a reason for hiding this comment

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

users have always the same machine all times. -> users always keep the same machine at all time.

isActive: machine.isSessionActive(),
config: ConfigService.get('neverTerminateMachine')
})
.then((props) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

You should use object destructuring in this case: https://ponyfoo.com/articles/es6-destructuring-in-depth

config: ConfigService.get('neverTerminateMachine')
})
.then((props) => {
var {isActive, config} = props;
Copy link
Contributor

Choose a reason for hiding this comment

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

{isActive, config} could and should be in the argument list.

@corentindrouet corentindrouet force-pushed the machine_assignement branch 3 times, most recently from e5079c5 to c798571 Compare October 4, 2016 09:34
Stop will not destroy the machine, she will just stop taking resources.
Start on a stopped machine will rerun her, so she can be reused.
Stop will not destroy the machine, she will just stop taking resources.
Start on a stopped machine will rerun her, so she can be reused.
to a user.

This option is available only in the config file.
@dynamiccast dynamiccast merged commit a2d21d3 into Nanocloud:master Oct 4, 2016
@corentindrouet corentindrouet deleted the machine_assignement branch November 18, 2016 06:59
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants