Permalink
Browse files

Renamed all scripts to remove the goofy ".rb" or ".sh" file extension…

…s. This is more unix-like. I don't know why I started that convention, maybe I was using an editor that wasn't smart enough to apply the right syntax highlighting...
  • Loading branch information...
1 parent fcef45c commit 563816e46b60b411edb88ee62d24f66f8336042b @pauldowman committed Mar 31, 2009
Showing with 18 additions and 18 deletions.
  1. +1 −1 CHANGELOG
  2. +2 −2 TODO
  3. +6 −6 lib/ec2onrails/recipes/db.rb
  4. +2 −2 lib/ec2onrails/recipes/server.rb
  5. +3 −3 server/files/etc/cron.d/ec2onrails
  6. +2 −2 server/files/etc/cron.daily/logrotate_post
  7. +1 −1 server/files/etc/god/master.conf
  8. 0 server/files/usr/local/ec2onrails/bin/{archive_file.rb → archive_file}
  9. 0 server/files/usr/local/ec2onrails/bin/{backup_app_db.rb → backup_app_db}
  10. 0 server/files/usr/local/ec2onrails/bin/{ec2_meta_data.rb → ec2_meta_data}
  11. 0 server/files/usr/local/ec2onrails/bin/{init_services.rb → init_services}
  12. 0 server/files/usr/local/ec2onrails/bin/{optimize_mysql.rb → optimize_mysql}
  13. 0 server/files/usr/local/ec2onrails/bin/{rebundle.sh → rebundle}
  14. 0 server/files/usr/local/ec2onrails/bin/{restore_app_db.rb → restore_app_db}
  15. 0 server/files/usr/local/ec2onrails/bin/{set_roles.rb → set_roles}
  16. +1 −1 server/files/usr/local/ec2onrails/config
  17. 0 server/files/usr/local/ec2onrails/startup-scripts/first-startup/{create-dirs.sh → create-dirs}
  18. 0 ...-scripts/first-startup/{generate-default-web-cert-and-key.sh → generate-default-web-cert-and-key}
  19. 0 server/files/usr/local/ec2onrails/startup-scripts/first-startup/{get-hostname.sh → get-hostname}
  20. 0 server/files/usr/local/ec2onrails/startup-scripts/first-startup/{misc.sh → misc}
  21. 0 ...cal/ec2onrails/startup-scripts/first-startup/{prepare-mysql-data-dir.sh → prepare-mysql-data-dir}
  22. 0 ...les/usr/local/ec2onrails/startup-scripts/first-startup/{setup-credentials.sh → setup-credentials}
  23. 0 ...cal/ec2onrails/startup-scripts/first-startup/{setup-file-permissions.sh → setup-file-permissions}
