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

Added dependencies needed to install pyodbc #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
- name: Install Vertica
apt: deb="{{vertica_package_location}}" state=installed
sudo: true

- name: Create Vertica dot file for the agent plugin
template: src=root-vertica-cnf.j2 dest=/root/.vertica.cnf owner=root group=root mode=400
9 changes: 8 additions & 1 deletion tasks/node_dependencies.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
- name: Install Vertica dependencies
- name: Install Vertica APT dependencies
apt: name="{{item}}" state=present
with_items: vertica_dependencies
when: not skip_install

- name: Install Vertica PIP dependencies
pip: name=pyodbc state=present virtualenv="{{monasca_virtualenv_dir}}"
when: not skip_install

- name: Setup User limits for the db
template: dest=/etc/security/limits.d/vertica.conf owner=root group=root mode=644 src=vertica_limits.conf.j2

Expand All @@ -20,3 +24,6 @@

- name: Create en_US.UTF-8 locale
shell: localedef -i en_US -c -f UTF-8 en_US.UTF-8

- name: Configure ODBC
template: src=odbcinst.j2 dest=/etc/odbcinst.ini owner=root group=root mode=644
3 changes: 3 additions & 0 deletions templates/odbcinst.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[HPVertica]
Description = HP Vertica ODBC Driver
Driver = /opt/vertica/lib64/libverticaodbc.so
7 changes: 7 additions & 0 deletions templates/root-vertica-cnf.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[vertica]
db_name =
db_user = {{ vertica_dbadmin_user }}
db_pass = {{ vertica_dbadmin_password }}
db_host = 127.0.0.1
db_port = 5433
db_driver = HPVertica
2 changes: 2 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ vertica_dependencies:
- ssh
- sysstat
- mcelog
- python-dev
- unixodbc-dev
# daily|weekly|monthly
vertica_logrotate_period: weekly
vertica_logrotate_retention: 4
Expand Down