Commit Graph

45 Commits (1e09e553edf091f53b3bbfe667630adc236cf223)

Author SHA1 Message Date
Clayton O'Neill 18b010975c Add hooks for external install & svc management
This adds defined anchor points for external modules to hook into the
software install, config and service dependency chain.  This allows
external modules to manage software installation (virtualenv,
containers, etc) and service management (pacemaker) without needing rely
on resources that may change or be renamed.

Change-Id: If683fbd098e701a3c4da91941cf818b18b41b209
7 years ago
Alexander Arzhanov dbb86cf076 Correction configuration due with the new parameters
- vmware_api_insecure deprecated - use vmware_insecure
- vmware_datacenter_path and vmware_datastore_name
  deprecated - use vmware_datastores
- update tests

Change-Id: Ie3d544b41f0736cbaedce26e5b52558adf2f29b4
Closes-bug: #1537017
7 years ago
Mykyta Karpin 037545fb3e Switch glance to os_service_default facts
Change-Id: If860858e2bdfe0387b6a3260b81a97625d05b9fe
7 years ago
Jenkins 4923d0441c Merge "Implement ability to pass CA bundle certificate for vCenter server" 7 years ago
Igor Zinovik a1fbd1a42c Implement ability to pass CA bundle certificate for vCenter server
Glance with vsphere backend by default verifies vCenter server TLS/SSL
certificate using system truststore (e.g.
/etc/ssl/certs/ca-certificates.crt). Here is a problem with connection
to vCenter: if we consider case with default installation, then vCenter
starts with self-signed certificate which cannot be verified using linux
shipped CA bundle. Glance starts, but fails to do any useful work,
because it generates SSL errors due to inability to verify vCenter
TLS/SSL certificate.

User can provide its own CA bundle file for Glance to verify connection,
but currently puppet-glance does not support this. This patch aims to
fix this problem, it:
- introduces new optional parameter $vcenter_ca_file which undef by
  default, which means that value will not be written to glance-api.conf
- it switches default value of vmware_api_insecure to True
- provides rspec tests for changed behaviour

Change-Id: Icef5c35ad1128df465da548dd880a0dfeeadb5e1
Related-bug: #1559067
7 years ago
Dan Prince 006c32a38f Add options to set swift auth domains
We need options to be able to set the user and project domain
when using keystone v3 credentials for the swift backend. Without
these options keystone v3 swift will fail.

Change-Id: Id384b0eca750e0946b42cb8ccb60a7f9ed64d21a
7 years ago
Denis Egorenko ea0c4d5b51 Add posibility to configure Glance backend settings for Glare service
This patch adds posibility to configure backend settings for Glare
service.

Since Glare service is experimental feature, it can be usually disabled
for deployment. Hence was added a optional parameter 'glare_enabled' for
each backend manifest. So, if Glare is enabled glance glare config
will (and should) have same backend options as main glance api config.

Change-Id: I112a332f490d2e57eef5fa7d41d465c0eb89da04
Related-bug: #1555697
7 years ago
Nate Potter 22231b2d66 Implement multiple store configuration
This patch moves the default_store config option to the glance::api
class, and makes it possible to configure more than one store while
supplying a value for the default store to be used. If only one store
is given for glance_store/stores, the default store is automatically
set to be the same value. If multiple stores are given and no default
store is explicitly set, the config will fail and ask the user to
provide a default store.

Change-Id: I28a79ae36e673a3537ea16910d338666b65c80f7
Closes-bug: #1481460
Co-Authored-By: Alex Schultz <aschultz@mirantis.com>
7 years ago
Denis Egorenko b3160011aa Use http protocol by default in auth_address for Swift backend
This commit explicitly sets default protocol to http in
swift_store_auth_address variable for Swift backend, because without
any specified protocol it will use https by default. That's not
consistent with other default values for protocols in auth addresses.

