Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would you provide an all in one example for zookeeper, mesos and marathon ? #63

Open
eromoe opened this issue Sep 18, 2016 · 1 comment

Comments

@eromoe
Copy link

eromoe commented Sep 18, 2016

Hello!

As a rookie to ansible, I have some questions to bind them togetother:

  1. There is a variable: zookeeper_client_port: "2181" in ansible-mesos, but not in ansible-marathon.
  2. Both ansible-mesos and ansible-marathon have zookeeper_hostnames, how can I set a global variable for them?
  3. ansible-mesos readme write as zookeeper_hostnames: "{{ groups.zookeeper_hosts | join(':' + zookeeper_client_port + ',') }}:{{ zookeeper_client_port }}. ( I think groups.zookeeper_hosts equals to groups[zookeeper_hosts] here, isn't it ). But in ansible-zookeeper, the example is zookeeper_hosts: "{{groups['zookeepers']}}".

Now, I write a .yml like below:

- name: install java
- hosts: all
  roles:
    - role: geerlingguy.java
      when: "ansible_os_family == 'RedHat'"
      java_packages:
        - java-1.8.0-openjdk

- name: Zookeeper cluster setup
  hosts: zookeepers
  sudo: yes
  roles:
    - role: AnsibleShipyard.ansible-zookeeper
      zookeeper_hosts: "{{groups['zookeepers']}}"

- name: install mesos
- hosts: mesos-cluster
  roles:
    - role: mesos # I reset the name, because install from github
      zookeeper_client_port: 2181
      zookeeper_hostnames: "{{ groups.zookeepers | join(':' + zookeeper_client_port + ',')  }}:{{ zookeeper_client_port  }}"
      mesos_containerizers: "docker,mesos"

- name: install marathon
- hosts: marathon-cluster
  roles:
    - role: marathon
      zookeeper_hostnames: "{{ groups.zookeepers | join(':2181,')  }}:2181"
      mesos_containerizers: "docker,mesos"

If there are a full example would be nice for learn and reuse.

@Light-Gao
Copy link

https://github.com/Light-Gao/lightpaas
Maybe you are interested in that project. But it's new ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants