public class ComputeServiceContextBuilder {
public static ComputeServiceContext build(ClusterSpec spec) throws IOException {
Configuration jcloudsConfig =
spec.getConfigurationForKeysWithPrefix("jclouds");
Set<AbstractModule> wiring = ImmutableSet.of(new JschSshClientModule(),
new Log4JLoggingModule());
return new ComputeServiceContextFactory().createContext(spec.getProvider(),
spec.getIdentity(), spec.getCredential(),
wiring, ConfigurationConverter.getProperties(jcloudsConfig));