tsuru / platforms Goto Github PK
View Code? Open in Web Editor NEWOfficial platforms for the tsuru PaaS.
License: BSD 3-Clause "New" or "Revised" License
Official platforms for the tsuru PaaS.
License: BSD 3-Clause "New" or "Revised" License
When you set an invalid version of a package, yarn install
shows a prompt waiting for the user to select another version of that package, locking the app deploy.
Exemple: When I add "dependencies": { "jquery": "3.3.0" }
to the package.json
file:
[1/4] Resolving packages...
Couldn't find any versions for "jquery" that matches "3.3.0"
? Please choose a version of "jquery" from this list: (Use arrow keys)
❯ 3.2.1
3.2.0
3.1.1
Hello, it would be good if the Python platform provided support to the newer version. It looks like that python 3.7 requires openssl 1.0.2, so it could be tricky to make it work on Ubuntu 14.04.
We can create a php 7 support in tsuru php platform without create a new platform?
I'm trying to add buildpack
platform in tsuru-bootstrap
environment:
Download output was truncated for posting here on GH, that's why progress bar aren't shown properly
$ tsuru-admin platform-add buildpack -d https://github.com/tsuru/platforms/raw/master/buildpack/Dockerfile
Step 1 : FROM progrium/buildstep
Pulling from progrium/buildstep
Pulling fs layer
Pulling fs layer
Pulling fs layer
Pulling fs layer
Pulling fs layer
Pulling fs layer
Pulling fs layer
Pulling fs layer
Downloading [==================================================>] 32 B/32 B
Extracting [==================================================>] 337 B/337 B
Extracting [==================================================>] 337 B/337 B
Extracting [==================================================>] 337 B/337 B
Pull complete
Digest: sha256:70ecdcb8660431593f56b0615da75ef013a0fd58d24f388341e731840c87ce81
Status: Downloaded newer image for progrium/buildstep:latest
---> d6d2e6f5fe3c
Step 2 : RUN locale-gen en_US.UTF-8
---> Running in 9a7123f056a2
Generating locales...
en_US.UTF-8... done
Generation complete.
---> 94ac1884869b
Removing intermediate container 9a7123f056a2
Step 3 : ENV LANG en_US.UTF-8 LANGUAGE en_US:en LC_ALL en_US.UTF-8 DEBIAN_FRONTEND noninteractive
---> Running in 5dc8dde08984
---> 7bba448a83ea
Removing intermediate container 5dc8dde08984
Step 4 : RUN apt-get update
---> Running in 5cc6c902bfeb
Ign http://archive.ubuntu.com trusty InRelease
Get:1 http://archive.ubuntu.com trusty-security InRelease [64.4 kB]
Get:2 http://archive.ubuntu.com trusty-updates InRelease [64.4 kB]
Hit http://archive.ubuntu.com trusty Release.gpg
Get:3 http://archive.ubuntu.com trusty-security/main amd64 Packages [476 kB]
Get:4 http://archive.ubuntu.com trusty-updates/main amd64 Packages [835 kB]
Hit http://archive.ubuntu.com trusty Release
Hit http://archive.ubuntu.com trusty/main amd64 Packages
Hit http://archive.ubuntu.com trusty/universe amd64 Packages
Fetched 1,440 kB in 6s (216 kB/s)
Reading package lists...
---> cd3ddedf4d8a
Removing intermediate container 5cc6c902bfeb
Step 5 : RUN apt-get install curl sudo -y --force-yes
---> Running in 468e853e5144
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
libcurl3 libcurl4-openssl-dev
Suggested packages:
libcurl4-doc libcurl3-dbg
The following NEW packages will be installed:
sudo
The following packages will be upgraded:
curl libcurl3 libcurl4-openssl-dev
3 upgraded, 1 newly installed, 0 to remove and 180 not upgraded.
Need to get 883 kB of archives.
After this operation, 1,544 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ trusty-security/main curl amd64 7.35.0-1ubuntu2.5 [123 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ trusty-security/main libcurl4-openssl-dev amd64 7.35.0-1ubuntu2.5 [245 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ trusty-security/main libcurl3 amd64 7.35.0-1ubuntu2.5 [173 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ trusty-updates/main sudo amd64 1.8.9p5-1ubuntu1.2 [342 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 883 kB in 1s (791 kB/s)
(Reading database ... 48111 files and directories currently installed.)
Preparing to unpack .../curl_7.35.0-1ubuntu2.5_amd64.deb ...
Unpacking curl (7.35.0-1ubuntu2.5) over (7.35.0-1ubuntu2.3) ...
Preparing to unpack .../libcurl4-openssl-dev_7.35.0-1ubuntu2.5_amd64.deb ...
Unpacking libcurl4-openssl-dev:amd64 (7.35.0-1ubuntu2.5) over (7.35.0-1ubuntu2.3) ...
Preparing to unpack .../libcurl3_7.35.0-1ubuntu2.5_amd64.deb ...
Unpacking libcurl3:amd64 (7.35.0-1ubuntu2.5) over (7.35.0-1ubuntu2.3) ...
Selecting previously unselected package sudo.
Preparing to unpack .../sudo_1.8.9p5-1ubuntu1.2_amd64.deb ...
Unpacking sudo (1.8.9p5-1ubuntu1.2) ...
Setting up libcurl3:amd64 (7.35.0-1ubuntu2.5) ...
Setting up curl (7.35.0-1ubuntu2.5) ...
Setting up libcurl4-openssl-dev:amd64 (7.35.0-1ubuntu2.5) ...
Setting up sudo (1.8.9p5-1ubuntu1.2) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
---> 4fd754d7244e
Removing intermediate container 468e853e5144
Step 6 : RUN curl -sLo base-platform.tar.gz https://github.com/tsuru/base-platform/tarball/master
---> Running in fe49da41a57c
---> 9870d5a66f9b
Removing intermediate container fe49da41a57c
Step 7 : RUN mkdir -p /var/lib/tsuru/base
---> Running in e5445190da4c
---> 0348788a2693
Removing intermediate container e5445190da4c
Step 8 : RUN tar -xvf base-platform.tar.gz -C /var/lib/tsuru/base --strip 1
---> Running in 191b65822bcc
tsuru-base-platform-67e836c/AUTHORS
tsuru-base-platform-67e836c/CONTRIBUTORS
tsuru-base-platform-67e836c/Dockerfile
tsuru-base-platform-67e836c/LICENSE
tsuru-base-platform-67e836c/README.md
tsuru-base-platform-67e836c/deploy
tsuru-base-platform-67e836c/install
tsuru-base-platform-67e836c/rc/
tsuru-base-platform-67e836c/rc/config
tsuru-base-platform-67e836c/rc/os_dependencies
---> 97e0dead8baf
Removing intermediate container 191b65822bcc
Step 9 : RUN rm base-platform.tar.gz
---> Running in 331538de3a07
---> f1462f5c7782
Removing intermediate container 331538de3a07
Step 10 : RUN mkdir -p /var/lib/tsuru/buildpack
---> Running in 56222f608eb9
---> 45f7c905f1c5
Removing intermediate container 56222f608eb9
Step 11 : ADD . /var/lib/tsuru/buildpack
---> 3cff47dc7344
Removing intermediate container 38e2744e0c9e
Step 12 : RUN cp /var/lib/tsuru/buildpack/deploy /var/lib/tsuru
---> Running in aca2ccdf3569
cp: cannot stat ‘/var/lib/tsuru/buildpack/deploy’: No such file or directory
error in docker node "http://127.0.0.1:2375": The command '/bin/sh -c cp /var/lib/tsuru/buildpack/deploy /var/lib/tsuru' returned a non-zero code: 1
Error: Failed to add new platform.
We can now do simple assertions on the environment installed by the platform. It would be good to at those kind of tests for other platforms as well, just like we did for ruby. It`s just a matter of adding a directory with the name of the platform inside the tests directory and adding .bats files inside.
Hi
when triying to select python 3.6 on python platform with build process warn about there is not 3.6 version and select the closest 3.5-5
root@tsurudev:~/python36test# git push tsuru master
Counting objects: 5, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 264 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: tar: Removing leading `/' from member names
remote: Exact python version '3.6.2' (.python-version file) is not supported.
remote: Closest version is 'pypy3.5-5.10.1'.
remote: -- Using python version: pypy3.5-5.10.1 (.python-version file (closest)) --
I had try with 3.6.2 and with 3.6.5 that is on tsuru/python /var/lib/pyenv/versions/
directory but not selected
regards
We could add an option to enable more verbose deploys, to help in debug. Usually when the deploy script breaks, it outputs something like exit status 1
.
A possible solution would be check for the presence of a specific environment variable, like TSURU_DEPLOY_DEBUG
, to increase the script output details.
Hi,
Please create the webhook in hub.docker/tsuru/ballerina from platform/ballerina
Tks
Krishna
The NodeJS platform use dependencies
for runtime dependencies and devDependencies
for development/testing ones [1].
Build tools, like babel, are not required on final image on production. But tsuru does not install it on build, forcing to move these dependencies and install it all. This increases the final image.
It can be handled using a docker file with multistage build [2].
Isn't possible to add this to the nodejs platform?
[1] - https://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file
[2] - https://docs.docker.com/develop/develop-images/multistage-build/
It would be nice if we could set a specific Python version, like we can in Ruby and Node platforms.
Originally from tsuru/basebuilder#4.
I have a wordpress app running normally, but when I tryed update it, I receive this error:
remote: Processing triggers for sgml-base (1.26+nmu4ubuntu1) ...
remote: * Stopping Apache httpd web server apache2
remote: *
remote: update-rc.d: /etc/init.d/apache2 exists during rc.d purge (use -f to force)
remote: /usr/bin/env: php: No such file or directory
remote: Traceback (most recent call last):
remote: File "/var/lib/tsuru/php/deploy.py", line 209, in <module>
remote: manager.install()
remote: File "/var/lib/tsuru/php/deploy.py", line 92, in install
remote: self.install_composer()
remote: File "/var/lib/tsuru/php/deploy.py", line 109, in install_composer
remote: raise InstallationException('Unable to install composer dependencies')
remote: __main__.InstallationException: Unable to install composer dependencies
remote: Installing system packages...
remote: Install composer dependencies
remote: Composer is not found locally, downloading it
remote: 2016/04/24 15:37:24 exit status 1
remote: Exit status 1
To [email protected]:iblvwordpress.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:iblvwordpress.git'
The error occur in this line - https://github.com/tsuru/platforms/blob/master/php/deploy.py#L108
if os.system('cd %s && %s install' % (self.application.get('directory'), composer_phar)) != 0:
raise InstallationException('Unable to install composer dependencies')
Accessing the container and following this steps to simulate the error, I receive this error:
$ tsuru app-shell
ubuntu@67bd6a2c8453:/$ cd /home/application/current/
ubuntu@67bd6a2c8453:/home/application/current$ python -c 'import os; os.system("cd /home/application/current && ./composer.phar install")'
Cannot create cache directory /home/ubuntu/.composer/cache/repo/http---wpackagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/ubuntu/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/ubuntu/.composer/cache/files/, or directory is not writable. Proceeding without cache
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
[ErrorException]
file_put_contents(/home/application/current/vendor/composer/installed.json): failed to open stream: Permission denied
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...
Running with sudo the script is executed normally:
$ python -c 'import os; os.system("cd /home/application/current && sudo ./composer.phar install")'
Running composer as root/super user is highly discouraged as packages, plugins and scripts cannot always be trusted
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
I think if we change os.system('cd %s && %s install' % (self.application.get('directory')
to os.system('cd %s && sudo %s install' % (self.application.get('directory'), composer_phar))
, composer_phar))` this problem is resolved.
Currently, the only way to add additional php modules to apache+mod_php is setting an useless interpretor (like fpm) along extensions. Apache frontend should supports extensions also.
When nodejs application contains a yarn.lock
builded from a different version of the container (v0.16.1), it breaks.
Please add support to define custom tsuru.yml
file name.
In some environments (like ours) an application yml config already exists to configure our services, would be better to use the same file for app configuration insted creating two different file (for example, our application.yml
and tsuru.yml
)
As all platform extents the base-platform, this configuration should be defined in base platform, by using an env variable or similiar.
For example:
export APP_CONFIG=application.yml
if APP_CONFIG
is set, all platform should try to use that file as configuration file. If missing, standard tsuru.yml
should be used.
Has the possibility to add support of Pipfile
on python platform?
Doest Python platform support extra packages? I mean, the same behavior of call a "pip install "airflow[s3, postgres]""
Originally open by @guestisp:
I've seen that support di heroku style buildpack was added.
If so, why not dropping support to basebuilder and just using only buildpacks?
Buildpacks are much more flexible and less components to maintain in a tsuru installation.
I've been investigating that the Nginx server version is a bit outdated. The response headers tell, that Nginx in version 1.4.6 serves the site.
$ tsuru app-shell -a php-sample
ubuntu@35849ec8db7b:/home/application/current$ nginx -v
nginx -v
nginx version: nginx/1.4.6 (Ubuntu)
ubuntu@35849ec8db7b:/home/application/current
Issuing the commands above tells the same.
Nginx 1.4.6 was released 2014. Current stable version is 1.14.2.
So how can I update the nginx version? Updating the server everytime deploying an app is not an option for me.
Best regards,
David
After setting the Ruby version in my project as 2.2.3
, I started getting this warning message during deploy:
remote: WARNING: Invalid ruby version, please use 1.9.1, 1.9.3, 2.0, 2.1 or 2.2. Using ruby 2.2 as fallback.
remote: -- Using ruby version: 2.2.3 --
Hi
I have a developer pushing a nodejs app and is getting error because the engines.node version is malformed
"engines": {
- "node": ">= 8.6.0"
with the >=
the deploy script returns error and exit
remote: error running "/var/lib/tsuru/deploy archive http://172.16.70.100:3232/?id=21eb855af295f8432dfc22f656786aa9415cf3e9d77278380806edf23f3e725d375f00f32e8e497e4fc51a31ade46b3730da8e6cbad1bd1f431802fb08cc1e0c": exit status 3
remote: Exit status 1
also, this is dificult to debug and would be nice to add verbose deploys #39
I want to use Heroku-like multiple buildpacks [1] on the buildpack platform. But I didn't see anything about it in the docs. Is this possible?
An example of where this is useful: https://devcenter.heroku.com/articles/using-grunt-with-java-and-maven-to-automate-javascript-tasks
[1] https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app
Latest go platform fails with the error sed: can't read : No such file or directory
.
git push tsuru master
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 438 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: HEAD is now at cedbac7... Initail commit
remote: ---- Pulling image to node ----
remote: latest: Pulling from tsuru/go
remote: Digest: sha256:43fd10289d77fcbcd0cdab10377f51b8605fe5734efda3d561d66d32836b5b95
remote: Status: Image is up to date for 192.168.99.4:5000/tsuru/go:latest
remote: /bin/sh: 27: source: not found
remote: go version go1.9.3 linux/amd64
remote: go version go1.9.3 linux/amd64
remote: Installing Go stable...
remote: sed: can't read : No such file or directory
remote: Procfile not found. Using default Procfile
remote: go build -o tsuru-app
remote:
remote: ---- Building image ----
remote: ---> Sending image to repository (386.57MB)
remote: ---> Cleaning up
remote: /bin/sh: 27: source: not found
remote: ---- Running build hooks ----
remote:
remote: ---- Deploying application image ----
remote: ---> Sending image to repository (0.00MB)
remote: ---> Cleaning up
remote:
remote: ---- Starting 1 new unit [web: 1] ----
remote: ---> Started unit 8c55272c2a [web]
remote:
remote: ---- Binding and checking 1 new unit ----
remote: ---> Bound and checked unit 8c55272c2a [web]
remote:
remote: ---- Adding routes to new units ----
remote: ---> Added route to unit 8c55272c2a [web]
remote:
remote: ---- Setting router healthcheck (Path: /) ----
remote:
remote: OK
Because of this the application build doesn't go through, with the following error
2018-02-13 14:45:38 +0530 [tsuru]: Logs initialization
2018-02-13 14:53:00 +0530 [tsuru][api]: go version go1.9.3 linux/amd64
2018-02-13 14:53:00 +0530 [tsuru][api]: go version go1.9.3 linux/amd64
2018-02-13 14:53:00 +0530 [tsuru][api]: Installing Go stable...
2018-02-13 14:53:02 +0530 [tsuru][api]: sed: can't read : No such file or directory
2018-02-13 14:53:42 +0530 [tsuru][api]: Procfile not found. Using default Procfile
2018-02-13 14:53:42 +0530 [tsuru][api]: go build -o tsuru-app
2018-02-13 14:53:43 +0530 [tsuru][api]: ---- Running build hooks ----
and it is stuck at this stage and error out finally.
It is causing the build to fail and thus the following error.
2018-02-13 16:47:16 +0530 [web][8c55272c2ad6]: /bin/sh: 27: source: not found
2018-02-13 16:47:16 +0530 [web][8c55272c2ad6]: /bin/sh: 1: exec: ./tsuru-app: Permission denied
Hi,
I developed a simple PHP project running on Nginx and PHP-FPM (fpm55), but Tsuru couldn't start the container. After investigating, I realized the system (Ubuntu 14.04 LTS) installed PHP 5.5.9, however PHP-FPM 5.5.9 doesn't support clear_env parameter (not until version 5.5.11) in pool.conf.
Do you think that clear_env parameter should be removed or at least commented so that a simple project wouldn't fail? Thank you.
Btw Tsuru is awesome!
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.