Heroku support and CloudSigma

82 views
Skip to first unread message

danny

unread,
Mar 27, 2013, 11:07:39 AM3/27/13
to jcl...@googlegroups.com
Hi there,

I've got a three questions about jclouds. At the moment I've got jclouds working with Amazon EC2: a instance starts, it installs tomcat and deploy's the Spring petclinic application. I must say it was very confusing which example or documentation-page from jclouds was the most up to date and correct to achieve this. I did it like this (not valid code, but for the idea):

AWSEC2ComputeService computeService = getComputeService();
String userData = buildInitScript(OsFamily.UNIX, "sudo apt-get -y update", "sudo apt-get -y install tomcat7");

// Create instance
computeService.createNodesInGroup(amazonConfiguration.getInstanceName(), 1, getTemplate(computeService, userData));

@Override
protected AWSEC2ComputeService getComputeService() {
    ContextBuilder contextBuilder = ContextBuilder.newBuilder("aws-ec2").credentials(this.amazonConfiguration.getAccesskey(), this.amazonConfiguration.getSecretkey());
    return contextBuilder.build(AWSEC2ComputeServiceContext.class).getComputeService();
}

@Override
protected String buildInitScript(OsFamily osFamily, String... commands) {
    ScriptBuilder builder = new ScriptBuilder();
    for (String command : commands) {
       builder.addStatement(exec(command));
    }

    return builder.render(osFamily);
}

Is this the correct way to do it, specially the initscript building part? 

My next question is, is there a particular reason why the cloud platform Heroku isn't supported? And my final question is, I'm trying to support CloudSigma right now, but I noticed jclouds is using the old API (version 1). Am I right and is it going to use the API version 2 in the future?

Thanks!

Andrew Phillips

unread,
Mar 28, 2013, 11:51:01 AM3/28/13
to jcl...@googlegroups.com
> My next question is, is there a particular reason why the cloud
> platform Heroku isn't supported?

I think that's because Heroku is not really a compute service/IaaS
provider, it's a PaaS platform which does not give you the kind of
control over image creation, provisioning etc. that you would expect
from a compute service.

That said, given the fact that Heroku is quite a "low-level" PaaS, in
the sense that you're specifying which process you want to run, rather
than passing in an application package such as a WAR file, it may be
possible to make Heroku "look like" a compute service.

I just think there hasn't been sufficient interest expressed in that
to pursue it so far.

ap

PS: The kind of provisioning you're looking to do in your example -
installating Tomcat - might be a good candidate for jclouds-chef [1]
or tools like pallet [2] or Cloudify [3]?

[1] https://github.com/jclouds/jclouds-chef/wiki/Quick-Start
[2] http://palletops.com/
[3] http://www.cloudifysource.org/

Andrew Phillips

unread,
Mar 28, 2013, 11:51:58 AM3/28/13
to jcl...@googlegroups.com
> the Spring petclinic application. I must say it was very confusing which
> example or documentation-page from jclouds was the most up to date and
> correct to achieve this.

Thanks for the feedback - agreed. Could you let us know which
document(s) you eventually ended up using?

ap

danny

unread,
Mar 28, 2013, 12:13:57 PM3/28/13
to jcl...@googlegroups.com, aphi...@qrmedia.com
Thanks for your answer, ah ok I understand. 

From the three other solutions you're giving me I've already looked at Cloudify from Gigaspaces and it's not quite what I'm looking for. Im working on a project as an intern in my graduation year. My project is looking for a solution for this: http://blog.avisi.nl/2012/08/22/one-click-deploy/. Next to jclouds I also found deltacloud, libcloud, fog etc. So the main difference is, I want to install an application in de cloud-environment from a user and not my own account at a provider.

danny

unread,
Mar 28, 2013, 12:16:47 PM3/28/13
to jcl...@googlegroups.com, aphi...@qrmedia.com
> Thanks for the feedback - agreed. Could you let us know which   
> document(s) you eventually ended up using? 

Most I got from an example: https://github.com/jclouds/jclouds-examples/blob/master/compute-basics/src/main/java/org/jclouds/examples/compute/basics/MainApp.java

And for the other things mostly I used my IDE (Intellij) well for digging into the code. :)

danny

unread,
Mar 29, 2013, 11:04:37 AM3/29/13
to jcl...@googlegroups.com, aphi...@qrmedia.com
Is it possible for me to add support for CloudSigma API version 2? 

Andrew Phillips

unread,
Mar 29, 2013, 1:50:23 PM3/29/13
to jcl...@googlegroups.com
> Is it possible for me to add support for CloudSigma API version 2?

I'm sure that would be much appreciated! Have a look at the
"contributing to jclouds" [1] guide and of course please feel free to
ask any questions with regard to the development process, e.g. about
coding style etc. You may want to ping the jclouds-dev mailing list on
those kind of subjects.

Also, it will be interesting to see whether 2.0 can simply be an
update of the existing API (would that then still be
backwards-compatible with 1.0?) or whether this is effectively a new
API. Someone with more CloudSigma knowledge can hopefully pitch in
here ;-)

Regards

ap

[1] http://www.jclouds.org/documentation/devguides/contributing-to-jclouds/
Message has been deleted

vpetersson

unread,
Apr 19, 2013, 2:51:29 PM4/19/13
to jcl...@googlegroups.com, aphi...@qrmedia.com
Did anyone make any progress on this?

I'm pretty familiar with CS API (1.0 and 2.0), but not a Java developer, but I'd be happy to help out.

Adrian Cole

unread,
Apr 19, 2013, 4:58:04 PM4/19/13
to jcl...@googlegroups.com
To answer your questions, we've not made a heroku or any other PaaS api yet.  Most of our apis are infrastructure or storage related, but that wouldn't preclude doing one.  There's also no status on CloudSigma 2.0.  If there were updates on either of these, they'd be in issues on github jclouds-labs repo.  Any work needs both a champion and a coder, though sometimes they are the same person.  At the moment, the two issues you mention have a champion (you), but are missing coders.  They probably won't progress until someone offers to do that.  Since neither have started and we will hopefully end up in the Apache Incubator in the next week or two, I'd recommend waiting and opening an issue on each there.

HTH.
-A


On Fri, Apr 19, 2013 at 12:50 PM, vpetersson <pete...@gmail.com> wrote:
Did anyone make any progress on this?

I'm pretty familiar with CS API (1.0 and 2.0), but not a Java developer, but I'd be happy to help out.

--
You received this message because you are subscribed to the Google Groups "jclouds" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jclouds+u...@googlegroups.com.
To post to this group, send email to jcl...@googlegroups.com.
Visit this group at http://groups.google.com/group/jclouds?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Andrew Phillips

unread,
Apr 20, 2013, 8:14:31 AM4/20/13
to jcl...@googlegroups.com
> To answer your questions, we've not made a heroku or any other PaaS api
> yet. Most of our apis are infrastructure or storage related, but that
> wouldn't preclude doing one.

@Adrian: on the Heroku topic, see also
https://groups.google.com/d/msg/jclouds/cGSxOKEHCzw/6Vv4yXghYYYJ

ap
Reply all
Reply to author
Forward
0 new messages