Commit Graph

179 Commits

Author SHA1 Message Date
Ignasi Barrera f5804867b3 Removed redundant binders 2013-09-04 10:44:32 +02:00
Noorul Islam K M 05e8d32d03 JCLOUDS-256: Add missing API to list environment nodes 2013-09-04 10:39:35 +02:00
Noorul Islam K M c75c3b9e63 JCLOUDS-256: Add missing API to list environment recipes 2013-09-04 10:39:31 +02:00
Ignasi Barrera 72122753f4 JCLOUDS-245/JCLOUDS-254: Fix live tests
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.
2013-09-03 09:37:37 +02:00
Andrew Phillips 5c63ec4451 JCLOUDS-244: Aligning jclouds-chef project structure with main
* JClouds Chef -> Apache jclouds Chef in names
* chef-parent -> chef-project to match jclouds-project
2013-08-17 17:40:46 -04:00
Ignasi Barrera 44ea490c1e JCLOUDS-149: Reuse checkstyle configuration 2013-07-02 18:10:27 +02:00
zack-shoylev 2792975ebe Ensuring pem files are properly split regardless of source OS 2013-06-30 18:19:40 +02:00
Ignasi Barrera 2701655f91 JCLOUDS-107: Use Guice multibinding extensions 2013-06-06 17:35:52 +02:00
Ignasi Barrera ea262c3995 JCLOUDS-38: Removed servlet project and unused constants 2013-06-04 17:47:41 +02:00
Ignasi Barrera 543dc025c4 JCLOUDS-82: Use unwrapApi from View and remove custom method in ChefContext 2013-05-27 22:14:55 +02:00
Ignasi Barrera 474f7fffad JCLOUDS-58: Updated license headers and rat plugin configuration 2013-05-20 16:53:37 +02:00
Ignasi Barrera 4455b9daf4 JCLOUDS-3: Bootstrap nodes in a custom environment
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.
2013-05-14 23:39:45 +02:00
Andrew Bayer a4ee5ba496 JCLOUDS-30. Switch to 2 space indents for POM files. 2013-05-13 10:29:06 -07:00
Andrew Bayer 3760cc09ae JCLOUDS-17. Switch groupId to org.apache.jclouds, change parent POM, remove old distributionManagement content, add ASF repos. 2013-05-13 10:28:43 -07:00
Ignasi Barrera 2afa950cb2 Merge pull request #85 from nacx/fix-test-config
Fix TransientChef and Strategy live tests
2013-04-29 02:26:58 -07:00
adriancole 397349f50e create property jclouds.version for upstream dependencies 2013-04-28 15:53:30 -07:00
Ignasi Barrera 19b9d5c4c7 Fix TransientChef and Strategy live tests 2013-04-29 00:22:34 +02:00
Ignasi Barrera f06cd83844 Use Futures.getUnchecked to get strategy results 2013-04-25 16:42:28 +02:00
Ignasi Barrera c9cdeb5c2f Fixed typo 2013-04-25 09:14:07 +02:00
Ignasi Barrera d245cb6aa3 Unasync Chef
* 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)
2013-04-24 23:47:16 +02:00
Ignasi Barrera 892f9f9493 Deprecate async apis. Fixes #70
* 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.
2013-04-22 19:00:53 +02:00
Ignasi Barrera 9d66de545b Do not use removed getXXX methods from jclouds Utils 2013-04-17 16:18:11 +02:00
adriancole 9cd432ed86 dealt with a myriad of config issues causing chef build to fail 2013-04-10 12:18:35 -07:00
adriancole 14479e1404 added Closeable to top-level Chef apis 2013-04-08 16:12:34 -07:00
Ignasi Barrera f70fa2c564 Remove InputSuppliers.of(String) 2013-04-05 09:12:58 +02:00
Ignasi Barrera 151c85a702 Enforce the use of builders in Ruby and Chef statements 2013-04-03 10:41:16 +02:00
Ignasi Barrera f35d30eed4 Bump master to 1.7.0-SNAPSHOT 2013-03-09 20:30:03 +01:00
Ignasi Barrera 15538035ff Fixed transient context creation and live tests 2013-03-09 19:30:19 +01:00
Ignasi Barrera 3ffdd3cde2 [maven-release-plugin] prepare for next development iteration 2013-03-07 13:35:42 +01:00
Ignasi Barrera 677ab47226 [maven-release-plugin] prepare release jclouds-chef-1.6.0-alpha.4 2013-03-07 13:35:42 +01:00
Ignasi Barrera 167f4f7204 Enable properties to configure Chef gems
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.
2013-03-07 12:29:21 +01:00
Ignasi Barrera efd8c4a1f8 There is no need to force the Chef version anymore 2013-03-02 10:57:38 +01:00
Adrian Cole 57d97e63a2 Merge pull request #61 from kulya/master
Ability to work with environments at chef > 0.10.0
2013-02-20 08:26:34 -08:00
Alexandr Kulik 191c3af53f Added support for chef environment api.
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
2013-02-19 20:31:04 +02:00
Ignasi Barrera fabd13acd7 Added helper method to generate only a run list 2013-02-17 00:02:56 +01:00
Ignasi Barrera 39ee5f1c1f [maven-release-plugin] prepare for next development iteration 2013-02-11 14:42:47 +01:00
Ignasi Barrera 25a4ff19e5 [maven-release-plugin] prepare release jclouds-chef-1.6.0-alpha.2 2013-02-11 14:42:46 +01:00
Ignasi Barrera bcaea4ea20 [maven-release-plugin] prepare for next development iteration 2013-02-04 12:17:33 -08:00
Ignasi Barrera 7148b4ada3 [maven-release-plugin] prepare release jclouds-chef-1.6.0-alpha.1 2013-02-04 12:17:32 -08:00
Ignasi Barrera 80e3121af8 Fixed Ohai unit tests 2013-01-22 10:25:03 +01:00
Ignasi Barrera bacb4245fd Issue #54: Allow to override attributes in node bootstrap 2013-01-20 13:18:37 +01:00
Ignasi Barrera 7cf428657e Removed all compile warnings and applied formatting to all classes 2013-01-20 13:10:23 +01:00
Adrian Cole efb5190023 changes related to centralizing construction of invokables 2013-01-19 17:18:16 -08:00
Adrian Cole 22a301b640 centralize TypeToken creation 2013-01-19 12:11:12 -08:00
Ignasi Barrera 63d203325f Issue 1184 in jclouds: @Named annotations in all async api methods. 2013-01-19 11:32:39 +01:00
Adrian Cole c1be4300a4 accomodate runtime credential changes 2013-01-15 21:43:21 -08:00
Adrian Cole edb6d7b318 There can be only one retryable predicate; use Predicates2.retry decorator 2013-01-13 21:41:37 -08:00
Adrian Cole 5664eeb127 updated to use standard guava Futures and ListenableFuture 2013-01-13 09:34:19 -08:00
Adrian Cole 6a728f8cb3 refactored tests and internal code due to removing custom guava code 2013-01-08 20:37:13 -08:00
Adrian Cole e31a42eab7 changes corresponding to jclouds/jclouds/invokable-with-enclosing 2013-01-08 01:11:17 -08:00
Adrian Cole ca8127abad changes for FunctionalReflection 2013-01-07 00:00:10 -08:00
Adrian Cole 93e66ee3f6 moved off j.l.r.Method -> Invokable 2013-01-05 18:53:02 -08:00
Adrian Cole f47d7ba2c4 fixed covariance and warnings on ApiMetadata subclasses 2012-12-31 19:43:18 -08:00
Adrian Cole 359b6b88d0 Move to Guava 14 BaseEncoding and Hashing 2012-12-31 14:22:54 -08:00
Adrian Cole 2ce689cc1a removed unnecessary type specifier 2012-12-30 22:46:10 -08:00
Adrian Cole 607a96b258 removed use of static fields to share type mapping info 2012-12-30 17:37:39 -08:00
Adrian Cole aa28a5248c replaced @Timeout w/explicit properties 2012-12-30 10:26:28 -08:00
Ignasi Barrera 32fd255432 Use CacheLoader instead of MapMaker.makeComputingMap
Use CacheLoader instead of MapMaker.makeComputingMap and removed all
deprecated stuff.
2012-12-30 00:11:29 +01:00
Ignasi Barrera aeff972b7c Fixed test after the PEM refactor in jclouds core 2012-12-29 23:07:56 +01:00
Ignasi Barrera 42f2f39574 Updated to latest version of the InstallChefGems script 2012-12-29 00:40:59 +01:00
Adrian Cole 389936cbbd migrate to guava fallbacks 2012-12-27 17:00:10 -08:00
Adrian Cole b9fee2d8fe chef doesn't need an explicit bouncycastle dep 2012-12-20 13:12:06 -08:00
Ignasi Barrera f37c5991ff Issue #30 Add support for Group api in Hosted Chef
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.
2012-12-13 01:06:30 +01:00
Ignasi Barrera 41f671e1fa Removed unused import 2012-11-12 19:45:35 +01:00
Ignasi Barrera f0fe60dbd2 Updated install gems test to the last version of the InstallChefGems statement 2012-11-11 20:34:46 +01:00
Ignasi Barrera d9a0035d58 InstallChefGems script is now in jclouds/scriptbuilder
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
2012-11-06 16:56:47 +01:00
Ignasi Barrera 59c1db6bf6 Propagate TimeoutException in awaitCompletion 2012-11-02 16:11:58 +01:00
Ignasi Barrera c6d57446e9 Made install chef gems script portable
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.
2012-10-08 19:15:36 +02:00
Ignasi Barrera 31683b3f5a Provide the existing validator credentials in context creation
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.
2012-10-08 16:17:48 +02:00
Ignasi Barrera 88c65bb816 Updated RunListForGroup to new DataBagItem parser 2012-10-07 17:57:31 +02:00
Ignasi Barrera 416a5f90aa Added 'name' parameter to ChefContext and PrivatChefContext 2012-10-07 17:40:31 +02:00
Ignasi Barrera 3b361b4ed1 Fixed DatabagItem parser for search api.
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.
2012-10-01 15:09:36 +02:00
Ignasi Barrera 4852e03237 Deal with index population delay in search api live tests 2012-10-01 14:11:14 +02:00
Ignasi Barrera bc733860a2 Added live test for search api methods 2012-09-30 21:08:59 +02:00
Ignasi Barrera 4c6e48fc47 Added SearchOptions to all search methods
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.
2012-09-29 16:28:50 +02:00
Ignasi Barrera c82de486dc Deprecate the jclouds.version property
Deprecated the jclouds.version property and used
project.version instead. This way should be easier
to keep in sync with core jclouds versioning.
2012-09-21 12:42:34 +02:00
Adrian Cole 3cb6e25929 bumped to 1.6.0-SNAPSHOT 2012-09-17 01:59:03 -07:00
Adrian Cole 0eaa946348 [maven-release-plugin] prepare for next development iteration 2012-09-15 08:48:33 -07:00
Adrian Cole e72f2789e2 [maven-release-plugin] prepare release jclouds-chef-1.5.0-rc.1 2012-09-15 08:48:32 -07:00
Garrett Eardley 1425e92538 added search query test case 2012-08-31 04:18:00 +01:00
Garrett Eardley 6d1b4f0bbf added node search chefapi 2012-08-30 23:02:32 +01:00
Adrian Cole 727e749296 [maven-release-plugin] prepare for next development iteration 2012-08-17 17:55:08 -07:00
Adrian Cole 9347c265fd [maven-release-plugin] prepare release jclouds-chef-1.5.0-beta.10 2012-08-17 17:55:07 -07:00
Adrian Cole a3053b41e6 updated to jclouds 1.5.0-beta.10 2012-08-17 17:53:33 -07:00
Jeff Gehlbach ef1dc56484 More changes in support of Chef environments
- 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
2012-07-25 12:49:43 -07:00
Jeff Gehlbach a75d816ad7 Add support for chef_environment on Node domain object 2012-07-25 12:49:29 -07:00
Ignasi Barrera 0a4362c561 Fixed transient blobStorage build.
Refactored to use LocalAsyncBlobStore to be aligned with:
562f8277d3
2012-07-24 19:07:41 +02:00
Adrian Cole 4113cadb24 changed to group naming conventions and updated runScript syntax 2012-07-16 23:30:00 -04:00
Adrian Cole 4c1f8f8414 switched to new naming conventions 2012-07-15 23:36:15 -07:00
Ignasi Barrera 85ce1bd659 Fixed cookbook upload 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.
2012-07-03 16:09:48 +02:00
Ignasi Barrera 20912c9ad4 Enabled base Chef api tests in Private Chef
* 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.
2012-07-02 16:17:05 +02:00
Ignasi Barrera 05481efd71 Do not force the Chef server version 2012-07-02 14:08:40 +02:00
Ignasi Barrera b4b7f5623a Custom chef version also in Private Chef
Configured PrivateChefAsyncClient to read the value of the
X-Chef-Version header from the jclouds.api-version property.
2012-06-29 16:08:30 +02:00
Ignasi Barrera 194cd906ce Fixed provate chef unit tests 2012-06-29 14:03:21 +02:00
Ignasi Barrera b88516fedc Added support for Chef 0.10
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.
2012-06-29 13:47:31 +02:00
Ignasi Barrera d743d11934 Allow to modify the X-Chef-Version
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.
2012-06-28 17:54:28 +02:00
Ignasi Barrera 56fe3069a8 Fixed skipped chef-core live tests
* 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.
2012-06-28 15:50:55 +02:00
Ignasi Barrera de89539c85 Private key fixes:
* 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.
2012-06-27 16:33:46 +02:00
Ignasi Barrera ae857b4911 Initial live test fixes:
* 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.
2012-06-27 13:39:07 +02:00
Adrian Cole 250722e9df moved chef to org.jclouds.api/chef; moved opscodeplatform to labs/privatechef,hostedchef; updated to latest jclouds 2012-06-26 13:29:41 -07:00