cloudfoundry

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 programatically reconfigure Availability Monitoring in DevOps stage for Blue-Green deployment?

牧云@^-^@ 提交于 2019-12-11 17:30:46
问题 I'm using an IBM devops pipeline based on the Cloud Foundry template. The template gives you Blue-Green deployments. My stage deploy script looks like this: #!/bin/bash cat << EOF > ${WORKSPACE}/manifest.yml declared-services: my_cloudant: label: cloudantNoSQLDB plan: Lite my_messagehub: label: messagehub plan: standard my_autoscaling: label: Auto-Scaling plan: free my_availability_monitoring: label: AvailabilityMonitoring plan: Lite applications: - name: movie-recommend-demo host: movie

Cloud Foundry - Folder structure and relative paths

戏子无情 提交于 2019-12-11 17:22:36
问题 This is somewhat related to an issue I'm having with CF on IBM Cloud here. My question after playing around with the folder structures is how exactly is CF building the app when it comes to relative paths? For example, if i have the following folder structure when I add <script type = 'text/javascript' src = '../index.js'></script> to the index.html file, I get GET https://simple-toolchain-20190320022356947.mybluemix.net/index.js net::ERR_ABORTED 404 . This error does not happen when I move

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

Node package dependencies on IBM Cloud Foundry - require/module is not defined (Package not loading)

不羁的心 提交于 2019-12-11 15:56:04
问题 I am working on an application via the toolchain tool on IBM Cloud and editing the code via the Eclipse Orion IDE. As I am not accessing this through my local cli, my understanding is that in order to so call npm install {package} , I would just need to include the package in the package.json file under dependencies and require it in my app. However, when I load the application, I get the require is not defined indicating that the package has not been installed. Moreover, the require() is

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

How can i run a insert query script(.sql) to create tables and columns or pre populate few datas

醉酒当歌 提交于 2019-12-11 15:23:09
问题 I need to create tables and columns with some default data to run my Java web application in CloudFoundry. I am not able to use any MySQL client to connect to the database ip which I received. java.lang.System.getenv("VCAP_SERVICES"); Is it possible to connect to the db from STS or Eclipse, or is there any client published by VMware? 回答1: you can use the VMC cli tool to create a tunnel to your MySQL service. When the tunnel is connected you can then opt to start a mysql client that will

Mongo Connection Failure

旧城冷巷雨未停 提交于 2019-12-11 15:20:56
问题 I'm new to rails. I would like to push a simple rails application to cloudfoundry and I am getting an error: ====> /logs/stderr.log <==== /var/vcap/data/dea/apps/mytestapp-0 -4a068e3fd2b22422bdd29f3762e9bc9b/app/rubygems/ruby/1.9.1/gems/mongo- 1.6.4/lib/mongo/connection.rb:420:in `connect': Fail:27017 (Mongo::ConnectionFailure) The sample app gemfile: source 'http://rubygems.org' gem 'rails', '3.0.5' gem 'mongo_mapper' gem 'bson_ext' mongo.yml: defaults: &defaults host: 127.0.0.1 port: 27017

How can the default route be removed on cloudfoundry using the manifest.yml

心已入冬 提交于 2019-12-11 14:46:49
问题 I define a route for my cloudfoundry app in its manifest file: --- ... routes: - route: example.com My route gets successfully created during 'cf push' but unfortunately the default route gets created as well, i.e. I have two routes and I want only the one I defined in my manifest. Any ideas how to get rid of the default route? I know it is possible to remove routes, but as 'cf push' is triggered via a jenkins pipeline in my case I'd like to define everything in advance in the configuration.