Commit ac41f0c8 authored by Flávio Ramalho's avatar Flávio Ramalho
Browse files

Updated to reflect the latest changes added to monasca

The changes were based on the latest commits on the monasca-api
repository until the commit 5f37594fe705b909507a82cd2ef03c2f972fcca0
on 15-Jul-2016.

Also, added a task to drop required plugin configs on the
/root directory.
parent 131e235f
......@@ -31,7 +31,7 @@ Install and configure the following services:
```bash
sudo apt-get update && sudo apt-get install git -y
git clone https://git.openstack.org/openstack-dev/devstack -b stable/mitaka
git clone https://git.openstack.org/openstack-dev/devstack
cd devstack
# Remember to configure the local.conf
./stack
......
......@@ -52,6 +52,10 @@ Role Variables
os_mon_password: "password"
os_mon_project_name: "mini-mon"
# monasca-read-only-user credentials
os_mon_read_only_username: "monasca-read-only-user"
os_mon_read_only_password: "password"
# monasca-agent credentials
os_mon_agent_username: "monasca-agent"
os_mon_agent_password: "password"
......
......@@ -41,6 +41,10 @@ os_mon_username: "mini-mon"
os_mon_password: "password"
os_mon_project_name: "mini-mon"
# monasca-read-only-user credentials
os_mon_read_only_username: "monasca-read-only-user"
os_mon_read_only_password: "password"
# monasca-agent credentials
os_mon_agent_username: "monasca-agent"
os_mon_agent_password: "password"
......
......@@ -15,7 +15,7 @@
- name: Download influxdb
get_url:
url: " http://s3.amazonaws.com/influxdb/influxdb_{{ influxdb_version }}_amd64.deb"
url: "http://s3.amazonaws.com/influxdb/influxdb_{{ influxdb_version }}_amd64.deb"
dest: "/root/influxdb_{{ influxdb_version }}_amd64.deb"
mode: 0440
tags:
......
......@@ -83,20 +83,10 @@
partitions: "64"
- topic: "events"
partitions: "12"
- topic: "raw-events"
partitions: "12"
- topic: "transformed-events"
partitions: "12"
- topic: "stream-definitions"
partitions: "12"
- topic: "transform-definitions"
partitions: "12"
- topic: "alarm-state-transitions"
partitions: "12"
- topic: "alarm-notifications"
partitions: "12"
- topic: "stream-notifications"
partitions: "12"
- topic: "retry-notifications"
partitions: "3"
- topic: "60-seconds-notifications"
......
......@@ -162,6 +162,10 @@ def main(argv):
'project': '{{ os_project_name }}',
'password': '{{ os_password }}',
'role': 'monasca-user'},
{'username': '{{ os_mon_read_only_username }}',
'project': '{{ os_mon_project_name }}',
'password': '{{ os_mon_read_only_password }}',
'role': 'monasca-read-only-user'}
]
url = 'http://{{ keystone_ip_address }}:35357/v3'
......
......@@ -23,6 +23,8 @@ alarms = monasca_api.v2.reference.alarms:Alarms
alarms_count = monasca_api.v2.reference.alarms:AlarmsCount
alarms_state_history = monasca_api.v2.reference.alarms:AlarmsStateHistory
notification_methods = monasca_api.v2.reference.notifications:Notifications
dimension_values = monasca_api.v2.reference.metrics:DimensionValues
notification_method_types = monasca_api.v2.reference.notificationstype:NotificationsType
[security]
# The roles that are allowed full access to the API.
......@@ -31,6 +33,9 @@ default_authorized_roles = user, domainuser, domainadmin, monasca-user
# The roles that are allowed to only POST metrics to the API. This role would be used by the Monasca Agent.
agent_authorized_roles = monasca-agent
# The roles that are allowed to only GET metrics from the API.
read_only_authorized_roles = monasca-read-only-user
# The roles that are allowed to access the API on behalf of another tenant.
# For example, a service can POST metrics to another tenant if they are a member of the "delegate" role.
delegate_authorized_roles = admin
......@@ -52,6 +57,9 @@ alarms_driver = monasca_api.common.repositories.sqla.alarms_repository:AlarmsRep
# The driver to use for the notifications repository
notifications_driver = monasca_api.common.repositories.sqla.notifications_repository:NotificationsRepository
# The driver to use for the notification method type repository
notification_method_type_driver = monasca_api.common.repositories.sqla.notification_method_type_repository:NotificationMethodTypeRepository
[dispatcher]
driver = v2_reference
......
......@@ -22,5 +22,7 @@
. /opt/venvs/monasca-client/bin/activate
export OS_USERNAME={{ os_mon_username }}
export OS_PASSWORD={{ os_mon_password }}
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_NAME={{ os_mon_project_name }}
export OS_PROJECT_DOMAIN_NAME=Default
export OS_AUTH_URL=http://{{ keystone_ip_address }}:35357/v3/
......@@ -39,7 +39,7 @@ supervisor.childopts: -Xmx256m
worker.childopts: -Xmx1280m -XX:+UseConcMarkSweepGC -Dcom.sun.management.jmxremote
### nimbus.* configs are for the master
nimbus.host: "{{ ansible_default_ipv4.address }}"
nimbus.seeds: ["{{ ansible_default_ipv4.address }}"]
nimbus.thrift.port: 6627
nimbus.childopts: -Xmx256m
......
......@@ -30,6 +30,10 @@ Role Variables
mysql_root_pass: "secretdatabase"
mysql_host: "127.0.0.1"
## Apache plugin conf
apache_status_user: "guest"
apache_status_password: "guest"
## NTP
agent_ntp_servers:
- "{{ monasca_ip_address }}"
......@@ -48,9 +52,8 @@ Role Variables
# Common pip packages
monasca_agent_pip_packages:
- simport
- psutil==3.0.1
- PyMySQL
- python-neutronclient
- MySQL-python
- kafka-python==0.9.2
......
......@@ -29,6 +29,10 @@ os_project_name: "admin"
mysql_root_pass: "secretdatabase"
mysql_host: "127.0.0.1"
## Apache plugin conf
apache_status_user: "guest"
apache_status_password: "guest"
## NTP
agent_ntp_servers:
- "{{ monasca_ip_address }}"
......@@ -47,8 +51,7 @@ monasca_agent_required_pip_packages:
# Common pip packages
monasca_agent_pip_packages:
- simport
- psutil==3.0.1
- PyMySQL
- python-neutronclient
- MySQL-python
- kafka-python==0.9.2
......@@ -49,7 +49,7 @@
dest: "/etc/monasca/agent/conf.d/host_alive.yaml"
owner: "root"
group: "root"
mode: "0744"
mode: "0644"
- src: "monasca-reconfigure.j2"
dest: "/usr/local/bin/monasca-reconfigure"
owner: "root"
......@@ -61,13 +61,17 @@
- monasca-agent-config
- monasca-install-agent
- name: Drop mysql config
- name: Drop required plugin(s) config(s) on /root
template:
src: "my.cnf.j2"
dest: "/root/.my.cnf"
src: "{{ item }}.j2"
dest: "/root/.{{ item }}"
with_items:
- "my.cnf"
- "apache.cnf"
- "supervisord.cnf"
when: "inventory_hostname in groups['devstack']"
tags:
- monasca-mysql-plugin
- monasca-plugins
- monasca-install-agent
- name: Run monasca-reconfigure
......
[client]
url=http://localhost/server-status?auto
user={{ apache_status_user }}
password={{ apache_status_password }}
[supervisorctl]
serverurl = unix:///var/tmp/monasca-agent-supervisor.sock
[unix_http_server]
file=/var/tmp/monasca-agent-supervisor.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisord]
minfds = 1024
minprocs = 200
loglevel = info
logfile = /var/log/monasca/agent/supervisord.log
logfile_maxbytes = 50MB
nodaemon = false
pidfile = /var/run/monasca-agent-supervisord.pid
logfile_backups = 10
[program:collector]
command=/opt/venvs/monasca-agent/bin/monasca-collector foreground
stdout_logfile=NONE
stderr_logfile=NONE
priority=999
startsecs=2
user=mon-agent
autorestart=true
[program:forwarder]
command=/opt/venvs/monasca-agent/bin/monasca-forwarder
stdout_logfile=NONE
stderr_logfile=NONE
startsecs=3
priority=998
user=mon-agent
autorestart=true
[program:statsd]
command=/opt/venvs/monasca-agent/bin/monasca-statsd
stdout_logfile=NONE
stderr_logfile=NONE
startsecs=3
priority=998
user=mon-agent
autorestart=true
[group:monasca-agent]
programs=forwarder,collector,statsd
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment