Giter Club home page Giter Club logo

docs-buildpacks's Introduction

docs-buildpacks

This is a guide for developers about using buildpacks with Cloud Foundry. Buildpacks package the languages and libraries that support your apps.

The contents here are structured as a topic repository intended to be compiled into a larger document with Bookbinder.

See the docs-book-cloudfoundry repository for the complete list of open source documentation repositories, as well as information about the publishing process.

docs-buildpacks uses only the master branch to publish the buildpack documentation. The buildpack documentation is not tied to specific versions of Cloud Foundry. If you need to add version-specific content, add a template variable in the book repo for that version.

Style Sheet

Use this section to specify spelling of special words for buildpacks:

  • Do not use variables to represent "product-names" in these files. The buildpacks are not proprietary but belong to Cloud Foundry.

docs-buildpacks's People

Contributors

abbyachau avatar animatedmax avatar anita-flegg avatar araher avatar bentarnoff avatar bobbygeeze avatar crawsible avatar cshollingsworth avatar dannyzen avatar dgodd avatar dwillist avatar elenasharma avatar fifthposition avatar jbheron avatar jtarchie avatar kdolor-pivotal avatar ljarzynski avatar michaeltrestman avatar mjgutermuth avatar mlimonczenko avatar mogul avatar pspinrad avatar rochesterinnyc avatar sclevine avatar sesmith177 avatar seviet avatar sleslie23 avatar snneji avatar teamhedgehog avatar vikafed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs-buildpacks's Issues

Vendoring Instructions Using Conda in Addition to Pip

It would be good to have instructions on how to do "vendoring" of dependencies when using conda as a package manager instead of pip.

I believe the instructions would be similar to the pip instructions
For example

  1. Create a virtual environment containing all of your dependencies
