Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Setting Meta-Web-Index and Deleting Existing Files #5

Open
adilwali opened this issue Feb 24, 2013 · 4 comments
Open

Setting Meta-Web-Index and Deleting Existing Files #5

adilwali opened this issue Feb 24, 2013 · 4 comments

Comments

@adilwali
Copy link

I have a couple core use cases that I'd like to support using CloudFiles. I thought I'd list them here to see if they are in the scope of what you're trying to do with this gem @rtgibbons

If they are, I can start hacking away at them as part of this grunt plugin. If not, no sweat!

  1. I want to clear out a container before uploading the 'new release' to it. (We are using our CloudFiles container to host a static site. So when we 'deploy' to staging/prod, we only want one copy of the files there.) Alternatively, we can use the sub-directory approach that you utilize here, but we'd need a way to symlink the root files to the newest build. So if we upload a build to '2013-02-23-build', we'd want container/index.html --> container/2013-02-23-build/index.html
  2. I want to set the Meta-Web-Index parameter via the RackSpace CloudFiles API. In the above example, we'd set the web-index to index.html. This way, if a user navigates to 'http://rackspace-container-url/', they would see the index page.

I suspect that the above two use cases would be reasonably common for anyone trying to deploy a static site to staging/production environments that are hosted entirely off of the CloudFiles CDN. (Ie, the difference between staging/prod is just a bucket-name.)

Let me know what you think!

@adilwali
Copy link
Author

It's worth noting that #2 is going to be more challenging to support since I don't think pkgcloud supports setting any of the meta parameters via the API. So we'd have to implement that ourselves.

@rtgibbons
Copy link
Owner

For #1, I think having an option to do this would be useful. I just haven't had that use case yet.

For #2, I had a simliar use case, but the lack of metadata support was more work then I could take on at the time. Ideally I was picturing an metadata option , that took another option of key:value for the metadata so

{
    ...
    container: 'somewhere',
    metadata: {
        'web-index': 'index.html'
    }
}

@adilwali
Copy link
Author

Ok, cool. So for num1: I'll take a peek at the pkgcloud code some more and see if I can't implement that sometime soon. Num2: yep, that's exactly how I'm seeing it too. I'll add it to my 'todo wishlist' and see where it comes out :)

@rtgibbons
Copy link
Owner

Hey, regarding #2 check out #21

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants