Commit Graph

57 Commits

Author SHA1 Message Date
Ghanshyam Mann b4f5c8f670 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: Icfd5b97688d8906e0b873065a6e5f80cb63df451
2024-02-17 20:50:10 -08:00
Lance Albertson 75e073a7b0 CentOS 8 support
- Update various packages for EL8
- Use platform family for installing dnsmasq
- ChefSpec updates

Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-identity/+/815147
Change-Id: Ia566d70348f1245733b5074b3ad6e0bb30c3e405
Signed-off-by: Lance Albertson <lance@osuosl.org>
2021-10-22 16:33:19 -07:00
Lance Albertson 8f5801890f Cookstyle 6.19.5 fixes
Depends-On: https://review.opendev.org/756168
Change-Id: Id30919fdf1e52405001abe964f434123c867f717
Signed-off-by: Lance Albertson <lance@osuosl.org>
2020-10-05 17:19:17 -07:00
Lance Albertson 1c40ad731e Improve ChefSpec test speed by enabling caching
This updates all references of let(:chef_run) to cached(:chef_run) to
speed up tests. By doing this, we have to create a new cached(:chef_run)
block whenever we need to adjust node attributes for testing.

Additional fixes:
- Pull in openstack-network::ml2_core_plugin in server spec so that we get the
  default attributes set
- Remove unused shared_examples

Speed was improved from 4 minutes 18.7 seconds to 1 minute 2.73 seconds

Change-Id: Ib10a6828e6886a57527a5e5a506cc57364ec0c2a
2020-01-07 09:55:25 -08:00
Samuel Cassiba 22d034d20a starting rocky development patch
Change-Id: I4d16b90987e8fb6569ff8775694868e2ad91eeef
2018-08-03 06:41:32 -07:00
Samuel Cassiba c6195859d9 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: I833cc80421be375aed202c208cf93a0165761226
Implements: blueprint simplify-identity-endpoint
2018-06-14 19:16:25 -07:00
Samuel Cassiba 77e2e705c3 network 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
- moved dpkg overrides to common cookbook for DRY

Implements blueprint modern-chef

Depends-On: I143e0ed0a2bdd76269fc0c402052696426d96d81
Change-Id: Ib268737d2f5c3196061d89202d806c3af1c54e72
2018-01-09 15:14:37 +00:00
Samuel Cassiba 9de60304f4 Initial network Pike updates
- Switched default linter to cookstyle
- Renamed rake tasks to better conform with Chef conventions

Change-Id: I5dd1971392fdf282d0f214dfce9dcbecc18542a8
2017-08-25 09:57:18 -04:00
Christoph Albers 88b37047c7 RPC_backend / transport_url workover
- removed deprecated rabbitmq attributes
- added rabbit_transport_url

Change-Id: I09ab54c7444dca440e15161c62d3203a48463b4a
2016-12-20 11:45:08 +00:00
Samuel Cassiba f67ff76aae Deprecated python-neutronclient
- deprecated python-neutronclient references
- removed deprecated references to repoforge; use OS-provided package for dnsmasq
- removed neutron-client and client-packages

Implements blueprint newton-xenial

Change-Id: Idcb54b1ece38403dc4fc5dab758ddbdbab8ca968
2016-12-20 08:39:38 +00:00
Christoph Albers d1fe020bd6 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
- updated neutron-package dependencies for debian

Change-Id: I2d404a424bd79a6e9b282304e21591fa33a48981
Depends-On: I0f8955f05de9b33711c54b9a198f45018cceb8e1
2016-09-30 14:19:49 +02:00
Samuel Cassiba 77060a6212 Style and lint fixes to support newer ChefDK
Change-Id: Ie45076f0ee36e880c9a6080f2b330982e40c282c
2016-07-06 11:56:17 -07:00
Jan Klare d518462595 removed bridge creation from recipes and splittet recipes
* removed the creation of ovs bridges (except br-int) from all recipes,
  since this can not be done in a sufficient generic way or only with a lot of
  case switches to cope with all possible network setups
