Giter Club home page Giter Club logo

moonshine's Introduction

Five Minute Rails Application Deployment

Ready to deploy your Rails application to Rails Machine? Follow these steps and you’ll have it running in no time! Feel free to utilize Rails Machine’s Ask Us Anything Support and contact us with any questions you have along the way.

Update Gems

Install the latest version of the railsmachine gem:

  
    $ sudo gem install railsmachine
  

Install Phusion Passenger and Ruby Enterprise Edition

If you do not have Phusion Passenger and Ruby Enterprise Edition installed on your Rails Machine yet you can run this installer on your server.

  
    $ wget http://assets.railsmachine.com/wiki/centos_passenger_install.sh
    $ sh centos_passenger_install.sh
  

Setup Capistrano

Capify your application:

  
    $ capify .
  

Configure Capistrano for Rails Machine

The following step customizes your config/deploy.rb with two bits of information you provide:

  • --name: a simple name for your application. no spaces, please.
    • example: my-cool-app
  • --domain: the primary domain name for your application. please omit the ‘www’ – we automaticaly alias www.whateveryouprovide.com as needed.
    • example: my-cool-app.com
  
    $ railsmachine --apply-to . --name my-cool-app --domain my-cool-app.com 
  

Please note that the domain name provided will need to be correctly pointed at your Rails Machine account. If you don’t have a DNS provider, we’ve been more than happy with DNS Made Easy.

Update Database Config

Update your applications config/database.yml’s section with your desired MySQL datbase name, username, and password. The database and user will be created for you in a forthcoming step.

Application Setup

Rails Machine defaults to using mongrel + mod_proxy_balancer to run your Rails Application. If you’d like to switch to Phusion Passenger, edit the line in your application’s config/deploy.rb that begins set :app_server to reflect your choice. For example:

  
    set :app_server, :passenger
  

Run the following Capistrano task to setup your MySQL databases and configure your application servers (mongrel/passenger):

  
    $ cap servers:setup
  

Source Control

If you’re already using Source Control…

…edit the lines in your application’s config/deploy.rb that begin set :scm and set :repository. For example:

  
    set :scm, :git
    set :repository, "[email protected]:yourname/my-cool-app.git"
  

If you’re not yet using Source Control…

…you can easily setup a Git/Subversion repository on your Rails Machine. Subversion is the default, edit the line in your application’s config/deploy.rb that begins set :scm if you’d like to change it to git. For example:

  
    set :scm, :git
  

Next, run the following task to import your application into a Git/SVN repository on your Rails Machine:

  
    $ cap repos:setup
  

Initial Deploy

That’s it! You’re ready to use Capistrano to deploy your app for the first time:

  
    $ cap deploy:cold
  

Once that’s done, open your application in a web browser and test it out!

To perform a subsequent deploy with Capistrano:

  
    $ cap deploy
  

or, if you need to run migrations as well:

  
    $ cap deploy:migrations
  

moonshine's People

Contributors

adamjparrott avatar andrewroth avatar bryantraywick avatar ches avatar dbrm avatar drakkhen avatar ernie avatar griffordson avatar jarinudom avatar jnewland avatar john-griffin avatar joshgoebel avatar kplawver avatar leejones avatar malmckay avatar mckpm avatar michaelbiven avatar morgancurrie avatar pjkelly avatar queso avatar railsmachine-ops avatar rmatei avatar rylwin avatar skalnik avatar slamere avatar technicalpickles avatar tgraham avatar vegantech avatar wfarr avatar wrecked avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moonshine's Issues

bundler vs config.gems

  • deprecate [with warnings] gems.yml
  • provide support for migrating config.gems -> Gemfile
  • bundle pack or bundle lock locally before deployment
  • bundle install in manifest run to replace installing gems from config/gems.yml

allow MySQL bind-address to be configured

E.g. for slave configurations or standalone DB server listening on an interface accessed by N app servers. Like this, but consider #34 as well.

This would force a MySQL restart because of updated cnf file, so must come in a point release.

