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

Move DB creation from st2mistral to postgresql role #95

Closed
arm4b opened this issue Jan 23, 2017 · 2 comments · Fixed by #272
Closed

Move DB creation from st2mistral to postgresql role #95

arm4b opened this issue Jan 23, 2017 · 2 comments · Fixed by #272

Comments

@arm4b
Copy link
Member

arm4b commented Jan 23, 2017

Since we have own postgresql role, - let it handle DB creation for st2mistral.

Use native Ansible modules postgresql_user and postgresql_db instead of init_mistral_db SQL template file.

So after all postgresql + st2mistral usage should look as following:

- name: Install st2mistral on a single node
  hosts: all
  roles:
    - name: Install PostgreSQL and configure databases
      role: postgresql
      vars:
        postgresql_databases:
          - name: "{{ st2mistral_db }}"
        postgresql_users:
          - name: "{{ st2mistral_db_username }}"
            pass: "{{ st2mistral_db_password }}"
            encrypted: yes

    - name: Install and configure StackStorm Mistral
      role: st2mistral
      vars:
        st2mistral_database_connection: postgresql://{{ st2mistral_db_username }}:{{ st2mistral_db_password }}@localhost/{{ st2mistral_db }}

Use best practices from https://github.com/ANXS/postgresql

Additionally, this will allow us to manage multi-node deployments #17 better in future.

@arm4b
Copy link
Member Author

arm4b commented May 5, 2017

This issue is the only blocker now to allow StackStorm installations with external Mongo, RabbitMQ, PostgreSQL #17

@cognifloyd
Copy link
Member

I would rather see the stackstorm and mistral specific features included in st2 specific roles so that there is still the possibility of either using an external postgres role (say, in a custom playbook) or reusing stackstorm's postgres role in external playbooks (ie in non-stackstorm playbooks).

Same goes for mongo and rabbitmq. I want to use the same roles to install those tools across my infrastructure (to maintain consistent variables across my inventory) and then add additional roles to setup app-specific databases/collections/queues after those services are installed.

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

Successfully merging a pull request may close this issue.

2 participants