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: ...@@ -31,7 +31,7 @@ Install and configure the following services:
```bash ```bash
sudo apt-get update && sudo apt-get install git -y 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 cd devstack
# Remember to configure the local.conf # Remember to configure the local.conf
./stack ./stack
......
...@@ -52,6 +52,10 @@ Role Variables ...@@ -52,6 +52,10 @@ Role Variables
os_mon_password: "password" os_mon_password: "password"
os_mon_project_name: "mini-mon" 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 # monasca-agent credentials
os_mon_agent_username: "monasca-agent" os_mon_agent_username: "monasca-agent"
os_mon_agent_password: "password" os_mon_agent_password: "password"
......
...@@ -41,6 +41,10 @@ os_mon_username: "mini-mon" ...@@ -41,6 +41,10 @@ os_mon_username: "mini-mon"
os_mon_password: "password" os_mon_password: "password"
os_mon_project_name: "mini-mon" 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 # monasca-agent credentials
os_mon_agent_username: "monasca-agent" os_mon_agent_username: "monasca-agent"
os_mon_agent_password: "password" os_mon_agent_password: "password"
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
- name: Download influxdb - name: Download influxdb
get_url: 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" dest: "/root/influxdb_{{ influxdb_version }}_amd64.deb"
mode: 0440 mode: 0440
tags: tags:
......
...@@ -83,20 +83,10 @@ ...@@ -83,20 +83,10 @@
partitions: "64" partitions: "64"
- topic: "events" - topic: "events"
partitions: "12" 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" - topic: "alarm-state-transitions"
partitions: "12" partitions: "12"
- topic: "alarm-notifications" - topic: "alarm-notifications"
partitions: "12" partitions: "12"
- topic: "stream-notifications"
partitions: "12"
- topic: "retry-notifications" - topic: "retry-notifications"
partitions: "3" partitions: "3"
- topic: "60-seconds-notifications" - topic: "60-seconds-notifications"
......
...@@ -162,6 +162,10 @@ def main(argv): ...@@ -162,6 +162,10 @@ def main(argv):
'project': '{{ os_project_name }}', 'project': '{{ os_project_name }}',
'password': '{{ os_password }}', 'password': '{{ os_password }}',
'role': 'monasca-user'}, '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' url = 'http://{{ keystone_ip_address }}:35357/v3'
......
...@@ -23,6 +23,8 @@ alarms = monasca_api.v2.reference.alarms:Alarms ...@@ -23,6 +23,8 @@ alarms = monasca_api.v2.reference.alarms:Alarms
alarms_count = monasca_api.v2.reference.alarms:AlarmsCount alarms_count = monasca_api.v2.reference.alarms:AlarmsCount
alarms_state_history = monasca_api.v2.reference.alarms:AlarmsStateHistory alarms_state_history = monasca_api.v2.reference.alarms:AlarmsStateHistory
notification_methods = monasca_api.v2.reference.notifications:Notifications 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] [security]
# The roles that are allowed full access to the API. # The roles that are allowed full access to the API.
...@@ -31,6 +33,9 @@ default_authorized_roles = user, domainuser, domainadmin, monasca-user ...@@ -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. # 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 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. # 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. # For example, a service can POST metrics to another tenant if they are a member of the "delegate" role.
delegate_authorized_roles = admin delegate_authorized_roles = admin
...@@ -52,6 +57,9 @@ alarms_driver = monasca_api.common.repositories.sqla.alarms_repository:AlarmsRep ...@@ -52,6 +57,9 @@ alarms_driver = monasca_api.common.repositories.sqla.alarms_repository:AlarmsRep
# The driver to use for the notifications repository # The driver to use for the notifications repository
notifications_driver = monasca_api.common.repositories.sqla.notifications_repository:NotificationsRepository 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] [dispatcher]
driver = v2_reference driver = v2_reference
......
...@@ -22,5 +22,7 @@ ...@@ -22,5 +22,7 @@
. /opt/venvs/monasca-client/bin/activate . /opt/venvs/monasca-client/bin/activate
export OS_USERNAME={{ os_mon_username }} export OS_USERNAME={{ os_mon_username }}
export OS_PASSWORD={{ os_mon_password }} export OS_PASSWORD={{ os_mon_password }}
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_NAME={{ os_mon_project_name }} export OS_PROJECT_NAME={{ os_mon_project_name }}
export OS_PROJECT_DOMAIN_NAME=Default
export OS_AUTH_URL=http://{{ keystone_ip_address }}:35357/v3/ export OS_AUTH_URL=http://{{ keystone_ip_address }}:35357/v3/
...@@ -39,7 +39,7 @@ supervisor.childopts: -Xmx256m ...@@ -39,7 +39,7 @@ supervisor.childopts: -Xmx256m
worker.childopts: -Xmx1280m -XX:+UseConcMarkSweepGC -Dcom.sun.management.jmxremote worker.childopts: -Xmx1280m -XX:+UseConcMarkSweepGC -Dcom.sun.management.jmxremote
### nimbus.* configs are for the master ### nimbus.* configs are for the master
nimbus.host: "{{ ansible_default_ipv4.address }}" nimbus.seeds: ["{{ ansible_default_ipv4.address }}"]
nimbus.thrift.port: 6627 nimbus.thrift.port: 6627
nimbus.childopts: -Xmx256m nimbus.childopts: -Xmx256m
......
...@@ -30,6 +30,10 @@ Role Variables ...@@ -30,6 +30,10 @@ Role Variables
mysql_root_pass: "secretdatabase" mysql_root_pass: "secretdatabase"
mysql_host: "127.0.0.1" mysql_host: "127.0.0.1"
## Apache plugin conf
apache_status_user: "guest"
apache_status_password: "guest"
## NTP ## NTP
agent_ntp_servers: agent_ntp_servers:
- "{{ monasca_ip_address }}" - "{{ monasca_ip_address }}"
...@@ -48,9 +52,8 @@ Role Variables ...@@ -48,9 +52,8 @@ Role Variables
# Common pip packages # Common pip packages
monasca_agent_pip_packages: monasca_agent_pip_packages:
- simport
- psutil==3.0.1
- PyMySQL - PyMySQL
- python-neutronclient
- MySQL-python - MySQL-python
- kafka-python==0.9.2 - kafka-python==0.9.2
......
...@@ -29,6 +29,10 @@ os_project_name: "admin" ...@@ -29,6 +29,10 @@ os_project_name: "admin"
mysql_root_pass: "secretdatabase" mysql_root_pass: "secretdatabase"
mysql_host: "127.0.0.1" mysql_host: "127.0.0.1"
## Apache plugin conf
apache_status_user: "guest"
apache_status_password: "guest"
## NTP ## NTP
agent_ntp_servers: agent_ntp_servers:
- "{{ monasca_ip_address }}" - "{{ monasca_ip_address }}"
...@@ -47,8 +51,7 @@ monasca_agent_required_pip_packages: ...@@ -47,8 +51,7 @@ monasca_agent_required_pip_packages:
# Common pip packages # Common pip packages
monasca_agent_pip_packages: monasca_agent_pip_packages:
- simport
- psutil==3.0.1
- PyMySQL - PyMySQL
- python-neutronclient
- MySQL-python - MySQL-python
- kafka-python==0.9.2 - kafka-python==0.9.2
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
dest: "/etc/monasca/agent/conf.d/host_alive.yaml" dest: "/etc/monasca/agent/conf.d/host_alive.yaml"
owner: "root" owner: "root"
group: "root" group: "root"
mode: "0744" mode: "0644"
- src: "monasca-reconfigure.j2" - src: "monasca-reconfigure.j2"
dest: "/usr/local/bin/monasca-reconfigure" dest: "/usr/local/bin/monasca-reconfigure"
owner: "root" owner: "root"
...@@ -61,13 +61,17 @@ ...@@ -61,13 +61,17 @@
- monasca-agent-config - monasca-agent-config
- monasca-install-agent - monasca-install-agent
- name: Drop mysql config - name: Drop required plugin(s) config(s) on /root
template: template:
src: "my.cnf.j2" src: "{{ item }}.j2"
dest: "/root/.my.cnf" dest: "/root/.{{ item }}"
with_items:
- "my.cnf"
- "apache.cnf"
- "supervisord.cnf"
when: "inventory_hostname in groups['devstack']" when: "inventory_hostname in groups['devstack']"
tags: tags:
- monasca-mysql-plugin - monasca-plugins
- monasca-install-agent - monasca-install-agent
- name: Run monasca-reconfigure - 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