* added an example recipe to create all default ovs bridges from the
  networking guide for legacy ovs setups (we should also create one for dvr later)
* splittet recipe ml2_openvswitch into seperate recipes for ml2_openvswitch config,
  openvswitch_agent and openvswitch to allow bridge creation from wrapper recipe inbetween
  and seperate configs from package installation

Change-Id: I6383575862ba110b3f3b5cba227288dc026fce77
2016-03-02 09:37:07 +01:00
Jan Klare 2ec770de11 refactoring final step
* added new logic to render plugin templates
* refactored recipe names to be more consistence
* moved version up to 13.0.0 for mitaka release
* removed suse as supported platform
* added verisionbumb for refactored os-identity and common
* adapted optimized endpoint logic
* added endpoint attributes to fit new endpoint logic
* adapted the specs (unit tests) to work again
* refactored attributes throughout all recipes that were connected to the
  attributes used for the neutron.conf.erb template to adapt the new template
  attribute syntax
* removed some attributes that were set to non default values, since the
  defaults from neutron cloud and should be used instead
* moved all attributes form attributes/default.rb that were used in
  neutron.conf.erb to attributes/neutron_conf.rb
* refactored attributes to fit new template logic
* refactored recipes/default.rb to fit new template logic
* removed all attributes set to default values in attribtues/default and
  template
* replaced static plugin logic and templates with new config logic, following
  the same principles as for neutron.conf
* renamed recipes to fit attributes and actual service names
* added recipes for ml2_core_plugin, ml2_openvswitch and ml2_linuxbridge as well
  as a recipe for the creation of all plugin configs (plugin_conf) like plugin.ini

Change-Id: I9cc1b5cc069987ac83e064322c2291772505ff5f
Implements: blueprint cookbook-refactoring
Depends-On: I0547182085eed91d05384fdd7734408a839a9a2c
Depends-On: I3262b2e6f792f37c32a446e6567790b82bdd4613
2016-02-08 10:44:13 +01:00
Mark Vanderwiel b49df0cb25 Replace deprecated get_secret
Use get_password 'token' instead.

Change-Id: I364d902de5943c9bbf55eca6c5f76fb7fef64162
Partial-Bug: #1467662
2015-06-24 13:50:16 -05:00
Mark Vanderwiel 095db20713 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: I6451b7593f36287d4efe4d7542f97d0a090fb1d1
2015-05-29 12:56:08 -05:00
Mark Vanderwiel abcf9b208b Move to rhel 7.1
rhel 7.0 is not EUS/LTS, need to switch to 7.1.

Change-Id: Ia20b0cfb10510c22a88cb234f0f35f8774d3b1a6
Related-Bug: #1438878
2015-04-21 07:31:35 +00:00
Mark Vanderwiel 53366aac19 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: Iad3da2be74823b8d706eb9b4e12311cbf655ab7f
Implements: blueprint identity-uri
2015-04-07 01:30:23 +00:00
Mark Vanderwiel 7963c596c9 Fix ubuntu ml2_conf missing ovs section
Used the existing ovs conf as a partial template to simply include
in the ml2 conf.  This keeps all the attributes the same.
A more detailed spec will have to be done after some refactoring
to allow for sections to be tested.

Please give this idea a try, it seems to allow me to setup neutron
on ubuntu with ml2. I'm working toward using this as a basis for
getting the repo aio_neutron test working.

Change-Id: Ia988f3d7ef1c280c40b55cea4f455710f673dd32
Closes-Bug: #1314751
2015-03-30 09:57:13 -05:00
Mark Vanderwiel 6ec0caf181 Add compute metadata api to common endpoints
Nova metadata api endpoint was missing from common endpoints.
This patch will be follow by one for compute and network to
make use of these new endpoint.

