rackspace-cloud

Rails/Capistrano tool to deploy static assets to Rackspace Cloud Files or Amazon Cloud Front?

我与影子孤独终老i 提交于 2020-01-23 03:43:04
问题 Is anyone aware of a tool that will automatically deploy a Rails app static assets to Rackspace Cloud Files or Amazon Cloud Front? In my perfect world capistrano would automatically upload everything in javascripts, stylesheets, and images then override the default image_tag and script_tags to route to the appropriate CDN path. It would be great if the deploy task created a new container with each deploy like cap creates a new release directory, or maybe it should use the same containers and

Openstack.Net SDK cannot access services

元气小坏坏 提交于 2019-12-24 00:57:37
问题 We've setup an OpenStack system on our own hardware installing all components, with everything seemingly fine as we've created networks and VMs through the web interface. I'm trying to use openstack.net SDK to do things programatically. I seem to be able to Authenticate fine using a username and password, but when it comes to accessing other services that are installed, we get errors suggesting the API endpoints aren't available to the user. The code we're using is below which works fine

Automatically deploying assets to Rackspace CDN via git and updating references to those assets?

跟風遠走 提交于 2019-12-22 04:39:04
问题 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

Capistrano - How to deploy to multiple cloud servers

淺唱寂寞╮ 提交于 2019-12-20 16:49:14
问题 I've heard that Capistrano supports deployment to multiple servers, but I haven't found a practical way to set it up. When I say multiple servers I mean servers running the same application in a production environment. At any time I would like to deploy to 5 or 10 servers if that is what I'm currently using. Thank you. 回答1: Using multiple servers is one of the main reasons to use capistrano versus just doing things by hand. Your deploy.rb just needs to define what actions should be performed

Django upload image - From a form to Rackspace/S3 with no manipulation

瘦欲@ 提交于 2019-12-19 19:45:16
问题 I simply want to upload an image (JPG) using a form, then send that image to Rackspace 'Cloud Files' or Amazon 'S3'. No manipulating the file. No saving to disk, everything to memory (am hosted on a cloud server) Image size won't exceed 75kb Update (Two Caveats): One: It also needs to work when data is posted from a phone app. Two: It needs to be sent to Rackspace Cloud Files as well as S3 (starting with CF). The code below works but it is way WAY too heavy. import cloudfiles as cf def

Stuck trying to bootstrap Windows server using Chef

痞子三分冷 提交于 2019-12-12 07:58:00
问题 I am a mac girl, working on connecting with knife-windows trough Opscode's managed Chef to my Rackspace Windows servers. (I know, it sounds exotic, but these Windows servers are a customer requirment). I tried to Chef for a spin but I am stuck in trying to bootstrap the Windows 2008 Server on Rackspace with the knife-windows command. I am working on OSX, using rvm, ruby 2.1.0 and a local gemset with chef + knife-windows. I was trying to follow the steps from: https://github.com/opscode/knife

NameError, global not defined when using try,except

让人想犯罪 __ 提交于 2019-12-12 01:29:21
问题 Edit: Ignore this, I figured it out about 3 seconds after posting this but can't delete it =( I have this try, except code for working with RackSpace cloudfiles try: cacheobject = cachecontainer.get_object('file.jpg') except NoSuchObject as objectname: raise tornado.web.HTTPError(404) If 'file.jpg' is not found, the exception 'NoSuchObject' is raised. When I run this code I get the error except NoSuchObject as objectname: NameError: global name 'NoSuchObject' is not defined I tried putting

How to copy a file between locations in a Rackspace Cloud Files container with their PHP API

扶醉桌前 提交于 2019-12-11 15:38:22
问题 Given the code $this->cf_container->copy_object_to($file, $this->cf_container, $new_path . '/' . $file_subpath); where $this->cf_container is an object of the CF_Container class, I get this error: "Specified object 'A random container/one/pow/whiskey.jpg' did not exist as source to copy from or 'A random container' did not exist as target to copy to." The container's name, obviously, is "A random container". I have tried this with a container that does not contain spaces to the same effect.

How to serve files stored in cloud

情到浓时终转凉″ 提交于 2019-12-11 10:27:42
问题 I am managing a web application that uses Rackspace Cloud Hosting to store user images and files. Currently, when serving user pages, the real links to the files in the cloud are used. Potentially a user could view other users' files by guessing the file names. The file names are obfuscated containing about 30 alphanumeric digits, bit still this does not feel good. Is my concern valid, and if it is how can I best solve this? 回答1: I think it depends on the sensitivity of the information in the

Setting Access-Control-Allow-Origin (CORS) in the Rackspace Cloud Files Python API

旧时模样 提交于 2019-12-08 13:14:19
问题 I'm trying to enable CORS on my Rackspace Cloud Files. According to the docs, I can add the Access-Control-Allow-Origin header, but I don't see how to do that with the Python python-cloudfiles module API: conn = cloudfiles.get_connection('apaidnerd', 's3cr3t') container = conn.get_container('warez') obj = container.create_object('foo.png') obj.load_from_filename('/path/to/foo.png') # ...what's next? Help? 回答1: Use the undocumented headers property of Object : obj.headers['Access-Control-Allow