Git Product home page Git Product logo

Comments (4)

cf-gitbot avatar cf-gitbot commented on July 22, 2024

We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/72734458.

from cf-riak-cs-release.

maxbrunsfeld avatar maxbrunsfeld commented on July 22, 2024

Hey Chad,

I reproduced your problem using Transmit; I saw exactly the same errors you described. I was however able to use the riak service successfully through the fog gem.

Can you try setting your test app's VCAP_SERVICES environment variable locally and running this script?

#!/usr/bin/env ruby

require 'json'
require 'fog'

services = JSON.parse(ENV['VCAP_SERVICES'])
riak_creds = services.fetch('p-riakcs').first.fetch('credentials')
uri = riak_creds.fetch('uri')
id = riak_creds.fetch('access_key_id')
secret = riak_creds.fetch('secret_access_key')
host = uri.split("@").last
bucket_name = host.split("/").last

# in case your server is using self-signed SSL certs
Excon.defaults[:ssl_verify_peer] = false

client = Fog::Storage.new(
  host: host,
  aws_access_key_id: id,
  aws_secret_access_key: secret,
  provider: 'AWS',
  path_style: true,
  port: "443",
  scheme: "https",
)

dir = client.directories.get(bucket_name)
puts "Got directory: #{dir.inspect}"

created_file = dir.files.create(key: "the-key", body: "the-body", public: true)
puts "Created file: #{created_file.inspect}"

read_file = dir.files.get("the-key")
puts "Read file: #{read_file.inspect}"

Thanks,
CF Community Pair

from cf-riak-cs-release.

oppegard avatar oppegard commented on July 22, 2024

Hi Max,

We tried your script, and it looks like the problem is that we have no bucket created.

When we run the script, we get "Got directory: nil".

We verified that the bucket name was correctly parsed from VCAP services and put into the 'bucket_name' variable.

So, it looks like this might have been a problem with the bucket not getting created properly when the service was initially created in CF (e.g. cf create-service ...).

I understand that this probably isn't a bug with this bosh release repo (per our email discussions). So, feel free to contact us directly via email if you'd like us to move this bug to be opened against a different repo.

-- Glenn and Chad

from cf-riak-cs-release.

thewoolleyman avatar thewoolleyman commented on July 22, 2024

We have this working now, via the test script, and our app and the aws_s3 gem. We've re-created the service, not sure why it didn't seem to have a bucket the first time we created it.

This still doesn't work via Transmit, it can never see the bucket, but that's an unrelated issue.

This issue can be closed, thanks for your help.

-- Chad

from cf-riak-cs-release.

Related Issues (17)

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.