Best practice to create a variable from a running VM

41 views
Skip to first unread message

KikoV Gimeno

unread,
Aug 17, 2015, 2:04:52 AM8/17/15
to scalr-discuss
Hello,

I'm trying to setup a swarm farm with Scalr.

I though having a ROLE for the Swarm Master and another ROLE for the Swarm Nodes.

When provisioning the Swarm master, I have to follow several steps:
1) Installing and parametrizing docker
2) Running docker swarm create => it returns a TOKEN that I need in the Nodes.
3) Running docker swarm agent and docker swarm manager with the token parameter.

For the Nodes,
1) Installing and parametrizing docker
2) Running docker swarm agent with the token parameter.

Is there a way to populate the TOKEN from the master to the nodes?
What's the best practice on this?

Thanks you,

BR,




Daniele Testa

unread,
Aug 17, 2015, 2:15:51 AM8/17/15
to scalr-discuss
Hey!

You might want to read one of our tutorials about "docker" clusters. Most of them are setup the same way.

Here is one about Mesos:


Regards,
Daniele

KikoV Gimeno

unread,
Aug 17, 2015, 12:11:28 PM8/17/15
to scalr-discuss
Hello!

It seems it's not a public page.

What I'm asking if there is a way to publish a GLOBAL VARIABLE from a box.

like this:
 szradm setenv myVar myValue

I haven't seen anything on the Wiki to do that.     Information generated in a Server that should be spreaded to other members of the farms.

Is it possible? (using scalr tools)

BR,

Igor Savchenko

unread,
Aug 31, 2015, 2:51:37 PM8/31/15
to scalr-discuss

Francisco Gimeno

unread,
Aug 31, 2015, 8:37:06 PM8/31/15
to scalr-...@googlegroups.com
Thanks. That's what I was looking for.

Anyway, the problem is that it seems it's not possible sharing variables with servers with a different role, and you can't inspect other role's servers variables.

This is the case with a Master and Slaves, and Master having to deploy a token, key or certificate into the slaves.
If you use two different roles, you need anything else that sharing variables. (I already made an implementation using custom parametrized events).

BR,


--
You received this message because you are subscribed to a topic in the Google Groups "scalr-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scalr-discuss/W5u_AQURaxE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scalr-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Igor Savchenko

unread,
Aug 31, 2015, 8:47:00 PM8/31/15
to scalr-...@googlegroups.com
I would suggest to use the same role for mesos master and slave, have
cluster_role GV defined on Role level and value 'slave' or 'master'
should be set on Farm role level. In this case you'll need to maintain
only one role and bootstrap servers with different configurations
based on the value of 'cluster_role' GV.

Regards,
Igor
> You received this message because you are subscribed to the Google Groups
> "scalr-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an

Igor Savchenko

unread,
Aug 31, 2015, 8:54:55 PM8/31/15
to scalr-...@googlegroups.com
Messos is just an example. Samle is applicable for Swarm or any other
master-slave architecture.

Regards,
Igor

Francisco Gimeno

unread,
Aug 31, 2015, 8:59:07 PM8/31/15
to scalr-...@googlegroups.com
Thanks you for the response!. I'll take it into account.


Reply all
Reply to author
Forward
0 new messages