log_slow_queries changing to slow_query_log

Saw this in my syslog:

[Warning] The syntax '--log_slow_queries' is deprecated and will be removed in MySQL 7.0. \
  Please use '--slow_query_log'/'--slow_query_log_file' instead.

Will patch when I get time.

don't hardcode versions in recipes/moonshine_cap.rb

There's a bunch of version numbers hardcoded into recipes/moonshine_cap.rb. It'd be awesome if you could specify something in config/moonshine.yml (and config/moonshine/<stage>.yml to control this.

This, in particular, would be useful for upgrading ruby, rubygems, shadow_puppet, and puppet. These are basically all things aren't managed by moonshine because they need to be bootstrapped before moonshine can run.

It probably be a hash of sorts, but I'm not sure what an appropriate name would be yet.

rake moonshine:gems output wrong

The output from running rake moonshine:gems says that “config/moonshine.yml has been updated” where actually config/gems.yml is where the action is at.

Dev docs are optional in REE187

A new option was added to the REE installer: --no-dev-docs which skips the ri/rdoc generation during the REE install. This makes depoy:setup much quicker. Patch tested and coming...

apt_gems just bitch-slapped me for specifying a gem version

I just learnt about exact_dep :) Seems counter-intuitive, and ironically - using the LTS - I only set rmagick to <= 2.12.2 because later versions require an ImageMagick that's not available on Hardy Heron.

This might be fixed simply with a better example showing versions in the example moonshine.yml, but it seems like package dependencies are more often going to be version independent.

Gems not added to gems.yml

Some gems are not added to gems.yml when running moonshine:gems

For example:

config.gem 'freelancing-god-thinking-sphinx', :lib => 'thinking_sphinx', :source => 'http://gems.github.com'

DEFLATE filter included but module not enabled

The default passenger.vhost.erb includes configuration for the DEFLATE filtering of a bunch of types, but the deflate module is not enabled.

This results in the following error in the apache error.log:

[error] an unknown filter was not added: DEFLATE

Resolution should be twofold:

  1. The DEFLATE config in passenger.vhost.erb should be wrapped in IfModule, and
  2. The deflate module should be enabled.

Patch coming.

Permissions error when running gem update --system in deploy:setup