conda create -n app_vendor pandas numpy scikit-learn -- copy```
2) Copy contents of <env_dir>/lib/site-packages to `vendor` subdirectory under your main app directory.
3) Push your app to cloud foundry using `cf push`. The build-pack will install dependencies directly from the `vendor` directory

Grails Services - Manual Configuration instructions incorrect

The instructions for manually configuring a service with Grails are incorrect. Running them with Grails 2.4.3 results in the following error.

Error packaging application: Error loading DataSource.groovy: Cannot set property 'factoryMethod' on null object (Use --stacktrace to see the full trace)

There are a couple problems with the instructions.

  1. You need to add the following to grails-app/conf/spring/resources.groovy
beans = {
    cloudFactory(org.springframework.cloud.CloudFactory)
}

This is necessary to disable auto configuration, because spring-cloud looks for the presence of certain bean types, CloudFactory being one, and if found disables auto configuration. It has to be in this file so that the bean is properly defined and available where spring-cloud is going to look.

  1. In DataSource.groovy, this is not valid and causes the error above.
beans {
    cloud(CloudFactory) { bean ->
        bean.factoryMethod = "cloud"
    }
}

If it were valid it would still fail because the CloudFactory's getCloud method is not static, so it's not going to work as a factory method.

The following should work instead.

def cloud = null
try {
    cloud = new CloudFactory().cloud
} catch (CloudException) {
   // not in a recognized Cloud environment
}

Then something like this can be done to access the cloud object.

def dbInfo = cloud?.getServiceInfo('myapp-mysql')
url = dbInfo?.jdbcUrl
username = dbInfo?.userName
password = dbInfo?.password

Note how we have to handle the case where cloud is null. This happens when it's run in an environment where a recognized cloud is not found. One case where this happens is when you run locally like grails run-app or grails war.

Working example below.

import org.springframework.cloud.CloudFactory
import org.springframework.cloud.CloudException

def cloud = null
try {
    cloud = new CloudFactory().cloud
} catch (CloudException) {}

dataSource {
    pooled = true
    dbCreate = 'update'
    driverClassName = 'com.mysql.jdbc.Driver'
}

environments {
    production {
        dataSource {
            def dbInfo = cloud?.getServiceInfo('myapp-mysql')
            url = dbInfo?.jdbcUrl
            username = dbInfo?.userName
            password = dbInfo?.password
        }
        grails {
            mongo {
                def mongoInfo = cloud?.getServiceInfo('myapp-mongodb')
                host = mongoInfo?.host
                port = mongoInfo?.port
                databaseName = mongoInfo?.database
                username = mongoInfo?.userName
                password = mongoInfo?.password
            }
            redis {
                def redisInfo = cloud?.getServiceInfo('myapp-redis')
                host = redisInfo?.host
                port = redisInfo?.port
                password = redisInfo?.password
            }
        }
    }
    development {
        dataSource {
            url = 'jdbc:mysql://localhost:5432/myapp'
            username = 'sa'
            password = ''
        }
        grails {
            mongo {
                host = 'localhost'
                port = 27107
                databaseName = 'foo'
                username = 'user'
                password = 'password'
            }
            redis {
                host = 'localhost'
                port = 6379
                password = 'password'
            }
        }
    }
}

Remove Java build integration page with all tools currently unsupported

We should remove the documentation page describing Maven and Gradle integration at /java/build-tool-int.html.md.erb. I spoke with @nebhale last week and these have not been migrated to the current cf-java-client repo in the move to version 2.x, so there is no official repo or documentation to point folks to for further information on these tools. We can add a new page to cover future java build tools if/when those become available.

building issue

Hello Team,

I am trying to deploy the simple python app.
But , I am getting the following error.

I need help as to how I can include the dependencies in the below python file.
like nltk.download() environment.yml I am getting not found on pip error.

please help me out.

if I add them in
Traceback (most recent call last):
2017-11-30T00:47:03.38+0000 [APP/PROC/WEB/0] ERR File "Application.py", line 14, in
2017-11-30T00:47:03.38+0000 [APP/PROC/WEB/0] ERR sid = SentimentIntensityAnalyzer()
2017-11-30T00:47:03.38+0000 [APP/PROC/WEB/0] ERR File "/home/vcap/deps/0/conda/envs/dep_env/lib/python3.6/site-packages/nltk/sentiment/vader.py", line 200, in init
2017-11-30T00:47:03.38+0000 [APP/PROC/WEB/0] ERR self.lexicon_file = nltk.data.load(lexicon_file)
2017-11-30T00:47:03.38+0000 [APP/PROC/WEB/0] ERR File "/home/vcap/deps/0/conda/envs/dep_env/lib/python3.6/site-packages/nltk/data.py", line 834, in load
2017-11-30T00:47:03.38+0000 [APP/PROC/WEB/0] ERR opened_resource = _open(resource_url)
2017-11-30T00:47:03.38+0000 [APP/PROC/WEB/0] ERR File "/home/vcap/deps/0/conda/envs/dep_env/lib/python3.6/site-packages/nltk/data.py", line 952, in open
2017-11-30T00:47:03.38+0000 [APP/PROC/WEB/0] ERR return find(path
, path + ['']).open()
2017-11-30T00:47:03.38+0000 [APP/PROC/WEB/0] ERR File "/home/vcap/deps/0/conda/envs/dep_env/lib/python3.6/site-packages/nltk/data.py", line 673, in find
2017-11-30T00:47:03.38+0000 [APP/PROC/WEB/0] ERR raise LookupError(resource_not_found)
2017-11-30T00:47:03.38+0000 [APP/PROC/WEB/0] ERR LookupError:
2017-11-30T00:47:03.38+0000 [APP/PROC/WEB/0] ERR ******************

with the below details.

-----environment.yml-----------
dependencies:

  • pandas
  • pip:
    • flask
    • gunicorn
    • flask_restful
    • nltk

--------procfile-------

web: python Application.py

--------manifest.yml--------

applications:

  • name: flask-python
    memory: 512M
    instances: 1
    command: python Application.py

--------runtime.txt----------
python-3.6.2

-----------Application.py-------------
import json
from flask import Flask, request,jsonify
from flask_restful import Resource, Api
from nltk.classify import NaiveBayesClassifier
from nltk.corpus import subjectivity
from nltk.sentiment import SentimentAnalyzer
from nltk.sentiment.util import *
import nltk
nltk.download('vader_lexicon')
from nltk.sentiment.vader import SentimentIntensityAnalyzer

app = Flask(name)
api = Api(app)
sid = SentimentIntensityAnalyzer()

class RandmMeta(Resource):
def get(self):
d = {}
with open('output.csv', 'r', encoding='utf8', errors='ignore') as f:
reader = csv.reader(f, dialect='excel')
# reader = f.read();
d = {'data': [{'score': i[0], 'sentence': i[1]} for i in reader]}
return random.choice(d['data'])

class NLTKMeta(Resource):
def post(self):
json_data = request.get_json(force=True)
sentence = json_data["sentence"]
polarity = sid.polarity_scores(sentence)
return {'data':polarity}

api.add_resource(NLTKMeta, '/api/score')
api.add_resource(RandmMeta,'/api/random/sentence')

if name == 'main':
app.run()


regards,
Rajath kodandaramu

Insufficient details about play service bindings

https://github.com/cloudfoundry/docs-buildpacks/blob/master/java/play-service-bindings.html.md.erb

Does this work with play 2.x ?

Is this documentation correct:
https://www.playframework.com/documentation/2.5.x/Deploying-CloudFoundry#Connecting-to-Cloud-Foundry-Services

I'm finding that it doesn't seem to be correct with a play 2.5.x application. I don't have the cloud.services properties available, and it's making it pretty much impossible to run a play application using any services on play. :(

Update docs for CF Gradle plugin

Hello. While using the Gradle CF plugin, I noticed the documentation needs updated to include all the available tasks and configs. I almost didn't use it because it seemed to be missing some key features (mainly around mapping routes), but fortunately I discovered the additional tasks after adding the plugin to my build.gradle. Some of the missing tasks includes:

- cfMap
- cfUnMap
- cfSwapDeployed
- cfDeleteOrphanedRoutes
- cfLogs

Also, for the cloudfoundry { }config block, you need to include the application field, which allows for setting the application name.

I suppose the same goes for the Maven plugin since they're from the same code, but I haven't confirmed they're available.

buildpack for pure kotlin-based web project

Hello
I'm working on a pure kotlin-based web project. Everything is fine localy and with my CI pipeline also. The issue comes when i want to push the project on Cloud Foundry: The official java buildpack does not work for the project.
Is there a dedicated buildpack for kotlin projects or some java buildpack version which works with kotlin project ?

"Enable or Disable Basic Authentication" doesn't explain environment variable settings

re: docs-buildpacks/staticfile/index.html.md.erb

The first line of the "Enable or Disable Basic Authentication" section says:

"Protect your website with a user/password configured via environment variables." but does NOT mention any need to set environment variables in the rest of the section.

That should be rephrased. OR, if environment variables must be set, then explain it.

I followed the instructions carefully and could not get basic authentication working. Now I'm wondering if I need to set environment variables.

Confusing

in within: docs-buildpacks/node/index.html.md.erb
Lines 120-124?

When vendoring apps for usage in offline environments, you must supply a lock file. For information
about npm lockfiles, see npm-package-locks in the NPM
documentation. For information about the NPM lock file, see
package-lock.json in the NPM
documentation.

Unsure of double reference to npm lock files. Maybe clarity in this sentence is needed.

Grails java buildpack doesn't define what service info is

The page here: http://docs.run.pivotal.io/buildpacks/java/grails-service-bindings.html#auto has the following line

def dbInfo = cloud?.getServiceInfo('myapp-mysql')

But it doesn't define what myapp-mysql is? Is it name of the service or name of the app.

While following this example I had setup the mysql service but the connection info failed with error:

No service with id cf-sample found

I push the app with command

➜  cf-sample git:(all-buildconfig) ✗ cf push cf-sample -n cf-sample

Output of manifest.yml, apps and services

➜  cf-sample git:(all-buildconfig) ✗ cat manifest.yml

---
applications:
  - name: cfsample
    memory: 1G
    instances: 1
    path: target/cf-sample-0.1.war
    buildpack: java_buildpack
    services:
      - mysql
➜  cf-sample git:(all-buildconfig) ✗ cf apps
Getting apps in org pcfdev-org / space pcfdev-space as user...
OK

name        requested state   instances   memory   disk   urls
cf-sample   started           0/1         1G       512M   cf-sample.local.pcfdev.io
➜  cf-sample git:(all-buildconfig) ✗ cf services
Getting services in org pcfdev-org / space pcfdev-space as user...
OK

name    service   plan    bound apps   last operation
mysql   p-mysql   512mb   cf-sample    create succeeded

What should I put in def dbInfo = cloud?.getServiceInfo('<what goes here??>') based on the above?

Broken link

docs-dev-guide/deploy-apps/environment-variable.html.md.erb doesn't have an anchor called #dea-set. That's why Bookinder reports a broken link for docs-buildpacks/node/node-tips.html.md.erb.

Example of routing to instances of microservices

Dear Sir,

The documentation doesent have an example of how to do routing between microservices with nginx buildpack.

How to do url based routing in nginx. We are giving the routes binded to an app in the upstream . However it is resolving to an ip and due to which go router is unable to forward the request to the appropriate IP

Request you to please create appropriate examples so that it benefits the users of the buildpack on how to route to other microservices directly using container to container networking or internal routes.

Also please create an example on how nginx can be used as a reverse proxy behind go router in Cloudfoundry for applications microservices with a static route bound to them

Also please crete examples for the below case

Abc.com/mservice1 -- maps to microservce 1

Abc.com/mcservice 2 - mapps to microservice 2

Nginx has more capabilities than go router and we wish to leverage that

Python vendoring: note pitfalls

Vendoring python dependencies is not trivial, and this should at least be reflected in the documentation, preferably while presenting a solution that "mostly works".

The problem is that python packages may contain arbitrary build steps (compilation), and that:

  1. compilation may require certain other files (not provided by pip) to be present in the build environment.
  2. the results of compilation are not generally transferable from one environment to the next. In particular: they are not generally transferable from arbitrary build environments to the python-buildpack.

The present solution (pip download -r requirements.txt --no-binary=:none: -d vendor) will, when no extra steps are taken, at least fail for packages which are not trivially buildable, and for which no wheels are provided on pypi or some other repo. This is because for such packages what will be vendored will not be a wheel, but a source package that remains to be built (in the python-buildpack itself). If the python-buildpack does not contain the necessary requirements for building (which it generally does not) building will fail. An example of such a package is python-ldap==3.4.2 because it depends on bdist_wheel to be available while building.

A solution with a higher chance of working is probably to build wheels for such packages yourself in the build environment (using pip wheel). However, if that road is taken great care must be taken to sufficiently match the build and target environments, because wheels are not generally transferable. That, in turn, depends on a careful specification of the python-buildpack's python version, and includes such details as the version of glibc on the target platform.

See also #289 and #290; but the issue described at present is much more general.

Python 3.5.1 not found

I'm pushing a bottle app to PWS but I'm running to an issue.

Inside runtime.txt I've specified python-3.5.1 and it looks like the buildpack picks that up, but CF can't find 3.5.1. Is this not yet a supported version on PWS?

Install Python.
-----> Found python-2.7.11, removing.
-----> Preparing Python runtime (python-3.5.1.)
 !     Requested runtime (python-3.5.1.) was not found.

JpGraph and GD library

Hello,

I push a PHP application using JpGraph on Bluemix. When I try to go to the URL of my application, i get this error :
"JpGraph Error: 25001 This PHP installation is not configured with the GD library. Please recompile PHP with GD support to run JpGraph. (Neither function imagetypes() nor imagecreatefromstring() does exist)".

I think I have to include GD library in the PHP build-pack. I have tried in the option.json file, but it does not work. So how and where to do that ?

If you can help me, thank you
optionjson

Request: Add Perl System Buildpack

Perl remains a very popular programming language for backends and Mojolicious is a modern Perl web framework and would be a reasonable selection for a Perl Buildpack. It would be great to have out-of-the-box support for Perl from Cloud Foundry.

Migration to java-cfenv from spring-cloud-connectors-core UriBasedServiceInfo dependency

Hello!
Currently facing below issue while trying to migrate to java-cfenv from spring-cloud-connectors-core. Any advice on how to resolve this will greatly be appreciated.

Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/cloud/service/UriBasedServiceInfo
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at sun.reflect.generics.repository.ClassRepository.getSuperclass(ClassRepository.java:90)
at java.lang.Class.getGenericSuperclass(Class.java:777)
at org.springframework.core.ResolvableType.getSuperType(ResolvableType.java:471)
at org.springframework.core.ResolvableType.as(ResolvableType.java:456)
at org.springframework.context.event.GenericApplicationListenerAdapter.resolveDeclaredEventType(GenericApplicationListenerAdapter.java:112)
at org.springframework.context.event.GenericApplicationListenerAdapter.resolveDeclaredEventType(GenericApplicationListenerAdapter.java:98)
at org.springframework.context.event.GenericApplicationListenerAdapter.(GenericApplicationListenerAdapter.java:58)
at org.springframework.context.event.AbstractApplicationEventMulticaster.supportsEvent(AbstractApplicationEventMulticaster.java:359)
at org.springframework.context.event.AbstractApplicationEventMulticaster.retrieveApplicationListeners(AbstractApplicationEventMulticaster.java:231)
at org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:204)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:134)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
at org.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:74)
at org.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:47)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:304)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1247)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1236)

Additional configuration section in cloudFoundry does not work.

Hi,

In this page https://docs.run.pivotal.io/buildpacks/java/build-tool-int.html in "Additional Configuration" section is explained how to add additional configuration to cloudFoundry section. However when executed cfBind command following exception occurred:

MUCM31654558A:edge ljubisap$ ./gradlew cfBind edge-v1-green rsyslog FAILURE: Build failed with an exception. Where: Script '/Users/d061177/work/argonauts/edge/deploy.gradle' line: 73 What went wrong: A problem occurred evaluating script. Could not find method serviceInfos() for arguments [deploy_6x6bd8kd2vnh2x19p5s2uo8h7$_run_closure3_closure5@78065fcd] on root project 'edge'. Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED

Correct version of Gradle is set and cloudFoundry section looks like this:

cloudfoundry { application = "$appName-$apiVersion" username = '[email protected]' space = 'acid' hosts = [application] buildpack = "java_buildpack" instances = 1 memory = 1024 healthCheckTimeout = 180 command = '' file = getWarFile() trustSelfSignedCerts = true variants = ['-blue', '-green'] env << [ APP_NAME : application, // it's required for logging APP_VERSION : buildVersion, // it's required for logging TEAM_NAME : space, // folder under which riemann statistics will be available ENV_NAME : organization, // folder under which riemann statistics will be available DYNATRACE_AGENT_NAME : "yaas_" + organization + "_" + application, JBP_CONFIG_OPEN_JDK_JRE: "[memory_heuristics: {heap: 20, metaspace: 4}]", MONITORING_POLLING_TIME: "120", MONITORING_ENABLED : true // for details how to tune memory see https://github.com/cloudfoundry/java-buildpack/blob/master/config/open_jdk_jre.yml // still you can use JAVA_OPTS : "-XX:MaxHeapFreeRatio=85" directly ] serviceInfos { "syslog" { label = "syslog" plan = "small_plan" bind = true } } }

I tried with Gradle version 1.1.3, but got the same exception.

Any hints?

Ljubisa.

documented /bin/package extension is unused/deprecated

The current doc at

### <a id='package-script'></a>bin/package ###
The `package` script provides buildpack artifacts, which are provided to Cloud Foundry as system buildpacks. `package` is
intended to provide a way for buildpack developers to package a buildpack with its dependencies. Implementing this is
entirely optional. It is a Cloud Foundry extension to the [Heroku Buildpack API](https://devcenter.heroku.com/articles/buildpack-api).
The result of running the package script must be a zip file that adheres to the api outlined above, using `detect`,
`compile`, `release`.
The `package` script accepts two commands as arguments:
* `package online` produces a zip of the buildpack, preferably excluding unnecessary content such as tests.
* `package offline` produces a zip of the buildpack with all dependencies cached.
`package offline` produces a buildpack that does not need internet connectivity to run. For more information about the tradeoffs of the dependency storage options available for custom offline buildpacks, refer to the [Packaging Buildpack Dependecies](./depend-pkg-offline.html) topic.
The `package offline` command is used to produce the [system buildpacks](./index.html) bundled with
Cloud Foundry.
For an example implementation, see the [Cloud Foundry Ruby buildpack](https://github.com/cloudfoundry/cf-buildpack-ruby/blob/master/bin/package).
describes the /bin/package CF extension

However:

As a result, this seems to rather create confusion in the community
https://groups.google.com/a/cloudfoundry.org/d/msg/vcap-dev/OWg4JXziyO0/0yxBjvjSRWQJ and https://groups.google.com/a/cloudfoundry.org/d/msg/vcap-dev/UR7h5MroGE4/RmPqh46V5QIJ

Suggesting to remove the /bin/package` extension from the documentation until status of this extension is made clear, and rather point to

