Commit Graph

194 Commits

Author SHA1 Message Date
Ghanshyam Mann 17c5f0c939 Retire openstack-chef: remove repo content
OpenStack-chef project is retiring
- https://review.opendev.org/c/openstack/governance/+/905279

this commit remove the content of this project repo

Depends-On: https://review.opendev.org/c/openstack/project-config/+/909134
Change-Id: I7a2655cab7bc4caad707f5f98174aae0b659fd4f
2024-02-17 20:51:02 -08:00
Lance Albertson d911425d0a Chef 17 support
- Require Chef >= 16.0
- Remove bind from Berksfile
- Update copyright years
- Enabled unified_mode

Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-identity/+/814051
Change-Id: I849792383efdcced72e399788ca849c102b8d510
Signed-off-by: Lance Albertson <lance@osuosl.org>
2021-10-14 12:04:59 -07:00
Lance Albertson d60c618b4e Cookstyle 6.19.5 fixes
Depends-On: https://review.opendev.org/756168
Change-Id: I6215914fbc6d2a1470b5b696b593c915f1b0572f
Signed-off-by: Lance Albertson <lance@osuosl.org>
2020-10-05 17:15:04 -07:00
Lance Albertson 4ecdad32bb Chef 16 updates
Depends-On: https://review.opendev.org/747556
Change-Id: I9ed3850bcd2093433420ef9870abf6dcc76f2294
Signed-off-by: Lance Albertson <lance@osuosl.org>
2020-08-27 17:22:07 -07:00
Lance Albertson a78e903e12 Updates for Train
Changed
- Update release to train
- Migrated to using multi-store feature which has been deemed stable

Fixed
- Cookstyle

Removed:
- Unused rubocop rules

Change-Id: I19c1ff463a70a81e4d08bacb86e480e0a3951789
Depends-On: https://review.opendev.org/731859
2020-05-29 17:17:41 -07:00
Lance Albertson dad981f9ce Stein fixes
- Cookstyle fixes
- Refactor Berksfile to use groups so we can exclude integration testing
  cookbooks
- Update documentation
- Enable sensitive resources for the execute resources in
  openstack_image_image and template[/etc/glance/glance-api.conf] to
  improve security.
- Update delivery configuration to exclude integration cookbooks
- Set glance_store/stores, and update auth_type to password as described
  in the upstream documentation [1]
- Fix ChefSpec output

[1] https://docs.openstack.org/glance/stein/install/install-rdo.html#install-and-configure-components

Depends-On: https://review.opendev.org/706151
Change-Id: I695b576267bc220b0b70011ab035520fc18ff955
2020-03-24 10:22:19 -07:00
Lance Albertson cf08cbb527 Remove deprecated registry service
The glance registry has been deprecated upstream [1] and needs to be removed.
This removes all references to the registry service and moves the db migration
to the api recipe.

[1] https://blueprints.launchpad.net/glance/+spec/deprecate-registry

Depends-On: https://review.opendev.org/690410
Change-Id: I356aa65e63032e7866470ad507e5c9bce793a52b
Signed-off-by: Lance Albertson <lance@osuosl.org>
2019-10-28 11:14:18 -07:00
Lance Albertson 13c672e052 Move glance-manage db_sync to api recipe
This is needed due to the registry being deprecated upstream and will be
removed.

Change-Id: I5a291c11816e1b6a7d0d62855785c7e2408c5f87
Signed-off-by: Lance Albertson <lance@osuosl.org>
2019-10-28 11:13:55 -07:00
Lance Albertson 59b082a6d0 Fixes to support fog-openstack-1.x
fog-openstack-1.x already appends "auth/tokens" so we no longer need to
do that.  In addition, comment out endpoint type until this PR [1] gets
merged and released.

[1] https://github.com/fog/fog-openstack/pull/494

Depends-On: https://review.opendev.org/666176
Change-Id: Ic80d08b6ed0180ca9513e4b4e230e787b2f5c52e
Signed-off-by: Lance Albertson <lance@osuosl.org>
2019-07-03 16:05:13 -07:00
Jens Harbott 187d3f0198 Drop admin endpoints and cache dirs
The admin endpoints offer no special functionality, users may talk to
the public endpoints instead. The only historic use case has been the
keystone v2 admin endpoint, but with keystone v3 API, even that is no
longer needed.

