Giter Site home page Giter Site logo

ansible-mesos's Issues

ainsible-docker support

Hi,

First of all, I would like to thank you for your ansible roles. It's really simple to play with them.

The mesos role goes well if I don't use docker as mesos_containerizers.

Unfortunately When using docker (installed with your AnsibleShipyard/ansible-docker role) each time I try to start my mesos-slaves I have the message in my mesos-slave log:

_Failed to create a containerizer: Could not create DockerContainerizer: Failed to execute 'docker version': exited with status 1_

Docker is installed, when I do a sudo docker version I have this output:

Client:
 Version:      1.9.1
 API version:  1.21
 Go version:   go1.4.3
 Git commit:   a34a1d5
 Built:        Fri Nov 20 17:56:04 UTC 2015
 OS/Arch:      linux/amd64

Server:
 Version:      1.9.1
  API version:  1.21
  Go version:   go1.4.3
  Git commit:   a34a1d5
  Built:        Fri Nov 20 17:56:04 UTC 2015
  OS/Arch:      linux/amd64

But when I don't do any sudo, I have this output:

Client:
Version:      1.9.1
API version:  1.21
Go version:   go1.4.3
Git commit:   a34a1d5
Built:        Fri Nov 20 17:56:04 UTC 2015
OS/Arch:      linux/amd64
Cannot connect to the Docker daemon. Is the docker daemon running on this host?

I'd like to know if someone already faced this issue and can help me with each group/users I need set up to make work docker and mesos together.

This is my configuration for the mesos-slave (all the roles used here are from AnsibleShipyard) :


---
- hosts: [mesos_slaves]
  sudo: True
  pre_tasks:
    - name: Remove require tty
      lineinfile: regexp="tty" dest=/etc/sudoers/os_defaults state=absent
      tags: ['system']
  roles: 
    - { role: 'ansible-docker', tags: ['docker'] }
    - { role: 'ansible-java', tags: ['java'], when: ansible_os_family == 'Debian' }
    - { role: 'ansible-mesos', mesos_containerizers: "docker,mesos", zookeeper_hostnames: "{{ groups.mesos_masters | join(':' + zookeeper_client_port + ',')  }}:{{ zookeeper_client_port  }}", mesos_cluster_name: 'oprt',  mesos_install_mode: "slave", tags:  ['mesos'] }
    - { role: 'ansible-consul', consul_conf_start_join: "{{ groups.mesos_masters }}", consul_conf_retry_join: "{{ groups.mesos_masters }}", tags: ['consul'] }

Thanks,
Valentin.

restart service

Hi,

I am adjusting playbook for Centos and just hit into mesos init script.

Is handler restarting service working on Debian?
I suppose I will have to add init.d service file which supports start/stop/restart commands else this handlers won't work without init.d script.

Playbook example confusion?

The documentation for the installer uses JasonGiedymin.mesos so shouldn't the playbook installer use the same name as the role?

Not a big issue but just a small annoyance when testing this. :)

Support mesos-slave config such as hostname

Looks like at Mesos UI, if you don't pass in publicly accessible --hostname to mesos-slave script, we won't be able to access slave Sandbox from UI.

I'm proposing using a hostname.j2 template with {{inventory_hostname}} as the content since it will be using the real hostname from the inventory file (which should be publicly accessible)

Implementation might be create a mesos-slave.yml file and include it in main.yml only for "slave" mode.

@JasonGiedymin your thought on this?

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

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.

Setting up SSL?

Will this ansible role support SSL out of the box? I was looking at the documentation here and it says you have to modify your configure line to enable SSL.

../configure --enable-libevent --enable-ssl

This of course means you are building it from source, which I don't believe the play does. Is there a way to still use ansible-mesos and enable ssl?

Systemd services remain enabled despite install mode

When running the master install mode, the mesos-slave services remain enabled in systemd (more specifically, the file at /etc/systemd/system/multi-user.target.wants/mesos-slave.service still exists), and vice versa. On a reboot, the system will continuously try to restart these services which should not be running.

The following task (and a similar one for disabling mesos-master) should fix this issue. I'll open a PR after some additional testing.

service: name=mesos-slave enabled=no
when: mesos_install_mode == "master"

