Git Product home page Git Product logo

sensu-admin-chef's Introduction

DESCRIPTION

Installs sensu-admin, a web interface for the Sensu API.

NOTE: sensu-admin has not been updated to support sensu >= 0.14.0; as a result this cookbook has become deprecated and is not likely to recieve updates. You may wish to consider using uchiwa-chef to install uchiwa instead.

TESTING

This cookbook uses test-kitchen. To converge and run tests:

gem install bundler
bundle install
bundle exec kitchen verify

Once converged, you may connect to the test-kitchen VM's IP in your browser and login as [email protected] with the password 'secret'.

COOKBOOK DEPENDENCIES

  • mysql-chef_gem - mysql-chef_gem::default recipe required to satisify mysql2 gem prerequisites
  • ruby - only used by Vagrantfile

REQUIREMENTS

SSL configuration

For ease of use with Vagrant, example ssl data is included in the data_bags directory. Please don't use this certificate in a live environment.

RECIPES

sensu-admin::default

Installs sensu-admin rails app running on unicorn, front-ended by an nginx or apache proxy.

sensu-admin::nginx.rb

Install nginx as frontend http server (default)

sensu-admin::apache.rb

Install apache as frontend http server instead of nginx (see attribute below)

sensu-admin::deploy.rb

Deploy sensu admin code from github repo

sensu-admin::unicorn.rb

Setup unicorn configuration and init scripts for sensu-admin

ATTRIBUTES

node.sensu.admin.user - user to run sensu-admin as, defaults to 'sensu'

node.sensu.admin.group - ditto above

node.sensu.admin.host - hostname which nginx is configured to proxy for

node.sensu.admin.http_port - nginx http port, defaults to '80'

node.sensu.admin.https_port - nginx https port, defaults to '443'

node.sensu.admin.backend_port - unicorn port, defaults to '8888'

node.sensu.admin.repo - repo url for sensu-admin app

node.sensu.admin.release - specifies revision of sensu-admin to deploy

node.sensu.admin.base_path - path where sensu-admin will be deployed, defaults to '/opt/sensu/admin'

node.sensu.admin.frontend - 'nginx', 'apache' or 'none' for user facing http - defaults to 'nginx'. 'none' does not install a frontend which could allow for integration with othe existing frontend proxys.

sensu-admin-chef's People

Contributors

cwjohnston avatar sdadh01 avatar zarry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sensu-admin-chef's Issues

Only Ubuntu 12.04 Supported

When attempting to run the test-kitchen suite, the chef run fails when bringing up any vm that's not Ubuntu 12.04. Each vm fails for their own reason. The .kitchen.yml should either be updated to reflect this (by only having 12.04) or the cookbook should be updated to support each platform listed.

Ubuntu 10.04: Fails b/c no git package in apt repository

CentOS 6.4: Fails when attempting to install ruby-mode

CentOS 5.9: Fails when attempting to install nginx

Ubuntu 10.04 output

* package[git] action install[2013-09-05T21:56:50+00:00] INFO: Processing package[git] action install (sensu-admin::default line 25)
      ===============================================================================
       Error executing action `install` on resource 'package[git]'