Change-Id: I232536d179db92d82f1c7459a0f13e5ca5576f42
7 years ago
Denis Egorenko c8b7d3319b Use glance-swift conf for swift backend
For working with Swift backend, Glance needs authentication parameters,
which are supplied to Swift when making calls to its storage system.
Glance will use information from the file specified under parameter
swift_store_config_file. When this parameter is set to the same file
(glance-api.conf), we have lot of non-critical errors in glance-api
log, because of 'Invalid format of swift store config'.

The same problem, when we have RadosGW.

Change-Id: I18ee8f68f7ce793d2580685e79ed636556c57ddd
Related-bug: #1540890
7 years ago
Ben Nemec c324788ff6 Fix Swift store configuration
The swift_store_config_file option is being set in the DEFAULT
group instead of the glance_store group where it is actually
defined in Glance.  This causes configuration of the Swift store
backend to fail because the configuration is not found by the
check here:
https://github.com/openstack/glance_store/blob/master/glance_store/_drivers/swift/utils.py#L66

Moving the option to glance_store makes the Swift backend work again.

Change-Id: I3af198e5015df1d626c4a5aaccb3b4e5781f56b8
Closes-Bug: 1532352
7 years ago
Denis Egorenko 09fec793da Update Glance Swift backend configuration
Currently, when Glance uses Swift as backend, all references to
images saved in database with credentials, like:
swift+http://services%3Aglance:EF3tluYM@192.168.0.2:5000/v2.0/glance/049cd701-77

The problem is that when we want to change Glance credentials we can't use
old images anymore, because new credentials and creds in database are
different. For resolving this issue was implemented patch in Glance [1]
and couple of patches in Glance_Store [2,3]. The main goal is using
separate section (file with such section) for providing credentials
for access to Swift and do not place reference with credentials to
database.

All changes above are covered in docs for configuring Swift backend [4].

Also glance_cache_config now is not using for configuring Swift backend,
hence all related parameters for this config removed.

[1] https://review.openstack.org/#/c/98722/
[2] https://review.openstack.org/#/c/193422/
[3] https://review.openstack.org/#/c/108036/
[4] https://review.openstack.org/#/c/242583/

Change-Id: Iaf0c1c6f2188c84267e41d2d4f9bda0dbf3dccad
Related-bug: #1499754
8 years ago
Emilien Macchi 57009efc4a file backend: do not inherit from glance::api
Do not make ::glance::backend::file inherits from ::glance::api because
::glance::api has parameters.
The class was broken until now.

Also, we need to include glance::backend::file to have
'filesystem_store_datadir' parameter in Glance config, since we're using
file backend.

If you don't provide this parameter, Glance fails to start:
glance_store._drivers.filesystem [-] Specify at least
'filesystem_store_datadir' or 'filesystem_store_datadirs' option

Change-Id: Iba6791199f7a2c7fef24b1e8752ed0b564b8512f
8 years ago
Mike Dorman 594f56477f Add S3 backend configuration for glance
Add a glance::backend::s3 class for configuring the S3 backend
for Glance.

Also includes a boolean default_store parameter to control
whether or not S3 should be confiured as the default backend
store.  Default is true to follow the behavior of the swift
backend configuration class.

Change-Id: Iaba726932d11396bac3bdf1d671c374339f8973b
8 years ago
Maksym Yatsenko 323162d6c9 Add rados_connect_timeout parameter in glance config
It adds rados_connect_timeout parameter with default value
to glance config, which tells how much time glance-api has
to wait before close the connection.

Setting 'rados_connect_timeout' <= 0  means no timeout.

A CR that adds "rados_connect_timeout": #200554
change-id: Ib44f74063d5a8332c6b5f3e15bcfa044c86bef9b

Change-Id: I2352bdec2a3339785eb38249afe385c5e496457c
8 years ago
Bartłomiej Piotrowski 3458416af1 Add swift_store_region parameter to glance::backend::swift
- Allow glance to connect to swift in different Region

