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

Dynamic values in top-level config blocks #58

Closed
markround opened this Issue May 15, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@markround
Copy link
Owner

markround commented May 15, 2017

Dynamic values are only currently processed inside datasources, they’re not being evaluated in the top-level or plugin configuration blocks.

EG:

exec: [ "/usr/bin/head /etc/haproxy/haproxy.cfg" ] # Testing
data_sources: [ defaults, file, 'zookeeper', environment ]
template_sources: [ file ]
md5sum: true
dynamic_values: true

zookeeper:
  uri: "<%= env_zkuri -%>"
  timeout: 5

environments:
  integration:
    haproxy.cfg.erb:
      target: /etc/haproxy/haproxy.cfg

Results in:

/home/akroenert/.gem/ruby/gems/tiller-1.1.0/lib/tiller/data/zookeeper.rb:25:in `rescue in setup': Could not connect to Zookeeper cluster : <%= env_zkuri -%> (RuntimeError)
    from /home/akroenert/.gem/ruby/gems/tiller-1.1.0/lib/tiller/data/zookeeper.rb:22:in `setup'
    from /home/akroenert/.gem/ruby/gems/tiller-1.1.0/lib/tiller/datasource.rb:9:in `initialize'
    from /home/akroenert/.gem/ruby/gems/tiller-1.1.0/bin/tiller:115:in `new'
    from /home/akroenert/.gem/ruby/gems/tiller-1.1.0/bin/tiller:115:in `block in <module:Tiller>'
    from /home/akroenert/.gem/ruby/gems/tiller-1.1.0/bin/tiller:110:in `each'
    from /home/akroenert/.gem/ruby/gems/tiller-1.1.0/bin/tiller:110:in `<module:Tiller>'
    from /home/akroenert/.gem/ruby/gems/tiller-1.1.0/bin/tiller:35:in `<top (required)>'
    from /home/akroenert/bin/tiller:22:in `load'
    from /home/akroenert/bin/tiller:22:in `<main>'

@markround markround self-assigned this May 15, 2017

@markround

This comment has been minimized.

Copy link
Owner

markround commented May 15, 2017

See this branch : https://github.com/markround/tiller/tree/feature/issue_58
An example is in the test fixture, where I configure the http hostname for the http plugin : https://github.com/markround/tiller/blob/feature/issue_58/features/top_level_dynamic.feature#L59-L94

@markround

This comment has been minimized.

Copy link
Owner

markround commented May 16, 2017

Merged into /develop.

@markround markround closed this May 16, 2017

@andrewkro

This comment has been minimized.

Copy link

andrewkro commented May 18, 2017

Great! Thanks for the quick turnaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment