Fixes for ceph::key

The sed command had escape sequences interpreted by puppet which
have been escaped now to allow correct execution of the unless
parameter

Change-Id: Icd0322eeeb6996a42906431add0322e51849061d
ENV['RELEASES'] overrides the [cuttlefish dumpling emperor]

The RELEASES environment variable contains the list of ceph releases for
which integration tests are going to be run. This is convenient to speed
up tests when debugging the logic of the implementation and before
making sure it works accross all distributions.

Change-Id: I0d0a6af6f07aeba72c42e6f853353ccf97db8658
Signed-off-by: Loic Dachary <loic@dachary.org>
add missing dependencies in Modulefile and Puppetfile

So that librarian-puppet install --puppetfile=ceph/Puppetfile works as
expected.

Change-Id: I0490615d5d2eb8fa8babff6664fe80970b57d120
Signed-off-by: Loic Dachary <loic@dachary.org>
Merge "ENV['RELEASES'] overrides the [cuttlefish dumpling emperor]"
ENV['MACHINES'] overrides [first second]

Integration tests need two virtual machines to complete. However, when
running a single integration test (via SPEC=...), it will save time to
not run the second virtual machine if it is not needed.

Change-Id: I0946c7e999186aebf5dc84661112518f63f45ce3
Signed-off-by: Loic Dachary <loic@dachary.org>
reminder to run a single integration test

Running a single integration test in a development environment is
convenient but the sequence to do so is not trivial to remember. It is
added to the end of the ceph_key_spec.rb test file, using an emacs
syntax so it can be run with M-x compile.

* It only creates a single virtual machine instead of two
* It only tests on cuttlefish, assuming that it is likely to work on
  newer versions as well
* The virtual machine is not destroyed at the end of the test to help
  with debugging

Change-Id: I2e18b8453fcba905cb99292bfd5e950a2900e185
Signed-off-by: Loic Dachary <loic@dachary.org>
ceph::key : make shell verbose for clarity

So that the output contains the actual shell lines being run, otherwise
it is most difficult to figure out what went wrong and why.

Change-Id: I655ef1b87ecede02c5a76f04c9b3075456a622ab
Signed-off-by: Loic Dachary <loic@dachary.org>
ceph::key : add keyring and id key injection arguments

The id and keyring used when injecting a key do not necessarily match
the ceph default. The inject_as_id and inject_keyring arguments are
added to change them independently of each other.

The argument documentation is updated and the integration tests upgraded
to demonstrated the intended side effect.

Change-Id: I9b19a66558bc11e16da9fde4f11d23b850154186
Signed-off-by: Loic Dachary <loic@dachary.org>
ceph::key : add the cluster argument

So that ceph::key can be used on a cluster that is not named after the
default (ceph).

Change-Id: I7b7626ceb83ff387b4c8d100534dea637f91a798
Signed-off-by: Loic Dachary <loic@dachary.org>
ceph::key : fix cap_{mon,osd,mds} prototype to match the documentation

Set cap_{mon,osd,mds} to undef by default instead of '' and fix the
integration tests accordingly.

Change-Id: I520c3b4f1f983c8503fc7bac0a5bb05c90da0bbc
Signed-off-by: Loic Dachary <loic@dachary.org>
ceph::key : exec touch is redundant with file

Change-Id: Iec58d37324a1b8c79c02247ab1b3956332314789
Signed-off-by: Loic Dachary <loic@dachary.org>
ceph::key : update copyright notice

To reflect the latest contributions.

Change-Id: If21277baa0e7baa4534e7498cd38da9982023e77
Signed-off-by: Loic Dachary <loic@dachary.org>
ceph::key : remove redundant Exec blocks

They were probably introduced back when touch was used to create the
keyring file.

Change-Id: I059fd56b73896a7262ff21b5c0b43131150a053b
Signed-off-by: Loic Dachary <loic@dachary.org>
ceph::key : remove the client.admin keyring for tests

To avoid unintended side effects between integration tests.

Change-Id: I3f084244291d4608b9090ecaad915f5543430d1d
Signed-off-by: Loic Dachary <loic@dachary.org>
ceph::key : reduce literal duplication in tests

Set keys in variables instead of duplicating them in the tests to avoid
spelling mistakes.

Change-Id: Iebbab700da62e8c99869a5cb5fd1ee1730318979
Signed-off-by: Loic Dachary <loic@dachary.org>
ceph::key : proofread documentation strings

Change-Id: Ice6c57375a6ba28e134fa8c9bb87fa55b6974fc1
Signed-off-by: Loic Dachary <loic@dachary.org>
update the first use case to reflect that it works

The first use case works with the current implementation. It is updated
to remove the warning and the syntax is adapted to match the
reality. Instead of a laptop, it is suggested that the test is done on a
virtual machine because it is much more likely.

Change-Id: I7fafb2a6d06eb146b6a2407fb20fdfc4846889f9
Signed-off-by: Loic Dachary <loic@dachary.org>
ceph::mon : remove useless comments from tests

Change-Id: I2cc5c3a1d2e3d130fb66f4a8adcd00786434391c
Signed-off-by: Loic Dachary <loic@dachary.org>