You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by Yaron Rosenbaum <ya...@gmail.com> on 2015/03/08 17:04:55 UTC

cloud-config / 'userdata' in GCE provider

Hi

Is there a way to provide userdata (something like, cloud-init) using the GCE provider?
I see that there’s no GoogleComputeEngineTemplateOptions.userData(..)  method, the equivalent of AWSEC2TemplateOptions’s userData(..) .

Thanks!

(Y)


Re: cloud-config / 'userdata' in GCE provider

Posted by Andrea Turli <an...@gmail.com>.
Yaron,

great!

Maybe you could issue a PR for `jclouds-site` at
http://jclouds.apache.org/guides/google/ using `Fix this page` link.

Looking forward to see it,
Andrea


On Thu, Mar 19, 2015 at 12:04 PM Yaron Rosenbaum <ya...@gmail.com>
wrote:

> @andrea
>
> Result: It works :)
> I just created a CoreOS node, configured it, created custom unit files,
> installed and executed them - using cloud-init. The node connected to the
> rest of my multi-cloud cluster using an SDN (defined in one of these unit
> files).
>
> Nice.
>
> PS. I think it would be useful to document this, maybe on the wiki?
>
>
>
> (Y)
>
> On Mar 8, 2015, at 10:20 PM, Andrea Turli <an...@gmail.com> wrote:
>
> Not sure about the right key, but I think that's the idea.
>
> Let us know about the result!
>
> Andrea
> Il 08/mar/2015 20:50 "Yaron Rosenbaum" <ya...@gmail.com> ha
> scritto:
>
>> Hi Andrea
>>
>> So I deduce from that +
>> https://coreos.com/docs/running-coreos/cloud-providers/google-compute-engine/,
>> that for cloud-config, I should add a user metadata “user-data”=<the
>> content of the cloud-init.yaml file>
>>
>> Interesting!
>>
>> Thanks
>>
>> (Y)
>>
>> On Mar 8, 2015, at 6:41 PM, Andrea Turli <an...@gmail.com> wrote:
>>
>> Hi Yaron,
>>
>> looking at the code
>> https://github.com/jclouds/jclouds-labs-google/blob/master/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceAdapter.java#L136-L137
>>  seems that should be able to do it
>>
>> According to the GCE doc at
>> https://cloud.google.com/compute/docs/startupscript a map entry like
>>
>> startup-script=install-apache.sh
>>
>> should be what you want to add to userMetadata.
>>
>> HTH,
>> Andrea
>>
>> On Sun, Mar 8, 2015 at 5:05 PM Yaron Rosenbaum <ya...@gmail.com>
>> wrote:
>>
>>> Hi
>>>
>>> Is there a way to provide userdata (something like, cloud-init) using
>>> the GCE provider?
>>> I see that there’s no GoogleComputeEngineTemplateOptions.userData(..)  method,
>>> the equivalent of AWSEC2TemplateOptions’s userData(..) .
>>>
>>> Thanks!
>>>
>>> (Y)
>>>
>>>
>>
>

Re: cloud-config / 'userdata' in GCE provider

Posted by Yaron Rosenbaum <ya...@gmail.com>.
@andrea

Result: It works :)
I just created a CoreOS node, configured it, created custom unit files, installed and executed them - using cloud-init. The node connected to the rest of my multi-cloud cluster using an SDN (defined in one of these unit files).

Nice.

PS. I think it would be useful to document this, maybe on the wiki?



(Y)

> On Mar 8, 2015, at 10:20 PM, Andrea Turli <an...@gmail.com> wrote:
> 
> Not sure about the right key, but I think that's the idea.
> 
> Let us know about the result!
> 
> Andrea
> 
> Il 08/mar/2015 20:50 "Yaron Rosenbaum" <yaron.rosenbaum@gmail.com <ma...@gmail.com>> ha scritto:
> Hi Andrea
> 
> So I deduce from that + https://coreos.com/docs/running-coreos/cloud-providers/google-compute-engine/ <https://coreos.com/docs/running-coreos/cloud-providers/google-compute-engine/>, that for cloud-config, I should add a user metadata “user-data”=<the content of the cloud-init.yaml file>
> 
> Interesting!
> 
> Thanks
> 
> (Y)
> 
>> On Mar 8, 2015, at 6:41 PM, Andrea Turli <andrea.turli@gmail.com <ma...@gmail.com>> wrote:
>> 
>> Hi Yaron,
>> 
>> looking at the code https://github.com/jclouds/jclouds-labs-google/blob/master/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceAdapter.java#L136-L137 <https://github.com/jclouds/jclouds-labs-google/blob/master/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceAdapter.java#L136-L137>
>>  seems that should be able to do it
>> 
>> According to the GCE doc at https://cloud.google.com/compute/docs/startupscript <https://cloud.google.com/compute/docs/startupscript> a map entry like
>> startup-script=install-apache.sh
>> should be what you want to add to userMetadata.
>> 
>> HTH,
>> Andrea
>> 
>> On Sun, Mar 8, 2015 at 5:05 PM Yaron Rosenbaum <yaron.rosenbaum@gmail.com <ma...@gmail.com>> wrote:
>> Hi
>> 
>> Is there a way to provide userdata (something like, cloud-init) using the GCE provider?
>> I see that there’s no GoogleComputeEngineTemplateOptions.userData(..)  method, the equivalent of AWSEC2TemplateOptions’s userData(..) .
>> 
>> Thanks!
>> 
>> (Y)
>> 
> 


Re: cloud-config / 'userdata' in GCE provider

Posted by Andrea Turli <an...@gmail.com>.
Not sure about the right key, but I think that's the idea.

Let us know about the result!

Andrea
Il 08/mar/2015 20:50 "Yaron Rosenbaum" <ya...@gmail.com> ha
scritto:

> Hi Andrea
>
> So I deduce from that +
> https://coreos.com/docs/running-coreos/cloud-providers/google-compute-engine/,
> that for cloud-config, I should add a user metadata “user-data”=<the
> content of the cloud-init.yaml file>
>
> Interesting!
>
> Thanks
>
> (Y)
>
> On Mar 8, 2015, at 6:41 PM, Andrea Turli <an...@gmail.com> wrote:
>
> Hi Yaron,
>
> looking at the code
> https://github.com/jclouds/jclouds-labs-google/blob/master/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceAdapter.java#L136-L137
>  seems that should be able to do it
>
> According to the GCE doc at
> https://cloud.google.com/compute/docs/startupscript a map entry like
>
> startup-script=install-apache.sh
>
> should be what you want to add to userMetadata.
>
> HTH,
> Andrea
>
> On Sun, Mar 8, 2015 at 5:05 PM Yaron Rosenbaum <ya...@gmail.com>
> wrote:
>
>> Hi
>>
>> Is there a way to provide userdata (something like, cloud-init) using the
>> GCE provider?
>> I see that there’s no GoogleComputeEngineTemplateOptions.userData(..)  method,
>> the equivalent of AWSEC2TemplateOptions’s userData(..) .
>>
>> Thanks!
>>
>> (Y)
>>
>>
>

Re: cloud-config / 'userdata' in GCE provider

Posted by Yaron Rosenbaum <ya...@gmail.com>.
Hi Andrea

So I deduce from that + https://coreos.com/docs/running-coreos/cloud-providers/google-compute-engine/ <https://coreos.com/docs/running-coreos/cloud-providers/google-compute-engine/>, that for cloud-config, I should add a user metadata “user-data”=<the content of the cloud-init.yaml file>

Interesting!

Thanks

(Y)

> On Mar 8, 2015, at 6:41 PM, Andrea Turli <an...@gmail.com> wrote:
> 
> Hi Yaron,
> 
> looking at the code https://github.com/jclouds/jclouds-labs-google/blob/master/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceAdapter.java#L136-L137 <https://github.com/jclouds/jclouds-labs-google/blob/master/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceAdapter.java#L136-L137>
>  seems that should be able to do it
> 
> According to the GCE doc at https://cloud.google.com/compute/docs/startupscript <https://cloud.google.com/compute/docs/startupscript> a map entry like
> startup-script=install-apache.sh
> should be what you want to add to userMetadata.
> 
> HTH,
> Andrea
> 
> On Sun, Mar 8, 2015 at 5:05 PM Yaron Rosenbaum <yaron.rosenbaum@gmail.com <ma...@gmail.com>> wrote:
> Hi
> 
> Is there a way to provide userdata (something like, cloud-init) using the GCE provider?
> I see that there’s no GoogleComputeEngineTemplateOptions.userData(..)  method, the equivalent of AWSEC2TemplateOptions’s userData(..) .
> 
> Thanks!
> 
> (Y)
> 


Re: cloud-config / 'userdata' in GCE provider

Posted by Andrea Turli <an...@gmail.com>.
Hi Yaron,

looking at the code
https://github.com/jclouds/jclouds-labs-google/blob/master/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceAdapter.java#L136-L137
 seems that should be able to do it

According to the GCE doc at
https://cloud.google.com/compute/docs/startupscript a map entry like

startup-script=install-apache.sh

should be what you want to add to userMetadata.

HTH,
Andrea

On Sun, Mar 8, 2015 at 5:05 PM Yaron Rosenbaum <ya...@gmail.com>
wrote:

> Hi
>
> Is there a way to provide userdata (something like, cloud-init) using the
> GCE provider?
> I see that there’s no GoogleComputeEngineTemplateOptions.userData(..)  method,
> the equivalent of AWSEC2TemplateOptions’s userData(..) .
>
> Thanks!
>
> (Y)
>
>