Steps with explanations to set up a server using:
- virtualenv
- Django
- nginx
- uwsgi
| File - core-site.xml | |
| --------------------- | |
| <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
| <configuration> | |
| <property> | |
| <name>fs.default.name</name> | |
| <value>hdfs://Cluster01</value> | |
| </property> |
| cookbook_path [ File.expand_path("../cookbooks", __FILE__), | |
| File.expand_path("../site-cookbooks", __FILE__)] | |
| role_path File.expand_path("../roles", __FILE__) | |
| file_cache_path File.expand_path("../run/cache", __FILE__) | |
| checksum_path File.expand_path("..run/cksum", __FILE__) |
| mysqladmin -ri 30 extended-status|egrep -i 'Innodb_data*|Innodb_buffer*|Innodb_ad*|Connections*|Created_tmp_disk_tables|*Threads*' |
| /* profiling */ | |
| set profiling = 1; | |
| show profiles; | |
| show profile for query X; | |
| /* performance_schema configure */ | |
| SELECT * FROM performance_schema.setup_instruments; | |
| /* performance_schema results */ |
| # file for pressed | |
| # password is empty | |
| percona-server-server-5.6 percona-server-server/root_password password | |
| percona-server-server-5.6 percona-server-server/root_password_again password | |
| # playbook | |
| --- |
| import os | |
| from flask import Flask, render_template, request | |
| import stripe | |
| stripe_keys = { | |
| 'secret_key': os.environ['SECRET_KEY'], | |
| 'publishable_key': os.environ['PUBLISHABLE_KEY'] | |
| } | |
| stripe.api_key = stripe_keys['secret_key'] |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
| <title>Stripe Getting Started Form</title> | |
| <!-- The required Stripe lib --> | |
| <script type="text/javascript" src="https://js.stripe.com/v2/"></script> | |
| <!-- jQuery is used only for this example; it isn't required to use Stripe --> |
| bash -c ' | |
| <%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%> | |
| yum install -y wget | |
| wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://rbel.co/rbel5 | |
| rpm -Uvh rbel5 | |
| yum install -y rubygem-chef | |
| ' |