** [out :: royalblues] RubyGems installed the following executables:
** [out :: royalblues] /usr/bin/gem
** [out :: royalblues]
** [out :: royalblues] ln: creating symbolic link `/usr/bin/gem':
File exists
** [out :: royalblues] Updating RubyGems
** [out :: royalblues] Updating rubygems-update
** [out :: royalblues] ERROR: While executing gem ...
(Gem::FilePermissionError)
** [out :: royalblues] You don't have write permissions into the /usr/
lib/ruby/gems/1.8 directory.
command finished
failed: "sh -c 'cd /tmp && sudo rm -rf rubygems-1.3.5* || true && wget
-q http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz &&
tar xfz rubygems-1.3.5.tgz && cd /tmp/rubygems-1.3.5 && sudo ruby
setup.rb && sudo ln -s /usr/bin/gem1.8 /usr/bin/gem || true && gem
update --system'" on myserver

I forked, fixed, and sent a pull request.

Adding to the shared_children doesn't seem to work

I've got one extra directory that needs to stay symlinked to the "permanent" directory in the shared/ directory. After adding the directory name to the :shared_children: section, moonshine doesn't appear to respect that particular directory (though all the other directories seem to be symlinked properly).

Can we get some more documentation (or even hints!) on how to create manifest for specific server roles?

I've been banging my head against the wall for the last few hours tonight and simply can't figure out how to make different manifests apply to boxes in my web and db roles. In the current doc, there's a very small tip, "By default, Capistrano applies the manifest at app/manifests/application_manifest.rb. To run a different manifest, for example one to install and maintain packages on a server of a different role: set :moonshine_manifest, 'memcached_manifest'"

Can we get a teaser or some other tips on how to make this work? I've been using Moonshine for months now and am now in a position where I absolutely need to separate out the DB from the Web role.

Multistage Deployments

I see some mentions of multistage in the docs, but have not had luck setting it up yet. Is there any secret to getting moonshine and capistrano-ext to work together? It seems like moonshine reads in moonshine.yml before I can specify any stage specific properties in my app manifest or deploy files.

using 'each' and other methods which take blocks generates extraneous newlines

Currently, if you use a for loop, like

<% configuration[:syslog_ng][:options].each do |key, value| %>
      <%= key %>(<%= value %>);
<% end %>

This ends up with at couple of extra new lines per iteration. It'd be nice to have this be more rails-like, where you can pretty easily have the newlines omitted.

One way to do this is to use ERB with a 'trim mode'. For example, it can omit newlines that start with <% and end with %>. This doesn't account for cases where you indent the start of the line though. There's another mode which trim on lines ending with %>. This covers cases of being indented, but, it might trim unexpectedly, like if you use <%= blah %> at the end of the line.

I was wondering how rails worked such that you can trim lines like <% array.each do |item| -%>. Turns out it's using erubis: http://github.com/rails/rails/blob/9415935902f120a9bac0bfce7129725a0db38ed3/actionpack/lib/action_view/template/handlers/erb.rb#L44

It's an extra dependency, so that might be a concern.

moonshine:gems builds gems from current env

At some point I configured a few gems in my development.rb:
config.gem 'rak'
config.gem 'ruby-debug'

rake moonshine:gems will pull these into the gems yml.

I think that moonshine:gems should default to 'production' or 'prod' since it's pretty easy to accidentally include these unnecessary gems.

support [:mysql][:allowed_hosts] in mysql_user recipe in core

So you can give MySQL privileges for multiple hosts without needing to override the recipe. By default should include localhost or bind_address variable, if that is added to Moonshine proper.

This is useful for multiple app servers with standalone DB server, and slave configurations.

Not sure how to install arbitrary packages, so created plugin moonshine_packages

There may be a way to install arbitrary (not tied to a gem as a dependency) packages, but I couldn't find out how. I made a simple plugin to handle this for me: just list the packages you want installed through apt-get in the moonshine.yml file and they will be installed on the next deploy.

Like I said, there may be a way to do this already, but I couldn't find it. If there is a way, just ignore this post. If not, then I'd like to have http://github.com/rylwin/moonshine_packages added to the wiki plugins page for others to use. Feel free to fork it to your railsmachine account, too.

Thanks for moonshine. It's great! Just hope this plugin is useful.

apt-get update only done during deploy:setup

What if, as I've just experienced, Ubuntu replace a package - like yesterday they replaced libkrb5-dev_1.6.dfsg.3~beta1-2ubuntu1.3_amd64.deb with libkrb5-dev_1.6.dfsg.3~beta1-2ubuntu1.4_amd64.deb (and removed 1.3)

The deploy chain doesn't actually call apt-get update so this change causes an error with the apache install (again, yes, on LTS :)

I think that the regular deploy should call an apt-get update to ensure that the package specifications are correct.

Some error - messages don't help track down the problem

I've gotten this error message a lot since I've been using moonshine. The first was because I had a rake task that used Rcov::RcovTask (I had to comment out my task in order to get deploy to work). Now it's happening again and I'm at a loss for the cause.

The moonshine log has nothing useful in it:
$ cat /var/log/moonshine_rake.log
(in /rails/registration/releases/20090625012320)

Also, I feel like this question would be better directed at a forum before filing a bug report but I've been unable to find a moonshine forum. Does one exist? Thanks!

$cap deploy
....
** [out :: rails] notice: /ApplicationManifest#79237290/File[/var/log/moonshine_rake.log]: Filebucketed to with sum b69f45200c592028b81fb16e712cb525
** [out :: rails]
** [out :: rails] notice: /ApplicationManifest#79237290/File[/var/log/moonshine_rake.log]/content: content changed '{md5}b69f45200c592028b81fb16e712cb525' to '{md5}7215ee9c7d9dc229d2921a40e899ec5f'
** [out :: rails]
** [out :: rails] err: /ApplicationManifest#79237290/Exec[rake tasks]/returns: change from notrun to 0 failed: rake environment 2>&1 >> /var/log/moonshine_rake.log returned 1 instead of 0
** [out :: rails] notice: /ApplicationManifest#79237290/Exec[rake moonshine:bootstrap]: Dependency exec[rake environment 2>&1 >> /var/log/moonshine_rake.log] has 1 failures
** [out :: rails] warning: /ApplicationManifest#79237290/Exec[rake moonshine:bootstrap]: Skipping because of failed dependencies
** [out :: rails] notice: /ApplicationManifest#79237290/Exec[rake db:migrate]: Dependency exec[rake environment 2>&1 >> /var/log/moonshine_rake.log] has 1 failures
** [out :: rails] warning: /ApplicationManifest#79237290/Exec[rake db:migrate]: Skipping because of failed dependencies

script/generate moonshine hangs at creating config/moonshine.yml

On a fresh install of Moonshine, running script/generate moonshine hangs at creating config/moonshine.yml. In Terminal on OS X, it looks like:

  create  config/moonshine.yml
/usr/local/bin/ruby

I'm not sure if Terminal would ever finish the ruby process, I killed it after a couple of minutes.

With a preexisting copy of Moonshine, post-running the generator once, if I run it again it hangs at the line prior:

  exists  config
/usr/local/bin/ruby

In either instance, config/moonshine.yml is created but is a blank file. Not sure if it is relevant, but when I ctrl-c out of the ruby process I get "Command failed with status (1)".

I'm on ruby 1.8.6, rails 2.3.5, OS X 10.5.8.

better support for svn

Currently, to support SVN, we have people drop this in their deploy.rb to make deploy:setup idempotent:

set :scm,"subversion"

# URL of your source repository.
set :repository,  "svn+ssh://[email protected]/path/to/repository"

default_run_options[:pty] = true

namespace :svn do
 task :install do
   sudo "apt-get install -q -y subversion"
 end
end
after 'deploy:setup','svn:install'

This would be much better integrated into moonshine proper

MySQL with root password set

MySQL recipes don't work with root password set. This is true even if you setup /root/.my.cnf with a password. The reason it doesn't work is that Moonshine uses sudo to run the manifest.

With the root password in /root/my.cnf this will fail:
sudo mysql -uroot

But this will work:
sudo su -c "mysql"

A fix might be to parse the password from /root/my.cnf and use that.

Non default socket causes false negative on mysql start

/etc/init.d/mysql uses this for testing that mysql is up:

MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"

As you can see, it has the debian.cnf hard-coded in there - which has the default socket in it, meaning that the mysqladmin based checks in /etc/init.d/mysql fail (even though mysqld has been started correctly).

Kinda related to #32

Will patch when I have time.

Redundant rewrite rules?

I was late to the Passenger party, so maybe early on Passenger needed these rewrites to serve up the static content, but are these still required?

# Rewrite index to check for static
RewriteCond  %{THE_REQUEST} ^(GET|HEAD)
RewriteCond  %{DOCUMENT_ROOT}/index.html -f
RewriteRule  ^/?$ /index.html [QSA,L]

# Rewrite to check for Rails non-html cached pages (i.e. xml, json, atom, etc)
RewriteCond  %{THE_REQUEST} ^(GET|HEAD)
RewriteCond  %{DOCUMENT_ROOT}%{REQUEST_URI} -f
RewriteRule  ^(.*)$ $1 [QSA,L]

# Rewrite to check for Rails cached html page
RewriteCond  %{THE_REQUEST} ^(GET|HEAD)
RewriteCond  %{DOCUMENT_ROOT}%{REQUEST_URI}.html -f
RewriteRule  ^(.*)$ $1.html [QSA,L]

Or am I missing the point entirely of what dark magic these are doing?

first deploy, fails with mysql misconfiguration

Deploying to a new VPS, followed the wiki, got to the 'cap deploy' step and it died with:

  * executing "sudo -p 'sudo password: ' RAILS_ROOT=/home/sitename/sitename.com/releases/20100323192630 DEPLOY_STAGE=undefined RAILS_ENV=production shadow_puppet /home/sitename/sitename.com/releases/20100323192630/app/manifests/application_manifest.rb"
    servers: ["li50-215.members.linode.com"]
    [li50-215.members.linode.com] executing command
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[pull current package list]/returns: executed successfully
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[mysql_database]/returns: executed successfully
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rails_gems]/returns: executed successfully
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake tasks]/returns: (in /home/sitename/sitename.com/releases/20100323192630)
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake tasks]/returns: ** Erubis 2.6.5
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake tasks]/returns: Loaded suite /usr/bin/rake
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake tasks]/returns: Started
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake tasks]/returns: 
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake tasks]/returns: Finished in 0.000188 seconds.
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake tasks]/returns: 
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake tasks]/returns: 0 tests, 0 assertions, 0 failures, 0 errors
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake tasks]/returns: executed successfully
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]: Triggering 'refresh' from 1 dependencies
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns: rake aborted!
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns: Mysql::Error: Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT': CREATE  INDEX `index_sessions_on_session_id` ON `sessions` (`session_id`)
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns: 
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns: (See full trace by running task with --trace)
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns: (in /home/sitename/sitename.com/releases/20100323192630)
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns: ** Erubis 2.6.5
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns: -- create_table("captions", {:force=>true})
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns:    -> 0.0814s
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns: -- create_table("frames", {:force=>true})
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns:    -> 0.0047s
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns: -- create_table("layouts", {:force=>true})
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns:    -> 0.0283s
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns: -- create_table("panels", {:force=>true})
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns:    -> 0.0049s
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns: -- create_table("placements", {:force=>true})
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns:    -> 0.0046s
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns: -- create_table("script_requests", {:force=>true})
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns:    -> 0.0044s
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns: -- create_table("scripts", {:force=>true})
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns:    -> 0.0046s
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns: -- create_table("sessions", {:force=>true})
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns:    -> 0.0045s
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake moonshine:bootstrap]/returns: -- add_index("sessions", ["session_id"], {:name=>"index_sessions_on_session_id"})
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake db:migrate]/returns: rake aborted!
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake db:migrate]/returns: Mysql::Error: Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT': CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake db:migrate]/returns: 
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake db:migrate]/returns: (See full trace by running task with --trace)
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake db:migrate]/returns: (in /home/sitename/sitename.com/releases/20100323192630)
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake db:migrate]/returns: ** Erubis 2.6.5
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Exec[rake db:migrate]/returns: executed successfully
 ** [out :: li50-215.members.linode.com] notice: /ApplicationManifest#89818390/Package[libmagick9-dev]/ensure: ensure changed 'purged' to 'present'
    command finished
  * executing "rm -f /home/sitename/sitename.com/current && ln -s /home/sitename/sitename.com/releases/20100323192630 /home/sitename/sitename.com/current"
    servers: ["li50-215.members.linode.com"]
    [li50-215.members.linode.com] executing command
    command finished
 ** transaction: commit
  * executing `deploy:migrate'
  * executing "ls -x /home/sitename/sitename.com/releases"
    servers: ["li50-215.members.linode.com"]
    [li50-215.members.linode.com] executing command
    command finished
