Commit Graph

45 Commits

Author SHA1 Message Date
Takashi Kajinami 43735fb127 Replace legacy facts and use fact hash
... because the latest lint no longer allows usage of legacy facts and
top scope fact.

Change-Id: Iebdb33dd18a8f8d18840ff3e5f4608f021a78bfa
2023-03-02 10:54:36 +09:00
Takashi Kajinami 7c1dc7144b Ubuntu: Make sure python3-rados is installed
The rbd backend implementation of glance_store requires not only
python3-rbd but also python3-rados. In CentOS the python3-rados package
is installed as a dependency of python3-rbd, but in Debian and Ubuntu
that dependency is not defined and we should install python3-rados
explicitly.

This fixes the missing python3-rados package in Ubuntu, by using
the meta python3-ceph package which installs all python libraries.

Closes-Bug: #2002934
Change-Id: I620c607f09e98f1ce1d7ba34d1b797dbef8402ad
2023-01-16 14:13:54 +09:00
Takashi Kajinami 53eefc2d95 Add support for running glance-api by httpd+mod_wsgi
This change introduces a basic implementation to run glance-api as
an application managed by httpd+mod_wsgi, instead of a standalone
eventlet server.

Change-Id: I9421ec891c535503ff61ad6107a1935a32b4b263
2022-07-15 10:33:39 +09:00
Alan Bishop 6f61ecd9c5 Configure the oslo.concurrency lock_path
A recent change in os-brick [1], which is used by cinder backends,
requires external file locks. This patch adds support for configuring
the lock path, with a default value that matches the corresponding
lock paths used by other services that use os-brick (namely cinder
and nova).

[1] I6f7f7d19540361204d4ae3ead2bd6dcddb8fcd68

Closes-Bug: #1980539
Change-Id: I5ea6766656f4227a1c514777c03bbf78d4ac59cd
2022-07-01 21:47:45 -07:00
Takashi Kajinami 8deb04fca2 Avoid hard-coding OS user/group in each manifest
and replace hard-codes by definition in params.pp .

Change-Id: I8a124223168556a6e733628d97151a79bc191c86
2022-02-20 19:53:45 +09:00
Takashi Kajinami 40315729bc Re-add support for S3 backend
Support for S3 backend was removed from glance_store during Newton
release[1] but it was restored during Ussuri release[2].

This change re-introduces support for S3 backend.

[1] 4432e60af2a2bdbfc456d8d99d93d1157fc86dcd
[2] 261bad3e433860742ecdaf93a9ff5609dcbfa432

Change-Id: I82cd7f006f9c85513ee8781e6e1a526816188844
2021-12-27 02:52:19 +00:00
Takashi Kajinami 6ff5e9e8e3 Avoid usage of custom os_package_type fact
Currently the os_package_type fact is used to distinguish Ubuntu and
Debian but it's redundant and built-in $::operatingsystem should be
enough. What is worse the custom fact is not injected while composing
facts data in unit tests and has never been tested properly.

Change-Id: Ifa3a52795b9e07fc1f2e003dd33c42dc0373880f
2021-11-04 22:25:51 +09:00
Thomas Goirand b503ae5f57 Fix using python3-ceph in Debian...
... and not python-ceph which doesn't exist.

Change-Id: I0b8e2acb42ec5cab025a032001434e30669a1b74
2021-09-28 11:55:41 +02:00
Thomas Goirand 28de7383cf Get rid of the $pyvers variable
Since everyone has switched to Python3, it's time for the removal of the
$pyvers variable.

Change-Id: I3878af33cb0deeddeb3d7b299525201edcc65976
2021-05-21 11:15:11 +02:00
Takashi Kajinami 11599ba429 Remove support for glance-registry service
This patch removes support for glance-registry service, because it has
been removed from glance [1].
 [1] https://review.opendev.org/#/c/738671/

Change-Id: Id05f736dbbddaff2cb90aa6678c777b9a0318e40
2020-07-28 19:41:10 +09:00
Takashi Kajinami e6d89a6355 Drop compatibility for el6
... because it's now really old, and we don't expect any users
use it to run OpenStack.

Change-Id: Ic13ad21831e937a981cd176e11f733bec9920289
2020-04-02 10:02:27 +09:00
Tobias Urdin ed9298e996 Convert all class usage to relative names
Change-Id: I9ff8d888e367a46ab89e3668bf4ba76c4c7c127c
2019-12-08 23:06:03 +01:00
Tobias Urdin 1daac1805f Install python rbd package on Ubuntu
The glance::backend::rbd class when managing the
ceph package would install the python-ceph package
which after changing to python3 became python3-ceph.

The python3-ceph package does not exist and the python-ceph
package is only a meta package that points to all the python
2 libraries.

