cloudcredo / cloudrocker Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
diego value for HOME is /home/vcap
docker image HOME is /app
when running the docker image /app does not appear to be symlinked to /home/vcap, so when running the ruby sample on lattice with diego i had to do a command like this to get the /app/.profile.d/ruby.sh script to have the correct values:
lattice-cli start ruby-example -i "docker:///jbayer/ruby-example" -- /bin/bash /app/cloudfocker-start-1c4352a23e52040ddb1857d7675fe3cc.sh /app export HOME=/app \&\& source /app/.profile.d/ruby.sh \&\& env \&\& /app/vendor/bundle/ruby/1.9.1/bin/bundle version \&\& /app/vendor/bundle/ruby/1.9.1/bin/bundle exec rackup config.ru -p 8080
Can cloudrocker be made to work under boot2docker? The README says:
Feel free to try Cloud Rocker with boot2docker, and good luck with the volume mounts.
I took this to mean that it was at least possible (maybe I misread some sarcasm there). Anyway, when I rock up
or rock build
, I get an error:
docker@boot2docker:/c/Users/mamacdon/code/myapp$ rock build
Starting the CloudRocker container...
no such file or directory
2015/04/27 18:42:32 Error: Error response from daemon: Cannot start container 4f1d198adcc6b7c96a5c87666271d61b2c5cb151d66e9f91f92c9573df34d5bc: [8] System error: no such file or directory
docker@boot2docker:/c/Users/mamacdon/code/myapp$
It would be nice to have more detail in the docs about why this will or won't work.
UID 0
already exists in the raw image.
mamacdon@ubuntud:~$ sudo ./rocker/bin/rock this
Bootstrapping Docker setup - this will take a few minutes...
Downloading from https://s3.amazonaws.com/blob.cfblob.com/1030f8d6-15c8-48d6-a99f-db8742b136f4
acb06367c15f26cae90ef22f62f0e2a20bcf8e828174f730fe6b8e1fd119095b
Creating image configuration...
Creating image...
Sending build context to Docker daemon 2.56 kB
Sending build context to Docker daemon
Step 0 : FROM cloudrocker-raw:latest
---> acb06367c15f
Step 1 : RUN /usr/sbin/useradd -mU -u 0 -d /app -s /bin/bash vcap
---> Running in 6782b2a5741b
useradd: UID 0 is not unique
2015/05/15 11:45:41 Error: Status: The command [/bin/sh -c /usr/sbin/useradd -mU -u 0 -d /app -s /bin/bash vcap] returned a non-zero code: 4, Code: 1
$ fock build
Starting the CloudFocker container...
Running Buildpacks...
-------> Buildpack version 1.1.0
! A .godir is required. For instructions:
! http://mmcgrana.github.io/2012/09/getting-started-with-go-on-heroku
Started the CloudFocker container.
Deleting the CloudFocker container...
cloudfocker-staging
Deleted container.
2014/12/13 19:38:34 Staging failed - have you added a buildpack for this type of application?
vagrant@ubuntu-14:/vagrant/sample-apps/go$ fock buildpacks
go-buildpack
java-buildpack
here are some command outputs from the fock build
image. note the error:
mkfifo: cannot create fifo `/app/tmp/heroku.waitpipe-8080.fycbjO': No such file or directory"
and the mkdir command and then see it working.
vcap@b3033f667ef4:~$ source ./.profile.d/php.sh
vcap@b3033f667ef4:~$ /bin/bash cloudfocker-start-1c4352a23e52040ddb1857d7675fe3cc.sh /app vendor/bin/heroku-php-apache2
Booting on port 8080...
Using PHP-FPM configuration file 'vendor/heroku/heroku-buildpack-php/conf/php/php-fpm.conf'
Using PHP configuration (php.ini) file 'vendor/heroku/heroku-buildpack-php/conf/php/php.ini'
Using Apache2 VirtualHost-level configuration include 'vendor/heroku/heroku-buildpack-php/conf/apache2/default_include.conf'
Using Apache2 configuration file 'vendor/heroku/heroku-buildpack-php/conf/apache2/heroku.conf'
mkfifo: cannot create fifo `/app/tmp/heroku.waitpipe-8080.fycbjO': No such file or directory
vcap@b3033f667ef4:~$ mkdir /app/tmp
vcap@b3033f667ef4:~$ /bin/bash cloudfocker-start-1c4352a23e52040ddb1857d7675fe3cc.sh /app vendor/bin/heroku-php-apache2
Booting on port 8080...
Using PHP-FPM configuration file 'vendor/heroku/heroku-buildpack-php/conf/php/php-fpm.conf'
Using PHP configuration (php.ini) file 'vendor/heroku/heroku-buildpack-php/conf/php/php.ini'
Using Apache2 VirtualHost-level configuration include 'vendor/heroku/heroku-buildpack-php/conf/apache2/default_include.conf'
Using Apache2 configuration file 'vendor/heroku/heroku-buildpack-php/conf/apache2/heroku.conf'
Starting log redirection...
Starting php-fpm...
Starting httpd...
[14-Dec-2014 08:16:47] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
[14-Dec-2014 08:16:47] NOTICE: fpm is running, pid 131
[14-Dec-2014 08:16:47] NOTICE: ready to handle connections
127.0.0.1 - - [14/Dec/2014:08:17:49 +0000] "GET / HTTP/1.1" 200 65 "-" "curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15"
I am trying to build a python buildpack based application. rock up fails with below message.
It could well be that this is related to my special setup of package repo and vendor folder. But the error message is very unspecific. How to increase verbosity or debug otherwise?
Running Buildpacks...
-------> Buildpack version 1.5.23
-----> Installing python-3.5.3
Downloaded [https://buildpacks.cloudfoundry.org/dependencies/python/python-3.5.3-linux-x64-105f02b2.tgz]
-----> Installing Setuptools (32.1.0)
Downloaded [https://buildpacks.cloudfoundry.org/dependencies/manual-binaries/setuptools/setuptools-32.1.0-44054eaa.tar.gz]
-----> Installing Pip (9.0.1)
Downloaded [https://buildpacks.cloudfoundry.org/dependencies/manual-binaries/pip/pip-9.0.1-35f01da3.tar.gz]
-----> Installing pip-pop (0.1.1)
Downloaded [https://buildpacks.cloudfoundry.org/dependencies/manual-binaries/pip-pop/pip-pop-0.1.1-d410583a.tar.gz]
-----> Installing pipenv (4.0.1)
Downloaded [https://buildpacks.cloudfoundry.org/dependencies/manual-binaries/pipenv/pipenv-4.0.1-148f753f.tar.gz]
$ pip install -r requirements.txt
Failed to compile droplet: exit status 1Deleting the CloudRocker container...
Deleted container.
2017/08/10 17:02:59 Staging failed - have you added a buildpack for this type of application?
When using the cflinuxfs2
stack I'm running into issues with the ruby buildpack (v1.6.5).
The error below is raised because it expects the CF_STACK
env far to be set to cflinuxfs2
.
I was able to verify the this by ENV['CF_STACK'] = 'cflinuxfs2'
to the top of the compile
script, which fixed the issue.
2015/08/22 13:10:23 Staging failed - have you added a buildpack for this type of application?
Starting the CloudRocker container...
Running Buildpacks...
It looks like you're deploying on a stack (currently set to *lucid64*) that's not supported by this buildpack.
That could be because you're using a recent buildpack release on a deprecated stack.
If you're using the buildpack installed by your CF admin, please let your admin know you saw this error message.
If you at one point specified a buildpack that's at git URL, please make sure you're pointed at a version that supports this stack.
Failed to compile droplet: exit status 44
While I was testing the multi-buildpack I run into an issue where it would not be detected.
After further investigation I found the problem was related to the .buildpacks
file which was not copied into the staging environment.
I suspect it being related to these lines.
I want run spring-music application on lattice, so I try to pack it into docker container with cloud rocket. But when I fock up
in spring-music directory I got an error:
/vagrant/spring-music$ fock up
Starting the CloudFocker container...
Running Buildpacks...
Started the CloudFocker container.
Deleting the CloudFocker container...
cloudfocker-staging
Deleted container.
2015/02/16 15:53:32 Staging failed - have you added a buildpack for this type of application?
I have already installed java buildpack.
$ fock buildpacks
java-buildpack
Application was built with ./gradlew assemble
bash-4.3$ docker -v
Docker version 1.8.1, build d12ea79
bash-4.3$ rock docker
Checking Docker version
Client API version: 1.15
Go version (client): go1.5
OS/Arch (client): darwin/amd64
2015/09/02 09:41:44 Error: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.15/version: dial unix /var/run/docker.sock: connect: no such file or directory
Hi,
I'm trying to do the vagrant provision
and getting a 404 when trying to download the vbox: https://s3.amazonaws.com/cloudrocker/vagrantboxes/cloudrocker-0.0.2-vbox.box
Trying it in a browser also yields a 404.
While trying to use a fuse based filesystem I found a difference between the permissions inside the docker container spawned by cloudrocker vs the permissions in the warden based container.
# cloudrocker
> ls -la /dev/fuse
c--------- 1 root root 10, 229 Aug 6 21:57 /dev/fuse
# cloudfoundry
> ls -la /dev/fuse
crw-rw-rw- 1 root fuse 10, 229 2015-07-05 15:22 /dev/fuse
Which results in fuse: failed to open /dev/fuse: Permission denied
in the cloudrocker environment.
running fock build
on a simple spring boot app.groovy
results in an invalid command entry in the docker image.
"Cmd": [
"/bin/sh",
"-c",
"#(nop) CMD [/bin/sh -c [\"/bin/bash\", \"/app/cloudfocker-start-1c4352a23e52040ddb1857d7675fe3cc.sh\", \"/app\", \"JAVA_HOME=$PWD/.java-buildpack/open_jdk_jre\", \"JAVA_OPTS=\"-Djava.io.tmpdir=/app/tmp\", \"-XX:OnOutOfMemoryError=$PWD/.java-buildpack/open_jdk_jre/bin/killjava.sh\", \"-XX:MaxMetaspaceSize=64M\", \"-XX:MetaspaceSize=64M\"\", \"SERVER_PORT=8080\", \"$PWD/.java-buildpack/spring_boot_cli/bin/spring\", \"run\", \"app.groovy\"]]"
]
the full detail is here: https://gist.github.com/jbayer/f834e5a08e32bf68519f#file-gistfile1-txt-L50
simple app.groovy
is here:
@Controller
class ThisWillActuallyRun {
@RequestMapping("/")
@ResponseBody
String home() {
return "BLUE"
}
@RequestMapping("/services")
@ResponseBody
String services() {
return System.getenv("VCAP_SERVICES")
}
}
i forgot to rock this
and it would be nice to defensively inform the user that they should do it.
$ rock build
Starting the CloudRocker container...
Unable to find image 'cloudrocker-base:latest' locally
Pulling repository cloudrocker-base
2015/05/09 21:10:59 Error: Error: image library/cloudrocker-base:latest not found
the sample flask app works fine on run.pivotal.io, so i assume it's some difference in the cloud rocker env from the normal cloud foundry environment.
$ fock add-buildpack https://github.com/cloudfoundry/python-buildpack.git
Downloading buildpack...
Cloning into 'python-buildpack'...
remote: Counting objects: 152, done.
remote: Compressing objects: 100% (90/90), done.
remote: Total 152 (delta 59), reused 123 (delta 58)
Receiving objects: 100% (152/152), 8.19 MiB | 3.03 MiB/s, done.
Resolving deltas: 100% (59/59), done.
Checking connectivity... done.
Submodule 'compile-extensions' (https://github.com/cf-buildpacks/compile-extensions.git) registered for path 'compile-extensions'
Cloning into 'compile-extensions'...
remote: Counting objects: 203, done.
remote: Compressing objects: 100% (102/102), done.
remote: Total 203 (delta 66), reused 199 (delta 64)
Receiving objects: 100% (203/203), 35.48 KiB | 0 bytes/s, done.
Resolving deltas: 100% (66/66), done.
Checking connectivity... done.
Submodule path 'compile-extensions': checked out '1b84b6955b115c84a552eaed2a28b1ae5dfb0456'
Downloaded buildpack.
vagrant@ubuntu-14:/vagrant/sample-apps/python$ fock up
Starting the CloudFocker container...
Running Buildpacks...
-------> Buildpack version 1.1.1
-----> Installing runtime (python-2.7.9)
-----> Installing dependencies with pip
Traceback (most recent call last):
File "/app/.heroku/python/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 339, in load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2470, in load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2184, in load
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/__init__.py", line 10, in <module>
from pip.util import get_installed_distributions, get_prog
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/util.py", line 15, in <module>
from pip.locations import site_packages, running_under_virtualenv, virtualenv_no_global
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/locations.py", line 96, in <module>
build_prefix = _get_build_prefix()
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/locations.py", line 65, in _get_build_prefix
__get_username())
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/locations.py", line 60, in __get_username
return pwd.getpwuid(os.geteuid()).pw_name
KeyError: 'getpwuid(): uid not found: 1000'
Traceback (most recent call last):
File "/app/.heroku/python/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 339, in load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2470, in load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2184, in load
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/__init__.py", line 10, in <module>
from pip.util import get_installed_distributions, get_prog
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/util.py", line 15, in <module>
from pip.locations import site_packages, running_under_virtualenv, virtualenv_no_global
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/locations.py", line 96, in <module>
build_prefix = _get_build_prefix()
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/locations.py", line 65, in _get_build_prefix
__get_username())
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/locations.py", line 60, in __get_username
return pwd.getpwuid(os.geteuid()).pw_name
KeyError: 'getpwuid(): uid not found: 1000'
cp: `/app/.heroku' and `/app/.heroku' are the same file
cp: `/app/.profile.d' and `/app/.profile.d' are the same file
cp: `/app/requirements.txt' and `/app/requirements.txt' are the same file
cp: `/app/runtime.txt' and `/app/runtime.txt' are the same file
Started the CloudFocker container.
Deleting the CloudFocker container...
cloudfocker-staging
Deleted container.
2015/01/03 00:55:45 Staging failed - have you added a buildpack for this type of application?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.