Disconnected Environments references are confusing

I've noticed a reference to the Disconnected Environments documentation from a few of the buildpack pages, saying that "your application must ‘vendor’ its dependencies". I know that the Python, Ruby, and Node buildpacks (did?) install the respective application dependencies as part of the build step, so was wondering:

  • Is this sentence a recommendation, or a requirement?
  • Is this relevant for all Cloud Foundry deployments, or just ones in "disconnected environments"?

Thanks!

The log messages are written in the same line ( no line break after each message)

Hello
I would like to thank you for this library. It is very helpful.
However, using the component logger, I noticed that all messages are written in the same line and no line break are added to the end of line.

Here is the code

$log = \CfCommunity\CfHelper\CfHelper;:getInstance()->getLogger();
$log->error("-- 1 -- Log message using the CloudFoundryLogger class ");
$log->error("-- 2 -- Log message using the CloudFoundryLogger class ");
$log->error("-- 3 -- Log message using the CloudFoundryLogger class ");

Here is the result log in the pivotal plateform

OUT 13:31:54 httpd   | [Tue Nov 14 13:31:54.948542 2017] [proxy_fcgi:error] [pid 51:tid 139866079753984] [client 172.16.1.2:57638] AH01071: Got error 'PHP message: PHP Notice:  Undefined index: CfCommunity\\CfHelper\\CfHe
lper in lib/vendor/sphring/sphring/src/Arthurh/Sphring/Runner/SphringRunner.php on line 62\nPHP message: [2017-11-14 13:31:54] CloudFoundry Helper.ERROR: -- 1 -- Log message using the CloudFoundryLogger class  [] []\nPHP message: [2017-11-14 13:31
:54] CloudFoundry Helper.ERROR: -- 2 -- Log message using the CloudFoundryLogger class  [] []\nPHP message: [2017-11-14 13:31:54] CloudFoundry Helper.ERROR: -- 3 -- Log message using the CloudFoundryLogger class  [] []\n'

And I would like to have

OUT 13:31:54 httpd   | [Tue Nov 14 13:31:54.948542 2017] [proxy_fcgi:error] [pid 51:tid 139866079753984] [client 172.16.1.2:57638] AH01071: Got error 'PHP message: PHP Notice:  Undefined index: CfCommunity\\CfHelper\\CfHe
lper in lib/vendor/sphring/sphring/src/Arthurh/Sphring/Runner/SphringRunner.php on line 62
PHP message: [2017-11-14 13:31:54] CloudFoundry Helper.ERROR: -- 1 -- Log message using the CloudFoundryLogger class  [] []
PHP message: [2017-11-14 13:31:54] CloudFoundry Helper.ERROR: -- 2 -- Log message using the CloudFoundryLogger class  [] []
PHP message: [2017-11-14 13:31:54] CloudFoundry Helper.ERROR: -- 3 -- Log message using the CloudFoundryLogger class  [] []\n'

Sentence is confusing

within: docs-buildpacks/node/index.html.md.erb
at line 105:

"To vendor dependencies for an app using the Node.js buildpack, run npm install

doesn't make any sense?

Staticfile Buildpack HSTS settings do not inherit

The Staticfile buildpack config-options include notes like

Note: Setting this property to true also makes http_strict_transport_security and http_strict_transport_security_include_subdomains default to true.
I'm not sure whether this is an issue with the docs or with the buildpack,

