68 Commits

Author SHA1 Message Date
Gael Chamoulaud
da26542fbb Fix unit tests against Puppet 4.3.0
Related-bug: #1517805
Change-Id: I19e891ecce2bceb20e141199e14333f01b0ec9ab
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2015-11-24 10:05:01 +01:00
Mykyta Karpin
acd95e6a3a Add support of os_service_default fact in glance spec
This change adds possibility to use the os_service_default
   fact for configuration options that default to '<SERVICE DEFAULT>'.
   this change is done by analogy with cinder
   commit 667e6c0850672dbbf99381eb92468f95e5591913

Change-Id: Ie5c8909bcc1c9a6a7a9ab1b59eec4637751ffd74
2015-11-20 12:53:35 +00:00
Yanis Guenane
3231e35320 Put all the logging related parameters to the logging class
Currently logging configuration is splitted in two distinct classes, the init.pp
and the logging.pp classes.

This review aims to centralize all logging related parameters in a single class,
the logging.pp one.

The impacted parameters are :

  * use_syslog
  * use_stderr
  * log_facility
  * verbose
  * debug
  * log_dir
  * log_file

This change remains backward compatible with what is currently in place

Change-Id: Ic268104fd9bc77bc142fc635285b0459f3d4314f
2015-10-01 10:18:55 +02:00
Sergey Kolekonov
1f4a545247 Add an ability to manage use_stderr parameter
When logging is already set up, it can be useful to disable this option
to avoid logs duplication (collected by Upstart, for example)

Change-Id: I1787191d9a512fdd3c3f79d6fadda110c5e41d54
Closes-bug: #1482564
2015-08-14 18:43:52 +00:00
Yanis Guenane
92180ae9a1 Add tag to package and service resources
In order to be able to take an action after all the packages of the
module have been installed/updated or all the services have been
started/restarted, we set a 'glance-package' and 'glance-service'
tag for each package and service of this module.

At the moment, there is a generic openstack tag that is not specific
enough if one wants to take action upon a single module change.

Use case :

If an action needs to be taken after all the packages have been
installed or updated : Package <| tag == 'glance-package' |> -> X

Change-Id: If43e27e80500deebf6b758b11541d3d6f50cb129
2015-07-22 20:05:30 +02:00
Jenkins
344aaa68cb Merge "Revert "Revert "Move rabbit/kombu settings to oslo_messaging_rabbit section""" 2015-06-17 14:22:18 +00:00
Jenkins
b803a9a983 Merge "Revert "Move rabbit/kombu settings to oslo_messaging_rabbit section"" 2015-04-22 15:43:50 +00:00
Jenkins
c0feafd0e9 Merge "Revert "Separate api and registry packages for Red Hat"" 2015-04-17 18:48:10 +00:00
Colleen Murphy
268370457c Revert "Revert "Move rabbit/kombu settings to oslo_messaging_rabbit section""
This reverts commit d302170d260f4e6585fedc1b4709c953d0491c56.

We  can unrevert this change once we are ready for kilo specific
changes.

Change-Id: I3079727c8333de3e9b4382a68fca3ef293ce2d48
2015-04-17 10:14:38 -07:00
Colleen Murphy
d302170d26 Revert "Move rabbit/kombu settings to oslo_messaging_rabbit section"
This reverts commit e6e8f6a56231409028ff1e7cdcd44781ca37d5b0.

Kilo deprecates these settings, but they still work. We should wait to
merge this until upstream distro packages are ready so that master is
not broken.

Change-Id: Ib05943e89969eb810527943426c566cf4a77e7ad
2015-04-17 17:13:52 +00:00
Emilien Macchi
876e857b29 Revert "Separate api and registry packages for Red Hat"
Due to a patch in RDO packaging, puppet-glance is broken for RHEL platforms.

This reverts commit 5f15e05704b2e549b8fab1c643a6ee743a0e92f4.

