You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by Lewis John Mcgibbney <le...@gmail.com> on 2015/12/08 02:09:57 UTC

Re: JClouds + Chef + Rackspace

Hi Folks,
A quick follow up here, I have been working on this code as a side project
and have now got something which is functional and which also updates the
code implementation at
https://jclouds.apache.org/guides/chef/
I'll try to send a patch to update this code example once I have a full
working implementation.
Best
Lewis


On Tue, Nov 24, 2015 at 8:19 AM, Lewis John Mcgibbney <
lewis.mcgibbney@gmail.com> wrote:

> Ignasi this is extremely helpful, thank you so much.
> Lewis
>
>
> On Tuesday, November 24, 2015, Ignasi Barrera <na...@apache.org> wrote:
>
>> Hi Lewis,
>>
>> I would recommend you use the portable abstraction, as it provides the
>> "runScriptOnNode" methods that will make very easy to run scripts (and
>> Chef) on the nodes. You don't have to provision the nodes using the
>> abstraction; the only thing you need to call the runScript methods is
>> the node id, so you should be able to use it with your current code.
>>
>> Back to your questions:
>>
>> > 1. Does Chef need to be installed on every single machine? If so, how
>> do I
>> > do this?
>>
>> No. When you generate the bootstrap script using the methods in the
>> ChefService as described in the Chef guide, the resulting statement
>> will already contain the instructions to install Chef if it is not yet
>> installed on the node.
>>
>> > 2. Is it possible to combine JClouds Rackspace orchestration with the
>> Chef
>> > Server API?
>>
>> Absolutely. Both APIs are independent. The only integration point is
>> that the ChefService provides a simple helper method to generate a
>> Statement the ComputeService understands to run all the configured
>> Chef bootstrap. You can think about it as the "java version of the
>> knife bootstrap' command".
>>
>> > 3. Should I be combining the JClouds compute portable API with the Chef
>> API
>> > to bootstrap nodes (as per [2]) instead of using the code I've already
>> > written?
>>
>> I think this is already answered now :)
>>
>>
>>
>> HTH!
>>
>> I.
>>
>
>
> --
> *Lewis*
>
>


-- 
*Lewis*

Re: JClouds + Chef + Rackspace

Posted by Ignasi Barrera <na...@apache.org>.
Nice! I've had a quick look to the jclouds bits and it looks great.

One little advice: I notice you are using the Hosted Chef (which IIRC
allows only up to 5 nodes in the free plan). If you're not planning to
pay for a hosted Chef Server or don't want to deploy your own one (you
might not want to add that piece to your architecture), you can also
consider using ChefSolo, which accomplishes the same configuration
management tasks without the need of a Chef Server. I wrote a small
blog post about it time ago [1]. You can check it to have an idea of
how it works, but it is quite an old post, so the links might be
broken and the code may have changed a bit.


In any case, good job!

I.


[1] http://www.abiquo.com/2012/11/12/cooking-your-own-configuration-in-the-cloud/

On 16 December 2015 at 19:55, Lewis John Mcgibbney
<le...@gmail.com> wrote:
> Hi Folks,
> To cap this thread off, I sent my pull request to Gora which can be seen
> here
> https://github.com/apache/gora/pull/47
> Thanks again for the pointers Ignasi.
> Best
> Lewis
>
> On Mon, Dec 7, 2015 at 5:09 PM, Lewis John Mcgibbney
> <le...@gmail.com> wrote:
>>
>> Hi Folks,
>> A quick follow up here, I have been working on this code as a side project
>> and have now got something which is functional and which also updates the
>> code implementation at
>> https://jclouds.apache.org/guides/chef/
>> I'll try to send a patch to update this code example once I have a full
>> working implementation.
>> Best
>> Lewis
>>
>>
>> On Tue, Nov 24, 2015 at 8:19 AM, Lewis John Mcgibbney
>> <le...@gmail.com> wrote:
>>>
>>> Ignasi this is extremely helpful, thank you so much.
>>> Lewis
>>>
>>>
>>> On Tuesday, November 24, 2015, Ignasi Barrera <na...@apache.org> wrote:
>>>>
>>>> Hi Lewis,
>>>>
>>>> I would recommend you use the portable abstraction, as it provides the
>>>> "runScriptOnNode" methods that will make very easy to run scripts (and
>>>> Chef) on the nodes. You don't have to provision the nodes using the
>>>> abstraction; the only thing you need to call the runScript methods is
>>>> the node id, so you should be able to use it with your current code.
>>>>
>>>> Back to your questions:
>>>>
>>>> > 1. Does Chef need to be installed on every single machine? If so, how
>>>> > do I
>>>> > do this?
>>>>
>>>> No. When you generate the bootstrap script using the methods in the
>>>> ChefService as described in the Chef guide, the resulting statement
>>>> will already contain the instructions to install Chef if it is not yet
>>>> installed on the node.
>>>>
>>>> > 2. Is it possible to combine JClouds Rackspace orchestration with the
>>>> > Chef
>>>> > Server API?
>>>>
>>>> Absolutely. Both APIs are independent. The only integration point is
>>>> that the ChefService provides a simple helper method to generate a
>>>> Statement the ComputeService understands to run all the configured
>>>> Chef bootstrap. You can think about it as the "java version of the
>>>> knife bootstrap' command".
>>>>
>>>> > 3. Should I be combining the JClouds compute portable API with the
>>>> > Chef API
>>>> > to bootstrap nodes (as per [2]) instead of using the code I've already
>>>> > written?
>>>>
>>>> I think this is already answered now :)
>>>>
>>>>
>>>>
>>>> HTH!
>>>>
>>>> I.
>>>
>>>
>>>
>>> --
>>> Lewis
>>>
>>
>>
>>
>> --
>> Lewis
>
>
>
>
> --
> Lewis

