Git Product home page Git Product logo

chef-sentry's People

Contributors

e100 avatar jonathantron avatar nilroy avatar oscar123mendoza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

chef-sentry's Issues

Special python packages for Sentry below 7.7.1

Although you state in the readme, that only 7.7.1 is supported, I found a fix for db:upgrade to to support earlier versions. Would you be interested in a Pull Request for that?

It is actually simple, just pinning down the versions of two specific packages.

The motivation is: For the Access Group Migration it is necessary to run Version 7.5.x

Deprecated Filestore Settings

Running a Sentry with 8.11 and it shows the following warning in the header:

Deprecated Settings

    The SENTRY_FILESTORE setting is deprecated. Please use SENTRY_OPTIONS['filestore.backend'] instead.
    The SENTRY_FILESTORE_OPTIONS setting is deprecated. Please use SENTRY_OPTIONS['filestore.options'] instead.

relevant getsentry/sentry#4537
New Setting has to be written in the config YAML. I can submit a Pull Request for this

Python Package Sentry Install notifies restart on every run

all other subscriptions in _service.rb are working fine,
however the python_package[#{node["sentry"]["pipname"]}]" always notifies the ressources for restart.
I have not found a work around and need to remove that resource from the collection. Can someone confirm this issue?

subscribes_resources = [
   "template[#{node["sentry"]["config_file_path"]}]",
   "python_package[#{node["sentry"]["pipname"]}]"
 ] +
   node["sentry"]["database"]["pipdeps"].map do |dep|
     dep_name, _ = dep
     "python_package[#{dep_name}]"
   end +
   node["sentry"]["plugins"].map do |plugin|
     plugin_name, _ = plugin
     "python_package[#{plugin_name}]"
   end

install_dir needs parent directory

This is a minor annoyance:

When another directory is used, chef run fails without a parent directory

directory node["sentry"]["install_dir"] do
  owner sentry_user
  group sentry_group
end

a simple recursive true would be nice

Allow setting credentials from node.run_state

Forcing users to use data bags for credentials is too limiting.

Example use case:
In sentry wrapper cookbook:

  1. Randomly generate credentials and store them using https://github.com/zuazo/chef-encrypted-attributes
  2. Populate run_state with plain text values
    node.run_state["sentry_credentials"] = {........}
  3. Include sentry recipe

in sentry::_configure I was thinking a minor edit like this:

if node.run_state["sentry_credentials"]               
  sentry_config = node.run_state["sentry_credentials"]
else                                                  
  sentry_config = data_bag_item(                      
    node["sentry"]["data_bag"],                       
    node["sentry"]["data_bag_item"]                   
  )                                                   
end      

If that would be acceptable or if you have a different idea please let me know and I will create a pull request.

issue with permissions to python dist packages, Ubuntu 14.04

================================================================================ Error executing actionrun` on resource 'execute[virtualenv /opt/sentry]'
================================================================================

       Mixlib::ShellOut::ShellCommandFailed
       ------------------------------------
       Expected process to exit with [0], but received '1'
       ---- Begin output of virtualenv  /opt/sentry ----
       STDOUT: 
       STDERR: Traceback (most recent call last):
         File "/usr/local/bin/virtualenv", line 7, in <module>
    from virtualenv import main
       ImportError: No module named virtualenv
       ---- End output of virtualenv  /opt/sentry ----
       Ran virtualenv  /opt/sentry returned 1

       Resource Declaration:
       ---------------------
       # In /tmp/kitchen/cache/cookbooks/python/providers/virtualenv.rb

        37:     execute "#{virtualenv_cmd}#{interpreter} #{new_resource.options} #{new_resource.path}" do
        38:       user new_resource.owner if new_resource.owner
        39:       group new_resource.group if new_resource.group
        40:       environment ({ 'HOME' => ::Dir.home(new_resource.owner) }) if new_resource.owner
        41:     end
        42:     new_resource.updated_by_last_action(true)

       Compiled Resource:
       ------------------
       # Declared in /tmp/kitchen/cache/cookbooks/python/providers/virtualenv.rb:37:in `block in class_from_file'

       execute("virtualenv  /opt/sentry") do
         action [:run]
         retries 0
         retry_delay 2
         default_guard_interpreter :execute
         command "virtualenv  /opt/sentry"
         backup 5
         environment {"HOME"=>"/opt/sentry"}
         group "sentry"
         returns 0
         user "sentry"
         declared_type :execute
         cookbook_name "sentry"
       end

   Recipe: remote_syslog2::service
     * service[remote_syslog2] action restart
       - restart service service[remote_syslog2]

   Running handlers:
   [2016-08-09T11:59:00+00:00] ERROR: Running exception handlers
   Running handlers complete
   [2016-08-09T11:59:00+00:00] ERROR: Exception handlers complete
   Chef Client failed. 14 resources updated in 57 seconds
   [2016-08-09T11:59:00+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
   [2016-08-09T11:59:00+00:00] ERROR: execute[virtualenv  /opt/sentry] (/tmp/kitchen/cache/cookbooks/python/providers/virtualenv.rb line 37) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
   ---- Begin output of virtualenv  /opt/sentry ----
   STDOUT: 
   STDERR: Traceback (most recent call last):
     File "/usr/local/bin/virtualenv", line 7, in <module>
       from virtualenv import main
   ImportError: No module named virtualenv
   ---- End output of virtualenv  /opt/sentry ----
   Ran virtualenv  /opt/sentry returned 1
   [2016-08-09T11:59:00+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)`

I resolved it with this:
chmod -R a+rX /usr/local/lib/python2.7/dist-packages/

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.