but they're not true.

For instance, this Staticfile doesn't include the include_subdomains toggle, and as a result it's missing from the returned header

$ curl -si 'https://response-test.g4.app.cloud.comcast.net' | grep Strict                                                                                                                
Strict-Transport-Security: max-age=31536000; preload
$ cat Staticfile                                                                                                                                                                         
http_strict_transport_security_preload: true
http_strict_transport_security: true

This is behavior is borne out in the code for the buildpack, which requires each toggle independently.

I'll happily PR to either here or the buildpack if needed, once the intended behavior is confirmed.

Environment configure problem

My runtime environment error message is "You are using pip version 9.0.1, however version 18.1 is available.You should consider upgrading via the 'pip install --upgrade pip' command." How to configure it ? In runtime.txt or requirements.txt ?

Configuring ForceHttps via Staticfile

Hi,
Currently the docs say to force https on the Staticfile buildpack to:

set the FORCE_HTTPS environment variable to true

It appears you can also set it via a Staticfile parameter (from src/staticfile/finalize/finalize.go):

type Staticfile struct {
...
    ForceHTTPS            bool   `yaml:"force_https"```

Can/should the Staticfile configuration method be added to the docs? 

Thanks,
-David

"Github" should be "GitHub"

I put together a pull request at #207 but I'm not wasting my time with a CLA that has to be filled out by hand then scanned and emailed - this should be entirely digital.

how do you skip-ssl-validation using cloudfoundry gradle plugin?

Is there an option to skip ssl validation using cloudfoundry gradle plugin?

Using the command line client, we can use the --skip-ssl-validation option

> I/O error on GET request for :sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Where is bp.log?

According to the doc below, bp.log should be written to app/.bp/logs/
https://docs.cloudfoundry.org/buildpacks/php/gsg-php-usage.html#troubleshooting

I do not even see a logs folder:

vcap@289b9ee6-5e45-4b43-5396-aa673b71f738:/app/.bp$ pwd
/home/vcap/app/.bp
vcap@289b9ee6-5e45-4b43-5396-aa673b71f738:
/app/.bp$ ls -al
total 16
drwxr-xr-x 4 vcap vcap 4096 Apr 5 21:05 .
drwxr-xr-x 9 vcap root 4096 Apr 5 21:05 ..
drwxr-xr-x 2 vcap vcap 4096 Apr 5 21:05 bin
drwxr-xr-x 3 vcap vcap 4096 Apr 5 21:05 lib
vcap@289b9ee6-5e45-4b43-5396-aa673b71f738:~/app/.bp$

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.