Adds support for the Group api in Hosted Chef. CRUD operations and the
management of the members of the group are now available.
Also cleaned up Private Chef, and will leave only those methods that are
proven to work and have a working live test.
Moved the InstallChefGems statement to jclouds/scriptbuilder to
implement there the Chef Solo support, since Solo does not require a
connection to a Chef server.
Fixes#28
Made install chef gems script portable to yum based
distributions.
This was tested with CentOS 5.6 with the apache2 recipe.
Everything works fine except the startup of the apache
server due to an issue in the apache2 recipe. When it creates
the httpd.conf file it does no set the right permissions.
This commit fixes#12.
Now when bootstrapping nodes using Chef, the validator credentials
must be provided in context creation. Since we cannot create validator
clients, having those credentials is a requirement to make the nodes
be able to autoregister to the Chef server during bootstrap.
When using this feature, the following properties must be set:
ChefProperties.CHEF_VALIDATOR_NAME
ChefProperties.CHEF_VALIDATOR_CREDENTIAL
Also refactored ChefConstants class into ChefProperties to follow the
new conventions.
The search api returns the databag item inside a 'raw_data'
object instead of returning it directly.
With this commit all live tests for the search api are passing
except the searchClients one for hosted and private chef due
to an existing issue in the target platform. Once it is fixed (by
opscode) the live test will pass.
Added a SearchOptions parameter to all search
methods in ChefApi. This way every search can be
customized and limited. Fixes#1.
This is still a WIP until the appropriate live tests
are added.
- Add and update constructors for org.jclouds.chef.domain.Node
- Make Node.chefEnvironment nullable
- Add JavaDoc indicating environments apply since Chef 0.10
- Update unit tests
There was an issue when commiting the sandbox after uploading its
contents. We were sending the is_complete flag as a String when the Chef
Server expected a boolean flag. Fixing the binder fixed the live test.
* Refactored BaseChefClientLiveTest to allow the use of different
context types such as PrivateChefContext, etc.
* Added delegate methods to PrivateChef*Clients to access the
Chef*Clients.
* Removed the hardcoded Chef Server version in tests and read it from
the system properties.
In Chef Server 0.10 the way the cookbooks are returned has changed. For
this reason, a couple of domain classes have been added to support this
new model.
Also added a @Provider in the ChefParserModule that will inject the
appropriate parser depending on the jclouds.api-version property set on
the context. This way the ChefAsyncClient method signatures remain
unchanged and the parser used to parse the cookbooks will be choosen at
runtime depending on the version used to create the context.
Modified the ChefAsyncClient to read the value for the X-Chef-Version
header from the jclouds.api-version property. This way users will have a
way to configure the version of the Chef server they are consuming.
* Refactored client creation tests and their dependencies to avoid
errors related to context re-creation.
* Added method to ChefAsyncClient to get the contents of a resource
(like a file in a cookbook) sending the authentication headers.
* Refactored chef-core live tests dependencies to avoid unnecessary test
skips.
* Added bouncycastle dependency in test scope to allow reading the
private key files.
* Fixed the client name field in the json sent to update a client.
* Added the uploadContent method to the ChefAsyncClient in order to
add the authentication headers to the upload contents to a sandbox
request.
* Disabled parallel integration test execution to avoid concurrent
creation of the same node.
* Fixed @Credential binding to bind the contents of the PEM file instead
of the path.
* Fixed validation identity and credential property loading.
* TestOhaiModule did not use the overriden provider method. Changed
strategy live tests to check against the current user as set by the
CurrentUserProvider.
This method creates a client with the 'admin' flag set, in an open source
Chef Server.
This does not work in Hosted Chef, since Opscode Platform
security design uses a different approach. By default a client is only
allowed to manage the node it's associated with, and setting this flag
in the POST or PUT request has no effect on the client permissions.
Metadata fields 'dependencies', 'conflicting', 'providing', 'platforms' and 'replacing' are
simple Map<String, String>, where the value is a version constraint like '>= 0.0.0', but not
a Json array.
See https://github.com/opscode/chef/blob/master/chef/lib/chef/cookbook/metadata.rb for more
details about Metadata format.