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

Start and stop containers as required to match configuration #252

Closed
adamtheturtle opened this issue Jul 9, 2014 · 4 comments · Fixed by #280
Closed

Start and stop containers as required to match configuration #252

adamtheturtle opened this issue Jul 9, 2014 · 4 comments · Fixed by #280

Comments

@adamtheturtle
Copy link
Contributor

#251 will output objects describing necessary changes which must take place to match a given configuration. This issue covers the remaining subset of #33 which involves performing those actions.

@adamtheturtle
Copy link
Contributor Author

We had a start at some of this in #251 and scrapped it, but some ideas which may help:

In the ChangeStateScript class, have _deployer = Deployer() and test that this is the case with something like:

    def test_deployer_is_deployer(self):
        """
        ``ChangeStateScript._deployer`` is an instance of :class:`Deployer`.
        """
        script = ChangeStateScript()
        self.assertIsInstance(script._deployer, Deployer)

Also, test that some part of Deployer.change_node_configuration is used by ChangeStateScript.main by testing for example that when a fake _deployer is set with Gear units running, and an empty configuration is sent to the change-state script, the right changes happen.

@adamtheturtle
Copy link
Contributor Author

Also, we found that the desired configuration should be set in parseArgs for the change-state script with Configuration.model_from_configuration

@adamtheturtle
Copy link
Contributor Author

ChangeState.main should also require a hostname (which will be the hostname of the node it is run on, covered by #19), and pass that as a parameter to Deployer.change_node_configuration

@adamtheturtle
Copy link
Contributor Author

Some of this doesn't need #251 so I will start it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants