Every repository with this icon (
Every repository with this icon (
Application deployment
Deployment
Here are a few ways you can deploy to PoolParty with built-in deployment mechanisms.
Deploy Directory
PoolParty has the deploydirectory resource built-in which enables you to specify a path on your filesystem that you want deployed across your cloud. Usage looks like:
has_deploy_directory "web_app.com",
:from => "~/Sites/web_app_directory",
:to => "/var/www/")
This will send the deploy directory up (with rsync) to the “to” path with name appended. The example above will resolve to:
/var/www/web_app.com
Everytime that you reconfigure your cloud with
cloud configure
A new copy of your directory will be pushed to the master and then filtered down to the slave nodes. This is useful for applications you won’t be pushing to all that often and don’t require versioning.
Git
PoolParty has the git resource already built-in as a resource as well. You can use this to deploy. Usage looks like:
has_git_repos( :name => "xnot",
:source => "git://github.com/auser/xnot.org.git",
:dir => "/var/www",
:owner => 'www-data',
:deploy_key => 'pool_cloud.rsa')
dir and source are required when calling has_git_repos.
This will push the git repository to your masater and your slaves. All the instances in the cloud will sync with the git repos everytime they reconfigure themselves, thus, you can then just push to your git repos and allow the clouds to pull when they are schedule to refresh themselves. Note, the at directory refers to the CWD (current working directory) that the command will be called from. Thus, the above will result in: /var/www/xnot.org.
Alternatively, you can use a post-receive hook to tell your cloud to pull the latest updated code. Now you can just use a git repository for your production level code and push to the production repos when you are ready to deploy. Simple as pie!
SVN
PoolParty has an svn resource already built-int. Similar to the git resource, you can use this to deploy your code as well. Usage looks like:
has_svn_repos "mysvn",
:source => "svn://svnsource",
:at => "/var/www",
:user => "username",
:password => "password"
This will pull the svn (with the username and password) into the “at” directory. This will resolve to:
/var/www/mysvn
The username and password are optional and only required if the svn repos needs one. Similar to the git resource, the cloud will always pull to keep up the latest code from the svn repos.