This changes so that it installs python3-rbd on Ubuntu but
leaves the python3-ceph package on Debian based packaging.

Change-Id: I37baa79943063a66922a9f82a286583a091122c7
2019-02-07 10:48:56 +01:00
Lee Yarwood 5cc9d67e34 Inherit pyvers from openstacklib::defaults
Depends-On: I84b767921d151a61429b2c89e6372c4b447f0d7d
Depends-On: https://review.openstack.org/#/c/633162/
Change-Id: I2ceeee6a2479fa43ead877a7130908c1dd516d30
2019-01-25 15:54:47 +00:00
yatin eb778f4276 Install python3-rbd in Fedora and RedHat > 7
Change-Id: I78a10da8f709f9126a05cb770f1a90fdcc478c22
2018-12-21 22:39:22 +05:30
ZhongShengping 1b4a2ef8f3 Fix lint
The libraries jobs fails with:
manifests/params.pp:7:ERROR: two-space soft tabs not used

Change-Id: I0899318ce29a1b3a585cb9d7fcfaca12234ef879
Closes-Bug: #1806790
2018-12-05 08:41:41 +08:00
Alex Schultz 1928f276b8 Update python packaging version for RHEL8
The glanceclient is python3-glanceclient for RHEL8

Change-Id: Id7fffe8e97a252619e5494e3c0baa61006049234
2018-11-27 07:57:39 -07:00
yatin a14d727430 Adjust glance packages name for Fedora
With [1] RDO distgits are used for glance, so
know openstack-glance-api and openstack-glance-registry
do not exist for Fedora, this patch adjusts the packages.

[1] https://review.rdoproject.org/r/#/c/16369/

Depends-On: https://review.openstack.org/#/c/605606/
Depends-On: https://review.openstack.org/#/c/605326/
Change-Id: I696c6f0c76b257fa30e8afc691eef5ed69cece14
2018-09-27 09:13:37 +00:00
yatin d3e1dd5529 Update glance packages name for Fedora
For services starting from Fedora, RPM specs from [1]
and repos [2] would be used. Do necessary changes in
glance packages names.

Also do not hard code packages name, instead take them
from glance::params.

[1] https://github.com/openstack/rpm-packaging/blob/master/openstack/glance/glance.spec.j2
[2] https://trunk.rdoproject.org/fedora/current/

Change-Id: Ibee5776116ebecf9f1e28632c4ab6317075ca868
2018-06-26 12:11:20 +05:30
Thomas Goirand e47ddb327b Debian is using Python 3
Change-Id: I45f20d063d0626b2f744a5e63e8e999a6a356c03
2018-04-10 11:49:45 +02:00
Emilien Macchi 3bc17a62f9 Add group to policy management
The move of policy.json into code means the file may not exist. We've
added support to ensure that the file exists in the openstacklib but we
need to make sure the permissions are right for each service. This adds
the group information to the policies so it works right.

Change-Id: I2101ddb29e48733a5a5982daafe074ce1c983e9c
Co-Authored-By: Alex Schultz <aschultz@redhat.com>
2018-01-12 03:27:09 +00:00
Denis Egorenko 1123f79809 Drop Glare service from puppet-glance
Glare service is now totally dropped from Glance [1] and now should
be configured only with puppet-glare module.

[1] https://review.openstack.org/#/c/427535/

Change-Id: I695ad518285a92a80dd7a9d5bebd11e804359224
2017-09-20 20:31:08 +00:00
Carlos Camacho 77e18dae1e Remove unnecesary spaces in log messages.
Spaces added by mistake in some log messages.

Change-Id: I1e3402d38de0b87c15f4d5d1c67bc2f7e26ef8cc
2016-09-26 09:36:57 +02:00
Carlos Camacho 3963d27ef4 Fix puppet-lint before upgrading gem
Removing puppet-lint warnings
in favor of upgrading to latest gem

2016-09-13 21:08:47.767844 | manifests/api.pp:558:WARNING: line has more than 140 characters
2016-09-13 21:08:47.767929 | manifests/params.pp:35:WARNING: line has more than 140 characters
2016-09-13 21:08:47.767948 | tests/site.pp:6:WARNING: unquoted node name found

Change-Id: I3a8a01057befa358867eb0396e19c9b763e2b13a
2016-09-16 19:13:44 +02:00
Sofer Athlan-Guyot 5a83a8d56d Include openstacklib defaults manifest.
This provides a mechanism for setting default across all modules.

Change-Id: I28c8f651f8c81de6ab2d3cb73ac67d57cad0a264
Related-Bug: 1599113
2016-07-08 08:56:03 +00:00
iberezovskiy 558fa4d212 Configure oslo related parameters using puppet-oslo module
Database, logging and policy parameters for api, registry
and glare services are configured from oslo defines now.

Change-Id: Iee5ee3adfaf9cef1dd3f634806d47c3c52c648fb
2016-04-14 14:20:18 +03:00
Denis Egorenko da8a3aa022 Add Glance Glare API service
In Mitaka Glance v3 was moved to stand alone service [1] - now
it's called Glance Artifacts Repository (Glare).

This patch adds appropriate service managing, package installation,
configuration and related spec tests.

[1] I5b7bd4cdcc5f2a40fc4a5f74bcc422fd700c4fb0

Change-Id: I3371d1d57486e79ccfae565417f2195d3ae66bc9
Closes-bug: #1555697
2016-03-22 18:50:29 +03:00
Jenkins 0902c3dccd Merge "Support of PyMySQL driver for MySQL backend" 2015-12-07 23:46:20 +00:00
Jenkins 72749e7a1d Merge "Introduce glance::db class" 2015-12-07 23:45:49 +00:00
iberezovskiy b6a9a2fd93 Support of PyMySQL driver for MySQL backend
Add ability to use python-pymysql library
as backend for MySQL connections.
Update acceptance tests to use pyMySQL.
Docs: https://wiki.openstack.org/wiki/PyMySQL_evaluation
The same implementation as it's done for keystone:
https://review.openstack.org/#/c/242134/

Change-Id: If7a19e4c5492ea2464358144e706c62ee2c8a78a
2015-12-03 13:04:57 +03:00
Denis Egorenko d6d4ddbe8f Introduce glance::db class
Another modules already implement a <component>::db class that
is not implemented in Glance. This commit aims to apply here the same logic.

Change-Id: Icd65a3303ccd512d5e34598d3e3a78bc924f8128
2015-12-01 19:12:34 +03:00
Nate Potter 166af71b1f Correct db sync for backwards compatibility
In the previous patch https://review.openstack.org/#/c/241003/4
the default value for the config file when running glance-manage
db sync was changed. This patch restores the old default value
for backwards compatibility.

Change-Id: I1c17461bf7f4922ece41673f3f726ec00b0cd4c7
2015-11-19 16:31:13 +00:00
Crag Wolfe ef19c5584d The package python-ceph no longer exists in el7, use python-rbd.
Change-Id: I885a11fd33577618138ddffaf0de196e7bb62a77
2015-06-08 14:35:52 -04: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 5f15e05704.

Change-Id: I7ba146714d1b0e8d461c556eff5a9f8c4ad9627f
2015-04-17 13:37:04 +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
Gaudenz Steinlin c51c22770d Command parameter to sync the correct Database
Without the correct --config-file parameter the glance-manage db_sync
command does not sync the correct database. The default without any
configuration is to use an SQLite Database at /var/lib/glance/glancedb.
This is most probably not what's intended.

Change-Id: I61f4e47ad082b48ee83b17df70e9856f640083b1
2015-02-23 13:06:35 +01: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
Mathieu Gagné 7da1f3bf2d Add glance-cache-cleaner and glance-cache-pruner
* glance::cache::cleaner: Installs a cron job to remove stalled and
  invalid cached images.
* glance::cache::pruner: Installs a cron job to keep the image cache
  at or below the maximum cache size.

Change-Id: I99cb1809446f1a1126454ff5fa5bdceb8044ee28
2013-07-24 18:11:29 -04:00
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
2013-07-08 15:01:10 +02:00
Jenkins f2313ce6af Merge "Do not initialize version_control for database" 2013-07-06 01:08:57 +00:00
Mathieu Gagné ca13c19b8a Do not initialize version_control for database
glance-manage version_control is not required since Folsom.

Fixes: bug #1172456
Change-Id: I39d3df92c91341ff3869d5e9da05d44714aaf54f
2013-07-01 00:27:56 -04:00
Dan Bode 53d2b7eeb6 glance::client was not installing the correct package
The actually glance executable is not installed as a part
of the python-glance package, it is installed in the
python-glanceclient pakcage.

Going through the RDO packages, I do not even see a package
called python-glance.

Change-Id: I35c71fc5da595a695b10cb2ecc5ad27f5131bac8
2013-06-20 10:22:27 -07:00
John Chilton 9d8a1fb56d Specify glance client package name in params.pp. 2012-05-03 10:36:15 -05:00
Dan Bode 0f751551db Make the db_sync command different per distro
Ubunutu has packaged its own special commands to deal with
db migrations. This commit ensures that the db sync command
is per distro.
2012-04-12 15:21:59 -07:00
Dan Bode 2167074954 Add fedora support for glance
This commit adds fedora support for glance
2012-03-18 11:57:04 -07:00