Also stop creating cache dirs that were only needed while keystone
supported PKI tokens.

[0]
https://opendev.org/openstack/openstack-chef-specs/src/branch/master/specs/ocata/all/drop-admin-endpoints.rst

Depends-On: https://review.openstack.org/652050
Change-Id: I58f1c442dc472c8e96ca7bfaf03577d14ca65cd5
2019-04-29 10:53:43 +00:00
Samuel Cassiba e7f5813c75 Use internal identity endpoint for services
- uses internal Keystone endpoint for service-level communication
- removes use_inline_resources

Depends-On: Id74966d9f1279f725bc41c08e434230a7845bbc1
Depends-On: I161af1074cd17f2e3d2d2cf0b37a0c5fa1015fd3
Change-Id: Iabb4f3549fed0d8e0a5da0beb348ca29e5a14557
2018-07-16 15:18:02 -07:00
Samuel Cassiba 7696912e7a Simplify identity endpoint
Per the Keystone Install Guide[1] the admin endpoint is superseded in
favor of a single public endpoint. As a result, the admin endpoint is no
longer deployed by default.

[1] https://docs.openstack.org/keystone/queens/install/keystone-install-ubuntu.html#install-and-configure-components

Change-Id: I7e1ee2fa32e5d9b816bd3624524e6680a278ed5d
Implements: blueprint simplify-identity-endpoint
2018-06-14 19:15:20 -07:00
Samuel Cassiba edc140b189 image refactor for Pike and Chef 13
- implemented foodcritic and cookstyle corrections
- deprecated node.foo.bar method access for node['foo']['bar'] bracket syntax
- deduplicated resource calls for identity registration

Implements blueprint modern-chef

Change-Id: If7d3ed298408d183a2d2ebaa1f9b5df148ac53e3
2017-12-10 14:37:40 -08:00
Roger Luethi 6ab8aa8ca7 Remove domain role from glance service user
This patch removes the openstack_user resource with :grant_domain
action. A user is always created within a specific domain; such a
membership cannot be tacked on later. This resource gave the user the
role intended for their project for the domain (i.e., for the Default
domain instead of for the service project).

We add the domain_name attribute that creates the glance user in the
desired domain. Note that this change needs a sufficiently recent
openstackclient cookbook -- otherwise the domain_name attribute is
ignored (which does not matter as long as the glance user is to be
created in the Default domain).

Change-Id: I07086d9ab65581cdcd77d402fe0d513b03a0af69
2017-11-13 15:08:03 +00:00
Roger Luethi 82056093ac Remove superfluous role_name arguments
This patch removes the role_name when using openstack_user's :create
action (it gets ignored by the target method).

Note that the spec test would still pass if only the line in
identity_registration.rb (but not the test) were changed, because the
code that actually does grant the role to the resource is executed right
after user creation and before any tests check the resource for the
existence of the role_name attribute. In other words: if the argument
were required in a call but only supplied in another call, the spec
tests would not catch it. Something to watch out for.

Change-Id: I6d98e0603cc4d8fa2dd21cd402adbbe888fbe4f3
2017-11-10 10:09:05 +01:00
Samuel Cassiba 7eb5fd6113 Initial image Pike updates
- Switched default linter to cookstyle
- Freshened image locations
- Renamed rake tasks to align with Chef conventions
- Normalized template comment

Change-Id: Ib99d9b12f036ff52e44a270455f0d2e16561f98a
2017-08-25 09:42:35 -04:00
Samuel Cassiba 5d7a11aeb3 Style and lint fixes for newer chefdk, deprecated Gemfile
- Removed ancient Gemfile
- Style and lint fixes to support newer chefdk
- Rewrote metadata.rb for readability

Change-Id: Ie61ae3ca685738fe1de98fc9223d3e39535ce000
2017-08-02 02:18:08 -04:00
Christoph Albers d6735b4b5f Added option to upload images with specified ID
- updated rubocop_todo
- added upload_image_id attribute
- updated specs

Change-Id: I29fd680ca4b16160a015fbf809cdd81860df9eeb
2017-01-11 14:23:44 +01:00
Christoph Albers 9dd38224a9 RPC_backend / transport_url workover
- removed deprecated rabbitmq attributes
- added rabbit_transport_url