latest => /home/sitename/sitename.com/releases/20100323192630
  * executing "cd /home/sitename/sitename.com/releases/20100323192630; rake RAILS_ENV=production  db:migrate"
    servers: ["li50-215.members.linode.com"]
    [li50-215.members.linode.com] executing command
 ** [out :: li50-215.members.linode.com] (in /home/sitename/sitename.com/releases/20100323192630)
 ** [out :: li50-215.members.linode.com] ** Erubis 2.6.5
 ** [out :: li50-215.members.linode.com] ==  CreateUsers: migrating ====================================================
 ** [out :: li50-215.members.linode.com] -- create_table(:users)
 ** [out :: li50-215.members.linode.com] -> 0.0060s
 ** [out :: li50-215.members.linode.com] ==  CreateUsers: migrated (0.0062s) ===========================================
 ** [out :: li50-215.members.linode.com] 
 ** [out :: li50-215.members.linode.com] rake aborted!
 ** [out :: li50-215.members.linode.com] An error has occurred, all later migrations canceled:
 ** [out :: li50-215.members.linode.com] 
 ** [out :: li50-215.members.linode.com] Mysql::Error: Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT': INSERT INTO schema_migrations (version) VALUES ('20100124223558')
 ** [out :: li50-215.members.linode.com] 
 ** [out :: li50-215.members.linode.com] (See full trace by running task with --trace)
    command finished