Add Test Cases & Execute via Docker

Use my other repo: ansible-nodejs as inspiration.

  • Add /tests/ with integration-tests.yml file which describes a (perhaps a simple) test to verify the application is running.
  • Add inventory.yml, and playbook.yml which is used to install this role in a dockerfile.
  • Add Dockerfile referencing AnsibleShipyard/base-ubuntu-java
  • Add build.sh which is a friendly command to build the dockerfile.

use default_ip4_address instead of eth1

I'm working on a PR with a few updates, but I wanted to suggest using ansible_default_ipv4.address instead of ansible_eth1.ipv4.address. I was deploying on an ubuntu instance which didn't have an eth1 interface and in inspecting ansible's artifacts it seems default would be better.

Cannot start agent due to "Failed to perform recovery: Incompatible agent info detected."

Sometimes mesos slaves do not want to start :

Failed to perform recovery: Incompatible agent info detected.

<lots of JSON>

To remedy this do as follows:
Step 1: rm -f /var/mesos/meta/slaves/latest
        This ensures agent doesn't recover old live executors.
Step 2: Restart the agent.

(from journalctl)

After removing the latest directory as suggested, the agent starts again.

I believe it is due to http://www.flexthinker.com/2015/09/reconfiguring-mesos-agents-slaves-with-new-resources/

It is possible to detect changes in the resources (one of the templates?) and automatically remove the latest directory?
Additionally, an variable can be introduced to enable/disable this behavior

Add support for resources and attributes

It'd be nice to provide support for configuring resources/attributes within Mesos using this role. The mesos-init-wrapper reads these values from /etc/mesos-slave/attributes/X and /etc/mesos-slave/resources/X where X is the name of the resource or attribute.

I think two new dicts should do the trick:

mesos_attributes:
  rack_id: 1
  os: centos7

mesos_resources:
  ports: "[21000-22000,31000-32000]"

I'll be happy to add these changes in; just thought I'd open an issue first to track the changes and request comments or suggestions.

Move vars/main.yml to defaults/main.yml

The vars defined in the vars directory has a higher precedence than the likes of group_vars, making it difficult or impossible to work with this role. Move them to defaults so users can configure this role as necessary.

Missing environment variables ?

so far I've added :

export MASTER="{{ master_ip_address }}:{{ mesos_master_port }}"

to the slaves
and

export ZK="{{ mesos_zookeeper_masters }}"
export IP="{{ ansible_eth1.ipv4.address }}"

to the master

Otherwise /usr/bin/mesos-init-wrapper is using default values for slaves :

  [[ ! ${MASTER:-} ]]    || args+=( --master="$MASTER" )

as well for master :

  [[ ! ${ZK:-} ]]      || args+=( --zk="$ZK" )
  [[ ! ${IP:-} ]]      || args+=( --ip="$IP" )

maybe I was missing something on the playbook execution

Debian repo no longer contains mesos

When using this play, I get the following error:

TASK: [ansible-mesos | Install Debian OS packages] ****************************
failed: [one] => (item=wget,curl,unzip,python-setuptools,python-dev,mesos=0.21.0-1.0.ubuntu1204) => {"failed": true, "item": "wget,curl,unzip,python-setuptools,python-dev,mesos=0.21.0-1.0.ubuntu1204"}
msg: No package matching 'mesos' is available

Did something change in the Debian repo config?

How To?

Hi,

Can someone provide a brief explanation of how to use this? Thanks.

Thanks,
Govind

[Question] Is zookeeper necessary packages for this role?

Hi !
I tried playbook . In the TASK "Install Debian OS packages" (I use Ubuntu), zookeeper* packages sometimes were not installed. With "install_recommends" option, these are installed. entries are missing with_items: ? or can we setup without zookeeper with current configuration of role?

BTW requirements section in readme says "zookeeper" is necessary package for this role.
appreciate if any reply.

Use HTTPS for repository URLs

Mesosphere and EPEL's repositories have https endpoints available. It would be prudent to use these instead of their plaintext counterparts.

Instructions unclear

Couple of things are missing from the documentation:

  • Instruction to run the project
  • What to expect when you run it

Can someone post screenshots or execution command of the same?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.