8

I'm looking for some help in designing a strategy to automate deployment of a web application's assets (images, css, js) to Rackspace's Cloud Files (CDN) service.

I currently use git push to deploy the web app to a remote server. So here's one way I'm thinking this could happen. Are there any better/cleaner methods?

  • Dev makes changes to an asset file (css, js, or an image)
  • Dev commits his changes
  • Dev pushes his changes to the server
  • Assets are automatically renamed to eliminate cache issues (append git version?) and sent to the CDN
  • Referencing code would be automatically updated to new filename

FYI, this is a PHP app in CodeIgniter 2.x if it matters.

Happy to hear any ideas, alternative or not.

k00k
  • 17,314
  • 13
  • 59
  • 86
  • Related: http://stackoverflow.com/questions/6379380 – gjb Jul 19 '11 at 15:45
  • I recently faced the same problem and found the ``swift`` console tool to be very useful for scripted upload to rackspace cloud files. see my answer: http://serverfault.com/questions/421622/sync-mirror-directory-with-rackspace-cloud-files-bucket/659209#659209 – flexponsive Jan 14 '15 at 22:18

7 Answers7

1

I've not found anything to automatically do it.

You can use the Rack Space Cloud File API ( http://www.rackspace.com/cloud/cloud_hosting_products/files/api/ ) to upload files to Rackspace's CDN aware containers.

Bill
  • 26
  • 2
0

This github repository will do at least part of what you are asking.

https://github.com/bermi/cloudfiles-mirror

user1532942
  • 17
  • 1
  • 3
0

Since you're using PHP you should seriously consider using the Rackspace PHP SDK. You can find sample code for working with the CDN service. It'll be a lot easier to work with than writing directly to the Cloud Files API.

Everett Toews
  • 10,337
  • 10
  • 44
  • 45
0

There's a paid service http://beanstalkapp.com/features/deployments for auto deployments to cloud files or other servers.

Thomas Welton
  • 148
  • 1
  • 5
0

try this its completely automated: https://github.com/rumblelabs/asset_sync

John Kloian
  • 1,414
  • 15
  • 15
0

I'm not aware of anything, but you could probably script something to do this without too much work.

Check out Fog or the official ruby-cloudfiles gem from Rackspace.

gjb
  • 6,237
  • 7
  • 43
  • 71
0

This might be what you're looking for:

https://github.com/phillc/cloud-files-asset-sync

Micah
  • 131
  • 1
  • 3