View
@@ -176,7 +176,7 @@
* ami-b79a7fde
* Fixed S3 backup cron job.
-* Added script to restore data from S3 (/usr/local/aws/bin/restore_app_db.rb). This is useful when setting up a staging server to test your deployment, you can have it set up with a copy of your production data to test your migrations.
+* Added script to restore data from S3 (/usr/local/aws/bin/restore_app_db). This is useful when setting up a staging server to test your deployment, you can have it set up with a copy of your production data to test your migrations.
* Rewrite rule now allows images/css on maintenance page
* Added empty /etc/apache2/sites-available/app.custom for custom Apache configuration in a separate file (so it can be deployed by rsync more easily).
* Added ImageMagick, RMagick and hpricot due to popular demand.
View
4 TODO
@@ -9,7 +9,7 @@ FUTURE CHANGES
[ ] use mongrel_cluster from app directory (shared or directly in the app/config dir), and then default to the one at /etc/mongrel_cluster/app.yml
-[ ] customize roles. For example, lets say I want to have nginx publish to multiple proxy's instead of the set_roles.rb default ones. Have a hook where I, as an end user, can extend custom roles... but where do I put it? is there a custom_roles_file location pref that is set in the cap deploy file?
+[ ] customize roles. For example, lets say I want to have nginx publish to multiple proxy's instead of the set_roles default ones. Have a hook where I, as an end user, can extend custom roles... but where do I put it? is there a custom_roles_file location pref that is set in the cap deploy file?
[ ] hook memcached into nginx...
@@ -84,7 +84,7 @@ COMPLETED
http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1663&categoryID=100
-[X] /etc/monit/monitrc needs to be chmod 700. see error at: http://pastie.org/251895, with custom task at http://pastie.org/251896.. Perhaps this should be solved in set_roles.rb or init_services or something a bit higher`
+[X] /etc/monit/monitrc needs to be chmod 700. see error at: http://pastie.org/251895, with custom task at http://pastie.org/251896.. Perhaps this should be solved in set_roles or init_services or something a bit higher`
[X] remove the *_admin capistrano roles. can we use admin for sudo access but continue to deploy and run under a user without sudo access? It looks like we can if we add this to the recipes.rb file:
set :use_sudo, true
@@ -155,8 +155,8 @@
prev_created = true if !quiet_capture("mount | grep -inr '#{mysql_dir_root}' || echo ''").empty?
unless no_force && (vol_id.nil? || vol_id.empty?)
- zone = quiet_capture("/usr/local/ec2onrails/bin/ec2_meta_data.rb -key 'placement/availability-zone'")
- instance_id = quiet_capture("/usr/local/ec2onrails/bin/ec2_meta_data.rb -key 'instance-id'")
+ zone = quiet_capture("/usr/local/ec2onrails/bin/ec2_meta_data -key 'placement/availability-zone'")
+ instance_id = quiet_capture("/usr/local/ec2onrails/bin/ec2_meta_data -key 'instance-id'")
unless prev_created
puts "creating new ebs volume...."
@@ -331,7 +331,7 @@
"database-archive/<timestamp>/dump.sql.gz".
DESC
task :archive, :roles => :db do
- run "/usr/local/ec2onrails/bin/backup_app_db.rb --bucket #{cfg[:archive_to_bucket]} --dir #{cfg[:archive_to_bucket_subdir]}"
+ run "/usr/local/ec2onrails/bin/backup_app_db --bucket #{cfg[:archive_to_bucket]} --dir #{cfg[:archive_to_bucket_subdir]}"
end
desc <<-DESC
@@ -340,7 +340,7 @@
expected to be the default, "mysqldump.sql.gz".
DESC
task :restore, :roles => :db do
- run "/usr/local/ec2onrails/bin/restore_app_db.rb --bucket #{cfg[:restore_from_bucket]} --dir #{cfg[:restore_from_bucket_subdir]}"
+ run "/usr/local/ec2onrails/bin/restore_app_db --bucket #{cfg[:restore_from_bucket]} --dir #{cfg[:restore_from_bucket_subdir]}"
end
desc <<-DESC
@@ -350,7 +350,7 @@
DESC
task :init_backup, :roles => :db do
server.allow_sudo do
- sudo "/usr/local/ec2onrails/bin/backup_app_db.rb --reset"
+ sudo "/usr/local/ec2onrails/bin/backup_app_db --reset"
end
end
@@ -362,7 +362,7 @@
task :optimize, :roles => :db do
if !quiet_capture("test -e /tmp/optimize_db_flag && echo 'file exists'").empty?
begin
- sudo "/usr/local/ec2onrails/bin/optimize_mysql.rb"
+ sudo "/usr/local/ec2onrails/bin/optimize_mysql"
ensure
sudo "rm -rf /tmp/optimize_db_flag" #remove so we cannot run again
end
@@ -29,14 +29,14 @@
sudo "cp /tmp/roles.yml /etc/ec2onrails"
#we want everyone to be able to read to it
sudo "chmod a+r /etc/ec2onrails/roles.yml"
- sudo "/usr/local/ec2onrails/bin/set_roles.rb"
+ sudo "/usr/local/ec2onrails/bin/set_roles"
end
end
task :init_services do
allow_sudo do
#lets pick up the new configuration files
- sudo "/usr/local/ec2onrails/bin/init_services.rb"
+ sudo "/usr/local/ec2onrails/bin/init_services"
end
end
@@ -4,13 +4,13 @@
# without EBS:
# Incremental backup every 5 minutes
-*/5 * * * * root test ! -f /etc/mysql/conf.d/mysql-ec2-ebs.cnf && /usr/local/ec2onrails/bin/backup_app_db.rb --incremental
+*/5 * * * * root test ! -f /etc/mysql/conf.d/mysql-ec2-ebs.cnf && /usr/local/ec2onrails/bin/backup_app_db --incremental
# without EBS:
# Full backup every day at 05:01, reset the binary logs.
# First kill any incremental backup that happens to be in progress
-1 5 * * * root killall -q -u root backup_app_db.rb ; test ! -f /etc/mysql/conf.d/mysql-ec2-ebs.cnf && /usr/local/ec2onrails/bin/backup_app_db.rb --reset
+1 5 * * * root killall -q -u root backup_app_db ; test ! -f /etc/mysql/conf.d/mysql-ec2-ebs.cnf && /usr/local/ec2onrails/bin/backup_app_db --reset
# with EBS:
# Full snapshot every 2 hours
-11 */2 * * * root test -f /etc/mysql/conf.d/mysql-ec2-ebs.cnf && /usr/local/ec2onrails/bin/backup_app_db.rb
+11 */2 * * * root test -f /etc/mysql/conf.d/mysql-ec2-ebs.cnf && /usr/local/ec2onrails/bin/backup_app_db
@@ -6,14 +6,14 @@ if [ -x /mnt/app/current ] ; then
logfile=/mnt/app/current/log/$RAILS_ENV.log-`date +%Y%m%d`
if [ -e $logfile ] ; then
gzip $logfile
- /usr/local/ec2onrails/bin/archive_file.rb --file $logfile.gz --dir logs/rails && rm $logfile.gz
+ /usr/local/ec2onrails/bin/archive_file --file $logfile.gz --dir logs/rails && rm $logfile.gz
fi
fi
for f in `ls /mnt/log/nginx/*.log` ; do
logfile=$f-`date +%Y%m%d`
if [ -e $logfile ] ; then
gzip $logfile
- /usr/local/ec2onrails/bin/archive_file.rb --file $logfile.gz --dir logs/nginx && rm $logfile.gz
+ /usr/local/ec2onrails/bin/archive_file --file $logfile.gz --dir logs/nginx && rm $logfile.gz
fi
done
@@ -31,5 +31,5 @@ God.load "#{APP_ROOT}/config/god/#{RAILS_ENV}/*.god"
Thread.new do
sleep(2)
applog(nil, :info, "initializing services....")
- system("/usr/local/ec2onrails/bin/init_services.rb")
+ system("/usr/local/ec2onrails/bin/init_services")
end
@@ -1,5 +1,5 @@
############################################################
-# This script is sourced by .bashrc and by /usr/local/ec2onrails/rebundle.sh
+# This script is sourced by .bashrc and by /usr/local/ec2onrails/rebundle
# You shouldn't need to change anything in here
if [ -r /mnt/aws-config/config ] ; then

0 comments on commit 563816e

Please sign in to comment.