pivotal-cloud-foundry

Apps must be mapped to routes in the same space

独自空忆成欢 提交于 2019-12-11 18:33:50
问题 Below is the error on cf push : org.cloudfoundry.client.v2.ClientV2Exception: CF-InvalidRelation(1002): The app cannot be mapped to this route because the route is not in this space. Apps must be mapped to routes in the same space. Below is the manifest file: applications: - name: xyz-api instances: 1 memory: 1G buildpack: java_buildpack_offline path: target/xyz-api-0.1-SNAPSHOT.jar cf login x.y.z.w.org.cloud .... cf push xyz-api -p target/xyz-api-0.1-SNAPSHOT.jar We have two API end points:

Staging in Cloud Foundry - .cfignore

一笑奈何 提交于 2019-12-11 18:06:46
问题 We have .cfignore file mentioning the files that should not be staged in Cloud Foundry. Through CF CLI tool, cf push is considering to ignore file mentioned in .cfignore before pushing files to Cloud Foundry. But Jenkins configured using push to cloud foundry plugin does not consider ignoring the files mentioned in .cfignore With this, Cloud Foundry some undesirable files at staging time, which makes staging failed. How to resolve this error? 回答1: Through CF CLI tool, cf push is considering

How to emit custom metrics from SpringBoot application and use it in PCF Autoscaler

帅比萌擦擦* 提交于 2019-12-11 16:43:24
问题 I am following this example for emitting the custom metrics and followed these details for registering the metrics in PCF. Here is the code: @RestController public class CustomMetricsController { @Autowired private MeterRegistry registry; @GetMapping("/high_latency") public ResponseEntity<Integer> highLatency() throws InterruptedException { int queueLength=0; Random random = new Random(); int number = random.nextInt(50); System.out.println("Generate number is : "+number); if(number % 2 == 0)

Enable container-to-container networking between all the apps in the space

北城余情 提交于 2019-12-11 16:42:35
问题 I use Pivotal Cloud Foundry. I have numerous apps (microservices) running in the same space. I want all the apps in this space to be able to connect to each other. It means every time I deploy a new app (microservice) I have to setup container-to-container (c2c) policies between the new app and the new apps ( cf add-network-policy ). This is very tedious and provides absolutely no value. Is there a way to set up a "default space policy", so that all the apps deployed in the same space will

ImportError: No module named queue - Flask app on Cloud Foundry

折月煮酒 提交于 2019-12-11 15:24:50
问题 I am trying to push a flask app (Python 3.5) to Cloud Foundry (CF). The application takes a POST request (text file) and returns a message. It works locally (tested via Postman). However, when attempting to push it to CF, it gives the error - ImportError: No module named queue Here is my code which contains queue . import queue as Queue self._batch_queue = Queue.Queue(self.BATCH_QUEUE_MAX) self._example_queue = Queue.Queue(self.BATCH_QUEUE_MAX * self._hps.batch_size) I've tried the solutions

Not able to deploy a helloworld spring-boot app on Cloud Foundry

你离开我真会死。 提交于 2019-12-11 13:44:44
问题 Getting following error while deploy a simple helloworld SpringBoot app on Cloud Foundry using cf push helloworld-api command. Note: I am not having a manifest.yml file Error Log: Staging app and tracing logs... Downloading binary_buildpack... Downloading python_buildpack... Downloading go_buildpack... Downloading dotnet_core_buildpack... Downloading php_buildpack... Downloaded binary_buildpack Downloading hwc_buildpack... Downloaded go_buildpack Downloading staticfile_buildpack... Downloaded

multi buildpack - not able to build java and node

徘徊边缘 提交于 2019-12-11 13:08:52
问题 Following this https://docs.cloud.gov/apps/multi-buildpack-deploys/ tutorial, I'm trying to build java and node buildpacks and my build pack contains the below URLs https://github.com/cloudfoundry/java-buildpack https://github.com/cloudfoundry/nodejs-buildpack Staging failed: Buildpack compilation step failed, how to fix this error? 来源: https://stackoverflow.com/questions/36596095/multi-buildpack-not-able-to-build-java-and-node

Error in accessing the Cloudfoundry Local App URL

走远了吗. 提交于 2019-12-11 08:52:11
问题 I need some help with a locally deployed app in the Local pivotal Cloud Foundry VM. Recently, I have installed the pivotal cloud foundry in a Windows Server 2012 VM and had deployed the Spring-music app in the local. Now I want to share this url with others, but when I give the URL generated in the APP PUSH Commands to others they are not able to see that app. Can you help how to share a APP url to others so that they can view the app. http://spring-music.local.pcfdev.io/ -- this is the Local

Provider org.springframework.cloud.cloudfoundry.CloudFoundryConnector could not be instantiated

戏子无情 提交于 2019-12-11 08:09:46
问题 I am working on a grails 2.5.3 app that will be deployed to cloudfoundry. The app is bound with few services and in order to get the values for those services I use two connectors: //s3 service connector compile ("org.cloudfoundry.community:spring-cloud-s3-service-connector:1.0.0") { excludes "aws-java-sdk", 'slf4j-api', 'slf4j-log4j12', 'slf4j' } //sso service connector compile (group: 'io.pivotal.spring.cloud', name: 'spring-cloud-sso-connector', version: '1.1.0.RELEASE') { excludes 'slf4j

Change PCF Dev installation location

那年仲夏 提交于 2019-12-11 07:34:06
问题 I'm trying to setup Pvotal Cloud Foundry DEV on my machine, but my main hard drive does not have enough room and our System Administrators frown on us installing applications onto the C drive. I have an additional D: drive with plenty of space on it, and I would like to get PCF DEV to download and/or install all files there. How do I specify the download and installation location when running 'cf dev start' for the first time on a windows machine? 回答1: You can use the PCFDEV_HOME environment