vmware-archive / ephemerol

A Cloud Native readiness scanner
Apache License 2.0
30 stars 21 forks source link

cf push ephemerol to PWS not working #14

Closed rm511130 closed 7 years ago

rm511130 commented 7 years ago

Current Instructions:

Deploy to Cloud Foundry

mkdir ./ephemerol/vendor
pip install --no-use-wheel --download ./ephemerol/vendor -r requirements.txt
cf push

I've already opened an issue re: the pip install command. But, once you're past that problem, the subsequent cf push also fails on PWS. Here are the results:

$ cf push ephemerol3
Using manifest file /work/ephemerol/manifest.yml

Creating app ephemerol3 in org Central / space staging as rmeira@pivotal.io...
OK

Creating route ephemerol3.cfapps.io...
OK

Binding ephemerol3.cfapps.io to ephemerol3...
OK

Uploading ephemerol3...
Uploading app files from: /Users/rmeira/work/src/github.com/user/ephemerol
Uploading 3.5M, 172 files
Done uploading               
OK

Starting app ephemerol3 in org Central / space staging as rmeira@pivotal.io...
Downloading python_buildpack...
Creating container
Downloaded python_buildpack
Successfully created container
Downloading app package...
Downloaded app package (4.6M)
-------> Buildpack version 1.5.15
-----> Installing python-2.7.11
DEPENDENCY MISSING IN MANIFEST: python 2.7.11
It looks like you're trying to use python 2.7.11.
Unfortunately, that version of python is not supported by this buildpack.
The versions of python supported in this buildpack are:
- 3.6.0
- 3.5.3
- 3.5.2
- 3.4.6
- 3.4.5
- 3.3.6
- 3.3.5
- 2.7.13
- 2.7.12
If you need further help, start by reading: https://github.com/cloudfoundry/python-buildpack/releases.
Failed to compile droplet
Exit status 223
Destroying container
Successfully destroyed container

FAILED
Error restarting application: BuildpackCompileFailed

TIP: use 'cf logs ephemerol3 --recent' for more information

How I got it to work:

Deploy to Cloud Foundry

mkdir ./ephemerol/vendor
pip download --no-binary ./ephemerol/vendor -r requirements.txt
cf push ephemerol-unique-name -b https://github.com/heroku/heroku-buildpack-python

Results:

$ cf push ephemerol-unique-name -b https://github.com/heroku/heroku-buildpack-python
Using manifest file /work/ephemerol/manifest.yml

Creating app ephemerol-unique-name in org Central / space staging as rmeira@pivotal.io...
OK

Creating route ephemerol-unique-name.cfapps.io...
OK

Binding ephemerol-unique-name.cfapps.io to ephemerol-unique-name...
OK

Uploading ephemerol-unique-name...
Uploading app files from: /Users/rmeira/work/src/github.com/user/ephemerol
Uploading 3.5M, 172 files
Done uploading               
OK

Starting app ephemerol-unique-name in org Central / space staging as rmeira@pivotal.io...
Creating container
Successfully created container
Downloading app package...
Downloaded app package (4.6M)
-----> Installing python-2.7.11
     $ pip install -r requirements.txt
       Collecting pytest==3.0.5 (from -r /tmp/app/requirements.txt (line 1))
         Downloading pytest-3.0.5-py2.py3-none-any.whl (170kB)
       Collecting mock (from -r /tmp/app/requirements.txt (line 2))
         Downloading mock-2.0.0-py2.py3-none-any.whl (56kB)
       Collecting werkzeug (from -r /tmp/app/requirements.txt (line 3))
         Downloading Werkzeug-0.11.15-py2.py3-none-any.whl (307kB)
       Collecting flask (from -r /tmp/app/requirements.txt (line 4))
         Downloading Flask-0.12-py2.py3-none-any.whl (82kB)
       Collecting PyYAML (from -r /tmp/app/requirements.txt (line 5))
         Downloading PyYAML-3.12.tar.gz (253kB)
       Collecting flask-cors (from -r /tmp/app/requirements.txt (line 6))
         Downloading Flask_Cors-3.0.2-py2.py3-none-any.whl
       Collecting py>=1.4.29 (from pytest==3.0.5->-r /tmp/app/requirements.txt (line 1))
         Downloading py-1.4.32-py2.py3-none-any.whl (82kB)
       Collecting funcsigs>=1; python_version < "3.3" (from mock->-r /tmp/app/requirements.txt (line 2))
         Downloading funcsigs-1.0.2-py2.py3-none-any.whl
       Collecting six>=1.9 (from mock->-r /tmp/app/requirements.txt (line 2))
       Collecting pbr>=0.11 (from mock->-r /tmp/app/requirements.txt (line 2))
         Downloading pbr-2.0.0-py2.py3-none-any.whl (98kB)
         Downloading six-1.10.0-py2.py3-none-any.whl
       Collecting itsdangerous>=0.21 (from flask->-r /tmp/app/requirements.txt (line 4))
         Downloading itsdangerous-0.24.tar.gz (46kB)
       Collecting Jinja2>=2.4 (from flask->-r /tmp/app/requirements.txt (line 4))
         Downloading Jinja2-2.9.5-py2.py3-none-any.whl (340kB)
         Downloading click-6.7-py2.py3-none-any.whl (71kB)
       Collecting click>=2.0 (from flask->-r /tmp/app/requirements.txt (line 4))
       Collecting MarkupSafe>=0.23 (from Jinja2>=2.4->flask->-r /tmp/app/requirements.txt (line 4))
         Downloading MarkupSafe-0.23.tar.gz
       Installing collected packages: py, pytest, funcsigs, six, pbr, mock, werkzeug, itsdangerous, MarkupSafe, Jinja2, click, flask, PyYAML, flask-cors
         Running setup.py install for itsdangerous: started
           Running setup.py install for itsdangerous: finished with status 'done'
         Running setup.py install for MarkupSafe: started
           Running setup.py install for MarkupSafe: finished with status 'done'
         Running setup.py install for PyYAML: started
           Running setup.py install for PyYAML: finished with status 'done'
       Successfully installed Jinja2-2.9.5 MarkupSafe-0.23 PyYAML-3.12 click-6.7 flask-0.12 flask-cors-3.0.2 funcsigs-1.0.2 itsdangerous-0.24 mock-2.0.0 pbr-2.0.0 py-1.4.32 pytest-3.0.5 six-1.10.0 werkzeug-0.11.15
Exit status 0
Uploading droplet, build artifacts cache...
Uploading build artifacts cache...
Uploading droplet...
Uploaded build artifacts cache (38.5M)
Uploaded droplet (43M)
Uploading complete
Destroying container
Successfully destroyed container

1 of 1 instances running

App started

OK

App ephemerol-unique-name was started using this command `python ./ephemerol/ephemerol-web.py`

Showing health and status for app ephemerol-unique-name in org Central / space staging as rmeira@pivotal.io...
OK

requested state: started
instances: 1/1
usage: 1G x 1 instances
urls: ephemerol-unique-name.cfapps.io
last uploaded: Sat Mar 4 01:20:30 UTC 2017
stack: cflinuxfs2
buildpack: https://github.com/heroku/heroku-buildpack-python

     state     since                    cpu    memory    disk      details
#0   running   2017-03-03 08:21:54 PM   0.0%   0 of 1G   0 of 1G
jwilliams-pivotal commented 7 years ago

Changed runtime.txt so that it uses python 2.7.13 instead of the unsupported version of python. That will allow you to cf push with the out of the box python build pack. Thank you for bringing this to our attention.