Coder Social home page Coder Social logo

pythonstack's Introduction

pythonstack Cookbook


Supported Platforms

  • Ubuntu 12.04
  • Centos 6.5

Requirements

Cookbooks

  • newrelic_meetme_plugin
  • application_python
  • rackspace_gluster
  • build-essential
  • platformstack
  • application
  • redis-multi
  • mysql-multi
  • chef-sugar
  • memcached
  • database
  • newrelic
  • pg-multi
  • rabbitmq
  • mongodb
  • openssl
  • yum-epel
  • yum-ius
  • apache2
  • varnish
  • python
  • mysql
  • nginx
  • uwsgi
  • yum
  • apt
  • git

Recipes

default

Sets up webserver attributes depending on attribute ['pythonstack']['webserver'] value

apache

Creates sites coming from node['apache']['sites'] array Creates monitoring check for each site if node[platformstack][cloud_monitoring] = enabled

nginx

Creates sites coming from node['nginx']['sites'] array Creates monitoring check for each site if node[platformstack][cloud_monitoring] = enabled

application_python_nginx

Creates a configuration file for applications using variables for mysql_master node and rabbitmq node and placing this file in /etc/pythonstack.ini

format_disk

Recipe will format /dev/xvde1 (datadisk on Rackspace performance cloud nodes) and will prepare it for the mysql datadir

gluster

Sets up gluster nodes and replica count

memcache

Install memcached and sets up cloud monitoring of memcached

mongodb_standalone

Sets up a stand alone mongo db instance

mysql_add_drive

Recipe will format /dev/xvde1 (datadisk on Rackspace performance cloud nodes) and will prepare it for the mysql datadir

mysql_base

Includes recipe database::mysql, platformstack::monitors, mysql-multi::mysql_base Creates mysql-monitor template if node[platformstack][cloud_monitoring] = enabled Creates an iptables rule for application_python nodes in order to connect to this one.

mysql_master

Runs pythonstack::mysql_base along with mysql-multi::mysql_master recipes creates db and associated user per vhost use this if you are running on a single node

mysql_slave

Runs pythonstack::mysql_base along with mysql-multi::mysql_slave recipes

mysql_holland

Setup an apt or yum repository for holland Installs needed packages (holland and holland-mysqldump) Verifies if this server is a slave or standalone Setup a cronjob based on holland attributes

postgresql_base

Runs pg-multi::default recipe Sets up default IP talbles rule to allow acces on ['postgresql']['port']

postgresql_master

Runs pythonstack::postgresql_base along with pg-multi::pg_master recipes

postgresql_slave

Runs pythonstack::postgresql_base along with pg-multi::pg_slave recipes

redis_base

Sets up a standalone redis node. It uses rackspace-support/redis-multi cookbook and includes redis-multi, redis-multi::single and redis-multi::enable and opens port in iptables.

redis_master

Uses community cookbook redis-multi::master and Rackspace pythonstack::redis_base

redis_sentinel

Install sentinel using community cookbooks

redis_single

Uses Rackspace pythonstack::redis_base and community cookbook redis-multi::single

redis_slave

Uses Rackspace pythonstack::redis_base and community cookbook redis-multi::slave

newrelic

Install Newrelic if node['newrelic']['license'] set with license key

rabbitmq

Installs Rabbitmq

varnish

Installs and sets up Varnish. loud monitoring enabled by default

Data_Bag

No Data_Bag configured for this cookbook

Attributes