Change-Id: I7ba146714d1b0e8d461c556eff5a9f8c4ad9627f
2015-04-17 13:37:04 +00:00
Jenkins
9c1b0a90d9 Merge "Separate api and registry packages for Red Hat" 2015-04-16 08:51:01 +00:00
Jenkins
25ad0bfbbc Merge "Move rabbit/kombu settings to oslo_messaging_rabbit section" 2015-04-14 18:40:24 +00:00
Javier Pena
5f15e05704 Separate api and registry packages for Red Hat
Starting in Kilo, Red Hat-based platforms are using separate
glance-api and glance-registry packages (for an example, see
http://trunk.rdoproject.org/f21/current/).

Change-Id: I3ad476846d7dec3ca612e5b0d20b21b8577f4af0
2015-04-10 18:07:12 +02:00
Matt Fischer
81a9c1acb1 Fix API/Registry ensure for Ubuntu
On Ubuntu the API and Registry are separate packages so we need an
package_ensure for each.

Change-Id: I02dcca223f57392e7b4c82806a2c0d48d301d4aa
2015-04-10 08:29:43 -06:00
Mike Dorman
e6e8f6a562 Move rabbit/kombu settings to oslo_messaging_rabbit section
Kilo oslo-messaging deprecates rabbit/kombu settings in the
DEFAULT section.

Move these settings to proper oslo_messaging_rabbit section.

Change-Id: Ica8cd70ece41f55b827f74d3f14cbc35f37ae13d
2015-04-02 22:54:42 -06:00
Emilien Macchi
ec48075eca api: change default pipeline
Setting up cache requires ops to be aware of how cache works in Glance
and the fact they'll need more space on disk. It can be dangerous when
using shared storage (Ceph for example).

This patch aims to default to 'keystone' without cachemanagement
anymore.

This is not backward compatible, so if the deployer is not overriding
this parameter, Glance API won't manage the cache anymore.

Change-Id: Ibac35501658b2ba79081cbc7a53245d4a4eb7839
2015-03-17 15:45:46 -04:00
Sebastien Badia
dbe297b056 spec: updates for rspec-puppet 2.x and rspec 3.x
This patch aim to update our specs test in order to work with the rspec-puppet release
2.0.0, in the mean time, we update rspec syntax in order to be prepared
for rspec 3.x move.

In details:

  * Use shared_examples "a Puppet::Error" for puppet::error tests
  * Convert 'should' keyword to 'is_expected.to' (prepare rspec 3.x)
  * Fix spec tests for rspec-puppet 2.0.0
  * Upgrade and pin rspec-puppet from 1.0.1 to 2.0.0
  * Clean Gemfile (remove over-specificication of runtime deps of puppetlabs_spec_helper)

Change-Id: Ibd0333dc3c0959e846edfbad51fb48e8dfb8fbe9
Card: https://trello.com/c/eHXc1Ryd/4-investigate-the-necessary-change-to-be-rspec-puppet-2-0-0-compliant
2015-02-25 05:37:44 +01:00
Jenkins
4ccd0981a1 Merge "Add openstack tag to glance packages" 2015-02-09 21:17:17 +00:00
Matt Fischer
2dff962a65 Support identity_uri
This patch adds the ability to set a new identity_uri parameter.
It also deprecates the old auth_host, auth_port, auth_protocol,
and auth_admin_prefix parameters. Logic is in place so that
users of the deprecated settings should have a smooth upgrade
process and get deprecation warnings until they adopt the
new settings.

Change-Id: Id72991da18dd1f467a7683f8f450e157da64f969
Closes-Bug: #1391235
2015-02-05 15:20:26 +00:00
Matt Fischer
cbf3326184 Add openstack tag to glance packages
Change-Id: Ifbc41027c11f62342397d7e60e71080336c3418e
Partial-Bug: #1391209
2015-02-05 15:20:18 +00:00
Jenkins
390cd7787e Merge "Service Validation for Glance-API" 2014-12-23 03:37:35 +00:00
Emilien Macchi
2fa0df1e3b Service Validation for Glance-API
As an option, validate Glance API service with a default or custom
command, and if the service is up and running, create a Puppet Anchor

Change-Id: Id713d32d1dc34a15e93adb89c18d3471145e6ffe
2014-12-08 18:43:09 -05:00
Jenkins
99eea1138f Merge "Remove deprecated parameters" 2014-11-26 08:02:52 +00:00
Mathieu Gagné
e16f86e37c Remove deprecated parameters
* glance::api::sql_connection (deprecated since 4.1.0)
* glance::api::sql_idle_timeout (deprecated since 4.1.0)
* glance::registry::sql_connection (deprecated since 4.1.0)
* glance::registry::sql_idle_timeout (deprecated since 4.1.0)

Change-Id: Ibfe4e1a0a9f2f9f79b3fc76ef6a93ce429f72ed4
2014-11-25 13:50:46 -05:00
Emilien Macchi
908a62b2b9 Update [glance_store] section in glance config for Juno
Use new parameters for Juno like it's documented here:
http://docs.openstack.org/trunk/config-reference/content/glance-conf-changes-master.html
* Use [glance_store] section
* Update prefix when needed

Partial-Bug: #1391099

Change-Id: I096b16c33c493270422113e0107a100f967debc6
2014-11-14 19:30:39 +01:00
Jenkins
a33a9d6250 Merge "policy.json: Allow one to manage them from the puppet module" 2014-11-09 11:26:49 +00:00
Colleen Murphy
a97bf99479 Add parameter to set os_region_name in glance config
When https://review.openstack.org/#/c/125231/ was merged, the glance
providers became dependent on the DEFAULT/os_region_name parameter in
the glance configs, but the module had no way to set that parameter.
This caused the providers to fail.

This patch adds the parameter to glance::api so that the user can
control the value. It also removes functionality of the os_region_name
in glance::backend::cinder. While it would be better to deprecate this
parameter first and remove its functionality in a later release, there
is no clean way to do this and avoid a duplicate definition error.

An alternative to rapidly removing this functionality from
glance::backend::cinder would be modifying the glance parent provider
to make the DEFAULT/os_region_name glance config optional.

Change-Id: I075224acb9da2bb547d437b08cf6fccfed655d5c
2014-10-31 16:23:19 -07:00
Yanis Guenane
c90a835953 policy.json: Allow one to manage them from the puppet module
This commit allow a deployer to manage the policies via this module
It relies on augeas to change only the policy needed. The init takes
a hash of policies and apply them.

Change-Id: I6ee27a1c4c26c73f5954e6462097fb5ed4dbb7ea
2014-10-22 11:08:41 -04:00
Jenkins
09c71e6076 Merge "Add manage_service feature" 2014-09-29 04:25:09 +00:00
Martin Magr
da217a13f5 Add manage_service feature
puppet-glance lacks of disabling service managing. This patch adds
$manage_service parameter to relevant classes.

Change-Id: I222b1a3318f5163f6ad1e39cbb8be10c440ab99f
Closes-bug: #1359823
2014-09-17 14:30:37 +02:00
Jenkins
6d1c8b9e3d Merge "Migrate mysql backend to use openstacklib::db::mysql" 2014-09-03 03:27:17 +00:00
Colleen Murphy
dbcb82fa36 Migrate mysql backend to use openstacklib::db::mysql
Implements: blueprint commmon-openstack-database-resource
Change-Id: I03bd33d7c78ea69702650688c28e9d0b7cac2911
2014-08-14 08:45:41 -07:00
Jenkins
a432119ff6 Merge "Hide secrets from puppet logs" 2014-08-04 17:00:18 +00:00
Soren Hansen
c3a25eac47 Use 2.2 as the default mysql_module
Change-Id: I5ec545b62ef8ac5371ca567a8a00f5ba535efceb
2014-07-16 18:45:39 +05:30
Stefano Zilli
a0c5c271ef Hide secrets from puppet logs
Currently secrets like rabbit_password or admin_password are displayed in
puppet logs when changed. This commit changes glance_*_config and
glance_*_ini types adding a new parameter that triggers obfuscation of
the values in puppet logs.

Change-Id: I31f974a9afadef42939ee092ecba3b8f4333bb8b
Closes-Bug: #1328448
2014-07-12 02:42:13 +02:00
Liping Mao
7f439210b1 Glance registry protocol should be configurable
registry_client_protocol can't be configure in puppet now.
The default value is "http". It should be configurable.

Change-Id: I526c0892d123067362ea1b18cb8c21526a860981
Closes-bug: #1266988
2014-06-24 10:50:43 +08:00
Emilien Macchi
8156a87cd0 Deprecate old SQL parameters
SQL configuration has changed in Havana.
This patch aims to deprecate old parameters and configure using the
right way.

Change-Id: I6a800d51294ae23636636a8d1c6ccad192f45d4e
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
2014-05-08 15:25:06 +02:00
Emilien Macchi
5eb145b1c5 api: add image_cache_dir parameter
Without image_cache_dir parameter, Glance API can't start.
Default value is set to /var/lib/glance/image-cache.

Change-Id: I1cfcbf0021cfae187d9c8d78a16b18de29c97b4a
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
2014-05-07 22:27:36 +00:00
Benedikt Trefzer
394661ec4a support separate registry/api packages
on Debian plattforms there are separate packages
for glance registry and glance api. This allows
you to install api/registry on different servers.

If the packages for registry and api are the same,
(as it is the case for RedHat plattform)
the package is installed in ::glance class.
If the packages differs (as for Debian plattform),
installation of packages is done in
registry/api classes.

Additionaly this patch adds a test for unsupported
plattforms.

Change-Id: I8d4b74e8c8ad2dd7e6e2ad175326f36ff818c108
2014-04-15 21:50:35 +02:00
Xingchao Yu
e08774a281 Add known_stores option in class glance::api
In glance-api, if you use known_stores's default value and didn't use
all of the stores listed in known_stores, then glance-api service will
throw an error to point out which store missing, see more description
in related bug link.
This patchset adds known_stores option in glance::api, so that users
can configure it by their own needs.

Change-Id: If08254f419d182b82cc50137383985834f40a6fd
Closes-bug: #1259403
2014-04-11 15:32:23 +08:00
Michael Chapman
4aa86af2fc Add support for puppetlabs-mysql 2.2
Puppetlabs-mysql has been rewritten to be much
cleaner. This patch adds a new parameter for the
glance mysql class allowing users to use the new
version. Previous behavior will continue as normal
when using the old version (0.9)

Change-Id: Icdc787e325f3e86572f6930f1ab8c3d5291e67c9
2014-03-22 02:12:28 +11:00
Benedikt Trefzer
e866507782 set ssl options for glance-api
lets you set the ssl cert, key, ca for secure api
connection.

Change-Id: Ie82a46eeca27897363273aab5e58fcf6f6fe1ae0
backport: havana
2014-03-19 08:16:46 +01:00
Jenkins
31ced75334 Merge "Add ability to purge config" 2014-03-10 15:57:51 +00:00
Michael Chapman
c629376782 Add ability to purge config
This patch adds paramters to the api and registry
classes that allows the respective config files to
be purged.

This is needed when running in a configuration that
is contrary to the defaults for the platform packager,
such as rabbitmq on RDO

Change-Id: I9f8664b2098bd41b9a98eac095bfec8493ed1254
2014-02-23 18:28:55 +11:00
Sebastien Badia
1d5a298f41 Add log_dir param. by default and allow users to disable it
* add log_dir param (and configure it to /var/log/glance) by default.
  * fix log_file missing setting on glance::registry
  * allow users to disable log_dir and log_file with « false » argument.

Change-Id: I0689fa15199e69cf16ff306050776d150365a09c
Closes-bug: #1282296
2014-02-20 13:55:46 +01:00
Sebastien Badia
715216c3dc Add availability to configure show_image_direct_url
This commit:
  - Add the show_image_direct_url parameter (default to false)
  - Fix spelling errors in documentation
  - Fix documentation format (use puppetdoc)
  - Add missing documentation about params

Change-Id: I8e5cb36c19ffa4ae726642a55d8fab5c6cea07b5
Co-Authored-By: Emilien Macchi <emilien.macchi@enovance.com>
2014-02-03 10:23:46 +01:00
Jenkins
a1b2406c9c Merge "Add syslog support to the glance module" 2013-09-03 14:10:54 +00:00
Dan Bode
3fe2895a71 Change keystone tenant and user default
Currently, the default auth tenant and user for
glance are set to admin. This is not only
inconsistent with the rest of the modules (where
the tenant defaults to services and the user defaults
to the name of the service: ie: glance), it
is also inconsistent with the glance::keystone::auth
class.

This patch changes the defaults to services and glance
for both the api and registry service.

Change-Id: I3bd6390183c88213ec4bc289ca6be6f2d9c8bdd2
2013-08-30 18:09:23 -07:00
Francois Deppierraz
a79c191681 Add syslog support to the glance module
Change-Id: Ibe3a22a996016d1a80efb69fd7d401d1834d011b
2013-08-28 14:40:43 +02:00