Change-Id: Ie3e9f27f7d6eec4f4ebb0b1dbebd0b12a03a0b65
Partial-Bug: #1425633
2015-02-25 17:25:35 -06:00
Jenkins cdef3e8815 Merge "Trusty juno updates" 2015-02-10 19:26:13 +00:00
Ken Thomas 2918234a39 Use new common specific_endpoint routines
Now that admin_endpoint, public_endpoint, and internal_endpoint
in the common library are working, these are the changes to use
them in the openstack-network recipes.

Note that some calls to 'endpoint' that can't have separate
admin, internal, public endpoints. (E.g. network-api-bind,
network-linuxbridge, network-openvswitch, etc.) Those
will continue to use the general endpoint routine.

Partial-Bug: 1412919

Change-Id: Ia08983f6f8da8a96da22969cdb660b44f82780d6
2015-02-03 20:44:57 +00:00
Mark Vanderwiel c565a5e4e8 Trusty juno updates
* update spec platform versions
* remove dhcp build from source for precise

Change-Id: Id719f63650a01af8c60a6d91337718520d7d938d
Implements: blueprint trusty-juno
2015-02-03 11:47:42 -06:00
JJ Asghar 4808ba56fc Centos 6.5 and up has and old version of dnsmasq
This patch updates the version of dnsmasq so dhcp-agent
can start correctly. This was found attempting to start
the testing framework with centos and neutron. This is
not triggered if the machine is anything other than
centos and 6.5 and above.

Change-Id: I622e51f8f9f912ca7bc4185614b3098208d29d11
Closes-Bug: 1397610
2015-01-15 07:46:57 -06:00
ZHU ZHU b7229e1601 Add cacert and insecure arguments for get tenant id call
If keystone are configured with SSL, neutron need to connect keystone
with certs(or insecure) to load the admin_tenant_id. This commit will
add these arguments for the call.

Related openstack-common cookbook fix:
https://review.openstack.org/#/c/132282/

Closes-Bug: #1388138
Change-Id: I2407055a71340aa6ac8f2d586a84cfb681d093ed
2014-11-02 19:34:00 -06:00
fgimenez 57849b5a08 Fixes midonet and metaplugin config template rendering
Also added tests for the default attribute values used
in the plugin templates
Change-Id: I91146c2254381572734bffb831896f522527e446
Closes-Bug: #1380243
2014-10-24 09:44:06 +02:00
jun xie 2fe862cd0e Add 2 attributes and make nova_url use right scheme
This commit adds nova_ca_certificates_file and
nova_api_insecure so that they can be configured.
It also makes the nova_url use the right scheme.

Change-Id: I00a9f900e2d722529808e10e946beae8f374c4fa
Closes-Bug: #1383701
2014-10-22 12:05:42 -05:00
Stephan Renatus f149cb105b Allow specifying the gateway_external_network by name
This change makes the l3_agent recipe lookup the ID of the network used
for the gateway external network by name.  For example, specify

node[openstack][network][l3][gateway_external_network_name] = public

and the recipe will lookup the network by name.  It will use
openstack-common/libraries/cli.rb network_uuid method, effectively
querying `neutron net-external-list`.  The result is saved to
gateway_external_network_id and used on subsequent runs.

To have the recipe check the UUID again (e.g. to update it), reset the
_id attribute to nil.

Change-Id: I5df6f9989df7b18121a8050835a192da9e1a762e
2014-10-14 09:23:15 -05:00
Federico Gimenez Nieto 424ce1db27 Added missing template tests and checked existing ones (II)
Covers lbaas_agent.ini.erb, metadata_agent.ini.erb, neutron.conf.erb,
neutron-server.erb, neutron.sysconfig.erb and rootwrap.conf.erb
Change-Id: Ie5c1bf67f57f4db554ba341d02732061a1f2c97c
Partial-Bug: #1328999
Implements: blueprint add-template-tests
2014-09-23 14:50:46 +02:00
Mark Vanderwiel 3442ec6376 Allow rootwrap configuration via attributes
Change-Id: I48174db291512cded9b371eaf5699e97af6a0ca0
Partial-Bug: #1347861
2014-08-01 11:32:44 -05:00
Federico Gimenez Nieto cedf3540cf Added missing tests and checked existing ones
Partial-Bug: #1328999
Implements: blueprint add-template-tests

