cloud,cloudfoundry , Running cloudfoundry sample app on local sandbox


Running cloudfoundry sample app on local sandbox

Question:

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

xxxxx.cfapps.io

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?


Answer:

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 (http://cloud.spring.io/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:

@Autowired
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.


Related:


Writing an IAM policy and CORS configuration for Amazon S3


ruby-on-rails,amazon-web-services,amazon-s3,cloud,amazon-iam
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...

Grunt, cloud deployment and compiled files


node.js,express,gruntjs,copy,cloud
I've recently started exploring grunt and I've done so by trying out the https://github.com/ng-vu/ng-express-boilerplate 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:...

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


java,cloudfoundry,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...

How to save my data in a cloud?


google-drive-sdk,cloud,server,dropbox
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...

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


cloudfoundry,bluemix
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...

Running python script on Microsoft Azure


python,azure,cloud,bigdata,azure-virtual-machine
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...

Digi Device API reading Datastream / DIO / AD


xml,cloud,xbee
I have XBee Gateway ZB, Wifi and I'm experimenting with the Digi Device API. I already tried the Heroku App xbeegateway.herokuapp.com 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...

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


cloudfoundry,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...

Authenticate Google Account with php


authentication,printing,cloud
Is there a possibility to log in on to Google Accountt with php? Until 26th of May I was using https://www.google.com/accounts/ClientLogin 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...

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


mapreduce,apache-spark,cloud
Just wondering does the filter turn the data into tuples? For example val filesLines = sc.textFile("file.txt") val split_lines = filesLines.map(_.split(";")) 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 = filteredData.map(x =>...

How to conditionally check the state of an openstack instance


cloud,state,conditional-statements,ansible,openstack
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...

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


cloudfoundry,asp.net-5,bluemix
I'm trying to deploy a aspnet5 Project (Template vNext WebApplication from Visual Studio) to Bluemix CF Service (Asp.net). 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":...

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


redis,rabbitmq,cloudfoundry
Currently, the only RabbitMQ service on PWS looks kinda iffy. I was wondering If I could use Pivotals solutions https://network.pivotal.io/products/p-redis https://network.pivotal.io/products/pivotal-rabbitmq-service On Pivotal's own http://run.pivotal.io , or If to run theseI have to have an on premises Cloud Foundry. Can I run these on Pivotal Web Services? ...

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


ruby,git,heroku,cloud,heroku-toolbelt
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...

What does (extra requests) mean in Parse.com services?


parse.com,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...

Parse.com To Do web app deployment issue


javascript,backbone.js,web,parse.com,cloud
Apologies for basic question. I am very new in web development . I have download parse.com javascript web To Do App from https://parse.com/tutorials/todo-app-with-javascript . Now I want to deploy with parse.com. So that I can browse this app using http://mytestapp.parseapp.com. But when try to deploy using "parse deploy" command getting...

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


cloud,openstack,cloudfoundry,bosh
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...

Creating a scalable database for android app | cloud hosted


android,cloud,google-cloud-storage,cloud-hosting,android-database
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...

Installing Spring Cloud Services for Cloudfoundry without OpsManager


cloudfoundry,spring-cloud
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...

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


sql,postgresql,join,cloudfoundry,cascading-deletes
I use select * from service_instances i inner join service_instance_operations op on i.id = op.service_instance_id inner join service_bindings bind on i.id = 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...

Running cloudfoundry sample app on local sandbox


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...

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


sql,ssl,cloud
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...

GoogleCloudMessaging - InstanceID.getInstance(), registering from client


java,android,api,cloud,messaging
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...

Reading part of a file in S3 using Boto


python,python-2.7,amazon-s3,cloud,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....

What is cloud foundry?


cloudfoundry
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...

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


cloudfoundry,bluemix
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?...

How to create a secure git repository in the cloud?


git,security,encryption,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...

Bluemix Node.js app not showing new code


cloudfoundry,bluemix
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,...

viewing google app engine Python logging messages in CodeEnvy


python,google-app-engine,logging,cloud
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') logging.info(feedback) I assumed...

Error deploying application from Eclipse to Bluemix


cloudfoundry,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....

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


cloudfoundry,bluemix
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...

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


cloudfoundry,bluemix
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...

Bluemix ClearDB MySQL capacity limitation


mysql,cloudfoundry,bluemix,cleardb
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...

Alternate to run window service in Azure cloud


azure,windows-services,cloud,azure-webjobs
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...

Does Bluemix include a JBoss runtime?


jboss,cloudfoundry,bluemix
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,...

Spark - How to count number of records by key


hadoop,apache-spark,cloud
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...

Difference between Cloud Foundry & Pivotal Web Services


cloudfoundry
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...

Identifying duplicate requests fired from back end


java,cloud
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...

Reduce Storage, By Juggling Packets in Network?


networking,tcp,cloud,server,transfer
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...

When upload Bitmap stream to Azure storage, it store zero/empty image


asp.net-mvc,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...

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


cloudfoundry,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...

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


amazon-web-services,amazon-ec2,cloud,server,amazon
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?

Relation replacement in Parse Cloud


javascript,parse.com,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...

Does Cloudfoundry router provide HTTPS support?


cloudfoundry
I am aware that there are two versions of CF routers: GoRouter: https://github.com/cloudfoundry/gorouter Older version: https://github.com/cloudfoundry-attic/router 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?...

Installing CouchDB on IaaS?


cloud,couchdb,centos6,iaas,dbaas
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...

how to run a static site on bitnami and AWS?


amazon-web-services,website,cloud,hosting,bitnami
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...

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


cloudfoundry,bluemix
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!...

How to get Office 365 service location via API


api,cloud,office365
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...