Change-Id: I2560f8010366d9c73fb9d6e2d6f6555d0c4ee7a1
2016-12-20 11:45:25 +00:00
Samuel Cassiba f428ecb5a2 Deprecated python-glanceclient
- deleted client.rb
- deprecated python-glanceclient references

Implements blueprint newton-xenial

Change-Id: I72dbd7d85cf745d2ca32c405df26b70bb353e1ed
2016-12-14 19:54:39 -08:00
Christoph Albers 419e7bc05e use_cookbook-openstackclient/identity_v3
- Now use cookbook-openstackclient to create endpoints role service and
  user
- added domain creation and access granting
- added values to work with identity_v3
- rewrote specs to work again
- updated readme
- added domain to image-upload
  edited resource / provider

Change-Id: If7b4d6e563081a0be9957353d73ef61a9688df56
Depends-On: I0f8955f05de9b33711c54b9a198f45018cceb8e1
2016-10-10 12:58:54 +00:00
Samuel Cassiba a08aecef1d Style and lint fixes to support newer ChefDK
Change-Id: I0a3872cd3a21c31b5e3a7b6190f911280e9ed909
Depends-On: I6ce4587caa3ae68ddbd3ef1a521aaf46f4840b2c
2016-07-08 10:08:37 -07:00
Jenkins c5f518bd75 Merge "Use admin user for glance uploads" 2016-04-08 08:01:53 +00:00
Mark Vanderwiel a2ee560a2b Restart glance immediately
Since glance could be used to upload images,
make sure it's restarted immediately within the recipe.

Change-Id: Ie4a742a2a8aaeeec2886fcc0513e654d0237997c
2016-04-07 10:23:32 -05:00
Mark Vanderwiel 4a0a8ff298 Use admin user for glance uploads
I think it's more correct to use a normal user, admin,
to upload images, instead of using the service accounts.

Change-Id: Ifb1411a4392d04cd9a5e867ffc95327adf4ea4ea
2016-04-07 13:59:20 +00:00
Christoph Albers 3298fe78a1 invert the order of endpoint and bind_service attributes
* endpoint type (admin, internal, public) and service (identitiy, network etc.)
  was switched during refactoring, this patch reverts this unintended switching
* edited bind_service service type from public,internal,admin to 'all'
  for default binding to just one service
* use bind_address method from common

Change-Id: I4f97b659361dabd7fac216305d2aad2f1bb98f51
Depends-On: Iec485deaf415e4187a323435cce2b6bbadfc5d42
Depends-On: Ia5bddfc5e2fd77cd6e9e855c680b079f78fc1c3f
2016-02-16 16:36:05 +01:00
Christoph Albers 6823eb84cb refactoring final step
* removed rubocop exceptions in recipes and regenerated the
  .rubocop_todo.yaml containing all remaining exceptions
* removed fedora, suse as supported platform
* adapted optimized endpoint logic
* moved endpoints from openstack-common to default attr
* bumbed openstack-common and identity to higher version
  due to refactoring
* moved version up to 13.0.0
* adapt the specs (unit tests) to work again
* added new logic into templates/default/glance-*.conf.erb
* refactored attributes throughout all recipes that were connected to
  the attributes used for the glance-*.conf.erb template to adapt the new
  template attribute syntax
* moved all attibutes/default.rb that were used in glance-*.conf.erb to
  attributes/glance_*_conf.rb
* removed all attributes from default.rb and glance-*.conf.erb which are set
  as default in attributes, openstack doc and used to render the template
* seperated filestore config and deployment from default api recipe and made it
  optional (e.g. swift_store)
* removed service config templates in favor of openstack-service.conf.erb from
  common cookbook
* removed default support for most filestore backends in favor of an easily
  wrappable cookbook structure which allow the configuration of filestore
  backends in wrappers

Depends-On: I3262b2e6f792f37c32a446e6567790b82bdd4613
Depends-On: I0547182085eed91d05384fdd7734408a839a9a2c
Implements: blueprint cookbook-refactoring
Change-Id: Ifa5a7f4e1df47a3961976e64f654224864c3dcb4
2016-02-08 15:08:52 +01:00
Jan Klare 6905c719b9 create cache dirs for api and registy
* current logic with 'directory ::File.dirname node.attr' will create resources
  with the same name 'directory '/var/cache/glance', but different parameters
  (so only the first one will be executed) (recipes/api and /registry)
