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

Question : Atlas join #228

Closed
CruzanCaramele opened this issue Feb 9, 2016 · 4 comments
Closed

Question : Atlas join #228

CruzanCaramele opened this issue Feb 9, 2016 · 4 comments

Comments

@CruzanCaramele
Copy link

One of the features of Consul is to view the state of your infrastructure on Atlas . Is there a way to configure your infrastructure using this module to have it display the state of the infrastructure on Atlas ?

@solarkennedy
Copy link
Contributor

https://www.consul.io/docs/guides/atlas.html

Using arbitrary option in config_hash, looks like you can do this. Looks like it would probably be better for us to support the ATLAS_TOKEN env variable so you don't see it in the cli flags in ps.

PRs welcome for a readme update or any changes needed to make this work! AFAIK nobody has done it yet.

@ghost
Copy link

ghost commented Apr 28, 2016

I would love to do this and have been testing it. I may be missing something basic here.

  class { '::consul':
  version     => $consul_version,
  config_hash => {
    'data_dir'    => '/opt/consul',
    'datacenter'  => $consul_datacenter,
    'log_level'   => 'INFO',
    'node_name'   => $::fqdn,
    'retry_join'  => $consul_servers,
    'encrypt'     => $consul_encryption_key,
    'atlas'       => 'username/environment',
    'atlas-token' => 'example24345563123' ,
    }
  }

Doesn't seem to work. I can use the same settings to start the agent manually (passing agent options inline). When I use the above, I get

consul agent -config-dir /etc/consul/
==> Error decoding '/etc/consul/config.json': Config has invalid keys: atlas,atlas-token

Any ideas?

@solarkennedy
Copy link
Contributor

You need to use the correct keys: https://www.consul.io/docs/agent/options.html#atlas_infrastructure

This is part of the config hash, they are not command line options.

@ghost
Copy link

ghost commented May 6, 2016

Thank you, that was it.

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