0

So I am new to IBM Bluemix and all of their products and I am trying to do this project http://www.ibm.com/developerworks/library/ba-muse-toycar-app/index.html . I have done all of the modifying of the car and everything I am just having issues with the codes.

I have a few specific questions on part 2 step 2.b when you are entering in the information for the Cloudant database what information do I put in for the cradle connection and how do I acquire that information.

Second when I go to deploy the app Part 2 Step 2.4 how do I navigate to the application directory? I have looked at the help and googled to no avail. So if we fix these things I am hoping that I will be able to deploy the application. However currently when I go to deploy it I get this error.

cf push braincar
Updating app braincar in org [email protected] / space dev as    [email protected]...
OK

Uploading braincar...
FAILED
Error uploading application.
open /Users/codycornwell/.rnd: permission denied
>>

I am green to all this so any help and explanation to understand it is greatly appreciated! Thanks!

1
  • Which directory were you in when pushing application (cf push command)? Based on the permission denied error , you might have issued cf push from your user root directory. Please change current directory to root of your application and try cf push again. If you try cf push from user root, the command tries to upload whole "/Users/<userName>/*" :) Commented Oct 18, 2015 at 23:03

1 Answer 1

1

In the tutorial's part 2, step 2.b, you need to specify your Cloudant credentials. There are several ways to get Cloudant credentials, but I'll focus on doing it within the context of Bluemix and the cf command line tool.

You will first need to create a Cloudant service instance, then create a set of service keys (credentials) and then view them.

Create a Cloudant service instance named myCloudantSvc using the Shared plan:

$> cf create-service cloudantNoSQLDB Shared myCloudantSvc

Create a set of service keys (credentials) named cred1:

$> cf create-service-key myCloudantSvc cred1

View the credentials for the service key you just created

$> cf service-key myCloudantSvc creed

With the last step above, you should see output which provides you with the username, password and host values that you'll need to place into your app.js code. It should look something like the following:

{
 "host": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-bluemix.cloudant.com",
 "password": "longSecretPassword",
 "port": 443,
 "url": "https://xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-bluemix:longSecretPassword@xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-bluemix.cloudant.com",
 "username": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-bluemix"
}

For your second question, it looks like you're performing the cf push from your $HOME directory (as mentioned in the comment by @vmovva). By default, the cf push command will send all files in the current directory to Bluemix/CloudFoundry.

Try running the command from the directory where your source code is located to reduce the files pushed to Bluemix. If your source code is intermingled in your $HOME directory, move your source into a different directory and then push from that directory.

Sign up to request clarification or add additional context in comments.

5 Comments

Thank you guys both, question I have is CD and PWD dont work within CF so how do I change the directory in cloud foundry?
Also using your commands the shared database isnt free. I am trying to get this to work for a class and using their free account, is there a word that I can use to make the instance for free rather than requiring me to pay for it/
The 'Shared' plan for Cloudant offers "free" up to a point: "This plan provisions a Cloudant account on a shared Cloudant Cluster. This plan allows for up to 20GB of free data storage with 100,000 Heavy API calls and 500,000 Light API calls per month free. Usage above the free tier will be charged as per pricing details.". If you're staying below 20GB of data, and the specified amount of API calls, there is no charge.
Can you clarify what you mean by 'CD and PWD don't work within CF' ? It appeared in the original question that you're pushing the application from your local filesystem.
Thank you for clearing that up Jim. And what I meant was that I have the application on bluemix and I forked their repository as they recommended. Should I just download the code to make it easier? Or is there a way to implement it with the forked code?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.