Change-Id: I19e49bde3d8dd9c195a0aee7f671c07428cce1a2
2014-07-23 20:00:09 +02:00
Mark Vanderwiel 30bd0d08a1 Fix fauxhai platform versions for suse and redhat
Change-Id: If9b8802d99e78acbb7cecf2ce44f5afa85191abb
Partial-Bug: #1344199
2014-07-18 12:59:40 -05:00
Mark Vanderwiel e725b99b04 Allow nova interactions attributes
Enable attributes for neutron interaction with nova.
This uses the new Common CLI method in change:
I2b2f1d94dbd67550ad3a352c2205a532173f6065

The default is to make a call into keystone CLI to query the service tenant
UUID and use that in the neuton.conf file. If the UUID is overridden, no
CLI call is made.  This does not pre-req any Compute recipes, just new Common
method.
Also see this bug: 1298640 for how the nova_url is handled, not obvious.
Added TODO's to look at handling this type of url situation better from Common.

Implements: blueprint neutron-icehouse-default-changes
Change-Id: I89dd47c802a544bdd998059b36884cb10f628223
2014-04-17 12:40:24 -05:00
galstrom21 4b6b5ee4ce Refactor ChefSpec tests
Change-Id: I0f1f3ea7b0bb1cefaf88277e8163dd9ceb561a60
Addresses: blueprint refactor-spec-files
2014-04-09 22:43:44 -05:00
Luis A. Garcia 575f440d45 Use get_secret instead of secret
The new get_secret method allows the 'secrets' databag to be renamed,
just like all other databags.

Change-Id: Ic8be5d19a112d78e22716c0cd571efc7186ac9ce
Related-Bug: #1288784
2014-04-02 08:29:44 -07:00
Stephan Renatus f165af4562 Update ChefSpec to 3.4.0
This change gives us new capabilities, such as matching notifies and
subscribes of resources.

Implements: blueprint chefspec-3-4
Change-Id: Ic2ffd83c398c93ec2f410b90b7305be7885b1471
2014-03-28 17:22:44 +01:00
Matt Thompson 80b8b97a12 Use get_password method to obtain qpid password
Currently, qpid's password is stored in an attribute in the common
cookbook.  This change causes the password to be looked up via
get_password method, which is how we obtain the rabbitmq password.

Change-Id: Id09820dafc67910f9f4d6c350ece6fe93fb21787
Implements: blueprint use-data-bag-for-qpid-password
2014-03-06 13:50:10 +00:00
Nacer Laradji 59858a4545 The command use to check if bridge are setup is not reliable.
On some plateform or verion of ovs the ouput of ovs-vsctl show have quote or not.
This patch implement a other method to check if bridge exist.

Co-Authored-By: Stephan Renatus <s.renatus@x-ion.de>
Change-Id: Iaae683213f281529e2167ac326d8e9573f026f12
Closes-Bug: #1266558
2014-03-04 16:22:45 +01:00
Paul Carver d2defc53c8 Added double quotes around the interface name
Added double quotes around the interface name in the grep pattern
because the output of ovs-vsctl quotes the interface name.

Closes-Bug: 1266558
Change-Id: I1a3dcbafe14db133ed02c4d9b7aacdb485fc2de1
2014-02-28 09:28:44 -05:00
galstrom21 2f538ce87d Restricting ChefSpec::Coverage to this cookbook
Change-Id: Ia3bde592e0cb7ff6f9b60ccac889792ce7bd52a6
Addresses: blueprint lint-and-unit-testing-for-havana
2014-02-18 15:05:51 +00:00
Jenkins 74897cd640 Merge "change tests to use SLES11SP3 instead of openSUSE 12.3" 2014-02-10 23:03:18 +00:00
Ionuț Arțăriși ec1bb96ded change tests to use SLES11SP3 instead of openSUSE 12.3
Change-Id: I9777c781cb85157c10110898a1b0563b6d259168
2014-02-07 10:59:51 +01:00
Christopher H. Laco cbed82efc9 Upgrade/Update rubocop
Now that almost all of the rubocop blueprints have been completed, make
one final pass through all of the cookbooks ensuring they're all in
sync with each other.

