Multi-VM / Provisioning dependencies

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Multi-VM / Provisioning dependencies

Sascha Vogt
Hi all,

Probably this is more a Puppet question, but I'm struggeling to find the
right search terms for Google and maybe someone here has already done
something similar.

What I want is to create a small cluster (3 VMs) in a private network
and install the software I'm currently developing on it. As provisioner
I used Puppet. Now setting up the first server is easy. The first server
creates the installation packages for the other nodes. This also works,
now comes the question:

At this point the provisioning on server 1 should pause, until server 2
and 3 are provisioned and after that server 1 should complete the setup
(basically "activating" server 2 and 3).

Is there any Vagrant or Puppet magic I'm missing which could be used for
something like that, or would I need to setup server 2 and server 3 as
Puppet slaves and server 1 as Puppet master and do not use the Vagrant
built-in provisioning for server 2 and 3?

Greetings
-Sascha-

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Multi-VM / Provisioning dependencies

Simon McCartney
Sascha Vogt wrote:
>
> At this point the provisioning on server 1 should pause, until server 2
> and 3 are provisioned and after that server 1 should complete the setup
> (basically "activating" server 2 and 3).

That feels a little clumsy, for most environments where you need to
activate or enable a server in a registry, (eg signing puppet keys or
salt keys from a minion), it's either an explicit step, or the
siging/activating process has a development mode that is insecure, i.e.
it signs/activates anything that comes in - is ther such an option for
your activate process?

Could you fake one by leaving a shell script running that activates any
incoming registrations?

> Is there any Vagrant or Puppet magic I'm missing which could be used for
> something like that, or would I need to setup server 2 and server 3 as
> Puppet slaves and server 1 as Puppet master and do not use the Vagrant
> built-in provisioning for server 2 and 3?

Not that I know of - you can't block a puppet run at a certain point
(well, you can with an exec with crazy sleep, but then you never get as
far as provisioning your 2nd & 3rd boxes)

Would "vagrant up" followed by a "vagrant provision server1" help - so
that server1 gets a second go at completing?

Simon.

--
Simon McCartney
[hidden email]
+44 7710 836 915


signature.asc (275 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Multi-VM / Provisioning dependencies

Sascha Vogt
Hi,

Am 26.11.13 12:29, schrieb Simon McCartney:

> Sascha Vogt wrote:
>>
>> At this point the provisioning on server 1 should pause, until server 2
>> and 3 are provisioned and after that server 1 should complete the setup
>> (basically "activating" server 2 and 3).
>
> That feels a little clumsy, for most environments where you need to
> activate or enable a server in a registry, (eg signing puppet keys or
> salt keys from a minion), it's either an explicit step, or the
> siging/activating process has a development mode that is insecure, i.e.
> it signs/activates anything that comes in - is ther such an option for
> your activate process?
Unfortunately not, the nodes get contacted from server 1, they have no
means to access the "inner" server. But I could open a separate SSH
session from the other servers and run the enabling remote. Thanks for
the idea ;)

> Could you fake one by leaving a shell script running that activates any
> incoming registrations?
Actually not needed, via SSH I can complete the registration remotely.

> Would "vagrant up" followed by a "vagrant provision server1" help - so
> that server1 gets a second go at completing?
Yes, that would work, but I would like to setup the whole thing with a
single vagrant up. Anyway, the SSH way should work. I'll try that tomorrow.

Greetings
-Sascha-

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Multi-VM / Provisioning dependencies

VMTrooper
You may want to check out a Vagrant plugin called "oscar" written by Puppet's Adrian Thebo. It will automatically deploy a Puppet Master with host files created for your second and third VMs so that you get name resolution.

Also, it allows you to use multiple box files (i.e. CentOS and Ubuntu) in the same Vagrantfile if you want multiple OS's

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Multi-VM / Provisioning dependencies

Sascha Vogt
Hey Trevor,

Am 28.11.2013 12:45, schrieb Trevor Roberts:
> You may want to check out a Vagrant plugin called "oscar" written by
> Puppet's Adrian Thebo. It will automatically deploy a Puppet Master
> with host files created for your second and third VMs so that you get
> name resolution.
Thanks for the hint. The plugin looks interesting. May play with it a
bit, for now I use the "slaves connect to the master via SSH and execute
the activation script" approach.

While this is not possible in a production env, in my test env I don't
have firewalls  in plays, which would prevent such a thing.

Thanks everyone for the help!
Greetings
-Sascha-

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.