Adding in vertica

Change-Id: Ifa633cd4b2fb04220a1adf8d57dde942f7ea3f57
This commit is contained in:
Michael James Hoppal 2015-05-15 14:05:50 -06:00
parent 38e722d432
commit 4e41e47566
7 changed files with 55 additions and 2 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@
.settings
*.deb
*.pyc
*.jar
roles/tkuhlman.*
roles/stympy.influxdb
ansible.cfg

View File

@ -14,6 +14,7 @@
- [Smoke test](#smoke-test)
- [Updating](#updating)
- [Running behind a Web Proxy](#running-behind-a-web-proxy)
- [Running with Vertica][#running-with-vertica]
- [Advanced Usage](#advanced-usage)
- [Access information](#access-information)
- [Internal Endpoints](#internal-endpoints)
@ -100,6 +101,25 @@ VM to use them also. It is important that 192.168.10.4, 192.168.10.5, 127.0.0.1
vagrant plugin install vagrant-proxyconf
```
## Running with Vertica
You can configure Vagrant to run Vertica as the database in place of influxdb.
To accomplish this you have to download the community edition (Debian) and the jdbc driver from [Vertica](https://my.vertica.com/download-community-edition/).
Place the jdbc driver and debian in the home directory of vagrant with the names of:
vertica_jdbc.jar
vertica.deb
Set the environment variable USE_VERTICA to true and then run vagrant up.
```
export USE_VERTICA=true
vagrant up
```
# Advanced Usage
## Access information
- Your host OS home dir is synced to `/vagrant_home` on the VM.
@ -156,6 +176,8 @@ your local ansible configuration (~/.ansible.cfg or a personal ansible.cfg in th
Next run `vagrant ssh-config >> ~/.ssh/config`, that will set the correct users/host_keys for the vagrant vms.
When running Ansible directly make sure that you pass in what the database_type is, ie `ansible-playbook mini-mon.yml -e 'database_type=influxdb'`.
### Editing Ansible Configuration
Since there are only two VMs in this setup the Ansible configuration has no host or group variables, rather
all variables are in the playbook. There is one playbook for each machine, `mini-mon.yml` and `devstack.yml`.

5
Vagrantfile vendored
View File

@ -51,6 +51,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
mm.vm.provision "ansible" do |ansible|
ansible.playbook = "mini-mon.yml"
ansible.raw_arguments = ['-T 30', '-e pipelining=True']
if ENV["USE_VERTICA"]
ansible.extra_vars = { database_type: "vertica"}
else
ansible.extra_vars = { database_type: "influxdb"}
end
end
end

View File

@ -17,12 +17,27 @@ nimbus_host: "{{mini_mon}}"
percona_package: percona-xtradb-cluster-56
smtp_host: localhost
storm_worker_ports: [6701, 6702]
vertica_package_location: /vagrant/vertica.deb
vertica_jdbc_location: /vagrant/vertica_jdbc.jar
vertica_ssh_key_location: /vagrant
vertica_url: "jdbc:vertica://localhost:5433/mon"
zookeeper_hosts: "{{mini_mon}}:2181"
# common credentials
influxdb_users:
mon_api: password
mon_persister: password
vertica_dbadmin_password: password
vertica_users:
- username: monitor
password: password
role: monitor
- username: mon_api
password: password
role: monasca_api
- username: mon_persister
password: password
role: monasca_persister
keystone_admin: admin
keystone_admin_password: ""
keystone_auth_method: token

View File

@ -1,3 +1,10 @@
- name: Check if database type is set
hosts: mini-mon
tasks:
- name: Check for database_type
fail: msg="Must set database type when running this playbook. To pass via command line use -e."
when: database_type is not defined
- name: Installs DBs, kafka and other core dependencies.
hosts: mini-mon
sudo: yes
@ -18,8 +25,9 @@
roles:
- {role: zookeeper, tags: [zookeeper]}
- {role: kafka, tags: [kafka]}
- {role: influxdb, tags: [influxdb]}
- {role: influxdb, when: database_type == 'influxdb', tags: [influxdb]}
- {role: percona, tags: [mysql, percona]}
- {role: vertica, when: database_type == 'vertica', tags: [vertica]}
- name: Sets up schema and install Monasca apps
hosts: mini-mon

View File

@ -26,3 +26,5 @@
name: zookeeper
- src: https://github.com/hpcloud-mon/ansible-influxdb
name: influxdb
- src: mhoppal.vertica
name: vertica

View File

@ -8,7 +8,7 @@ system_vars = {
'default': { # the default configuration, assumes monasca-vagrant setup
'expected_processes': ('monasca-persister', 'monasca-notification',
'kafka', 'zookeeper.jar', 'monasca-api',
'influxdb', 'apache-storm', 'mysqld'),
'apache-storm', 'mysqld'),
'mail_host': 'localhost',
'metric_host': subprocess.check_output(['hostname', '-f']).strip()},
}