failed: "sh -c 'cd /home/sitename/sitename.com/releases/20100323192630; rake RAILS_ENV=production  db:migrate'" on li50-215.members.linode.com

apache/mysql logrotate not set up

The docs say that moonshine sets up logrotate for Apache and MySQL, but where? I can't see any calls to the logrotate function to set it up. And indeed, on a server I just tested on, it didn't happen -- I have the default Ubuntu apche2 and mysql-server files in /etc/logrotate.d.

I ask because I'm trying to have moonshine add the 'dateext' option to them (otherwise it's needlessly annoying to try to find a particular logfile) and can't even see where it's invoked from.

Ruby 1.9 Support

I would really like to deploy my apps with Ruby 1.9 but there is currently no way of doing so that I can see.

Thanks!

no way to upgrade?

Passenger 2.2.3 is out with a bunch of bugfixes, but there doesn't seem to be a way to have moonshine to upgrade it or anything else on the system.

What's the upgrade path? Log back into the server and run apt-get update/upgrade and passenger-install-apache2-module by hand? Back to having the system in an unknown, unreproducible state, it seems.

I have a hunch there's a way to do it that I'm just missing, so this is probably a bug against the docs.

apt_gems in moonshine.yml do not override plugin's apt_gems.yml (supporting rmagick in 9.04)