* fixed logic and specs to actually use the full node attributes and create the
  two caching directories

Change-Id: I6289bf7a8b7b1a998ad4cefef04021ec02fe4172
2015-09-28 12:55:21 +02:00
Lan Qi song f707472c4c Ability to auto generate the filesystem store metadata file
After this path has been merged : https://review.openstack.org/#/c/190265/
The compute service has the ability to copy the image data from the mountpoint
directly which can save image download time.

This patch make the metadata file can be generated automatically if user
specify the id and mountpoint.

Change-Id: Ibd4cc2d15a97f8018fc7f0aa19e4f2c9d1da285c
2015-07-13 23:30:29 +08:00
Mark Vanderwiel abc47a3bb5 Replace deprecated get_secret
Use get_password 'token' instead.

Partial-Bug: #1467662

Change-Id: I8c9ff7cb17fa1d945e794ee386d24c393ef97a10
2015-06-25 01:26:27 +00:00
Mark Vanderwiel 3ede834e41 Use correct endpoint scheme for api to registry connection
The ['openstack']['image']['ssl']['enabled'] was being used for
both the API/Regsitry services AND the APIs internal connection
to the registry.

Need to allow for separate control for enabling SSL for API and Registry.
Added attributes to cover this.

And the APIs internal connection to the registry needs to be
configured correctly based upon the Registry's internal endpoint scheme
(http or https).

Change-Id: Ieed28ad891192d81356c0d40ba48d70517087950
Closes-Bug: #1462388
2015-06-22 14:29:11 -05:00
Mark Vanderwiel e53ae638f1 Cleanup minor rubocop offenses
Cleaned up all the minor rubocop issues, the ones left relate to
complex logic and what I think is a bug in rubocop for nested
vs compact modules/class definitions.

Change-Id: I6097cd1032a5b2305d9a6ca8cb2e2b19f6a57a1e
2015-05-29 10:09:57 -05:00
Mark Vanderwiel 1600d6a14d Only admin can create public glance images
With change to use the correct "service" role for service users,
they can no longer create public images.
For this recipe, need to use admin for public images.

Added a public flag to the lwrp such that other non-admin
accounts can create images.   Made a note in the client cookbook
patch that this support needs to be merged in there.

Change-Id: I99e2febfdbf6f4bab260d897216f4ae768cf3315
Related-Bug: #1436050
Closes-Bug: #1441292
2015-04-07 13:51:22 -05:00
Jenkins 4c8deb8c68 Merge "Use new "service" role instead of "admin"" 2015-04-06 15:39:28 +00:00
Mark Vanderwiel bebda68f46 Use identity_uri_transform for identiry_uri support
Remove deprecated keys and use identity_uri via the new transform
helper method.

Also, cleanup specs for endpoint testing to make sure Common is
fully tested.

Change-Id: I979593906733e2c56b0114de298aa84d19227e59
Implements: blueprint identity-uri
2015-04-03 06:08:27 +00:00
Mark Vanderwiel 3c5947030f Use new "service" role instead of "admin"
Change-Id: I32508a10eb452f722e0111399e1c02dbc8c71346
Partial-Bug: #1436050
2015-03-25 08:14:39 -05:00
Mark Vanderwiel 9a2fb451d8 Remove api-paste.ini as it provided by package
Since we have no attribute overrides for api-paste.ini, no
need to have a template resource for it.  Until we need to
have some attribute, removing this will take away burden of
keeping in sync with base openstack code.

Change-Id: I8ebf93a04916789afc8125303e372ed285b0d799
Related-Bug: #1433152
2015-03-17 11:08:00 -05:00
Ken Thomas 31e7f0d232 Use new common specific_endpoint routines
Now that admin_endpoint, public_endpoint, and internal_endpoint
in the common library are (nearly) working, these are the
changes to use them in the openstack-image recipes.

Partial-Bug: 1412919

Change-Id: If81fc2a56f540a460325de879555e95d108aac77
2015-02-10 23:35:09 +00:00
Jenkins 8f1037ef21 Merge "Ensure the owner/group for cache is correct" 2015-02-09 01:07:06 +00:00
Jun Hong Li 191e0130b8 Ensure the owner/group for cache is correct
Create the cache dir or update the owner/group for cache dir,
in order to ensure that the image cache dir has the right
permission, avoid breaking the glance cache feature.

