Refactored the domain model to be immutable and addressed some
inconsistences with the Chef Server API model.
Removed all HEAD methods, as they have been removed from newer versions
of Chef. They were used to test the existance of a given resource, and
with newer versions the only way to do that is via a GET operation.
Now all live tests are passing for Community Chef 0.10.8, 11.0.6 and
Enterprise Chef.
Added the environment where the nodes in a group must be created in the
bootstrap data bag. This way the configuration is persisted and can be
used between runs, such as the node run list.
To accomodate the new bootstrap parameter, the method in the ChefService
used to create the data bag has been refactored and a the new
BootstrapConfig object has been created. This way, we'll be able to
extend the information in the bootstrap databag in the future without
changing the ChefService interface.
* Removed all async apis
* Refactored strategies to avois using the async apis
* Removed references to awaitCompletion and use Guava helpers
* Added a method in ChefContext to access the underlying api (ChefApi,
HostedChefApi or PrivateChefApi)
* Deprecated all async apis.
* Refactored tests to extend BaseApiLiveTest.
* ChefContext now extends View.
* HostedChefApi now extends ChefApi.
* PatchedChefApi has been removed.
* Removed HostedChefContext and PrivateChefContext because they are now
redundant. The concrete apis can be unwrapped from teh ChefContext
view.
Added context properties to allow users customize how RubyGems is
installed and also the version of the Chef gems that is installed when
bootstrapping nodes.
Change formating to jcloud standarts. Added SinceApiVersion annotation to new methods. Removed environmentExists method from api.
Added forgeted serializable name for attributes field of environment
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.