Change-Id: I7f00b9cc20cb2d11eacbfaefb86f998247cf3454
8 years ago
Denis Egorenko 05b0969c4d Fix section names for parameters
Some parameters have wrong (or deprecated) section names.

Change-Id: Ib44cf7825de33dc251812cb9138b821a397d77e7
8 years ago
Stanislaw Bogatkin 611045f213 Add endpoint type parameter
To point glance swift endpoint type, one optional parameter
was added.

Change-Id: I25ce5d9d119804f1aca5b5567be46750050ebacd
Closes-Bug: #1458811
8 years ago
Xingchao Yu 101ca5b088 Move rbd related options into glance_store section
From Juno release, rbd related options has been move into
glance_store section.
See more info:
http://docs.openstack.org/juno/config-reference/content/section_glance-api.conf.html

Change-Id: Ibf38ee27f0ad08592dd05650c37613cee0100a7d
Closes-Bug: #1436699
8 years ago
Sebastien Badia 0d83409381 Fix lint issues (doc, metadata, manifests)
Add puppet parameters lint (with puppet-lint-param-docs gem) and fix
missing documentations, this commit also fix metadata.json file (SPDX
license, and open dependencies).

Change-Id: I0d590b930a8d0263c3a74d861b9786770be7d183
8 years ago
Clayton O'Neill d72e768a10 Add Puppet 4.x lint checks
This changes the puppet-lint requirement to 1.1.x, so that we can use
puppet-lint plugins.  Most of these plugins are for 4.x compat, but some
just catch common errors.

Change-Id: I3d21236d5bf3b0b6c625e38e20492d35aaa13307
8 years ago
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
9 years ago
Jenkins fced3226c2 Merge "Add support vSphere Datastore backend for Glance" 9 years ago
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
9 years ago
Stepan Rogov bb8e5301ed Add support vSphere Datastore backend for Glance
Created class for this type of glance backend

Change-Id: I88478bf4ec5d9a4c65344fbdc04ac973a31f46ea
9 years ago
Aleksandr Didenko baa47b4bba New parameter for swift backend
New parameter is 'swift_store_large_object_size'.

Sometimes default value (5G) doesn't work when user attempts to
make a snapshots with size > 300 Mb. So it may be usefull to have
a possibity to adjust this parameter to your needs.

Change-Id: I08336b91b0cd294a86326605fb6c28653e8eedb8
9 years ago
Xav Paice b909152922 Add $package_ensure to glance::backend::rbd
Previously for the python-ceph package ensure was hard coded to 'present', but
in some circumstances we want to set the ensure value same as for the glance
package itself.  This adds that in.

Change-Id: Ib5fc0b3d916eef93c810b0ee3fcecf0d9b80218e
9 years ago
Benedikt Trefzer 5dd8404764 deprecate show_image_direct_url in glance::rbd
show_image_direct_url conflicts with same parameter
in glance::api.

Change-Id: I65a4158bcb271324f8ca40a454d21b167c4f5151
9 years ago
Donald Talton 779496ecad Added copy-on-write cloning of images to volumes.
This enables COW cloning of images into rbd-backed Cinder volumes.

Change-Id: Ibb114c90f2d5a2d258b25155cc800ab7ce77adfc
9 years ago
David Moreau Simard 30fd048fc8 Make sure swift backend in-file documentation matches actual code.
Simply making sure that the in-file documentation matches the
manifest to avoid any confusion.

Change-Id: I0b890f575ec1c33dbd515d2454023bfa3ade041b
10 years ago
Emilien Macchi eb7c33bb1f Add Cinder backend to image store
Cinder is an potiential backend in Glance.
This patchs aims to:
- create glance::backend::cinder
- improve spec_helper using shared_examples

Change-Id: I15e5de8281ff2e60465fedda97d9c9ccf808386c
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
10 years ago
Xingchao Yu 6dc226bbde Update glance::backend::rbd options
This patch is aim to add rbd options in glance-api.conf
and also update related spec test.

Fixes bug #1221074

Change-Id: Ifcbaf15ab4a7aedb074abac42941181e53d538c4
10 years ago
Emilien Macchi 3d3c342bb3 Clean all warnings for puppet-lint gate
Change-Id: If143d40464af60bcba4b69705ef48c1206fead02
10 years ago
Marc Koderer bf19533072 Add support for rbd in glance
Add support for Ceph/rbd in glance.
Unit test added to spec.

Add package dependency "python-ceph" accordingly to a patch from
Michael Jeanson <mjeanson@gmail.com>.

Change-Id: I0908cde951994db6aba74d2ce3415126c429a76e
10 years ago
Jenkins 3a0003f9bb Merge "Configure glance-cache.conf with file backend" 10 years ago
Mathieu Gagné fe39edd577 Configure glance-cache.conf with file backend
glance::backend::file was not properly configuring
filesystem_store_datadir in /etc/glance/glance-cache.conf
when using file backend.

Change-Id: Ie8d3259de429089f2f00fbafd2e5cbf90c069263
10 years ago
Mathieu Gagné 95dd566b9b Configure glance-cache.conf with swift backend
glance::backend::swift was not properly configuring
swift_store_* in /etc/glance/glance-cache.conf
when using swift backend.

Change-Id: I7b46dd2bd1ff050759b11cbc9c3c7068e4c3e01e
10 years ago
Mathieu Gagné b04232aecb Use boolean instead of string
Change-Id: Ie508c5f6a98277b650307a1782ce3fde9d2bca1e
10 years ago
Dan Prince 5dbcb47c50 Add swift_store_auth_version to swift backend.
Updates the glance swift backend to support configuring the
swift_store_auth_version setting. The default value for this is '2'
(which matches the glance config file defaults).

As part of this change I am also updating the default value
for swift_store_auth_address to use 127.0.0.1:5000/v2.0/ (keystone).
This makes sense because the previous value would have required
us to set swift_store_auth_version by default to 1.

Change-Id: I865712914dd0506b2722ab8da3e1c56d7d9f433a
10 years ago
Dan Prince 3ce02dbd69 Make swift backend not enherit glance::api.
Having the glance::backend::swift class inherit glance::api
makes it unusable (it causes puppet errors due to missing password
which is required by glance::api).

Since this module is mainly just useful to configure sets of
swift configs it can stand on its own.

Change-Id: I549087e2e9e9e1abd43bd0f78e4f4dee71490ace
10 years ago
Dan Bode 74b15ec273 fix backends 11 years ago
Dan Bode db7de69bd5 Convert to ini file management
- Add native types to manage all existing ini files
- remove all unused templates
- convert all concat with ini_setting resources
- remove all concat code
11 years ago
Branan Purvine-Riley 87740b26ae fix old puppet 11 years ago
Dan Bode 151493f294 Remove backend class
The backend class has been removed and the related
backend config service has been coupled with the
file and swift classes. This is to reduce the code
complexity.
11 years ago
Dan Bode 6c29550dcb Split api.conf file into fragments
This commit splits the api.conf template into
fragments to better allow for logical separation
for configuration sections.

The main motivation for this change is to allow
differrent implementations of services in glance to
be split up into seperate configuration interfaces.

The primary examples of this are the notifier and
the storage backend. Each of these services have
multiple potential implementations. This allows
those implementations to be implemented as separate
class interfaces and saves us from having to have
all of the possible config parameters to be specified
as parameters of the api class.

It creates a define: glance::api::config that can
used to configure file fragments for
/etc/glance/glance-api.conf

It also creates configuration interfaces for
configuring the following config sections of api:
backend::swift, backend::file, notify::qpid,
notify::rabbitmq.
11 years ago