Browse Source

Fixing bug: worker starting app. Also fixed grammar in README

master
Benedikt Kristinsson 4 years ago
parent
commit
df2e1f9f6e
  1. 2
      README.md
  2. 2
      ansible/roles/swarm-services/tasks/main.yml
  3. 2
      tf/stack.tf

2
README.md

@ -118,4 +118,4 @@ If you haven't delegated the subdomain, you should use the ELBs public dns name,
I tried to keep all of the logic in Terraform, but it feels like it belongs somewhere else --- even independently. Also, it would be better if you could just specify a total number of nodes, and an automatically correct ratio of managers/workers would be selected automatically.
The `local-exec` command that invokes Ansible is terribly messy and has handcrafted JSON. Also, due to limitation in Terraform, you can only configure one app in `stack.tf`, but the Ansible is able to handle a list of apps. It might be better to have that part of the configuration in Ansible and not Terraform.
The `local-exec` command that invokes Ansible is terribly messy and has handcrafted JSON. Also, due to limitations in Terraform, you can only configure one app in `stack.tf` to start on the swarm, but the Ansible code handles a list of apps. It might be better to have that part of the configuration in Ansible and not Terraform

2
ansible/roles/swarm-services/tasks/main.yml

@ -4,6 +4,6 @@
- "{{ services }}"
- name: "Create Docker services on the swarm"
shell: "docker service create --replicas {{ node_count }} --publish {{ item.port }}:{{item.port}} --network aws-demo {{ item.name }}"
shell: "docker -H {{ masterip }} service create --replicas {{ node_count }} --publish {{ item.port }}:{{item.port}} --detach=false --network aws-demo {{ item.name }}"
with_items:
- "{{ services }}"

2
tf/stack.tf

@ -23,7 +23,7 @@ variable "domainname" {
}
variable "node_count" {
default = 3
default = 5
}
variable "manager_count" {

Loading…
Cancel
Save