- Upgrade rubocop to 0.18.1
- Fix violations caused by 0.18.1 upgrade
- Add Includes for non-existent folders to Includes so they
  automatically cover future additions

Change-Id: Ib3220a0ab8281bc0eafaf9898c233d90490cfde6
Implements: blueprint lint-and-unit-testing-for-havana
2014-02-04 14:43:32 -05:00
Andy McCrae f5f4773b7a Update spec files to be rubocop compliant
- Update .rubocop.yml to include spec/**
- Update spec files to be rubocop compliant
- Inlcude 'chefspec/berkshelf' in spec_helper.rb for ease of use

Change-Id: Ief01cc34cc4f9f04e6ba6437f67bfd347975c3a8
Addresses: blueprint rubocop-for-network
2014-01-28 16:03:46 +00:00
Andy McCrae dc58cbe2a8 Remove ambiguity in stubbed methods in spec_helper
- Adjust the stubs in spec/spec_helper.rb to specify the appropriate
  number of expected variables.
- Add parenthensis around return values

Partial-Bug: #1271535
Change-Id: I1aa473e406059fec66b0b2c9a307e8eeb41b0996
2014-01-22 16:44:47 +00:00
Andy McCrae 66bfd98651 Move to use "get_password" instead of "{user,service,db}_password"
The user_password, service_password and db_password functions are redundant
since they simply call "secret". Creates a get_password function that
will accept a "type" of db, service or user.

All instances of these calls have been changed to call get_password.

Change-Id: I480c654de44dc83e78f9ec4085f1b83edadd91d6
Partial-Bug: #1195915
2014-01-15 18:17:52 +00:00
Paul Czarkowski 61d2267d75 rubocop compliance
all cops now pass except for the following
(which are silenced in .rubocop.yml )

* LineLength, MethodLength: not sure if we care about these
* WordArray: I prefer [] vs %w{} for readability.

Conflicts:
	metadata.rb
	recipes/common.rb
	recipes/openvswitch.rb
	spec/openvswitch_spec.rb

Change-Id: I92996b5db9f292e9ba93c7619ca727ffa92ddd71
2014-01-13 14:02:31 -06:00
paulczar 802bb695c4 example of using new chefspec coverage report
about: https://sethvargo.com/chef-recipe-code-coverage/
output: https://gist.github.com/paulczar/6f9c6ddad71ef4cd6394

Change-Id: I77c32f13c85d26516ded961063412682665de4cb
2014-01-05 15:08:24 -06:00
gengjh 0f7feef177 Upgrade to Havana release
Also upgrade gems:
- berkshelf, ~> 2.0.10
- chefspec, ~> 3.0.2
- foodcritic, ~> 3.0.3
And update the DEPRECATION keywords

Change-Id: I203124c42cccd0c96b40518bc71006b731b2edee
2013-12-17 18:03:55 +08:00
gengjh 6cda0639c3 Support neutron configuration
Since in OpenStack Havana release the Quantum project was renamed to the
Neutron, for the cookbooks we also need do the same things to support
the Neutron. I do the %s/Quantum/Neutron/g in all the files under
cookbook-openstack-netwrok. It will effect other cookbooks:
openstack-compute, openstack-ops-database which should be covered in
others patches.

Implemented: blueprint neutron-support

Change-Id: I59f3f2d8dfad678f70b97d4cbc4e10dfa163e9b2
2013-12-13 22:37:04 +08:00