This decouples a deployment from completed migrations. Give us control of the data manipulation proccess by encapsulatin it in on place. need to remember to:
- Run it in one of the ways bellow: a. Add this rake task the deployment script or;
| # Sidekiq interaction and startup script | |
| commands: | |
| create_post_dir: | |
| command: "mkdir -p /opt/elasticbeanstalk/hooks/appdeploy/post" | |
| ignoreErrors: true | |
| files: | |
| "/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh": | |
| mode: "000755" | |
| owner: root | |
| group: root |
| # .ebextensions/cache.config | |
| files: | |
| "/opt/elasticbeanstalk/hooks/appdeploy/pre/02a_set_cache.sh": | |
| mode: "000755" | |
| owner: root | |
| group: root | |
| content: | | |
| #!/bin/bash | |
| set -xe |
This decouples a deployment from completed migrations. Give us control of the data manipulation proccess by encapsulatin it in on place. need to remember to:
Place the supervisord.conf under .ebextensions/supervisor/
Place the supervisor.config under .ebextensions/
Place the data_import_consumer.conf under .ebextensions/supervisor/
| #!/usr/bin/env bash | |
| # | |
| # Rails console script that can be run on AWS Elastic Beanstalk. | |
| # | |
| # Run this script from the app dir (/var/app/current) as root (sudo script/rails-console) | |
| # | |
| set -xe | |
| EB_SCRIPT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k script_dir) |
Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.
Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| # (create oauth2 tokens from Google Console) | |
| client_id = "" | |
| client_secret = "" | |
| # (paste the scope of the service you want here) | |
| # e.g.: https://www.googleapis.com/auth/gan | |
| scope = "" | |
| # RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
| # defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
| module Player | |
| describe MovieList, "with optional description" do | |
| it "is pending example, so that you can write ones quickly" | |
| it "is already working example that we want to suspend from failing temporarily" do | |
| pending("working on another feature that temporarily breaks this one") |