================================================================================

       Chef::Exceptions::Package
       -------------------------
       git has no candidate in the apt-cache       

       Resource Declaration:
       ---------------------
       # In /tmp/kitchen-chef-solo/cookbooks/sensu-admin/recipes/default.rb
        25: package "git"
        26: package "sqlite3"

       Compiled Resource:
       ------------------
       # Declared in /tmp/kitchen-chef-solo/cookbooks/sensu-admin/recipes/default.rb:25:in `from_file'

       package("git") do
         action :install
         retries 0
         retry_delay 2
         package_name "git"
         cookbook_name :"sensu-admin"
         recipe_name "default"
       end

       [2013-09-05T21:56:50+00:00] INFO: Running queued delayed notifications before re-raising exception
       [2013-09-05T21:56:50+00:00] ERROR: Running exception handlers
       [2013-09-05T21:56:50+00:00] ERROR: Exception handlers complete
       [2013-09-05T21:56:50+00:00] FATAL: Stacktrace dumped to /tmp/kitchen-chef-solo/cache/chef-stacktrace.out
       Chef Client failed. 15 resources updated
       [2013-09-05T21:56:50+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> Converge failed on instance <default-ubuntu-1004>.
>>>>>> Please see .kitchen/logs/default-ubuntu-1004.log for more details
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: SSH exited (1) for command: [sudo -E chef-solo --config /tmp/kitchen-chef-solo/solo.rb --json-attributes /tmp/kitchen-chef-solo/dna.json  --log_level info]
>>>>>> ----------------------

CentOS 6.4 Output

 * package[ruby-mode] action install[2013-09-05T22:09:38+00:00] INFO: Processing package[ruby-mode] action install (ruby::1.9.1 line 73)

           * No version specified, and no candidate version available for ruby-mode
      ================================================================================
       Error executing action `install` on resource 'package[ruby-mode]'
       ================================================================================
       Chef::Exceptions::Package
       -------------------------
       No version specified, and no candidate version available for ruby-mode

       Resource Declaration:
       ---------------------
       # In /tmp/kitchen-chef-solo/cookbooks/ruby/definitions/ruby_packages.rb

        73:       package pkg do
        74:         action params[:action]
        75:       end
        76:     end

       Compiled Resource:
       ------------------
       # Declared in /tmp/kitchen-chef-solo/cookbooks/ruby/definitions/ruby_packages.rb:73:in `block (2 levels) in from_file'

       package("ruby-mode") do
         params {:action=>:install, :name=>"1.9.1"}
         action [:install]
         retries 0
         retry_delay 2
         package_name "ruby-mode"
         cookbook_name :ruby
         recipe_name "1.9.1"
       end

       [2013-09-05T22:09:48+00:00] INFO: Running queued delayed notifications before re-raising exception
       [2013-09-05T22:09:48+00:00] ERROR: Running exception handlers
       [2013-09-05T22:09:48+00:00] ERROR: Exception handlers complete
       [2013-09-05T22:09:48+00:00] FATAL: Stacktrace dumped to /tmp/kitchen-chef-solo/cache/chef-stacktrace.out
       Chef Client failed. 7 resources updated
       [2013-09-05T22:09:48+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> Converge failed on instance <default-centos-64>.
>>>>>> Please see .kitchen/logs/default-centos-64.log for more details
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: SSH exited (1) for command: [sudo -E chef-solo --config /tmp/kitchen-chef-solo/solo.rb --json-attributes /tmp/kitchen-chef-solo/dna.json  --log_level info]
>>>>>> ----------------------

CentOS 5.4 Output

* package[nginx] action install[2013-09-05T23:28:27+00:00] INFO: Processing package[nginx] action install (sensu-admin::default line 24)

           * No version specified, and no candidate version available for nginx 
================================================================================       
       Error executing action `install` on resource 'package[nginx]'
===============================================================================

       Chef::Exceptions::Package
       -------------------------
       No version specified, and no candidate version available for nginx

       Resource Declaration:
       ---------------------
       # In /tmp/kitchen-chef-solo/cookbooks/sensu-admin/recipes/default.rb

        24: package "nginx"
        25: package "git"

       Compiled Resource:
       ------------------
       # Declared in /tmp/kitchen-chef-solo/cookbooks/sensu-admin/recipes/default.rb:24:in `from_file'

       package("nginx") do
         action :install
         retries 0
         retry_delay 2
         package_name "nginx"
         cookbook_name :"sensu-admin"
         recipe_name "default"
       end

       [2013-09-05T23:28:30+00:00] INFO: Running queued delayed notifications before re-raising exception
       [2013-09-05T23:28:30+00:00] ERROR: Running exception handlers
       [2013-09-05T23:28:30+00:00] ERROR: Exception handlers complete
       [2013-09-05T23:28:30+00:00] FATAL: Stacktrace dumped to /tmp/kitchen-chef-solo/cache/chef-stacktrace.out
Chef Client failed. 10 resources updated       
       [2013-09-05T23:28:31+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> Converge failed on instance <default-centos-59>.
>>>>>> Please see .kitchen/logs/default-centos-59.log for more details
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: SSH exited (1) for command: [sudo -E chef-solo --config /tmp/kitchen-chef-solo/solo.rb --json-attributes /tmp/kitchen-chef-solo/dna.json  --log_level info]
>>>>>> ----------------------

Duplicate cronjobs are added at every deploy

After deploy, but before restarting the service, 'bundle exec whenever' is run to install cronjobs. Unfortunately we're getting duplicates because the cwd is $PATH/releases/$REVISION instead of $PATH/current

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.