Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Feature/mesos attributes #1284

Merged
merged 13 commits into from
Apr 19, 2016
Merged

Feature/mesos attributes #1284

merged 13 commits into from
Apr 19, 2016

Conversation

stevendborrelli
Copy link
Contributor

@stevendborrelli stevendborrelli commented Mar 18, 2016

  • Installs cleanly on a fresh build of most recent master branch
  • Upgrades cleanly from the most recent release
  • Updates documentation relevant to the changes

@langston-barrett
Copy link
Contributor

How can we tell whether or not this works (i.e. where are Mesos agent attributes visible)?

@stevendborrelli
Copy link
Contributor Author

@siddharthist you want to look at the mesos /etc/sysconfig/mesos-agent files.

To test, put this in your role=worker stanza in sample.yml:

- hosts: role=worker
  # role=worker hosts are a subset of "all". Since we already gathered facts on
  # all servers, we can skip it here to speed up the deployment.
  gather_facts: no
  vars:
    consul_dns_domain: consul
    mesos_mode: follower
   mesos_attributes:
      - "node_id:{{ inventory_hostname }}"
      - "type:infra"

@langston-barrett langston-barrett force-pushed the feature/mesos-attributes branch from 1ad8f43 to 56852e9 Compare April 7, 2016 20:20
@langston-barrett
Copy link
Contributor

rebased, will test soon.

@langston-barrett
Copy link
Contributor

On a cluster upgraded from 1.0.3, looks like the config change worked:

$ cat sample.yml
---
# CHECK SECURITY - when customizing you should leave this in. If you
# take it out and forget to specify security.yml, security could be turned off
# on components in your cluster!
- include: "{{ playbook_dir }}/playbooks/check-requirements.yml"

# The worker role itself has a minimal configuration, as it's designed mainly to
# run software that the Mesos leader shedules. It also forwards traffic to
# globally known ports configured through Marathon.
- hosts: role=worker
  # role=worker hosts are a subset of "all". Since we already gathered facts on
  # all servers, we can skip it here to speed up the deployment.
  gather_facts: no
  vars:
    mesos_mode: follower
    consul_dns_domain: consul
    mesos_mode: follower
    mesos_attributes:
      - "node_id:{{ inventory_hostname }}"
      - "type:infra"
  roles:
    - mesos
$ ssh [email protected]
Last login: Fri Apr  8 01:05:09 2016 from c135h054.wless.reed.edu
[centos@ip-10-1-1-21 ~]$ cat /etc/sysconfig/mesos-agent
# common configuration
MESOS_PORT=5051
MESOS_ADVERTISE_IP=10.1.1.21
MESOS_IP=10.1.1.21
MESOS_HOSTNAME=lb0-worker-01.node.consul
MESOS_EXTERNAL_LOG_FILE=/var/log/mesos/mesos-agent.log
MESOS_LOGGING_LEVEL=WARNING

# agent configuration

# required
MESOS_MASTER=zk://mesos:[email protected]:2181/mesos

# optional
MESOS_ATTRIBUTES=node_id:lb0-worker-01;type:infra
MESOS_RESOURCES=ports(*):[4000-5000, 7000-8000, 9000-10000, 25000-26000, 31000-32000]
MESOS_CONTAINERIZERS=docker,mesos
MESOS_EXECUTOR_REGISTRATION_TIMEOUT=10mins
MESOS_WORK_DIR=/var/lib/mesos

# authentication
MESOS_CREDENTIAL=file:///etc/sysconfig/mesos-agent-credential

EXTRA_OPTS=""

But I lost all my Mesos agents:
screenshot

I was able to get my agents back by re-running current master's sample.yml.

@stevendborrelli
Copy link
Contributor Author

So you had to run it twice to make it work? The main issue here is that if an attribute changes, we need to remove the mesos meta file.

@langston-barrett
Copy link
Contributor

No, I wasn't able to get this branch working.

@stevendborrelli
Copy link
Contributor Author

The newest commits fix the issue. We now correctly clear out agent metadata based on the configured mesos_work_dir.

@stevendborrelli stevendborrelli merged commit 13e3ad9 into master Apr 19, 2016
@stevendborrelli stevendborrelli deleted the feature/mesos-attributes branch April 19, 2016 17:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants