375 Commits

Author SHA1 Message Date
Colleen Murphy
e64e9c2a44 Drop rabbitmq dependency to <4.0.0
The difference in rabbit versions between openstacklib, cinder and nova
causes dependency conflicts. Version 4 of the rabbitmq module dropped
support for setting up erlang. This patch drops the required version to
between 2.0.2 and 4.0.0 in order to line up with the other modules
rather than requiring the other modules to change their dependencies as
well as set up erlang.

Change-Id: I99383b28574958a43b88b4feb0025ad795a6fda2
2014-11-23 12:57:12 -08:00
Emilien Macchi
2fc2e5504d Implement openstacklib::messaging::rabbitmq
* Add puppetlabs-rabbitmq 4.x as a dependency in fixtures &
  metadata.json
* Implement openstacklib::messaging::rabbitmq to manage user, permissions
  and vhost in RabbitMQ (+ unit tests)
* Documentation

Change-Id: I65190035b51f3d72e4302dae7fad92a280d63cff
2014-11-14 19:14:58 +01:00
Emilien Macchi
bfbe779b17 Implement Service Validation
Service Validations aims to be used in all OpenStack modules to validate
that services are actually running.

Example in nova::api where we could validate the Nova API is really
working. If it's the case, a Puppet Anchor will be created. This Anchor
could be consummed by external tools to validate a deployment workflow
and improve the orchestration during an OpenStack deployment.

Change-Id: Ia74677b1402c8f872183f873cf9cb73702253874
2014-11-05 10:12:08 +01:00
Sebastien Badia
28130971a8 Switch to metadata.json for Puppet forge releases
Since puppet 3.x, Puppet Labs Forge accept only the metadata.json
for module description (Modulefile is now deprecated).

This patch :
 - convert the Modulefile to metadata.json.
 - bump major version to 5 (for juno).
 - switch to stackforge namespace.
 - relax pe version_requirement to 3.x.

Change-Id: I116ea888e4be8d791994573b57bc0b3ef9560804
2014-10-24 18:33:35 +02:00
Jenkins
5ddb8ea169 Merge "Implement base aviator provider" 2014-10-01 23:41:40 +00:00
Colleen Murphy
612fa7e121 Implement base aviator provider
This patch adds a dependency on the aimonb/aviator module and adds
functionality to support interactions with the OpenStack services' API
via aviator.

The patch adds a parent provider that is intended for other providers
to inherit from. The parent provider has methods to authenticate to
openstack services, create session objects, and make requests. The
authenticate method can accept credentials as an argument hash or infer
credentials from the environment.

It also adds a stub type parameter that allows types to incorporate
basic parameters they need in order to support using aviator.

Change-Id: I56b0d07ae8f4738037eda486b75a0f6e24fe80e7
Implements: blueprint use-aviator-in-module-resources
2014-09-30 21:01:28 -07:00
Jenkins
e6684e98bf Merge "Improve openstacklib::db::mysql test coverage" 2014-09-30 13:46:59 +00:00
Jenkins
6aec291dd7 Merge "Greatly reduce code duplication in rspec tests of db::mysql" 2014-09-30 11:14:01 +00:00
Mathieu Gagné
6fbbd778eb Fix support for puppetlabs-stdlib<4.2.0
Support for non-array value in the function concat() was added
in puppetlabs-stdlib 4.2.0.

This change adds a fix to support puppetlabs-stdlib<4.2.0
by converting $host to an array.

Change-Id: Ib8e4c7a5f788d1e0bd7440bc93b560df8e39fcf4
2014-09-29 17:26:56 -04:00
Mathieu Gagné
4d3e668360 Improve openstacklib::db::mysql test coverage
* Add tests for openstacklib::db::mysql::host_access
* Add tests for other overridable parameters in db::mysql
* Do not test implementation details of host_access from
  within openstacklib::db::mysql tests.

Change-Id: Ifcf3820a575f932313a62b9d294ebd92a5055cf5
2014-09-29 17:12:08 -04:00
Mathieu Gagné
7467b6aaa2 Greatly reduce code duplication in rspec tests of db::mysql
Use shared examples to avoid duplicating tests for both platforms.

