cloudfoundry

Change of route name - Cloud foundry

放肆的年华 提交于 2019-12-31 05:33:08
问题 Each component(java) of a particular application is deployed on Cloud foundry as an application instance. Each application instance(component) has its respective route name. Every component talks another component through REST. Every component( say component2 ) has route name something like component2-dev.abc.xyz.com . On blue green deployment of any component(say component2 ) in PCFoundry the route name of a component2 gets changed for some duration. Amidst this duration the component1

Cloud Foundry / Bluemix load balancing

*爱你&永不变心* 提交于 2019-12-30 11:14:09
问题 I know that by default, Bluemix / Cloud Foundry use round-robin load balancing. Is there a way to change that? If I deploy 2 apps with the same route, and want 90% of my traffic to go to blue, and 10% to green, is that possible? 回答1: You would have to deploy more than two instances of the app to have better than 50-50 control over who sees what. If you have 10 instances, for example, and you update 1, then you could get your 90-10 split. Check out this CF CLI plugin: https://github.com/krujos

Cannot run Cloudfoundry Task - Unexpected Response 404

北慕城南 提交于 2019-12-29 08:36:26
问题 After my app is successfully pushed via cf I usually need do manually ssh-log into the container and execute a couple of PHP scripts to clear and warmup my cache, potentially execute some DB schema updates etc. Today I found out about Cloudfoundry Tasks which seems to offer a pretty way to do exactly this kind of things and I wanted to test it whether I can integrate it into my build&deploy script. So used cf login, got successfully connected to the right org and space, app has been pushed

Pivotal Cloud Foundry Plus MySql DB

拥有回忆 提交于 2019-12-25 17:14:17
问题 I have a running web-service application on Pivotal Cloud Foundry. I have added a service to it which is MySql DB and I bind it with web service application. My Question is how to get the data source of My Sql db with Java API Plus Cloud Foundry API in (Spring-boot). Things I have tried: public class Configuration { @Configuration @Profile("cloud") static class CloudConfiguration { @Bean public DataSource dataSource() { CloudFactory cloudFactory = new CloudFactory(); Cloud cloud =

Pivotal Cloud foundry Access Service from Java App

不羁的心 提交于 2019-12-25 09:02:00
问题 How would I access credentials from a user provided service bound to a java app. For example if I create a service like so: cf cups <service instance> -p "DB_URL, DB_USERNAME, DB_PASSWORD". and bind to a java app In Java Main what would I do to access that service? ` public static void main(String[] args) throws Exception{ ?????? }` 回答1: In your Java app, you would access the VCAP_SERVICES environment variable. You can find detailed information here: http://docs.pivotal.io/pivotalcf/1-7

Cloud Foundry map-route is not working when path mentioned

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-25 08:24:04
问题 In Cloud Foundry I have pushed two copies of the same application, Say app1 and app2. I need to route a specific request from app1 to app2. Note: app1 and app2 are one and the same, but just i have deployed twice in different name. so the /collections endpoint though it exists in app1, I would like to handle this only via app2 application.So I have created the following routes. cf map-route app2 mydomain.com --hostname app1 --path collections cf map-route app1 mydomain.com --hostname app1 By

Spring boot app on Cloud with external properties file

折月煮酒 提交于 2019-12-25 05:06:06
问题 I have a spring boot application which needs to use a property file. This application will be on the cloud. So, the property file will also be on the coud. I am using cloud foundry to communicate with the cloud and use 'cf push' to push my spring-boot application. My question : 1. Where and how to store a properties file? Can it be stored on the cloud? How? Or does it need to be stored on git and reference it in your application? 2. How to use this properties file which is at the external

Cloud Foundry yaml parse error

半腔热情 提交于 2019-12-25 03:00:04
问题 I'm getting an error on cf push when I try to push a yaml file for a memcached service broker: #cf push FAILED Error reading manifest file: yaml: [] mapping values are not allowed in this context at line 2, column 7 /Users/pivotal/go-agent/pipelines/Mac-OSX-Testing/src/github.com/cloudfoundry/cli/Godeps/_workspace/src/github.com/cloudfoundry-incubator/candiedyaml/decode.go:95 (0x2c0d87) /usr/local/go/src/pkg/runtime/panic.c:248 (0x16276) /Users/pivotal/go-agent/pipelines/Mac-OSX-Testing/src

Error setting up CloudFoundry 2 on AWS (AWS::S3::Errors::AccessDenied)

怎甘沉沦 提交于 2019-12-25 01:44:36
问题 After watching this awesome demo video, I've been trying to setup a CloudFoundry2 installation on AWS according to the docs and keep running into issues. I'm on OS X, so I ended up installing rbenv and Ruby v 1.9.3-p327 , but now I can't follow the guide and am not sure how to proceed. I get the following error when trying to run bosh aws create to provision the Amazon services: → bosh aws create /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/aws-sdk-1.8.5/lib/aws/core/client

How do I serve static file with express over cloudfoundry?

时间秒杀一切 提交于 2019-12-24 20:35:21
问题 How do I serve static files with express over cloudfoundry? I was trying to use the following code: app.use(express.static(__dirname+'/www')); but I am getting some bizarre exception when I am accessing the specific url: TypeError: Object #<SendStream> has no method 'on' at Object.static [as handle] (/var/vcap/data/dea/apps/FeedBack-0-c812c99aa3818946dd0bcf5538e2aecd/app/node_modules/express/node_modules/connect/lib/middleware/static.js:75:8) at next (/var/vcap/data/dea/apps/FeedBack-0