Key Type Description Default
['holland']['enabled'] boolean Sets mode (true | false) false
['holland']['password'] string Define password 'notagudpassword'
['holland']['cron']['day'] string Set cron job day '*'
['holand']['cron']['hour'] string Set cron job hour '3'
['holland']['cron']['minute'] string Set cron job minute '12'
['pythonstack']['rackspace_cloudbackup']['http_docroot']['enable'] boolena Enable cloudbackup (true | false) false
['pythonstack']['newrelic']['application_monitoring'] string Set application name ''
['pythonstack']['webserver'] string webserver to use (Nginx/Apache) 'apache'
['pythonstack']['ini']['cookbook'] string Cookbook name 'pythonstack'
['pythonstack']['code-deployment']['enabled'] boolena Enable code deployment (true | false) true
['pythonstack']['demo']['enabled'] boolean Is this a demo deployment? false
['pythonstack']['rabbitmq']['passwords'] array Define passwords {}
['pythonstack']['varnish']['multi'] boolean Is varnish mulit node true
['disk']['name'] string Define disk name '/dev/xvde1'
['disk']['fs'] string Disk file system 'ext4'
['rackspace_gluster']['config']['server']['glusters']['Gluster Cluster 1'] Array {}
['rackspace_gluster']['config']['server']['glusters']['Gluster Cluster 1']['volume'] string Define Volume 'vol10'
['nginx']['default_site_enabled'] boolean Is default site enabled? false
['nginx']['init_style']' string If platform ubuntu 'upstart'
['nginx']['listen_ports'] string Set listening ports '%w(80)'
['nginx']['default_root'] string Default root path '/var/www'
['pythonstack']['cloud_monitoring']['remote_http']['disabled'] boolean Enable or Disable monitoring false
['pythonstack']['cloud_monitoring']['remote_http']['alarm'] boolean Enable or disable monitor alarms false
['pythonstack']['cloud_monitoring']['remote_http']['period'] int Interval in mins 60
['pythonstack']['cloud_monitoring']['remote_http']['timeout'] int Timeout in mins 15
['pythonstack']['cloud_monitoring']['agent_mysql']['disabled'] boolean Enable or Disable monitoring false
['pythonstack']['cloud_monitoring']['agent_mysql']['alarm'] boolean Enable or Disable monitor alarms false
['pythonstack']['cloud_monitoring']['agent_mysql']['period'] int Interval in mins 60
['pythonstack']['cloud_monitoring']['agent_mysql']['timeout'] int Timeout in mins 60
['pythonstack']['cloud_monitoring']['agent_mysql']['user'] string Momyswl monitoring user 'raxmon-agent'
['pythonstack']['cloud_monitoring']['agent_mysql']['password'] string Mysql monitor agent password nil
['platformstack']['cloud_monitoring']['plugins'] hash List of plugins to use {}
['platformstack']['cloud_monitoring']['plugins']['rabbitmq']['label'] string 'rabbitmq'
['platformstack']['cloud_monitoring']['plugins']['rabbitmq']['disabled'] boolean Enable ort disable plugin true
['platformstack']['cloud_monitoring']['plugins']['rabbitmq']['period'] int Interval in mins 60
['platformstack']['cloud_monitoring']['plugins']['rabbitmq']['timeout'] int Timeout in mins 30
['platformstack']['cloud_monitoring']['plugins']['rabbitmq']['file_url'] string Plugin location 'https://raw.githubusercontent.com/racker/rackspace-monitoring-agent-plugins-contrib/master/rabbitmq.py'
['platformstack']['cloud_monitoring']['plugins']['rabbitmq']['cookbook'] string 'platformstack'
['platformstack']['cloud_monitoring']['plugins']['rabbitmq']['details']['file'] string Plugin file name 'rabbitmq.py'
['platformstack']['cloud_monitoring']['plugins']['rabbitmq']['details']['args'] array []
['platformstack']['cloud_monitoring']['plugins']['rabbitmq']['details']['timeout'] int Timeout in mins 60
['platformstack']['cloud_monitoring']['plugins']['rabbitmq']['alarm']['label'] string ''
['platformstack']['cloud_monitoring']['plugins']['rabbitmq']['alarm']['notification_plan_id'] string Notifaction plan name 'npMANAGED'
['platformstack']['cloud_monitoring']['plugins']['rabbitmq']['alarm']['criteria'] string ''
['platformstack']['cloud_monitoring']['plugins']['varnish']['label'] string 'varnish'
['platformstack']['cloud_monitoring']['plugins']['varnish']['disabled'] boolean Enable or disable varnish plugin true
['platformstack']['cloud_monitoring']['plugins']['varnish']['period'] int Interval in mins 60
['platformstack']['cloud_monitoring']['plugins']['varnish']['timeout'] int Timeout in mins 30
['platformstack']['cloud_monitoring']['plugins']['varnish']['file_url'] string Plugin location 'https://raw.githubusercontent.com/racker/rackspace-monitoring-agent-plugins-contrib/master/varnish.sh'
['platformstack']['cloud_monitoring']['plugins']['varnish']['cookbook'] string Plugin cookbook name 'platformstack'
['platformstack']['cloud_monitoring']['plugins']['varnish']['details']['file'] string Plugin file name 'varnish.sh'
['platformstack']['cloud_monitoring']['plugins']['varnish']['details']['args'] array []
['platformstack']['cloud_monitoring']['plugins']['varnish']['details']['timeout'] int Timeout in mins 60
['platformstack']['cloud_monitoring']['plugins']['varnish']['alarm']['label'] string ''
['platformstack']['cloud_monitoring']['plugins']['varnish']['alarm']['notification_plan_id'] string Notifaction plan name 'npMANAGED'
['platformstack']['cloud_monitoring']['plugins']['varnish']['alarm']['criteria'] string ''
['platformstack']['cloud_monitoring']['plugins']['memcached']['label'] string 'memcached'
['platformstack']['cloud_monitoring']['plugins']['memcached']['disabled'] boolean Enables or disables plugin true
['platformstack']['cloud_monitoring']['plugins']['memcached']['period'] int Interval in mins 60
['platformstack']['cloud_monitoring']['plugins']['memcached']['timeout'] int Timeout in mins 30
['platformstack']['cloud_monitoring']['plugins']['memcached']['file_url'] string Plugin file location 'https://raw.githubusercontent.com/racker/rackspace-monitoring-agent-plugins-contrib/master/memcached_stats.py'
['platformstack']['cloud_monitoring']['plugins']['memcached']['cookbook'] string Plugin cookbook name 'platformstack'
['platformstack']['cloud_monitoring']['plugins']['memcached']['details']['file'] string Plugin file name 'memcached_stats.py'
['platformstack']['cloud_monitoring']['plugins']['memcached']['details']['args'] array []
['platformstack']['cloud_monitoring']['plugins']['memcached']['details']['timeout'] int Timeout in mins 60
['platformstack']['cloud_monitoring']['plugins']['memcached']['alarm']['label'] string ''
['platformstack']['cloud_monitoring']['plugins']['memcached']['alarm']['notification_plan_id'] string Notifcation plan name 'npMANAGED'
['platformstack']['cloud_monitoring']['plugins']['memcached']['alarm']['criteria'] string ''
['apache']['sites'][site1]['port'] int Define site port 80
['apache']['sites'][site1]['cookbook'] string Cookbook name 'pythonstack'
['apache']['sites'][site1]['template'] string Site templatet location "apache2/sites/#{site1.erb}"
['apache']['sites'][site1]['server_name'] variable Sites server name site1
['apache']['sites'][site1]['server_alias'] array Sites server name alias ["test.#{site1}", "www.#{site1}"]
['apache']['sites'][site1]['docroot'] string Sites document root name "#{node['apache']['docroot_dir']}/#{site1}"
['apache']['sites'][site1]['errorlog'] string Sites error log location "#{node['apache']['log_dir']}/#{site1}-error.log"
['apache']['sites'][site1]['customlog'] string Sites custom log location "#{node['apache']['log_dir']}/#{site1}-access.log combined"
['apache']['sites'][site1]['allow_override'] array ['ALL']
['apache']['sites'][site1]['loglevel'] string Sites logging level 'warn'
['apache']['sites'][site1]['script_name'] string Sites script name 'wsgi.py'
['apache']['sites'][site1]['server_admin'] string Sites admin mail address '[email protected]'
['apache']['sites'][site1]['revision'] string Site version "v#{version1}"
['apache']['sites'][site1]['repository'] string Sites app repo location 'https://github.com/rackops/flask-test-app'
['apache']['sites'][site1]['deploy_key'] string Sites deploymnet key '/root/.ssh/id_rsa'
['nginx']['sites'][site1]['port'] int Define sites port 80
['nginx']['sites'][site1]['uswgi_port'] int Define sites uswgi port 8080
['nginx']['sites'][site1]['uswgi_stats_port'] string Define sites uswgi stats port '1717'
['nginx']['sites'][site1]['uswgi_options'] hash Define uswgi option {}
['nginx']['sites'][site1]['cookbook'] string Sites cookbook name 'pythonstack'
['nginx']['sites'][site1]['server_name'] variable Sites server name site1
['nginx']['sites'][site1]['server_alias'] array Sites server alias ["test.#{site1}", "www.#{site1}"]
['nginx']['sites'][site1]['docroot'] string Sites document root "#{node['nginx']['default_root']}/#{site1}"
['nginx']['sites'][site1]['errorlog'] string Site error log location "#{node['nginx']['log_dir']}/#{site1}-error.log"
['nginx']['sites'][site1]['customlog'] string Sites custom log location c "#{node['nginx']['log_dir']}/#{site1}-access.log combined"
['nginx']['sites'][site1]['loglevel'] string Sites logging level 'warn'
['nginx']['sites'][site1]['app'] string Application name 'demo:app'
['nginx']['sites'][site1]['revision'] string Site version "v#{version1}"
['nginx']['sites'][site1]['repository'] string Sites app repo location 'https://github.com/rackops/flask-test-app'
['nginx']['sites'][site1]['deploy_key'] string Site deployment key '/root/.ssh/id_rsa'

Usage

https://github.com/AutomationSupport/pythonstack/blob/master/USAGE.md

Contributing

https://github.com/rackspace-cookbooks/contributing/blob/master/CONTRIBUTING.md

Authors

Authors:: Rackspace DevOps ([email protected])

pythonstack's People

Contributors

bobross419 avatar dearing avatar fernandohonig avatar gondoi avatar jarosser06 avatar jensrax avatar jujugrrr avatar lmunro avatar marcoamorales avatar martinb3 avatar niven01 avatar prometheanfire avatar zdeptawa avatar

Watchers

 avatar

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.