Workaround to revert to shared credential store
Project: http://git-wip-us.apache.org/repos/asf/jclouds-site/repo Commit: http://git-wip-us.apache.org/repos/asf/jclouds-site/commit/c87b4acd Tree: http://git-wip-us.apache.org/repos/asf/jclouds-site/tree/c87b4acd Diff: http://git-wip-us.apache.org/repos/asf/jclouds-site/diff/c87b4acd Branch: refs/heads/master Commit: c87b4acdbd9c7d679ddd9165f8f20533c9ed49be Parents: e567875 Author: Svetoslav Neykov <[email protected]> Authored: Mon Jul 17 16:41:54 2017 +0300 Committer: Svetoslav Neykov <[email protected]> Committed: Mon Jul 17 17:33:38 2017 +0300 ---------------------------------------------------------------------- start/compute.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jclouds-site/blob/c87b4acd/start/compute.md ---------------------------------------------------------------------- diff --git a/start/compute.md b/start/compute.md index 71ad08d..b1c6138 100644 --- a/start/compute.md +++ b/start/compute.md @@ -548,3 +548,20 @@ The jclouds API allows many `Statements` to be built entirely from high-level co without having to resort to OS-specific scripts. This enables developers to express what they mean without having to deal with the gory details of various OS flavors. To see the commands that will be executed, print the result of `Statement.render(OsFamily.UNIX)`, for example. + +### Sharing the credential store between ComputeService instances + +By default there's a separate credential store per ComputeService instance. To change that and share the +same credential store between instances create your ComputeService as follows: + +{% highlight java %} +public static final Map<String, ByteSource> SHARED_CREDENTIAL_STORE = new ConcurrentHashMap<String, ByteSource>(); +... +Module sharedCredStore = new CredentialStoreModule(SHARED_CREDENTIAL_STORE); + +ContextBuilder.newBuilder("provider") + .modules(ImmutableSet.of(sharedCredStore, ...)) +... +{% endhighlight %} + +*Note*: The behaviour changed from pre-2.1.0 jclouds where the credential store used to be shared as the default.
