{"id":15931195,"url":"https://github.com/ajcrowe/puppet-supervisord","last_synced_at":"2025-04-13T05:07:07.044Z","repository":{"id":1546422,"uuid":"13505534","full_name":"ajcrowe/puppet-supervisord","owner":"ajcrowe","description":"Puppet Module to install and configure applications under supervisord","archived":false,"fork":false,"pushed_at":"2024-08-13T06:09:18.000Z","size":272,"stargazers_count":37,"open_issues_count":25,"forks_count":104,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-13T05:06:55.684Z","etag":null,"topics":["puppet","puppet-module"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ajcrowe.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-10-11T17:47:28.000Z","updated_at":"2022-07-11T08:16:11.000Z","dependencies_parsed_at":"2024-01-16T10:37:16.853Z","dependency_job_id":"c6f19b0f-35a4-4154-8dd7-c56b45009de9","html_url":"https://github.com/ajcrowe/puppet-supervisord","commit_stats":{"total_commits":249,"total_committers":49,"mean_commits":5.081632653061225,"dds":"0.42971887550200805","last_synced_commit":"4a3e0804e5ae59e8e2daf4737054f517ce785e45"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajcrowe%2Fpuppet-supervisord","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajcrowe%2Fpuppet-supervisord/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajcrowe%2Fpuppet-supervisord/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajcrowe%2Fpuppet-supervisord/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajcrowe","download_url":"https://codeload.github.com/ajcrowe/puppet-supervisord/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665748,"owners_count":21142123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["puppet","puppet-module"],"created_at":"2024-10-07T01:04:25.083Z","updated_at":"2025-04-13T05:07:07.004Z","avatar_url":"https://github.com/ajcrowe.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Puppet Supervisord\n\n[![Puppet Forge](http://img.shields.io/puppetforge/v/ajcrowe/supervisord.svg)](https://forge.puppetlabs.com/ajcrowe/supervisord)\n[![Build Status](https://travis-ci.org/ajcrowe/puppet-supervisord.png?branch=master)](https://travis-ci.org/ajcrowe/puppet-supervisord)\n\nPuppet module to manage the [supervisord](http://supervisord.org/) process control system.\n\nFunctions available to configure\n\n* [programs](http://supervisord.org/configuration.html#program-x-section-settings)\n* [groups](http://supervisord.org/configuration.html#group-x-section-settings)\n* [fcgi-programs](http://supervisord.org/configuration.html#fcgi-program-x-section-settings)\n* [eventlisteners](http://supervisord.org/configuration.html#eventlistener-x-section-settings)\n* [rpcinterface](http://supervisord.org/configuration.html#rpcinterface-x-section-settings)\n\n## Deprecation warning\n\nTo avoid conflict with puppet master's $environment variable, the *environment* parameter of supervisord::program resource is being renamed *program_environment* and old name will be removed in future version.\n\n#### Examples\n\n## Examples\n\n### Configuring supervisord with defaults\n\nInstall supervisord with pip and install an init script if available\n\n```puppet\ninclude ::supervisord\n```\n\n### Install supervisord and pip\n\nInstall supervisord and install pip if not available.\n\n```puppet\nclass { 'supervisord':\n  install_pip =\u003e true,\n}\n```\n\nThis will download [setuptool](https://bitbucket.org/pypa/setuptools) and install pip with easy_install.\n\nYou can pass a specific url with `$setuptools_url = 'url'`\n\n### Install without pip\n\nIf you want to use your system package manager you can specify that with `supervisord::package_provider`.\n\nYou'll also likely need to adjust the `supervisord::service_name` to match that installed by the system package. If you're using Debian, Redhat or Suse OS families you'll also want to disable the init scripts with `supervisord::install_init = false`.\n\n#### Custom Init Script\n\nOnly Debian, RedHat and Suse families have an init script included currently. But you can provide custom scripts like this:\n\n```puppet\nclass { 'supervisord':\n  install_init         =\u003e true,\n  init_script          =\u003e '/path/to/init_file',\n  init_script_template =\u003e 'mymodule/template/init.erb',\n  init_defaults        =\u003e false\n}\n```\n\n### HTTP servers\n\nAs of version 3.0a3, Supervisor provides an HTTP server that can listen on a Unix socket, an inet socket, or both.  By default, this module enables the Unix socket HTTP server.  `supervisorctl` issues commands to the HTTP server, and it must be configured to talk to either the Unix socket or the inet socket.  If only one HTTP server is enabled, this module will configure `supervisorctl` to use that HTTP server.  If both HTTP servers are enabled, the Unix socket HTTP server will be used by default.  To use the inet socket instead, set `ctl_socket` to `inet` (its default is `unix`).\nmodified\n#### Configure the Unix HTTP server\n\nThe Unix HTTP server is enabled by default.  Its parameters are:\n\n```puppet\nclass { 'supervisord':\n  unix_socket       =\u003e true,\n  run_path          =\u003e '/var/run',\n  unix_socket_mode  =\u003e '0700',\n  unix_socket_owner =\u003e 'nobody',\n  unix_socket_group =\u003e 'nobody',\n  unix_auth         =\u003e false,\n  unix_username     =\u003e undef,\n  unix_password     =\u003e undef,\n}\n```\n\nThis results in the following config sections:\n\n```\n[unix_http_server]\nfile=/var/run/supervisor.sock\nchmod=0700\nchown=nobody:nobody\n\n[supervisorctl]\nserverurl=unix:///var/run/supervisor.sock\n```\n\n#### Configure the Inet HTTP server\n\nThe Inet HTTP server is disabled by default.  Its parameters are:\n\n```puppet\nclass { 'supervisord':\n  unix_socket          =\u003e false,\n  inet_server          =\u003e true,\n  inet_server_hostname =\u003e '127.0.0.1',\n  inet_server_port     =\u003e '9001',\n  inet_auth            =\u003e false,\n  inet_username        =\u003e undef,\n  inet_password        =\u003e undef,\n}\n```\n\nThis results in the following config sections:\n\n```\n[inet_http_server]\nport=127.0.0.1:9001\n\n[supervisorctl]\nserverurl=http://127.0.0.1:9001\n```\n\n### Override sysconfig template\n\nIf `supervisord::install_init` is true (the default), then an init script will be installed, and that script will source the contents of the `templates/init/${::osfamily}/defaults.erb` file.  If you want to override that template, you can set `supervisord::init_template` to the path of an alternative template:\n\n```puppet\nclass { 'supervisord':\n  install_pip   =\u003e true,\n  init_template =\u003e 'my/supervisord/${::osfamily}/defaults.erb'\n}\n```\n\nYou almost certainly want to copy and add to the original templates, as they contain important settings.\n\n### Configure a program\n\n```puppet\nsupervisord::program { 'myprogram':\n  command             =\u003e 'command --args',\n  priority            =\u003e '100',\n  program_environment =\u003e {\n    'HOME'   =\u003e '/home/myuser',\n    'PATH'   =\u003e '/bin:/sbin:/usr/bin:/usr/sbin',\n    'SECRET' =\u003e 'mysecret'\n  }\n}\n```\n\nYou may also specify a variable for a hiera lookup to retreive your environment hash. This allows you to reuse existing environment variable hashes.\n\n```puppet\nsupervisord::program { 'myprogram':\n  command  =\u003e 'command --args',\n  priority =\u003e '100',\n  env_var  =\u003e 'my_common_envs'\n}\n```\n\nOr you can fully define your programs in hiera:\n\n```yaml\nsupervisord::programs:\n  'myprogram':\n    command: 'command --args'\n    autostart: yes\n    autorestart: 'true'\n    program_environment:\n      HOME: '/home/myuser'\n      PATH: '/bin:/sbin:/usr/bin:/usr/sbin'\n      SECRET: 'mysecret'\n```\n\n### Configure a group\n\n```puppet\nsupervisord::group { 'mygroup':\n  priority =\u003e 100,\n  programs =\u003e ['program1', 'program2', 'program3']\n}\n```\n\n### Configure a ctlplugin\n\n```puppet\nsupervisord::ctlplugin { 'laforge':\n  ctl_factory =\u003e 'mr.laforge.controllerplugin:make_laforge_controllerplugin'\n}\n```\n\n### Configure an eventlistener\n\n```puppet\nsupervisord::eventlistener { 'mylistener':\n  command  =\u003e 'command --args',\n  events   =\u003e ['PROCESS_STATE', 'PROCESS_STATE_START']\n  priority =\u003e '100',\n  env_var  =\u003e 'my_common_envs'\n}\n```\n\n### Configure an rpcinterface\n\n```puppet\nsupervisord::rpcinterface { 'laforge':\n  rpcinterface_factory =\u003e 'mr.laforge.rpcinterface:make_laforge_rpcinterface'\n}\n```\n\n### Run supervisorctl Commands\n\nShould you need to run a sequence of command with `supervisorctl` you can use the define type `supervisord::supervisorctl`\n\n```puppet\nsupervisord::supervisorctl { 'restart_myapp':\n  command =\u003e 'restart',\n  process =\u003e 'myapp'\n}\n```\n\nYou can also issue a command without specifying a process.\n\n### Development\n\nIf you have suggestions or improvements please file an issue or pull request, i'll try and sort them as quickly as possble.\n\nIf you submit a pull please try and include tests for the new functionality/fix. The module is tested with [Travis-CI](https://travis-ci.org/ajcrowe/puppet-supervisord).\n\n\n### Credits\n\n* Debian init script sourced from the system package.\n* RedHat/Centos init script sourced from https://github.com/Supervisor/initscripts\n* Suse init script modified from RedHat/Centos script\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajcrowe%2Fpuppet-supervisord","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajcrowe%2Fpuppet-supervisord","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajcrowe%2Fpuppet-supervisord/lists"}