GithubHelp home page GithubHelp logo

thiruyadav / ansible-splunk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alanwill/ansible-splunk

0.0 1.0 0.0 225 KB

Ansible playbook for installing Splunk 6 on an AWS infrastruture

License: MIT License

Shell 100.00%

ansible-splunk's Introduction

Ansible Playbook for Splunk

This Ansible playbook installs and configures a Splunk 6.1 cluster

So far I've only used and tested this playbook on AWS instances.

  • The core CloudFormation template is used to create the VPC
  • The cfn-splunk CloudFormation template is used to create the Splunk components

You don't have to use the above templates and can surely use a pre-created VPC and instances, just be sure that your instances are tagged as Ansible expects or tweak the splunk-site.yml file to adapt to your tagging convention.

This playbook will do the following:

  • Install the latest OS security updates on all instances
  • Update the hostsnames on all instances to be the EC2 instance ID
  • Download and install the Splunk Enterprise RPM on all instances, if it's not already installed
  • Delete the RPM after successful install
  • Run config_splunk_inputs.sh which updates the inputs.conf on each component to include the instance hostname
  • Start Splunk and set to auto-start on boot
  • Update ACLs to allow Splunk to read /var/log files
  • Reset the default Splunk password
  • Copy custom configuration files (authentication.conf, web.conf, authorize.conf, ui-prefs.conf, alert_actions.conf)
  • Copy custom certs for Splunk Web
  • Add nodes to the License Master
  • Restart Splunk
  • Install packages to enable Cloudwatch metrics
  • Configure the Cluster Master with a replication factor of 3 and search factor of 2 then restart Splunk on the instance
  • Add the Search Heads to the cluster, then restart Splunk on them
  • Add the Peer Nodes to the cluster
  • Partition and mount the Peer node volumes
  • Disable Splunk web on the Peer Nodes

By the time this playbook completes you'll have a working Splunk cluster.

##Future

There's a few things I'm looking to do to make this playbook more re-usable, namely:

  • Increase the idempotency
  • Make the peer node role more dynamic to various instance sizes. As it, it works best with i2.2xlarge instances
  • Consolidate all variables to a single master file

##Contributing

I can't say this enough, Pull Requests are very much welcomed. Hope this playbook helps others as much as it helps me. If you have any feedback on ways to improve it, I'm all ears. Submit an Issue if something doesn't work as advertised.

alan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.