Re: JClouds + Chef + Rackspace

Posted by Lewis John Mcgibbney <le...@gmail.com>.
Hi Folks,
To cap this thread off, I sent my pull request to Gora which can be seen
here
https://github.com/apache/gora/pull/47
Thanks again for the pointers Ignasi.
Best
Lewis

On Mon, Dec 7, 2015 at 5:09 PM, Lewis John Mcgibbney <
lewis.mcgibbney@gmail.com> wrote:

> Hi Folks,
> A quick follow up here, I have been working on this code as a side project
> and have now got something which is functional and which also updates the
> code implementation at
> https://jclouds.apache.org/guides/chef/
> I'll try to send a patch to update this code example once I have a full
> working implementation.
> Best
> Lewis
>
>
> On Tue, Nov 24, 2015 at 8:19 AM, Lewis John Mcgibbney <
> lewis.mcgibbney@gmail.com> wrote:
>
>> Ignasi this is extremely helpful, thank you so much.
>> Lewis
>>
>>
>> On Tuesday, November 24, 2015, Ignasi Barrera <na...@apache.org> wrote:
>>
>>> Hi Lewis,
>>>
>>> I would recommend you use the portable abstraction, as it provides the
>>> "runScriptOnNode" methods that will make very easy to run scripts (and
>>> Chef) on the nodes. You don't have to provision the nodes using the
>>> abstraction; the only thing you need to call the runScript methods is
>>> the node id, so you should be able to use it with your current code.
>>>
>>> Back to your questions:
>>>
>>> > 1. Does Chef need to be installed on every single machine? If so, how
>>> do I
>>> > do this?
>>>
>>> No. When you generate the bootstrap script using the methods in the
>>> ChefService as described in the Chef guide, the resulting statement
>>> will already contain the instructions to install Chef if it is not yet
>>> installed on the node.
>>>
>>> > 2. Is it possible to combine JClouds Rackspace orchestration with the
>>> Chef
>>> > Server API?
>>>
>>> Absolutely. Both APIs are independent. The only integration point is
>>> that the ChefService provides a simple helper method to generate a
>>> Statement the ComputeService understands to run all the configured
>>> Chef bootstrap. You can think about it as the "java version of the
>>> knife bootstrap' command".
>>>
>>> > 3. Should I be combining the JClouds compute portable API with the
>>> Chef API
>>> > to bootstrap nodes (as per [2]) instead of using the code I've already
>>> > written?
>>>
>>> I think this is already answered now :)
>>>
>>>
>>>
>>> HTH!
>>>
>>> I.
>>>
>>
>>
>> --
>> *Lewis*
>>
>>
>
>
> --
> *Lewis*
>



-- 
*Lewis*

Re: JClouds + Chef + Rackspace

Posted by Ignasi Barrera <na...@apache.org>.
Great to see it is working!

You can update the docs in the jclouds-site repo or submit a fully working
example to the jclouds-examples repo. We often use those to validate the
releases.

I.
El 8/12/2015 2:15, "Lewis John Mcgibbney" <le...@gmail.com>
escribió:

> Hi Folks,
> A quick follow up here, I have been working on this code as a side project
> and have now got something which is functional and which also updates the
> code implementation at
> https://jclouds.apache.org/guides/chef/
> I'll try to send a patch to update this code example once I have a full
> working implementation.
> Best
> Lewis
>
>
> On Tue, Nov 24, 2015 at 8:19 AM, Lewis John Mcgibbney <
> lewis.mcgibbney@gmail.com> wrote:
>
>> Ignasi this is extremely helpful, thank you so much.
>> Lewis
>>
>>
>> On Tuesday, November 24, 2015, Ignasi Barrera <na...@apache.org> wrote:
>>
>>> Hi Lewis,
>>>
>>> I would recommend you use the portable abstraction, as it provides the
>>> "runScriptOnNode" methods that will make very easy to run scripts (and
>>> Chef) on the nodes. You don't have to provision the nodes using the
>>> abstraction; the only thing you need to call the runScript methods is
>>> the node id, so you should be able to use it with your current code.
>>>
>>> Back to your questions:
>>>
>>> > 1. Does Chef need to be installed on every single machine? If so, how
>>> do I
>>> > do this?
>>>
>>> No. When you generate the bootstrap script using the methods in the
>>> ChefService as described in the Chef guide, the resulting statement
>>> will already contain the instructions to install Chef if it is not yet
>>> installed on the node.
>>>
>>> > 2. Is it possible to combine JClouds Rackspace orchestration with the
>>> Chef
>>> > Server API?
>>>
>>> Absolutely. Both APIs are independent. The only integration point is
>>> that the ChefService provides a simple helper method to generate a
>>> Statement the ComputeService understands to run all the configured
>>> Chef bootstrap. You can think about it as the "java version of the
>>> knife bootstrap' command".
>>>
>>> > 3. Should I be combining the JClouds compute portable API with the
>>> Chef API
>>> > to bootstrap nodes (as per [2]) instead of using the code I've already
>>> > written?
>>>
>>> I think this is already answered now :)
>>>
>>>
>>>
>>> HTH!
>>>
>>> I.
>>>
>>
>>
>> --
>> *Lewis*
>>
>>
>
>
> --
> *Lewis*
>