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

Add tags to mesos-consul itself ? #53

Open
scalp42 opened this issue Dec 22, 2015 · 10 comments
Open

Add tags to mesos-consul itself ? #53

scalp42 opened this issue Dec 22, 2015 · 10 comments

Comments

@scalp42
Copy link

scalp42 commented Dec 22, 2015

Is there a possibility to add a tag to the mesos service itself ?

The issue is that if you run multiple Mesos clusters with a single shared Consul cluster, both environments get mixed.

Assuming a dev Mesos cluster:

dev.mesos.service.consul

And a prod Mesos cluster:

prod.mesos.service.consul

It would be great to be able to override the actual service name, mesos being really generic and also taking in account where you already have a mesos service in Consul.

Thoughts ?

@ChrisAubuchon
Copy link
Contributor

Check out feature/configurable-service-name. That adds a --service-name to the command line options to change the mesos service name.

Maybe a --service-tag option that registers the mesos hosts as (leader|master|slave).<tag>.<service-name>.service.consul?

@scalp42
Copy link
Author

scalp42 commented Dec 23, 2015

@ChrisAubuchon both would be great actually 🎅 🎄

This way it's easy peasy to deploy this with Chef for example.

@ChrisAubuchon
Copy link
Contributor

@scalp42 I added --service-tags the branch. It takes a comma-delimited list of tags and registers the mesos hosts as (leader|master|follower)...service.consul.

@scalp42
Copy link
Author

scalp42 commented Dec 23, 2015

@ChrisAubuchon thanks a lot for considering it! In the middle of some ops madness here but (and sorry in advance but gotta make sure 😇) does it just default to the standard behavior, meaning if you don't pass the param, it equals to:

(leader|master|follower).mesos.service.consul

Thanks again, I'll try to figure how to pass the branch when building go package (if you're familiar with Chef):

golang_package 'github.com/CiscoCloud/mesos-consul' do
  action node[cookbook_name][recipe_name]['nuke'] ? :nothing : :install
  retries 3
  retry_delay 2
end

@ChrisAubuchon
Copy link
Contributor

@scalp42 The service-name defaults to mesos and the tags are empty by default so default behavior is not changed.

@scalp42
Copy link
Author

scalp42 commented Dec 23, 2015

@ChrisAubuchon you rock! #hugops

@imrangit
Copy link

Hi,

I just checked out a "mesos-consul" code and build an image recently. I am using consul 0.6.0. However, I am trying to run a docker container with service-name and service-tags options, but it looks like it is not picking it up. Does it have to be in a particular order?

The way I am running it is:
sudo docker run -d mesos-consul:0.3.1 "--zk=zk://zkhost:2181/mesos --service-name=mymesos --service-tags=tag1,tag2"

whereas If I run it as:
sudo docker run -d mesos-consul:0.3.1 "--zk=zk://zkhost:2181/mesos"
it registers all the mesos task as service properly in consul.

But I i would like to leverage service-name and service-tags features, how to get it to work?

-Imran

@scalp42
Copy link
Author

scalp42 commented Feb 26, 2016

I'm not sure if it's actually made it to master @ChrisAubuchon maybe can confirm

@imrangit
Copy link

I also have other question regarding the service-name and service-tags. Can we extend that to the actual marathon applications?

For example: If I have multiple marathon frameworks and if they the same application names, then it sort of pollutes the services in the consul if the name is common. What I would like to get is something like "app_name.service_name" registered as a service in consul rather than just "app_name". It is more like adding a namespace feature to mesos-consul.

-Imran

@ChrisAubuchon
Copy link
Contributor

@imrangit --service-name and --service-tag is included in v0.3.2

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

No branches or pull requests

3 participants