Change-Id: If7ba126af284c7fd53adbdb8270a7cf20a941ace
Related-Bug: 1416245
2015-02-06 09:40:23 +08:00
Elliott Davis da05834a09 Add dependency on upstream ceph cookbook for better key management
The upstream ceph cookbook already hooks into chef for environment information.
This patch utilizes the client LWRP to create or add ceph keys for RBD support.
This patch also changes some default attribute names for more sane organization

Partial-Bug: #1409943

Change-Id: If37159524c237eec6ca1561e2979cd44e6dfac92
2015-02-05 06:32:42 -06:00
Mark Vanderwiel dac2763799 Allow image to support muiltple rabbit mq hosts
The other cookbooks already have this same support, but it was missing
from the image cookbook.

Change-Id: I228e84917fc538c3883d27725a5bc9cbbf98a967
Closes-Bug: #1385400
2014-10-28 09:11:46 -05:00
chenxiao ae2c1aef94 Allow some attributes for cinder storage to be configurable
Glance cookbook does not have some configurable attributes for
cinder storage backend, so add them to avoid issues when using
'glance.store.cinder.Store'.

Change-Id: Ieaff14c5c24c4cbd194c70d46d376dc7d170d946
Closes-Bug: #1384044
2014-10-24 10:59:49 +08:00
Mark Vanderwiel 8463e1a9b6 Add support for vhd vmdk vdi iso raw disk formats
Image upload provider already has a image type, but was not
used to handle the other common image types that have a simple
bare container format.   Expanded the list of types and allowed
the existing upload_image recipe to also take advantage of this
new provider disk type support in an optional way.  Backward
compatible.

Change-Id: I1f5983150aa648837c9bcd256f0ceb4bf73d4b52
Closes-Bug: #1383079
2014-10-23 10:56:54 -05:00
Mark Vanderwiel 234ba535c4 Add oslo.messaging attributes
glance switch to use oslo.messaging and some of the attributes have
changed or been replaced.

Change-Id: I7f3d56eb03942ad4c87c43f47bbacc838a2b41f9
Closes-Bug: #1382110
2014-10-16 12:44:06 -05:00
Mark Vanderwiel 75d06886d0 Fix glance registry owner and group
Glance registry is started using the glance userid.
The owner/group of the glance registry conf and paste ini
should be glance user attribute, not hardcoded to root.

Change-Id: I7472e44c61e3d338a2d0bd5fca10511302d4ca43
Closes-Bug: #1375963
2014-09-30 14:19:00 -05:00
leileiz 6bb3179141 Update glance configuration file permission
Some of glance configuration files contain secrete information like
qpid_password,db connection. To avoid unauthorized users to access it,
change those file permission to 640.

Closes-Bug:#1372330
Change-Id: Id0dfc250ca98759c5c134f5d163d862889f35259
2014-09-23 21:59:21 -04:00
Ionuț Arțăriși 85a9c8b80c use new python_packages attributes from -common
*_python_packages attributes are being moved to -common in order to
remove the duplication from all the cookbooks which are using them

Change-Id: Ie26ceb713ad07f28d70a6711198a229cd45f777a
Implements: blueprint move-python-db-client-attrs-to-common
2014-06-26 11:54:11 +02:00
Stephan Renatus b61494f842 Make retrieval of vmware_host_pass optional
Before this change, a non-vmware user would (without developer mode)
have to create a data bag item for this pass even when not using it,
because otherwise the get_secret's call would fail.

Now the lookup happens when the vmware_server_host is set, which seams
quite reasonable (I couldn't make out a "real" config driver switch to
put there instead.)

Also did some refactoring of the vmware specs into a parameterised
shared_examples block, with some additions.

Implements: blueprint vmware-password-databag
Change-Id: I8b34ef11eb01a668eddc41894d10c7c240f56e21
2014-05-26 12:18:52 +02:00
Chen Zhiwei d7c959610e Data Bag items must have an id matching /^[\.\-[:alnum:]_]+$/
Data Bag items must have an id matching /^[\.\-[:alnum:]_]+$/
But in recipes/api.rb file, it is "service:glance".

Change-Id: I0aef71c10cc6d7ca30d58c168044c4dbbcfafad1
Closes-bug: 1319286
2014-05-14 03:57:19 -04:00