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

Using pillar date from two mysql instances appears impossible #175

Open
JeffAbrahamson opened this issue Feb 10, 2018 · 0 comments
Open

Comments

@JeffAbrahamson
Copy link

This may be an error in my understanding of mysql-formula or an error/omission in the docs. Or a real bug. My apologies that I'm not sure which.

Imagine I have two mysql instances:

salt/top.sls

base:
  'db1-host':
    - MySQL
  'db2-host':
    - MySQL

pillar/top.sls

base:
  'db1-host':
    - mysql.db1-host
  'db2-host':
    - mysql.db2-host

And then there are files salt/MySQL/init.sls, pillar/mysql/db1-host.sls, and pillar/mysql/db2-host.sls.

But now what happens when I have some applications that want to use these databases? They need to know credentials. Easy enough,

salt/top.sls

base:
  'db1-host':
    - mysql
  'db2-host':
    - MySQL
  'app1-host':
    - app1
  'app2-host':
    - app2

pillar/top.sls

base:
  'db1-host':
    - mysql.db1-host
  'db2-host':
    - mysql.db2-host
  'app1-host':
    - mysql.db1-host
  'app2-host':
    - mysql.db2-host

Good enough. But suppose it turns out that the applications are lightweight enough to run on one host.

salt/top.sls

base:
  'db1-host':
    - mysql
  'db2-host':
    - MySQL
  'app-host':
    - app1
    - app2

And here I'm in trouble, because pillar/mysql/db1-host and pillar/mysql/db2-host have the same key names, just different values. That's what mysql-formula wants. So it's no longer clear how to write the app state file so that it picks out credentials for the two separate apps.

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

1 participant