Merge lp:~cprov/charms/trusty/adt-cloud-worker/nova-keypair-reset into lp:~canonical-ci-engineering/charms/trusty/adt-cloud-worker/trunk
Status: | Merged |
---|---|
Approved by: | Celso Providelo |
Approved revision: | 7 |
Merged at revision: | 7 |
Proposed branch: | lp:~cprov/charms/trusty/adt-cloud-worker/nova-keypair-reset |
Merge into: | lp:~canonical-ci-engineering/charms/trusty/adt-cloud-worker/trunk |
Diff against target: |
90 lines (+41/-4) 2 files modified
hooks/actions.py (+40/-4) hooks/services.py (+1/-0) |
To merge this branch: | bzr merge lp:~cprov/charms/trusty/adt-cloud-worker/nova-keypair-reset |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Para Siva (community) | Approve | ||
Review via email: mp+252095@code.launchpad.net |
Commit message
Adding steps to (re-) configure nova keypairs, so worker can access its testbeds.
Description of the change
Adding steps to (re-) configure nova keypairs, so worker can access its testbeds.
On install or every configuration change the charm checks for a existing SSH key (for root), if it exists we assume it was already setup and nothing is done. If it doesn't exist, we create a new default SSH key (RSA-2048, empty-pass, ~/.ssh/id_rsa) and enable (del + add) it in nova using the current app configuration nova credentials and named as the configuration worker name.
It requires us to change the way adt-run is called by additionally passing '-k <worker_name>', I've tested it by abusing nova.extra_args configuration parameter, but ideally we would change a-c-w code for doing that automatically.
The side-effect of this change is that the configuration nova credentials will have as many keys as deployed workers, which might require some future cleanup. Re-deploying units is already nicely supported because before adding a new keypair we delete it, so it's effectively updated.
+1, looks good.