Change-Id: I16a77a284070e243c2a46675af419e635a139969
2014-09-29 16:27:29 -04:00
Mathieu Gagné
a71ac3d371 Use host_access to provision mysql_user and mysql_grant
Improve logic to be able to reuse host_access for both the initial
mysql user/grant and the additional ones for allowed_hosts.

Change-Id: Ia42833a99ee0fab41a571cccaeb31f740176fce3
2014-09-29 16:18:34 -04:00
Jenkins
5ecdc92222 Merge "policy.json: Allow puppet modules to manage policy.json" 2014-09-26 13:39:12 +00:00
Yanis Guenane
37935472f1 policy.json: Allow puppet modules to manage policy.json
Currently puppet modules does not allow one to manage policy.json.
This commit aims to create a common resource for people to manage
their policies.

Change-Id: I1cd7765cdcbddb7e7ad5d720f1efa382641712f2
2014-09-25 08:42:18 -04:00
Colleen Murphy
dc8da63ffd Update stdlib dependency to 4.x
puppetlabs/stdlib 4.x is backwards compatible with 3.x and still tested
on Puppet 2.7. Updating stdlib to 4.x allows modules to use newer
functions without breaking older functionality.

Change-Id: Iaaac5678cdd00db3a03eb1f715e6cd91a25cefc8
2014-09-22 15:32:34 -07:00
Jenkins
c374bed10f Merge "Add os_database_connection function" 2014-08-06 12:43:36 +00:00
Jenkins
1c9635c6ff Merge "Add db::mysql and db::mysql::host_access to openstacklib" 2014-07-25 14:38:01 +00:00
Colleen Murphy
dd25406b9e Add db::mysql and db::mysql::host_access to openstacklib
The openstacklib::db::mysql resource is a library resource that can be used by
nova, cinder, ceilometer, etc., rather than replicating equivalent
functionality across all of these modules.

This resource reimplements most of the functionality of the puppetlabs
mysql::db resource. The primary purpose of writing this code from scratch
rather than using the mysql::db resource is to allow the use of a password
hash rather than a plaintext password as a parameter. Other differences from
the mysql::db implementation are:

* It does not have an ensure parameter, we will assume the db should be present
* It does not accept and execute arbitrary SQL because the db sync exec manages
  the state of the db
* It does not use ensure_resource because the database and user should only be
  created from within this resource and creating them elsewhere should be an
  error

Implements: blueprint commmon-openstack-database-resource

Change-Id: I76bd93d1579179932d1f48cea4bb80a2576a7fba
2014-07-15 10:27:28 -07:00
Jenkins
3364bbac57 Merge "Add *.swp to .gitignore" 2014-07-12 01:06:20 +00:00
Mathieu Gagné
0536a214f4 Add os_database_connection function
The os_database_connection function is an helper used to build
database connection URI from various parameters.

Example:

  os_database_connection({
    dialect  => 'mysql',
    host     => '127.0.0.1',
    port     => '3306',
    username => 'guest',
    password => 's3cr3t',
    database => 'test',
    charset  => 'utf-8'
  })

Result:

  mysql://guest:s3cr3t@127.0.0.1:3306/test?charset=utf-8

Change-Id: Id0bde33891112e36f13d3f8fdf0ff89820c09c01
2014-07-09 14:20:34 -04:00
Mathieu Gagné
21b1d3c297 Add *.swp to .gitignore
It was missing.

Change-Id: Idd5879187edf75a0bd1bdc5c5beaecf951a91c3b
2014-07-08 21:36:31 -04:00
Colleen Murphy
97f76c5c60 Remove validate task from Rakefile
As of release 0.6.0 puppetlabs_spec_helper now contains a validate task in
puppetlabs_spec_helper/rake_tasks, so writing it in our own Rakefile
is unnecessary.

Change-Id: I8250c2fc7621fe4233c2bc53e6770f69a84188eb
2014-07-08 09:17:19 -07:00
Mathieu Gagné
e72605f500 Fail rspec tests on warnings
Change-Id: I851f3cb9eb4eadded7187a067d2ab94d7c4479b8
2014-07-02 13:13:02 -04:00
Colleen Murphy
474a3bbabe Create basic module structure with required files
Change-Id: I9984ffa0e5f0fa379fae559b44457c34fa10ccd2
2014-07-01 08:37:43 -07:00
OpenStack Project Creator
c54de60507 Added .gitreview 2014-06-18 19:09:51 +00:00