Thank you for moonshine. It has been wonderful.

We are deploying to Ubuntu 9.04. Everything worked fine until we added rmagick. The rmagick dependencies have changed.

We added this to our moonshine.yml:

:apt_gems:
  :rmagick:
    - imagemagick
    - libmagickcore-dev

After commiting and 'cap deploy', the libmagickcore-dev library is not installed on our server.

  1. Are we headed in the right direction?
  2. Is some other step needed?
  3. Is this a good way to handle the changed rmagick dependency?

can't get :ensure => :latest by way of the gem convenience method

The current implementation of the gem helper gives no regard to a user-specified :ensure parameter, and if you pass :version => :latest you always end up with the gem index being searched for a dependency with ">= 0". Hence, it just keeps any already-installed version, or installs the current one the first time but never updates it.

Using package :foo, :ensure => :latest, :provider => :gem of course works, but gem's behavior is a gotcha.

Capistrano don't read my moonshine.yml file

I'm trying to use moonshine to deploy my rails application but I have a problm that I'm not able to solve.

When I try to run "cap deploy:setup" it outputs an error saying "Please specify the name of your application, set :application, 'foo'"

I don't understand why I'm having that error because the application name is set on the config/moonshine.yml file.

http://pastie.org/473615

Thank's in advance!

"undefined method `mattr_accessor' for ActiveSupport::Deprecation:Module" error in 2.3.5

When using the old syntax of plugin :ssh (for example) you get the above error when running your manifest.

This is because in lib/moonshine/manifest.rb on line 33 active_support/deprecation is loaded, but attribute_accessors hasn't been loaded yet and so mattr_accessor has not yet been defined.

I'm guessing that this works in Rails3 with the dependencies cleanup in Rails, but in 2.3.x it'll break without either requiring active_support or active_support/core_ext/module/attribute_accessors

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.