I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
| # See http://m.onkey.org/running-rails-performance-tests-on-real-data | |
| # START : HAX HAX HAX | |
| # Load Rails environment in 'test' mode | |
| RAILS_ENV = "test" | |
| require File.expand_path('../../config/environment', __FILE__) | |
| # Re-establish db connection for 'performance' mode | |
| silence_warnings { RAILS_ENV = "performance" } | |
| ActiveRecord::Base.establish_connection |
| # MySQL. Versions 4.1 and 5.0 are recommended. | |
| # | |
| # Install the MySQL driver: | |
| # gem install mysql2 | |
| # | |
| # And be sure to use new-style password hashing: | |
| # http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
| development: | |
| adapter: mysql2 | |
| encoding: utf8 |
| [Default Applications] | |
| x-scheme-handler/txmt=openInMine.desktop |
| # Install with: | |
| # bash < <(curl -L https://raw.github.com/gist/2767174) | |
| echo "Installing S3cmd..." | |
| wget -O- -q http://s3tools.org/repo/deb-all/stable/s3tools.key | sudo apt-key add - | |
| sudo wget -O/etc/apt/sources.list.d/s3tools.list http://s3tools.org/repo/deb-all/stable/s3tools.list | |
| sudo apt-get update && sudo apt-get install s3cmd | |
| echo "Done" |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
| namespace :deploy do | |
| task :confirmation do | |
| puts <<-WARN | |
| ======================================================================== | |
| WARNING: You're about to perform actions on production server(s) | |
| Please confirm that all your intentions are kind and friendly | |
| ======================================================================== |
| echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list | |
| wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
| sudo apt-get update | |
| sudo apt-get install postgresql-9.3 postgresql-server-dev-9.3 postgresql-contrib-9.3 -y | |
| sudo su - postgres -c "psql template1 -p 5433 -c 'CREATE EXTENSION IF NOT EXISTS hstore;'" | |
| sudo su - postgres -c "psql template1 -p 5433 -c 'CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";'" | |
| sudo su - postgres -c "service postgresql stop" | |
| sudo su - postgres -c '/usr/lib/postgresql/9.3/bin/pg_upgrade -b /usr/lib/postgresql/9.1/bin -B /usr/lib/postgresql/9.3/bin -d /var/lib/postgresql/9.1/main/ -D /var/lib/postgresql/9.3/main/ -O "-c config_file=/etc/postgresql/9.3/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.1/main/postgresql.conf"' | |
| namespace :deploy do | |
| desc "Load the initial schema - it will WIPE your database, use with care" | |
| task :db_schema_load do | |
| on roles(:db) do | |
| puts <<-EOF | |
| ************************** WARNING *************************** | |
| If you type [yes], rake db:schema:load will WIPE your database | |
| any other input will cancel the operation. | |
| ************************************************************** |
| require "net/http" | |
| def start_server | |
| # Remove the X to enable the parameters for tuning. | |
| # These are the default values as of Ruby 2.2.0. | |
| @child = spawn(<<-EOC.split.join(" ")) | |
| XRUBY_GC_HEAP_FREE_SLOTS=4096 | |
| XRUBY_GC_HEAP_INIT_SLOTS=10000 | |
| XRUBY_GC_HEAP_GROWTH_FACTOR=1.8 | |
| XRUBY_GC_HEAP_GROWTH_MAX_SLOTS=0 |
| # This task will notify Sentry via their API[1] that you have deployed | |
| # a new release. It uses the release timestamp as the `version` | |
| # (like 20151113182847) and the git ref as the optional `ref` value. | |
| # | |
| # This task requires several environment variables be set (or just | |
| # hardcode the values in here if you like living on the edge): | |
| # | |
| # ENV['SENTRY_API_ENDPOINT'] : API endpoint, https://app.getsentry.com | |
| # ENV['SENTRY_ORG'] : the organization for this app | |
| # ENV['SENTRY_PROJECT'] : the project for this app |