cloud,cloudfoundry , Running cloudfoundry sample app on local sandbox

Running cloudfoundry sample app on local sandbox


Tag: cloud,cloudfoundry

This question may seem pretty naive but I've just started using cloud foundry. I installed the eclipse plugin & deployed a sample app. But everytime, while running the app in local or starting the server it is being pushed to the remote cloud server & running on a unique domain

Is there a way to run the app on localhost during development? Without connecting to the remote server & pushing every time, just like Google App Engine enables us to. Pushing every time makes the development process slow.

I tried to start the server without an internet connection it just won't start. Gives a sockettimedout exception.

Or is there any other way or workaround to develop in local & finally push the app to cloud foundry?


The Java applications you deploy to Cloud Foundry are going to be regular .WAR files (or Spring Boot .JARs) without any hard dependencies on the Cloud Foundry environment. So you should be able to iterate and test on these artifacts in your local environment just fine.

The only significant issue you should enconter is if your app has a dependency on a bound service in the Cloud Foundry environment. In this situation, I would recommend the use of Spring Cloud Connectors (

Let's say my application binds to a Redis service in the Cloud Foundry environment. I can inject this service with Spring Cloud like this:

@Autowired(required = false)
private RedisTemplate<String,String> _redisTemplate;

Now, my code can check to see if _redisTemplate is null. If so, I am running locally without Redis.

Or maybe I do have a local Redis instance to test against. In which case, I go with:

private RedisTemplate<String,String> _redisTemplate;

In my local environment, I start up with the environment profile local. With Spring Profiles, I declare the implementation of RedisTemplate to use the local instance for this profile. When I deploy to Cloud Foundry, the app will automatically start with the cloud profile, and will bind to the Cloud Foundry Redis instance instead of your local instance.


Installing Spring Cloud Services for Cloudfoundry without OpsManager

I've installed cloudfoundry on my local machine as described here and now I'd like to install Spring Cloud Services as well. However I don't know where to find OpsManager and I doubt if it is deployed at all. So the question is - is it possible to install Spring Cloud...

Digi Device API reading Datastream / DIO / AD

I have XBee Gateway ZB, Wifi and I'm experimenting with the Digi Device API. I already tried the Heroku App and it works really good. So I wanted to access online the Datastream. Using Google Spreadsheet or something like this. So reading the documentation from digi. I could acces...

AWS Instance Type For 3,000+/Second Outgoing HTTP Requests?

I'm currently scaling up an application on AWS, we send thousands of outgoing HTTP requests per second to 3rd party API's and services. Are there any EC2 instances optimized for this type of work?

How to tell which buildpack has staged my application in Cloud Foundry?

In Cloud Foundry, is there a way to tell which buildpack (and which version of that buildpack) has staged a given application? I am thinking there must be a way because I can see it on the Bluemix web console, but I can't find the same information from the cf...

Identifying duplicate requests fired from back end

I am facing a use case where I need to track down duplicate requests, which are fired through REST API calls from back end. Each request writes into the database, and hence the duplicate requests need not be processed again. The duplicate requests may come in different threads under the...

How can I preserve execute bits for files during 'cf push' for Node apps?

I need to push a node application that will be executing a bash script and the script file needs to have the execute bit set. Can the cf command line utility allow me to set execute permission? If it doesn't, can I do something during the staging cycle of my...

Did google change/update related to vm ssl connections to Cloud SQL?

Google Cloud SQL down? At 1am ET my VM connection to Cloud SQL over SSL decided to stop connecting and will not allow a connection. Did google make changes/updates? Has been working fine for months, no changes, then all of a sudden this morning at 1am ET BAM! Won't connect...

viewing google app engine Python logging messages in CodeEnvy

I'm trying to move my GAE development to the cloud. So far Codeenvy has the richest toolset however I'm struggling with one small issue. when I use the python logging library I don't know where to view these messages! def post(self): self.response.write('Processing form data...') feedback = self.request.get('content') I assumed...

Running python script on Microsoft Azure

I'll have a linux machine with a virtual machine installed for Microsoft azure soon. I need to run some data mining/graph analysis algorithms on the azure because I work with big data. I don't want to use azure machine learning stuff. just want to run my own python code. What...

delete the output of a join (record in multipe tables)

I use select * from service_instances i inner join service_instance_operations op on = op.service_instance_id inner join service_bindings bind on = bind.service_instance_id where i.guid = 'daf67426-129b-4010-832c-692bcfe98f62'; Howto delete this record in all 3 tables? There are primary and foreign key constraints. It doesn't work to replace "select *" with...

Difference between Cloud Foundry & Pivotal Web Services

I read on wikipedia that cloud foundry open source software is available to anyone whereas the Pivotal Web Services is a commercial product from Pivotal. I kinda searched a lot on internet but did not find any cloud foundry open source software implementation example. Everything is for Pivotal product which...

Error BXNUI2032E: The host is taken — Occurs while creating a Java Liberty project in IBM Bluemix

I am using the Java DB Web Starter boilerplate in IBM Bluemix. When I use it to create an app called SentimentAnalysisAPP, create fails with this error: BXNUI2032E: An error occurred when contacting Cloud Foundry to create a resource. Resource: routes. Cloud Foundry message: "The host is taken: SentimentAnalysisAPP." See...

What does (extra requests) mean in services?,notifications,push-notification,cloud,push
In Parse's pricing FAQ it is mentioned that "If your app hits its request limit, your extra requests will begin to fail with error code 155 (RequestLimitExceeded)". What does (extra requests) mean? Are they the requests made within the same minute? day? month? or all other requests made until the...

Deploying a Standard vNext WebApplication VS Next 2015 RC to Bluemix fails

I'm trying to deploy a aspnet5 Project (Template vNext WebApplication from Visual Studio) to Bluemix CF Service ( Yet it's not possible and fails with: OUT FAILED: Writing Release YML failed, 746: unexpected token at '?{ OUT "webroot": "wwwroot", OUT "dependencies": { OUT "Microsoft.AspNet.Diagnostics": "1.0.0-beta4", OUT "Microsoft.AspNet.Mvc": "6.0.0-beta4", OUT "Microsoft.AspNet.Mvc.TagHelpers":...

Does Bluemix include a JBoss runtime?

How can I create a JBoss runtime on Bluemix? The JBoss buildpack for Cloud Foundry does not support all features. The current buildpack is focused on running web applications in the servlet container and nothing further. Are there more docs on this and any updates on the plans going forward,...

Bluemix Node.js app not showing new code

I've built a Node.js app locally that works fine but when I went to test it on Bluemix, it didn't show the app consistently. What I mean is this. I did my cf push. It reported it went up ok. I went to my domain and I saw the original,...

How scale up/out mechanism works in OpenStack and Cloudfoundry integration?

I just started investigating OpenStack & Cloudfoundry recently, and I just wonder how scale up/out mechanism works in OpenStack & Cloudfoundry integration. As far as I understand, if we need to scale-up a web app, Cloudfoundry will try to create a new container to run new web app. If it...

Does Cloudfoundry router provide HTTPS support?

I am aware that there are two versions of CF routers: GoRouter: Older version: My question is: which one supports HTTPS incoming requests, if any. If they do support HTTPS, do they terminate SSL session and forwards the request in plain HTTP to the application?...

Authenticate Google Account with php

Is there a possibility to log in on to Google Accountt with php? Until 26th of May I was using to verify account. Now this method is disabled. What Im trying to do is to connect Google Printer Cloud to print orders in resaturant. Client makes order on website...

Uploading files to a bluemix app and pointing to them from configuration files

I am trying to upload files to my bluemix app and I am having problems using and understanding the file system. After I have succesfully uploaded files I want to give their path on my configuration files. Specifically, I want to upload a jar file to the server and later...

Error deploying application from Eclipse to Bluemix

While pushing an application from Eclipse to Bluemix, I received this error: Error: Client error - Error performing operation: 500 Error I tried multiple times but received the same error whenever pushing the application....

Spark - How to count number of records by key

This is probably an easy problem but basically I have a dataset where I am to count the number of females for each country. Ultimately I want to group each count by the country but I am unsure of what to use for the value since there is not a...

How to gain authorization to perform requested action, specifically create an instance of a service in Bluemix?

I am following the Developing Watson Applications with BlueMix tutorial but for some reason when attempting to create an instance via cf create-service DataCache free DataCacheInst I get the following error: FAILED Server error, status code: 403, error code: 10003, message: You are not authorized to perform the requested action...

How to get Office 365 service location via API

I am trying to find the region of an Office 365 service. Microsoft's Office 365 documentation states that the data storage regions are disclosed to the customer. Is it possible to find a service's region via an API request? I've been looking through documentation on the Service Communications API, the...

what does cloud foundry do that I can't do with Bosh

My company has been using Bosh for deploying and managing applications. My boss has asked me to deploy Cloud Foundry. My understanding is that cloud foundry works by running bosh scripts in the background. My question is, is there anything i really need cloud foundry for that I can't just...

Can I use Pivotal's Redis and RabbitMQ for Cloud Foundry on Pivotal Web Services

Currently, the only RabbitMQ service on PWS looks kinda iffy. I was wondering If I could use Pivotals solutions On Pivotal's own , or If to run theseI have to have an on premises Cloud Foundry. Can I run these on Pivotal Web Services? ...

Running cloudfoundry sample app on local sandbox

This question may seem pretty naive but I've just started using cloud foundry. I installed the eclipse plugin & deployed a sample app. But everytime, while running the app in local or starting the server it is being pushed to the remote cloud server & running on a unique domain...

Alternate to run window service in Azure cloud

We currently have a window service which send some notification emails to users after doing some processing on database(SQL database). Runs once in day. We want to move this on azure cloud. One alternate is to put it on Azure VM as is. but I am finding some other best...

Adding a second Heroku app to my local repo, I'm denied access to my apps

I originally had a setup like: git remote -v origin [email protected]: (fetch) origin [email protected]: (push) stage [email protected]: (fetch) stage [email protected]: (push) where I could push and pull from stage without an issue and run commands like heroku run console --app stage however, I added a production app locally leaving me...

GoogleCloudMessaging - InstanceID.getInstance(), registering from client

I'm pretty new to programming in Java and generally programming. Right now I decided to make my own app that is supposed to utilize Google Cloud Messaging. And somehow I succeeded but then I realized I used method String regid = gcm.register(PROJECT_NUMBER); that is deprecated and I should now use...

Bluemix ClearDB MySQL capacity limitation

The MySQL ClearDB service in Bluemix catalogue is offered with one single plan with a very limited capacity (5MB and 4 connections) and for free. Do you have a recommendation for an application that requires a mysql db with a higher capacity? Should I run an hybrid application with the... To Do web app deployment issue

Apologies for basic question. I am very new in web development . I have download javascript web To Do App from . Now I want to deploy with So that I can browse this app using But when try to deploy using "parse deploy" command getting...

Installing CouchDB on IaaS?

After many many google searches I am still unclear on how to install a CouchDB instance on an Infrastructure as a Service cloud service. I have looked into DBaaS options such as Cloudant, but for initial testing I would like to host the database on an IaaS. Specifically, I am...

Writing an IAM policy and CORS configuration for Amazon S3

I am very new to all this but have been able to get an avatar/image uploader to work in my Rails application. A user can upload a new avatar to my S3 bucket and the avatar shows within the web application. To this end, I've had to grant "AmazonS3FullAccess" policy...

How to conditionally check the state of an openstack instance

I am trying to conditionally check the state of an openstack cloud instance in my playbook. The playbook itself takes the name of a cloud instance as a parameter and then deletes it by setting the state to absent using nova compute. What I want to do is check if...

how to run a static site on bitnami and AWS?

I am quite a noob when it comes to cloud based apps, this is a completely new context for me. I currently got the github education pack, part of it was an account on bitnami. I was wondering if it's possible to host a static html site on bitnami, I...

Relation replacement in Parse Cloud

In a Parse Cloud function I need to replace the value of a relation. How do I do that? Here is my code: Parse.Cloud.define (“myCloudFunction”, function(request, response) { // Code to get myObject ……. // ……… // Now I have myObject in the hand. myObject.relation("author").add(NewAuthor); }); If I keep this...

In Spark, does the filter function turn the data into tuples?

Just wondering does the filter turn the data into tuples? For example val filesLines = sc.textFile("file.txt") val split_lines =";")) val filteredData = split_lines.filter(x => x(4)=="Blue") //from here if we wanted to map the data would it be using tuple format ie. x._3 OR x(3) val blueRecords = =>...

Reading part of a file in S3 using Boto

I am trying to read 700MB file stored in S3. How ever I only require bytes from locations 73 to 1024. I tried to find a usable solution but failed to. Would be a great help if someone could help me out....

Grunt, cloud deployment and compiled files

I've recently started exploring grunt and I've done so by trying out the seed. It uses a gruntfile to copy static assets, css, javascript to a destination folder with this code: dist_js: { files: [{ src: ['<%= app_files.js %>', '<%= vendor_files.js %>'], dest: '<%= dist_dir %>/public', cwd: '.', expand:...

Bluemix : cf logs command taking 10-15 mins to load

This just started today but it seems to be consistent across all of my Bluemix apps, running cf logs <appname> --recent is taking 10+ minutes to load, making debugging a grueling experience. Is this a known issue?...

Creating a scalable database for android app | cloud hosted

I am working to launch an app which in future will store huge number of users and there profile information. But I Wanted to start small to pre-test my app idea , so what will be the options for hosting database which are cost effective initially and scalable in future...

Reduce Storage, By Juggling Packets in Network?

I want to preface this by saying, I have a feeling that this idea will not work the way I'm imagining, but I'm sure why. Its likely I'm making some sort of false assumption about the way the internet works. Lets say server A has a file of size 1024...

Is there any known limit for the size of an app uploaded and for the GBs assigned to a runtime?

I was asked to deploy a Java EE application of 700MB (single EAR file) which requires 8 GB of RAM to execute. I searched the docs but I didn't found any documented limit for those two parameters: size and RAM. Any URL or idea? Thanks!...

What is cloud foundry?

I am very new to cloud foundry and I am just picking up the things. I am working with some other cloud providers like AWS, Azure etc in my day to day life. Have read some docs provided by cloud foundry website. Not being in a development team, the following...

How to create a secure git repository in the cloud?

I would like to create a git repository and keep a backup copy of it in the cloud. Creating a remote repository would be a simple solution, but the code would be open to anyone with access to the cloud machine, thus compromised. Currently I manage this git repository in...

How to save my data in a cloud?

I don't know if this is possible, but I would like to save some data of my website, like images and documents in a cloud like dropbox or google drive and I want that these data are available and visible to someone looking my site. is it possible? (My intention...

When upload Bitmap stream to Azure storage, it store zero/empty image,azure,cloud
I am using below code to upload a MemoryStream from a bitmap image to my Microsoft azure storage account: MemoryStream memoryStream = new MemoryStream(); img.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Png); blob.Properties.ContentType = model.File.ContentType; blob.UploadFromStream(memoryStream); What happen by use above code is it uploads an empty image to Azure storage :( !(I found the name...