soleger / opennms-minion-aws

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenNMS Minion Lab on AWS

Overview

The repository contains an AWS CloudFormation stack and Ansible playbooks for setting up the stack and configuring the EC2 instances.

The current stack that is generated by these scripts looks like:

                                       - Minion 1 -                       - Elasticsearch Cluster
    Load Generator -> Load Balancer -               -> Kafka -> OpenNMS -
                                       - Minion 2 -                       - PostgreSQL
                - Kafka 1
    Zookeeper -
                - Kafka n
                             - Elasticsearch node 1
     Elasticsearch Cluster -
                             - Elasticsearch node n

Requirements

  • Ansible (tested with v2.2.0.0)
  • Valid AWS credentials (i.e. aws iam list-users should run successfully)

Setup

ansible-playbook -vv cloudformation.yaml --tags "provision"
./ec2.py --refresh-cache
ansible-playbook -i ec2.py -vv cloudformation.yaml --tags "setup" -u ec2-user

Teardown

ansible-playbook -vv cloudformation.yaml --tags "destroy"

Other useful commands

ansible-playbook -i ec2.py -vv cloudformation.yaml --tags "debug" -u ec2-user
ansible -i ec2.py -u ec2-user tag_aws_cloudformation_stack_name_opennms_minion_lab -m ping

Kafka and Elasticsearch

Number of Kafka and Elasticsearch nodes can be confiured in the vars/cf_vars.yaml configuration file.

Using the stack

Kafka

Increase the number of partitions using:

./bin/kafka-topics.sh --zookeeper=10.0.0.226:2181 --alter --topic OpenNMS.Sink.Syslog --partitions 2

References

About


Languages

Language:Python 86.1%Language:Smarty 10.3%Language:Shell 2.1%Language:Nginx 1.3%Language:Clojure 0.1%