Discussion:
[ansible-project] Rolling deploys to groups of servers
Guy Matz
2015-07-29 21:03:05 UTC
Permalink
Hello!
I have the requirement to perform rolling deploys to groups of servers at a
time, e.g. the first set of servers - app1_server_1, app2_server_1,
app3_server1 - first, then the second set - app1_server2, app2_server2,
app3_server2 - then the third set, app1_server3, app2_server3,
app3_server3, etc.

Anyone know of a good way to do this in ansible?

Thanks a lot,
Guy
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CABnTgtUV9-vT5AR5Y2COHKQ7fU-kgvBf9e2rVJpKLm83A_OG8A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Brian Coca
2015-07-29 23:13:41 UTC
Permalink
several, one way is:

- hosts: app*_server1:app*_server2:app*_server3
serial: 3
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8nzbkjUe1rrSKxVgA3cP6cj%3D0fpNrrN_FE_AVWw8g190g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Guy Matz
2015-07-30 16:28:10 UTC
Permalink
Great! That looks like it'll work! What's another way? ;-)

Thanks,
Guy
Post by Brian Coca
- hosts: app*_server1:app*_server2:app*_server3
serial: 3
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAJ5XC8nzbkjUe1rrSKxVgA3cP6cj%3D0fpNrrN_FE_AVWw8g190g%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CABnTgtXmXO2E%3Du0Kh3qJOR5nDD4So05suFRCQGWKOA4PcaUrnQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Offer Sharabi
2015-07-30 12:52:05 UTC
Permalink
Hi Guy,
First you need a way to refer to your servers in the required release
order. Easy way is to just have them as a group in your host file such as:

[servers]
server1
server2
server3
...
serverN

Then in your rolling deploy playbook, you refer to this group as hosts, and
use serial=1 if you would like Ansible to finish all apps in one server
before moving on to the next one.

To force the app order, you can create task lists for each deploy, and then
include them in order, such as:

hosts: servers
serial:1
.
.
.
tasks:
- include : deploy_app1
- include: deploy_app2
- include: deploy_app3

Hope it helps !
Post by Guy Matz
Hello!
I have the requirement to perform rolling deploys to groups of servers at
a time, e.g. the first set of servers - app1_server_1, app2_server_1,
app3_server1 - first, then the second set - app1_server2, app2_server2,
app3_server2 - then the third set, app1_server3, app2_server3,
app3_server3, etc.
Anyone know of a good way to do this in ansible?
Thanks a lot,
Guy
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2f5e106b-ede6-483a-bc66-0c7f7d70aade%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...