Git Product home page Git Product logo

pkgr's Introduction

pkgr

Build Status

Goal

Make debian or rpm packages out of any app, including init script, crons, logrotate, etc. Excellent way to distribute apps or command line tools without complicated installation instructions.

Hosted service available at Packager.io. Free for OpenSource apps.

Officially supported languages

  • Ruby
  • NodeJS
  • Python
  • Go

In beta:

  • PHP, using the following buildpack: https://github.com/pkgr/heroku-buildpack-php#buildcurl

You can also point to other buildpacks (doc). They may just work.

Supported distributions (64bits only)

  • Ubuntu 24.04 ("noble")
  • Ubuntu 22.04 ("jammy")
  • Ubuntu 20.04 ("focal")
  • Ubuntu 18.04 ("bionic")
  • Ubuntu 16.04 ("xenial")
  • Ubuntu 14.04 ("trusty")
  • Ubuntu 12.04 ("precise")
  • Debian 12 ("bookworm")
  • Debian 11 ("bullseye")
  • Debian 10 ("buster")
  • Debian 9 ("stretch")
  • Debian 8 ("jessie")
  • Debian 7 ("wheezy")
  • RHEL/CentOS 9
  • RHEL/CentOS 8
  • RHEL/CentOS 7
  • RHEL/CentOS 6
  • Suse Linux Enterprise Server 15
  • Suse Linux Enterprise Server 12
  • Suse Linux Enterprise Server 11
  • Amazon Linux AMI 2015
  • Amazon Linux AMI 2014

Examples

See Packager.io for examples of apps packaged with pkgr (Gitlab, OpenProject, Discourse, etc.).

Installation

Docker images are available for the most recent distributions. If you don't have docker or are interested in older distributions, you can also install pkgr as a ruby gem:

gem install pkgr

Usage

To package your app, execute pkgr against your app's repository:

# if using the ruby gem, you need to run it under the distribution you want to package for:
pkgr package path/to/app/repo

# if using a docker image, you can run it from any host OS:
docker run --rm -it -v $(pwd):/app -v /tmp/cache:/cache pkgr/ubuntu:20.04
docker run --rm -it -v $(pwd):/app -v /tmp/cache:/cache pkgr/el:8
docker run --rm -it -v $(pwd):/app -v /tmp/cache:/cache pkgr/debian:10

The resulting .deb or .rpm package will be in your current working directory.

Full command line options are given below:

$ pkgr help package
Usage:
  pkgr package TARBALL|DIRECTORY

Options:
  [--buildpack=BUILDPACK]                        # Custom buildpack to use
  [--buildpack-list=BUILDPACK_LIST]              # Specify a file containing a list of buildpacks to use (--buildpack takes precedence if given)
  [--changelog=CHANGELOG]                        # Changelog
  [--maintainer=MAINTAINER]                      # Maintainer
  [--vendor=VENDOR]                              # Package vendor
  [--architecture=ARCHITECTURE]                  # Target architecture for the package
                                                 # Default: x86_64
  [--runner=RUNNER]                              # Force a specific runner (e.g. upstart-1.5, sysv-lsb-1.3)
  [--logrotate-frequency=FREQUENCY]              # Set logrotate frequency
                                                 # Default: daily
                                                 # Possible values: daily, weekly, monthly, yearly
  [--logrotate-backlog=BACKLOG]                  # Set logrotate backlog
                                                 # Default: 14
  [--homepage=HOMEPAGE]                          # Project homepage (e.g. "https://pkgr.example.org")
  [--home=HOME]                                  # Project home (e.g. "/usr/share/PACKAGE_HOME")
  [--description=DESCRIPTION]                    # Project description
  [--category=CATEGORY]                          # Category this package belongs to
                                                 # Default: none
  [--version=VERSION]                            # Package version (if git directory given, it will use the latest git tag available)
  [--iteration=ITERATION]                        # Package iteration (you should keep the default here)
                                                 # Default: 20141015024539
  [--license=LICENSE]                            # The license of your package (see <https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/#license-short-name>)
  [--user=USER]                                  # User to run the app under (defaults to your app name)
  [--group=GROUP]                                # Group to run the app under (defaults to your app name)
  [--compile-cache-dir=COMPILE_CACHE_DIR]        # Where to store the files cached between packaging runs. Path will be resolved from the temporary code repository folder, so use absolute paths if needed.
  [--before-precompile=BEFORE_PRECOMPILE]        # Provide a script to run just before the buildpack compilation, on the build machine. Path will be resolved from the temporary code repository folder, so use absolute paths if needed.
  [--after-precompile=AFTER_PRECOMPILE]          # Provide a script to run just after the buildpack compilation, on the build machine. Path will be resolved from the temporary code repository folder, so use absolute paths if needed.
  [--before-install=BEFORE_INSTALL]              # Provide a script to run just before a package gets installated or updated, on the target machine.
  [--after-install=AFTER_INSTALL]                # Provide a script to run just after a package gets installated or updated, on the target machine.
  [--before-remove=BEFORE_REMOVE]                # Provide a script to run just before a package gets uninstallated, on the target machine.
  [--after-remove=AFTER_REMOVE]                  # Provide a script to run just after a package gets uninstallated, on the target machine.
  [--dependencies=one two three]                 # Specific system dependencies that you want to install with the package
  [--build-dependencies=one two three]           # Specific system dependencies that must be present before building
  [--host=HOST]                                  # Remote host to build on (default: local machine)
  [--auto], [--no-auto]                          # Automatically attempt to install missing dependencies
  [--clean], [--no-clean]                        # Automatically clean up temporary dirs
                                                 # Default: true
  [--edge], [--no-edge]                          # Always use the latest version of the buildpack if already installed
                                                 # Default: true
  [--env=one two three]                          # Specify environment variables for buildpack (--env "CURL_TIMEOUT=2" "BUNDLE_WITHOUT=development test")
  [--force-os=FORCE_OS]                          # Force a specific distribution to build for (e.g. --force-os "ubuntu-12.04"). This may result in a broken package.
  [--store-cache], [--no-store-cache]            # Output a tarball of the cache in the current directory (name: cache.tar.gz)
  [--verify], [--no-verify]                      # Verifies output package
                                                 # Default: true
  [--data-dir=DATA_DIR]                          # Custom path to data directory. Can be used for overriding default templates, hooks(pre-, post- scripts), configs (buildpacks, distro dependencies), environments, etc.
                                                 # Default: ./pkgr/data
  [--directories=DIRECTORIES]                    # Recursively mark a directory as being owned by the package
  [--verbose], [--no-verbose]                    # Run verbosely
  [--debug], [--no-debug]                        # Run very verbosely
  [--name=NAME]                                  # Application name (if directory given, it will default to the directory name)
  [--buildpacks-cache-dir=BUILDPACKS_CACHE_DIR]  # Directory where to store the buildpacks
                                                 # Default: /home/vagrant/.pkgr/buildpacks

Why?

Tools such as Capistrano are great for deploying applications, but the deployment recipe can quickly become a mess, and scaling the deployment to more than a few servers can prove to be difficult. Plus, if you're already using automation tools such as Puppet to configure your servers, you have to run two different processes to configure your infrastructure.

pkgr builds on top of the Heroku tools to provide you with an easy way to package you app as a debian package. The great advantage is that once you've built it and you tested that it works once, you can deploy on any number of servers at any time and you're sure that it will just work. Then, you can upgrade/downgrade or uninstall the whole application in one command.

Finally, it's a great way to share your open source software with your users and clients. Much easier than asking them to install all the dependencies manually! I'm in the process of making sure pkgr is feature complete by trying to package as many successful open-source projects as I can. Don't hesitate to test it on your app and report your findings!

What this does

  • Uses Heroku buildpacks to embed all the dependencies related to your application runtime within the debian package. For a Rails app for instance, this means that pkgr will embed the specific ruby runtime you asked for, along with all the gems specified in your Gemfile. However, all other dependencies you may need must be specified as additional system dependencies (see Usage). This avoids the 'packaging-the-world' approach used by other tools such as omnibus (with the pros and cons that come with it), but it still allows you to use the latest and greatest libraries for your language of choice. See this blog post for more background.
  • Gives you a nice executable, which closely replicates the Heroku toolbelt utility. For instance, assuming you're packaging an app called my-app, you can do the following:

      my-app config:set VAR=value
      my-app config:get VAR
      my-app run [procfile process] # e.g. my-app run rake db:migrate; my-app run console; etc.
      my-app run [arbitrary process] # e.g. my-app run ruby -v; my-app run bundle install; etc.
      my-app scale web=1 worker=1
      my-app logs [--tail]
      ...
    
  • Your app will reside in /opt/app-name.

  • You'll also get upstart, systemd, or sysvinit initialization scripts (depending on your distribution) that you can use directly:

      service my-app start/stop/restart/status
    

    Note: init scripts are generated only after you've done a scale command for the process type, e.g. my-app scale web=1.

  • Logs will be stored in /var/log/app-name/, with a proper logrotate config automatically added. For systemd-based distributions, you will find the logs in the systemd journal.

  • Config files can be added in /etc/app-name/

Requirements

  • You must have a Procfile.

  • Your application should be Heroku compatible, meaning you should be able to set your main app's configuration via environment variables.

Troubleshooting

If you're on older versions of Debian, you may need to append /var/lib/gems/1.9.1/bin to your PATH to "see" the pkgr command:

export PATH="$PATH:/var/lib/gems/1.9.1/bin"

If you get the following error ERROR: While executing gem ... (ArgumentError) invalid byte sequence in US-ASCII while trying to install pkgr, try setting a proper locale, and then retry:

sudo locale-gen en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
sudo gem install pkgr

Looking for the init script? It is created the first time you run this command

sudo my-app scale web=1 worker=1

Issue getting nokogiri to compile? Try the following based on this comment:

bundle config --local build.nokogiri "--use-system-libraries --with-xml2-include=/usr/include/libxml2"

Authors

Copyright

See LICENSE (MIT)

pkgr's People

Contributors

ankane avatar benlangfeld avatar cbliard avatar chytreg avatar crohr avatar dequbed avatar direvius avatar ethanculler avatar fatum avatar felipegs avatar garethr avatar jacob-carlborg avatar jperville avatar luizsignorelli avatar lukaszkorecki avatar monotek avatar mylanconnolly avatar obfuscoder avatar oliverguenther avatar pierredup avatar smcavoy-b avatar thedayisntgray avatar thomasalrin avatar wruppelx avatar zgohr avatar

Stargazers

 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  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

Watchers

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

pkgr's Issues

Any interest in using fpm internally?

Howdy! I am the fpm maintainer. fpm helps with making packages and is might be perfect as a library for pkgr to use.

I didn't see fpm in the dependency list, so I figured I'd poke here and ask. Any interest in reusing the multiple package support fpm already has to help pkgr do it's work more easily?

Gains:

  • reusing a well tested tool to create output packages
  • fpm supports lots of different output package formats (rpm, deb, solaris, puppet modules) which pkgr target easily

Any thoughts?

Add script-hook for installation/update of the package

Currently, we have to supply update instructions so that the user runs rake db:migrate and friends manually after the app installs/updates (which I presume the user tends to forget).

Thus, I'd like to propose that we add some install/update hooks, that specify scripts which will be automatically run when the user installs/updates the app on his system. This could be similar to the before_precompile configuration which is already present (with the only difference being that the script is run at the target system).

I hope to see the following hooks implemented:

  • after-install (for example to prepare a configuration wizard which offers a GUI to setup my app)
  • after-update (for example to automatically upgrade the database to a new schema)
  • before-update (for example to set the app in maintenance mode before it goes offline)

Disclaimer: I don't know enough of (debian) packages to know if this feature is feasible or how one would implement it.

only web/worker for upstart

This is my Procfile:

web: bundle exec thin start -p 3000
worker: bundle exec rake resque:work QUEUE=*
scheduler: bundle exec rake resque:scheduler

... after generating/installing the .deb file the only upstart conf/scripts
created are for web/worker but not scheduler. Doing it by hand with
Foreman I get all three. I think this would be a common Procfile.
Also, I noticed in pkgr/spec/fixtures/Procfile that there are the 3: web, worker, and redis.
What am I missing ?

Control bundle config through pkgr?

I'm trying to package my Rails app that depends on nokogiri. Apparently Bundler needs special configuration to build on my Ubuntu 14.04 VM:

bundle config build.nokogiri "--use-system-libraries --with-xml2-include=/usr/include/libxml2"

Can I control that through pkgr? Otherwise it fails:

$ pkgr package simple-merchant/
-----> Ruby app
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using 1.7.12
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j2 --deployment
Fetching gem metadata from https://rubygems.org/.........
Installing rake 10.4.2
Installing i18n 0.7.0
Installing json 1.8.2
Installing minitest 5.5.1
Installing thread_safe 0.3.5
Installing tzinfo 1.2.2
Installing activesupport 4.2.1
Installing builder 3.2.2
Installing erubis 2.7.0
Installing mini_portile 0.6.2
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/tmp/d20150427-20456-8lhcav/opt/simple-merchant/vendor/ruby-2.0.0/bin/ruby extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using system libraries.
libxml2 version 2.6.21 or later is required!
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

master upstart conf needs to wait until filesystem is started

pkgr was working great for our app on one Ubuntu 12.04 machine and then we tried it on another and it refused to start our service on boot. We found that it was failing because although the network dependency had been satisfied, the filesystem was slower to come up and it was unable to write the log for our webserver.

Adding the filesystem dependency to our master conf file fixed it...

start on (started network-interface
          or started network-manager
          or started networking) and filesystem

# The `networking` job is a task, which means it will be stopped after the network interfaces have been configured.
# That's why we don't stop on "stopping networking".
# See <https://github.com/ddollar/foreman/issues/263>
stop on runlevel [!2345]

How to set the PORT for service?

I'm struggling to set the PORT for the service created by the package. I've tried this in my .pkgr.yml file:

env:
  - "PORT=3000"

That seems to affect the pkgr command properly, at least according to --debug:

[2015-09-23T21:23:32-05:00] DEBUG: Found .pkgr.yml file. Updated config is now: #<Pkgr::Config name="onebody", homepage="https://church.io/onebody", description="private member portal for churches, built with Ruby on Rails", changelog="RELEASES.md", license="AGPL", version="3.5.0-pre", env=["PORT=3000"], dependencies=["mysql-server", "libxml2"], compile_cache_dir="/tmp/pkgr-cache", after_install="build/script/deb-post-install", verbose=false, debug=true, buildpacks_cache_dir="/home/tim/.pkgr/buildpacks", vendor="pkgr <https://github.com/crohr/pkgr>", architecture="x86_64", iteration="20150923212229", build_dependencies=[], auto=false, clean=true, edge=true, verify=true>

...but alas, it doesn't affect the services when I do onebody scale web=1, the created service file still has 6000:

tim@debian:~$ cat /etc/systemd/system/onebody-web-1.service
[Unit]
StopWhenUnneeded=true
Requires=onebody-web.service
After=onebody-web.service

[Service]
Environment=PORT=6000
ExecStart=/usr/bin/onebody run web
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=%n

[Install]
WantedBy=onebody-web.service

What am I missing?

Oh, and great software by the way! I'm super excited about using this to help our users install OneBody more easily. <3 <3 <3

Warning on `apt-get uninstall my-app`

When I install my app (in my case OpenProject), configure it (so that the app runs), and then uninstall it, I get some dpkg warning:

tessi  ~  dev  openproject  sudo apt-get remove openproject
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  openproject
0 upgraded, 0 newly installed, 1 to remove and 21 not upgraded.
After this operation, 199 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 513193 files and directories currently installed.)
Removing openproject (3.0.1-1398866096.f476e5c.trusty) ...
dpkg: warning: while removing openproject, directory '/etc/openproject/conf.d' not empty so not removed
dpkg: warning: while removing openproject, directory '/opt/openproject/db' not empty so not removed
dpkg: warning: while removing openproject, directory '/opt/openproject/tmp/cache' not empty so not removed

I think it is not a major problem, but not a clean de-installation either.

pkgr doesn't work with vanilla ubuntu12.04 config / unable to use BUNDLER_LIB_PATH env variable

Hi,

right now pkgr prevents passing any env variables to the underlying compilation process (see https://github.com/crohr/pkgr/blob/master/lib/pkgr/buildpack.rb#L38).

It also means that useful BUNDLER_LIB_PATH env variable recognized by heroku-buildpack-ruby (https://github.com/lemurheavy/heroku-buildpack-ruby/blob/master/vendor/syck_hack.rb#L13) is banned.

It limits usage of pkgr or even can prevent it from working.

The sample test scenario is:

  1. Create fresh ubuntu 12.04 machine
  2. Install ruby 1.9.3 from deb packages (ruby1.9.3 package)
  3. Install system-wide bundler
  4. Install system-wide pkgr
  5. Try to run pkgr
  6. See how it fails on installing bcrypt-ruby gem:
Installing bcrypt-ruby (3.0.1)
       Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
       /usr/bin/ruby1.9.1 extconf.rb
       /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler/psyched_yaml (LoadError)
       from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
       from /home/build/.pkgr/buildpacks/heroku-buildpack-ruby/vendor/syck_hack.rb:14:in `<top (required)>'
       from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
       from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
       Gem files will remain installed in /tmp/d20131011-23600-1kcbx3/opt/tuned-scheduler/vendor/bundle/ruby/1.9.1/gems/bcrypt-ruby-3.0.1 for inspection.
       Results logged to /tmp/d20131011-23600-1kcbx3/opt/tuned-scheduler/vendor/bundle/ruby/1.9.1/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out

Installing bcrypt-ruby by typing gem install bcrypt-ruby works without any problems.

The line pointed by the stack trace (heroku-buildpack-ruby/vendor/syck_hack.rb:14) is just

require 'bundler/psyched_yaml'

I've managed to add some debugging output right before this line, and I've got the following:

PATH:

["/usr/local/lib/site_ruby/1.9.1", "/usr/local/lib/site_ruby/1.9.1/i686-linux", "/usr/local/lib/site_ruby", "/usr/lib/ruby/vendor_ruby/1.9.1", "/usr/lib/ruby/vendor_ruby/1.9.1/i686-linux", "/usr/lib/ruby/vendor_ruby", "/usr/lib/ruby/1.9.1", "/usr/lib/ruby/1.9.1/i686-linux"]

ENV:

{"RACK_ENV"=>"production", "PATH"=>"vendor/ruby-1.9.3/bin:vendor/ruby-1.9.3/bin/ruby: 1: vendor/ruby-1.9.3/bin/ruby: \x7FELF\x02\x01\x01\x02: not found\nvendor/ruby-1.9.3/bin/ruby: 3: vendor/ruby-1.9.3/bin/ruby: Syntax error: Unterminated quoted string/bin:bin:vendor/bundle/bin:/usr/local/bin:/usr/bin:/bin", "LANG"=>"en_US.UTF-8", "GEM_HOME"=>"vendor/ruby-1.9.3/bin/ruby: 1: vendor/ruby-1.9.3/bin/ruby: \x7FELF\x02\x01\x01\x02: not found\nvendor/ruby-1.9.3/bin/ruby: 3: vendor/ruby-1.9.3/bin/ruby: Syntax error: Unterminated quoted string", "RAILS_ENV"=>"production", "GEM_PATH"=>"vendor/ruby-1.9.3/bin/ruby: 1: vendor/ruby-1.9.3/bin/ruby: \x7FELF\x02\x01\x01\x02: not found\nvendor/ruby-1.9.3/bin/ruby: 3: vendor/ruby-1.9.3/bin/ruby: Syntax error: Unterminated quoted string", "PWD"=>"/tmp/d20131011-26094-1rg42v8/opt/tuned-scheduler", "BUNDLE_GEMFILE"=>"/tmp/d20131011-26094-1rg42v8/opt/tuned-scheduler/Gemfile", "BUNDLE_CONFIG"=>"/tmp/d20131011-26094-1rg42v8/opt/tuned-scheduler/.bundle/config", "CPATH"=>"/tmp/libyaml-20131011-26147-1go5u98/libyaml-0.1.4/include:", "CPPATH"=>"/tmp/libyaml-20131011-26147-1go5u98/libyaml-0.1.4/include:", "LIBRARY_PATH"=>"/tmp/libyaml-20131011-26147-1go5u98/libyaml-0.1.4/lib:", "RUBYOPT"=>"-r/home/build/.pkgr/buildpacks/heroku-buildpack-ruby/vendor/syck_hack", "NOKOGIRI_USE_SYSTEM_LIBRARIES"=>"true"}

The vendor/ruby-1.9.3/bin/ruby: \x7FELF\x02\x01\x01\x02: not found strings are strange and most probably they are related to the problem, but this is the point where I am stuck.

Remote builds without the --vendor option bomb

Since the --vendor option was added I can no longer build unless I specify some dummy value for this since the default seems to cause an issue.

I haven't debugged too far since my use-case involves remote building which is harder to get debug info from. Anyway, if I don't specify a --vendor value the following error occurs:

bash: https://github.com/crohr/pkgr: No such file or directory
[2015-05-11T14:33:44-05:00] DEBUG: RuntimeError : Error when running remote packaging command. Please make sure to run `sudo apt-get install -y ruby1.9.1-full build-essential git-core && sudo gem install pkgr --version 1.4.3`
[2015-05-11T14:33:44-05:00] DEBUG: /home/ubuntu/.rvm/gems/ruby-2.1.2/gems/pkgr-1.4.3/lib/pkgr/dispatcher.rb:31:in `call'

At this point I'm thinking it might have something to do with thor trying to interpret the default option, but I'm not certain.

Customizable daemon processes

Planning to fix and PR this, but wanted your input @crohr. We have more processes in our app than just web and worker that should be daemonized, but those two are hard-coded in pkgr. I was thinking it would be a safe to assume that anything in the Procfile was daemonizable. I would also always daemonize web if it was a process from the Procfile or defaults).

What do you think?

Rails 3.2 project fails due to non precompiled assets

By default Rails 3.2 expects coffee-script and sass files to be precompiled when running in the production environment. So my project give the following error when accessing any page:

ActionView::Template::Error (application.css isn't precompiled):

I'm happy to try making the necessary change, which involves running rake assets:precompile. Is debian_steps in Pkgr::App the right place for this? Or will it need to be run locally and the files committed to the pkrg-... branch since the build machine doesn't actually have a working instance of the rails app being packaged?

rake aborted! Don't know how to build task 'pkgr:setup'

I am trying to build debian package from my ruby app

~/scripts/ruby/myapp master $ rake pkgr:setup --trace
rake aborted!
Don't know how to build task 'pkgr:setup'
/home/maneesh/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.3.2/lib/rake/task_manager.rb:62:in []' /home/maneesh/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.3.2/lib/rake/application.rb:149:ininvoke_task'
/home/maneesh/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.3.2/lib/rake/application.rb:106:in block (2 levels) in top_level' /home/maneesh/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.3.2/lib/rake/application.rb:106:ineach'
/home/maneesh/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.3.2/lib/rake/application.rb:106:in block in top_level' /home/maneesh/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.3.2/lib/rake/application.rb:115:inrun_with_threads'
/home/maneesh/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.3.2/lib/rake/application.rb:100:in top_level' /home/maneesh/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.3.2/lib/rake/application.rb:78:inblock in run'
/home/maneesh/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.3.2/lib/rake/application.rb:176:in standard_exception_handling' /home/maneesh/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.3.2/lib/rake/application.rb:75:inrun'
/home/maneesh/.rvm/gems/ruby-1.9.3-p194/gems/rake-10.3.2/bin/rake:33:in <top (required)>' /home/maneesh/.rvm/gems/ruby-1.9.3-p194/bin/rake:23:inload'
/home/maneesh/.rvm/gems/ruby-1.9.3-p194/bin/rake:23:in <main>' /home/maneesh/.rvm/gems/ruby-1.9.3-p194/bin/ruby_executable_hooks:15:ineval'
/home/maneesh/.rvm/gems/ruby-1.9.3-p194/bin/ruby_executable_hooks:15:in `

'

I have the pkgr version 1.3.2 installed

~/scripts/ruby/myapp master $ bundle show
Gems included by the bundle:....................

  • mixlib-shellout (1.4.0)
  • multi_json (1.10.1)
  • pkgr (1.3.2)
  • polyglot (0.3.5)
  • rack (1.5.2)
  • rack-test (0.6.2)
    ......................

Thanks,
Maneesh

dependency issues

I have this in my .pkgr.yml:

addons:
  - mysql
targets:
  ubuntu-12.04:
    dependencies:
      - mysql-common
      - libpq5
      - libxslt1.1
      - libreadline5
      - libmysqlclient18
      - libevent-core-2.0-5
      - libevent-extra-2.0-5
after_install: packaging/debian/postinst

... but I get this error:

sudo dpkg -i cg-oneview_4.1.4-20140721194532_amd64.deb 
Selecting previously unselected package cg-oneview.
(Reading database ... 52818 files and directories currently installed.)
Unpacking cg-oneview (from cg-oneview_4.1.4-20140721194532_amd64.deb) ...
dpkg: dependency problems prevent configuration of cg-oneview:
 cg-oneview depends on libpq5; however:
  Package libpq5 is not installed.
 cg-oneview depends on libxslt1.1; however:
  Package libxslt1.1 is not installed.
 cg-oneview depends on libreadline5; however:
  Package libreadline5 is not installed.
 cg-oneview depends on libevent-core-2.0-5; however:
  Package libevent-core-2.0-5 is not installed.
 cg-oneview depends on libevent-extra-2.0-5; however:
  Package libevent-extra-2.0-5 is not installed.
dpkg: error processing cg-oneview (--install):
 dependency problems - leaving unconfigured
Processing triggers for ureadahead ...
Errors were encountered while processing:
 cg-oneview

Suggestions on how to handle dependencies ? ... other than doing them before hand.

Also, why is libpq5 a dependency as I'm using mysql and not postgres ?

Also, is .pkgr.yml and the packaging folder required in the rails app for pkgr to work ?
Thanks

Build failure

I've resolved my issues with building dependencies and installing gems, but when the package starts to actually build, I get the following error:

rm -rf vendor/bundle/ruby/1.9.1/cache vendor/bundle/ruby/1.9.1/doc
dpkg-buildpackage -us -uc -d
dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor):
dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor):
dpkg-buildpackage: source package myapp
dpkg-buildpackage: source version 0.1.0-1
dpkg-buildpackage: source changed by myname [email protected]
dpkg-buildpackage: host architecture i386
dpkg-buildpackage: warning: debian/rules is not executable: fixing that.
dpkg-source --before-build myapp-0.1.0
debian/rules clean
dh clean
dh: No packages to build.
dpkg-source -b myapp-0.1.0
dpkg-source: warning: no source format specified in debian/source/format, see dpkg-source(1)
dpkg-source: info: using source format `1.0'
dpkg-source: info: building myapp in myapp_0.1.0-1.tar.gz
dpkg-source: info: building myapp in myapp_0.1.0-1.dsc
debian/rules build
dh build
dh: No packages to build.
debian/rules binary
dh binary
dh: No packages to build.
dpkg-genchanges >../myapp_0.1.0-1_i386.changes
dpkg-genchanges: error: cannot read files list file: No such file or directory
dpkg-buildpackage: error: dpkg-genchanges gave error exit status 2
rake aborted!
Command failed with status (2): [
git archive HEAD --prefix=myapp...]

Tasks: TOP => pkgr:build:deb

I'm not very familiar with the process of building debian packages, and from the research I've done it seems like my Debian VM is setup correctly.

run rake task without sudo

Is there any way that my app user can run a rake task without using sudo? It seems like there should be a way.

BTW - pkgr is amazing. Works so well. Saved my ass.

sudo not yet on host

+ sudo apt-get install debhelper dpkg-dev ruby1.9.1-full libmysqlclient15-dev libxml2-dev libxslt-dev libsqlite3-dev -y
bash: line 4: sudo: command not found
Command failed with status (127): [
          git archive pkgr-master --prefi...]

probably have to add apt-get install sudo to some yaml config, because I'd hate to ssh in just to do that every time for provisioning... only half way through rtfm--probably close this issue myself in about 15 min

nokogiri issue

The build fails... reproducible.

Here is what I've tried so far:

root@a6bc9d0b759c:/# rails new test_app -d mysql
      create  
      create  README.rdoc

     [...] # usual output

      create  vendor/assets/stylesheets
      create  vendor/assets/stylesheets/.keep
         run  bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.2
Using minitest 5.6.1
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.1
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Using nokogiri 1.6.6.2

[...] # usual output

Using web-console 2.1.2
Bundle complete! 12 Gemfile dependencies, 54 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
         run  bundle exec spring binstub --all
* bin/rake: spring inserted
* bin/rails: spring inserted
root@a6bc9d0b759c:/# cd test_app/
root@a6bc9d0b759c:/test_app# pkgr package .
-----> Ruby app
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using 1.7.12
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j2 --deployment
       Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
       Fetching gem metadata from https://rubygems.org/...........
       Fetching additional metadata from https://rubygems.org/..
       Installing rake 10.4.2
       Installing i18n 0.7.0
       Installing json 1.8.2
       Installing minitest 5.6.1
       Installing thread_safe 0.3.5
       Installing tzinfo 1.2.2
       Installing activesupport 4.2.1
       Installing builder 3.2.2
       Installing erubis 2.7.0
       Installing mini_portile 0.6.2
       Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
       /tmp/d20150512-12309-1u7cvso/opt/test_app/vendor/ruby-2.0.0/bin/ruby extconf.rb
       checking if the C compiler accepts ... yes
       Building nokogiri using system libraries.
       libxml2 version 2.6.21 or later is required!
       *** extconf.rb failed ***
       Could not create Makefile due to some reason, probably lack of necessary
       libraries and/or headers.  Check the mkmf.log file for more details.  You may
       need configuration options.
       Provided configuration options:
       --with-opt-dir
       --without-opt-dir
       --with-opt-include
       --without-opt-include=${opt-dir}/include
       --with-opt-lib
       --without-opt-lib=${opt-dir}/lib
       --with-make-prog
       --without-make-prog
       --srcdir=.
       --curdir
       --ruby=/tmp/d20150512-12309-1u7cvso/opt/test_app/vendor/ruby-2.0.0/bin/ruby
       --help
       --clean
       --use-system-libraries=true
       --with-zlib-dir
       --without-zlib-dir
       --with-zlib-include
       --without-zlib-include=${zlib-dir}/include
       --with-zlib-lib
       --without-zlib-lib=${zlib-dir}/lib
       --with-xml2-dir
       --without-xml2-dir
       --with-xml2-include
       --without-xml2-include=${xml2-dir}/include
       --with-xml2-lib
       --without-xml2-lib=${xml2-dir}/lib
       --with-libxml-2.0-config
       --without-libxml-2.0-config
       --with-pkg-config
       --without-pkg-config
       --with-xslt-dir
       --without-xslt-dir
       --with-xslt-include
       --without-xslt-include=${xslt-dir}/include
       --with-xslt-lib
       --without-xslt-lib=${xslt-dir}/lib
       --with-libxslt-config
       --without-libxslt-config
       --with-pkg-config
       --without-pkg-config
       --with-exslt-dir
       --without-exslt-dir
       --with-exslt-include
       --without-exslt-include=${exslt-dir}/include
       --with-exslt-lib
       --without-exslt-lib=${exslt-dir}/lib
       --with-libexslt-config
       --without-libexslt-config
       --with-pkg-config
       --without-pkg-config
       Gem files will remain installed in /tmp/d20150512-12309-1u7cvso/opt/test_app/vendor/bundle/ruby/2.0.0/gems/nokogiri-1.6.6.2 for inspection.
       Results logged to /tmp/d20150512-12309-1u7cvso/opt/test_app/vendor/bundle/ruby/2.0.0/gems/nokogiri-1.6.6.2/ext/nokogiri/gem_make.out
       An error occurred while installing nokogiri (1.6.6.2), and Bundler cannot continue.
       Make sure that `gem install nokogiri -v '1.6.6.2'` succeeds before bundling.
       Bundler Output: Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
       Fetching gem metadata from https://rubygems.org/...........
       Fetching additional metadata from https://rubygems.org/..
       Installing rake 10.4.2
       Installing i18n 0.7.0
       Installing json 1.8.2
       Installing minitest 5.6.1
       Installing thread_safe 0.3.5
       Installing tzinfo 1.2.2
       Installing activesupport 4.2.1
       Installing builder 3.2.2
       Installing erubis 2.7.0
       Installing mini_portile 0.6.2

       Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

       /tmp/d20150512-12309-1u7cvso/opt/test_app/vendor/ruby-2.0.0/bin/ruby extconf.rb
       checking if the C compiler accepts ... yes
       Building nokogiri using system libraries.
       libxml2 version 2.6.21 or later is required!
       *** extconf.rb failed ***
       Could not create Makefile due to some reason, probably lack of necessary
       libraries and/or headers.  Check the mkmf.log file for more details.  You may
       need configuration options.

       Provided configuration options:
       --with-opt-dir
       --without-opt-dir
       --with-opt-include
       --without-opt-include=${opt-dir}/include
       --with-opt-lib
       --without-opt-lib=${opt-dir}/lib
       --with-make-prog
       --without-make-prog
       --srcdir=.
       --curdir
       --ruby=/tmp/d20150512-12309-1u7cvso/opt/test_app/vendor/ruby-2.0.0/bin/ruby
       --help
       --clean
       --use-system-libraries=true
       --with-zlib-dir
       --without-zlib-dir
       --with-zlib-include
       --without-zlib-include=${zlib-dir}/include
       --with-zlib-lib
       --without-zlib-lib=${zlib-dir}/lib
       --with-xml2-dir
       --without-xml2-dir
       --with-xml2-include
       --without-xml2-include=${xml2-dir}/include
       --with-xml2-lib
       --without-xml2-lib=${xml2-dir}/lib
       --with-libxml-2.0-config
       --without-libxml-2.0-config
       --with-pkg-config
       --without-pkg-config
       --with-xslt-dir
       --without-xslt-dir
       --with-xslt-include
       --without-xslt-include=${xslt-dir}/include
       --with-xslt-lib
       --without-xslt-lib=${xslt-dir}/lib
       --with-libxslt-config
       --without-libxslt-config
       --with-pkg-config
       --without-pkg-config
       --with-exslt-dir
       --without-exslt-dir
       --with-exslt-include
       --without-exslt-include=${exslt-dir}/include
       --with-exslt-lib
       --without-exslt-lib=${exslt-dir}/lib
       --with-libexslt-config
       --without-libexslt-config
       --with-pkg-config
       --without-pkg-config


       Gem files will remain installed in /tmp/d20150512-12309-1u7cvso/opt/test_app/vendor/bundle/ruby/2.0.0/gems/nokogiri-1.6.6.2 for inspection.
       Results logged to /tmp/d20150512-12309-1u7cvso/opt/test_app/vendor/bundle/ruby/2.0.0/gems/nokogiri-1.6.6.2/ext/nokogiri/gem_make.out
       An error occurred while installing nokogiri (1.6.6.2), and Bundler cannot continue.
       Make sure that `gem install nokogiri -v '1.6.6.2'` succeeds before bundling.
 !
 !     Failed to install gems via Bundler.
 !
     ! ERROR: compile failed

System info:

root@a6bc9d0b759c:/# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.2 LTS
Release:        14.04
Codename:       trusty
root@a6bc9d0b759c:/# dpkg -l | grep xml         
ii  libxml2:amd64                   2.9.1+dfsg1-3ubuntu4.4           amd64        GNOME XML library
ii  libxml2-dev:amd64               2.9.1+dfsg1-3ubuntu4.4           amd64        Development files for the GNOME XML library

The whole thing is based on this docker image: https://gist.github.com/MichaelSp/6219cb8230129c080651

Two questions:

  1. What is going on here?
  2. How can I preserve the /tmp dir so I can dig into question 1?

License missing from gemspec

RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.

via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can imagine, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.

There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!

Appendix:

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies

p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.

Custom upstart script

Hi! i have one question..

Can i add custom upstart script, for example i need restart my unicorn workers with zero downtime?

Support for latest Ruby 2.1.5

I'd like to have support for latest ruby 2.1.5. How to achieve this?
I don't know if this is feasible, but installing Ruby with rbenv would be awesome..

Btw: I added support for Ubuntu 14.10. Not heavily tested, but works for me. https://github.com/MichaelSp/pkgr Want to have an PR?

Command failed with status (127)

As the package is building on the Debian Squeeze VM that I've setup, it gets to a point and then fails with the following error message:

rake aborted!
Command failed with status (127)

The line directly before that was this:

gem1.9.1 install bundler --no-ri --no-rdoc --version 1.1.3 -i vendor/bundle/ruby/1.9.1
bash: line 5: gem1.9.1: command not found

It looks like it's trying to execute "gem1.9.1 install" instead of just "gem install".

Could this be an issue with my environment? I'm running 1.9.3p-194 with rubygems 1.8.24.

Thanks,
Aaron

No init script generated

Hello,
I have a web: entry in the Procfile:

web: bundle exec unicorn -E production -c config/unicorn.rb -D

but no init script is generated. This is for CentOS 6 specifying sysv-lsb-1.3 and upstart-1.5 do no make a difference.

I've ran the build with debug and found:

[2014-11-13T10:35:04+00:00] DEBUG: Adding # to initialization scripts
[2014-11-13T10:35:04+00:00] DEBUG: Adding # to initialization scripts

There is no init script generated.

I've run the same build on a Ubuntu system (14.04) and had the same results:

[2014-11-13T16:44:51+00:00] DEBUG: Adding # to initialization scripts
[2014-11-13T16:44:51+00:00] DEBUG: Adding # to initialization scripts

Cannot override name from .pkgr.yml

I'm experimenting with your gem on CI and I have a strange issue in the latest version. When building packages in CI server the working directory has a name I can't control easily (IIRC is generated from commit number) so I've pinned application name in .pkgr.yml file. However when I build packages generated name is not overridden. I did a quick test in a vagrant virtual machine using a directory named foo for sources and here's the result:

$ cat .pkgr.yml
name: my-app
notifications: false
before:
  - cp config/application.example.yml config/application.yml
targets:
  ubuntu-12.04:
    dependencies:
      - opendkim-tools # Used to verify DKIM signed messages


$ pkgr package . --force-os "ubuntu-12.04" --verbose --debug 2>&1 | tee log/pkgr.log
[2015-04-30T13:12:23+02:00] DEBUG: sh(git describe --tags --abbrev=0)
[2015-04-30T13:12:23+02:00] DEBUG: Initializing builder with the following config: #<Pkgr::Config verbose=true, debug=true, buildpacks_cache_dir="/home/fabio/.pkgr/buildpacks", architecture="x86_64", iteration="20150430131201", dependencies=[], build_dependencies=[], auto=false, clean=true, edge=true, env=[], force_os="ubuntu-12.04", version="0.0.0", name="foo">
[2015-04-30T13:12:23+02:00] DEBUG: sh(tar xzf /tmp/pkgr-tarball20150430-27230-vrp6uc.tar.gz -C /tmp/d20150430-27230-7e7r6y/opt/foo)
[2015-04-30T13:12:30+02:00] DEBUG: Loading ubuntu-12.04 from /tmp/d20150430-27230-7e7r6y/opt/foo/.pkgr.yml.
[2015-04-30T13:12:30+02:00] DEBUG: Configuration from file: {"name"=>"my-app", "notifications"=>false, "before"=>["cp config/application.example.yml config/application.yml"], "targets"=>{"ubuntu-12.04"=>{"dependencies"=>["opendkim-tools"]}}} - Distribution: "ubuntu-12.04".
[2015-04-30T13:12:30+02:00] DEBUG: Found .pkgr.yml file. Updated config is now: #<Pkgr::Config name="foo", notifications=false, before=["cp config/application.example.yml config/application.yml"], dependencies=["opendkim-tools"], verbose=true, debug=true, buildpacks_cache_dir="/home/fabio/.pkgr/buildpacks", architecture="x86_64", iteration="20150430131201", build_dependencies=[], auto=false, clean=true, edge=true, env=[], force_os="ubuntu-12.04", version="0.0.0">

Am I doing something wrong? Is this a bug?

.git directory inside RPM

Hi,

I would like to ask why a rpm package which is build by pkgr includes .git directory?
I checked in the code and I can see that there is just a cache. I do not see any value of having it inside the rpm package? Could you provide more information what for it is and if this can be removed?

Thanks a lot

PHP support

I have a really unexplained error

.pkgr.yml

buildpack: https://github.com/heroku/heroku-buildpack-php.git#master
env:
  - STACK=cedar

targets:
  centos-6:
    build_dependencies:
      - readline
      - readline-devel

which solves the readline.so.5 error

====== Attempt #1
-----> Fetching repository
Cloning into '/tmp/d20150522-24106-1mjf170/input'...
-----> Restoring cache
-----> Starting packaging process
-----> Fetching buildpack https://github.com/heroku/heroku-buildpack-php.git at master
-----> PHP app
 !     ERROR: Couldn't parse composer.lock; it must be valid JSON.
       Run 'composer update' to have it re-generated by Composer.
     ! ERROR: compile failed
       ! FAILED.
         Failure during packaging
       ! Please contact support.

And I composer updated, and checked with jsonlint, it is valid and both the composer.json and composer.lock are valid and in the root directory

Jessie/Debian 8 systemd not working

I don't know if it works for others, but it's not working for me with Debian 8. My .pkgr.yml looks like this:

$ more .pkgr.yml 
targets:
  debian-7:
  debian-8:
  centos-7:

I added in centos-7 (in the hope it fixes the issue) and previously I just had debian-8, but now I'm trying anything to get it to add in support.

Trying to bring the web server up (Rails app) on a Jessie/Debian 8 box gives this:

$ sudo myapp scale web=1
[sudo] password for andy.jeffries: 
Scaling up...
cp: cannot stat ‘/opt/myapp/vendor/pkgr/scaling/systemd/myapp.service’: No such file or directory

Any ideas? The scaling folder literally includes just this (no systemd folder at all):

$ tree /opt/myapp/vendor/pkgr/scaling
/opt/myapp/vendor/pkgr/scaling
└── upstart
    ├── myapp
    ├── myapp.conf
    ├── myapp-console.conf
    ├── myapp-console-PROCESS_NUM.conf
    ├── myapp-rake.conf
    ├── myapp-rake-PROCESS_NUM.conf
    ├── myapp-web.conf
    ├── myapp-web-PROCESS_NUM.conf
    ├── myapp-worker.conf
    └── myapp-worker-PROCESS_NUM.conf

1 directory, 10 files

DB authentication failed when running build

I got following message after updating gem 'devise_token_auth' to version 0.1.32:

PG::ConnectionBad: FATAL:  password authentication failed for user "user"

which executes method:

Changelog

It would be nice to have a Changelog that includes release notes for every release: the git history is not as useful.

JRuby support

Is JRuby support on the horizon for Packager.io? Is there anything necessary to get official support into pkgr, which I guess would be the first step? I need this urgently on a project and am trying to evaluate our options.

pkgr calling npm install without a HOME variable

I'm trying to build with something like this

export HOME=/home/ubuntu
pkgr package .

but I always get this error:

Error: node-gyp requires that the user's home directory is specified in either of the environmental variables HOME or USERPROFILE

v1.3.0 lacks the ubuntu 14.04 buildpack

the currently released gem does not work on Trusty Tahr. Maybe the 1.3.0 gem got built and distributed before the buildpack was added to the repo (it should be enough to push a new version eg v.1.3.1).

"Incorrect" /etc/debian_version

Hi,

I just did a fresh debian wheezy net install, and my /etc/debian_version looks wrong :

git@pkgr:/tmp/buildpacks$ cat /etc/debian_version 
7.2

When I do a pkgr package with a puts distribution.inspect inside builder.rb, I get :

git@pkgr:~$ pkgr package /tmp/buildpacks/blu-server/
#<Pkgr::Distributions::Debian:0x00000001de4738 @version="7.2\n">
/var/lib/gems/1.9.1/gems/pkgr-1.1.0/lib/pkgr/builder.rb:192:in `buildpack_for_app': undefined method `find' for nil:NilClass (NoMethodError)
    from /var/lib/gems/1.9.1/gems/pkgr-1.1.0/lib/pkgr/builder.rb:63:in `compile'
    from /var/lib/gems/1.9.1/gems/pkgr-1.1.0/lib/pkgr/builder.rb:23:in `call'
    from /var/lib/gems/1.9.1/gems/pkgr-1.1.0/lib/pkgr/dispatcher.rb:35:in `call'
    from /var/lib/gems/1.9.1/gems/pkgr-1.1.0/lib/pkgr/cli.rb:36:in `package'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /var/lib/gems/1.9.1/gems/pkgr-1.1.0/bin/pkgr:8:in `<top (required)>'
    from /usr/local/bin/pkgr:23:in `load'
    from /usr/local/bin/pkgr:23:in `<main>'

I've patched the debian_version file to be wheezy/7.2 and everything works fine now.

Any idea why the file is not like this from the beginning ?

Remote building isn't working for me

Maybe I was doing something wrong, but remote building just hung for me. I ran with the --debug flag and saw "Initializing builder with the following config..." but the tar just seemed to hang.

Does it work for you? If so, I can keep experimenting and improve this bug report.

Too many hard coded dependencies ?

Hi,

Could you explain why there are so many dependencies hard coded in lib/pkgr/data/distributions/debian/*dependencies.yml ?

As far as I understand it, I think there should be as few as possible dependencies in these 2 files, and each application must tell its own dependencies, right ?

Right now, my beautifully crafted package refuse to install because of libevent-1.4-2 which is not available on wheezy and it has many unnecessary dependencies like sqlite which I don't even use.

Is it safe to remove all dependencies from the pkgr configuration files ?

Build pipeline support

First, a regular reminder: pkgr and Packager.io are awesome!

We're delivering more and more of our software as packages using Packager.io, and one thing that is currently missing and preventing us from moving forward with other projects is integration into a CI pipeline. Ideally I would like to build and publish packages only for commits which passed CI.

It strikes me that perhaps Github's commit-marking API might be useful for this, such that Packager builds might only be triggered by a successful Travis CI build of a commit or similar workflow?

Additionally it would be nice for Packager to mark commits as built such that I could then monitor for that and use it to trigger deployments, or maybe even Packager could raise events of its own.

Ruby on Rails application fails to compile when setting ruby 2.1.3 or 2.1.2 on Gemfile

I am trying to package my app but I get the following error:


-----> Ruby app
-----> Compiling Ruby/Rails
 !
 !     Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 60 --max-time 300 https://s3-external-1.amazonaws.com/pkgr-buildpack-ruby/20140408175240-ubuntu-14.04/ruby-2.1.3.tgz -s -o - | tar zxf -' failed unexpectedly:
 !
 !     gzip: stdin: unexpected end of file
 !     tar: Child returned status 1
 !     tar: Error is not recoverable: exiting now
 !
  ! ERROR: compile failed

If I try to manually curl https://s3-external-1.amazonaws.com/pkgr-buildpack-ruby/20140408175240-ubuntu-14.04/ruby-2.1.3.tgz I get an access denied error.

This only happens if I have the ruby set in Gemfile to version 2.1.3 or 2.1.2.
If I remove that on my Gemfile it compiles normally, however, it will use ruby version 2.0.0

Unable to download Ruby buildpack

I get the following error when trying to build a package. I'll also note that another repo still builds fine, maybe because the buildpack is cached?

$ time pkgr package --verbose webservices-rb
-----> Ruby app
-----> Compiling Ruby/Rack
 !
 !     Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/pkgr-buildpack-ruby/20140408175240-ubuntu-14.04/ruby-2.1.0.tgz -s -o - | tar zxf -' failed unexpectedly:
 !     
 !     gzip: stdin: unexpected end of file
 !     tar: Child returned status 1
 !     tar: Error is not recoverable: exiting now
 !
 ! ERROR: compile failed

rake aborted! key not found

I'm following the setup guide and I'm at the part where I run the following command:

rake pkgr:bump:minor

When I do, I get the following error:

rake aborted!
key not found

Tasks: TOP => pkgr:bump:minor

I've initialized a git repo on my working directory and everything up until this point works. Any suggestions?

Can't use private repo in buildpack

Hi,

.pkgr.yaml:

buildpack: https://github.com/ddollar/heroku-buildpack-multi
env:
  - NODE_ENV=production
  - BUNDLE_WITHOUT=development:test
  - FETCHER_RETRY=1
  - CURL_CONNECT_TIMEOUT=10
  - SSH_AUTH_SOCK=$(ls -1 --sort t /tmp/ssh-*/agent.* | head -1)
before:
  #- SOCKET=$(ls -1 --sort t /tmp/ssh-*/agent.* | head -1)
  #- export SSH_AUTH_SOCK=$SOCKET
  #- eval `ssh-agent -s && ssh-add`
  #- ssh-add -L
  #- ssh -Tv [email protected] -o StrictHostKeyChecking=no

.buildpacks :

https://github.com/vjm/heroku-buildpack-nodejs-grunt-compass
https://github.com/vjm/heroku-buildpack-ruby#universal

Gemfile has a private repo:

gem 'gem_name_here', '>= 0.1.0', :git => '[email protected]:vjm03/gem_name_here.git', :branch => 'master'

I get an access denied (publickey) error when trying to run bundle install.

When I uncomment my before section of the .pkgr.yaml file to test my socket connection, I get

Running hook: "/tmp/before_hook20150724-5918-dwftnv.sh"
       Agent pid 6003
       The agent has no identities.
       OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
       debug1: Reading configuration data /etc/ssh/ssh_config
       debug1: /etc/ssh/ssh_config line 19: Applying options for *
       debug1: Connecting to bitbucket.org [131.103.20.168] port 22.
       debug1: Connection established.
       debug1: identity file /home/vagrant/.ssh/id_rsa type -1
       debug1: identity file /home/vagrant/.ssh/id_rsa-cert type -1
       debug1: identity file /home/vagrant/.ssh/id_dsa type -1
       debug1: identity file /home/vagrant/.ssh/id_dsa-cert type -1
       debug1: identity file /home/vagrant/.ssh/id_ecdsa type -1
       debug1: identity file /home/vagrant/.ssh/id_ecdsa-cert type -1
       debug1: identity file /home/vagrant/.ssh/id_ed25519 type -1
       debug1: identity file /home/vagrant/.ssh/id_ed25519-cert type -1
       debug1: Enabling compatibility mode for protocol 2.0
       debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
       debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
       debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000000
       debug1: SSH2_MSG_KEXINIT sent
       debug1: SSH2_MSG_KEXINIT received
       debug1: kex: server->client aes128-ctr hmac-md5 none
       debug1: kex: client->server aes128-ctr hmac-md5 none
       debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<3072<8192) sent
       debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
       debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
       debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
       debug1: Server host key: RSA 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40
       debug1: Host 'bitbucket.org' is known and matches the RSA host key.
       debug1: Found key in /home/vagrant/.ssh/known_hosts:1
       debug1: ssh_rsa_verify: signature correct
       debug1: SSH2_MSG_NEWKEYS sent
       debug1: expecting SSH2_MSG_NEWKEYS
       debug1: SSH2_MSG_NEWKEYS received
       debug1: Roaming not allowed by server
       debug1: SSH2_MSG_SERVICE_REQUEST sent
       debug1: SSH2_MSG_SERVICE_ACCEPT received
       debug1: Authentications that can continue: publickey
       debug1: Next authentication method: publickey
       debug1: Trying private key: /home/vagrant/.ssh/id_rsa
       debug1: Trying private key: /home/vagrant/.ssh/id_dsa
       debug1: Trying private key: /home/vagrant/.ssh/id_ecdsa
       debug1: Trying private key: /home/vagrant/.ssh/id_ed25519
       debug1: No more authentication methods to try.
       Permission denied (publickey).

When I run ssh -Tv [email protected] -o StrictHostKeyChecking=no, I get the following:

OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to bitbucket.org [131.103.20.168] port 22.
debug1: Connection established.
debug1: identity file /home/vagrant/.ssh/id_rsa type -1
debug1: identity file /home/vagrant/.ssh/id_rsa-cert type -1
debug1: identity file /home/vagrant/.ssh/id_dsa type -1
debug1: identity file /home/vagrant/.ssh/id_dsa-cert type -1
debug1: identity file /home/vagrant/.ssh/id_ecdsa type -1
debug1: identity file /home/vagrant/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/vagrant/.ssh/id_ed25519 type -1
debug1: identity file /home/vagrant/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<3072<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40
debug1: Host 'bitbucket.org' is known and matches the RSA host key.
debug1: Found key in /home/vagrant/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/vjm/.ssh/id_rsa
debug1: Remote: Forced command: conq username:vjm03
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Remote: Forced command: conq username:vjm03
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Authentication succeeded (publickey).
Authenticated to bitbucket.org ([131.103.20.168]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0
logged in as vjm03.

How can I solve this?

Default dependencies does not work

In yml file I have bith default dependencies and target specific dependencies, but after build my package contains only specific.

build command:

pkgr package ./frontend --debug --name=valo --auto [email protected] --vendor=IQReserve --version=1.3 --iteration=%build.counter% --description="Valo 1.2" --homepage="http://iqreserve.ru"

yml:

dependencies:
  - imagemagick
  - valo-backend
  - valo-block-storage
  - valo-node-storage
  - valo-messaging
targets:
  ubuntu-14.04:
    dependencies:
      - nginx-extras
  centos-7:
    dependencies:
      - nginx >= 1.9.4
build_dependencies:
  - nodejs-legacy
  - npm

check:

[teamcity@ip-172-31-30-60 valo-server]$ rpm -qRp valo-1.3-%build.counter%.x86_64.rpm 
openssl
readline
libxml2
libxslt
libevent
postgresql-libs
mysql-libs
sqlite
nginx >= 1.9.4
/bin/sh
/bin/sh
/bin/sh
/bin/sh
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
[teamcity@ip-172-31-30-60 valo-server]$ 

PORT problems again :(

Sorry, but I'm still struggling with PORT problems, though I did get past #81, which is great!

When I scale my web app to 2, here's what gets created for the second node:

cat /etc/systemd/system/onebody-web-2.service

[Unit]
StopWhenUnneeded=true
Requires=onebody-web.service
After=onebody-web.service

[Service]
Environment=PORT=3001
ExecStart=/usr/bin/onebody run web
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=%n

[Install]
WantedBy=onebody-web.service

The PORT is set in the environment as I expected, great!

However, when I start the service, this second node thinks the PORT is set to 3000. 😣

sudo systemctl status onebody-web-2

● onebody-web-2.service
   Loaded: loaded (/etc/systemd/system/onebody-web-2.service; enabled)
   Active: active (running) since Thu 2015-09-24 22:37:29 CDT; 293ms ago
 Main PID: 11433 (ruby)
   CGroup: /system.slice/onebody-web-2.service
           └─11433 ruby /opt/onebody/vendor/bundle/ruby/2.2.0/bin/thin start -p 3000

I've tracked the problem down (I think) to line 300 of the binary generated by pkgr, which reads:

exec chroot --userspec ${APP_USER}:${APP_GROUP} "/" sh -c "cd $(_p ${APP_HOME}) && $runnable"

This line doesn't seem to transfer the environment over? I'm a bash n00b, so I don't really know how to fix this.

But I did verify the PORT is read properly if I change this line to read:

exec chroot --userspec ${APP_USER}:${APP_GROUP} "/" sh -c "cd $(_p ${APP_HOME}) && PORT=3001 $runnable"

(I know that's lame, but just wanted to confirm where the environment isn't getting transferred over.)

Any thoughts on how to fix?

How can I select the install directory?

Looks like my rails app will be installed in a fixed location (/opt/myproject and /usr/bin/myproject). Just wonder can I change the final install directory?


Update:

Oh, nvm. Looks like it is hardcoded in the config class:

def home
  "/opt/#{name}"
end

Just wonder is there any plan to expose this option?

Thanks.

not working

On brand new Ubuntu 12.04 install:

sudo apt-get update
sudo apt-get install -y build-essential ruby1.9.1-full rubygems1.9.1
sudo gem install pkgr

ruby -v ... shows: ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]

But doing:
pkgr package path/to/app/repo
... I've tried several ruby versions in the app's Gemfile
ruby '1.9.3', ruby '2.0.0', and ruby '2.1.1'
and all have a similar result:

-----> Ruby app
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.1.1
bash: vendor/ruby-2.1.1/bin/ruby: cannot execute binary file
 !
 !     Problem detecting bundler vendor directory:
 !
  ! ERROR: compile failed

pkgr package path/to/app/repo --debug

[2014-07-19T02:52:42+00:00] DEBUG: sh(git describe --tags --abbrev=0)
[2014-07-19T02:52:42+00:00] DEBUG: Initializing builder with the following config: #<Pkgr::Config verbose=false, debug=true, buildpacks_cache_dir="/home/cleesmith/.pkgr/buildpacks", architecture="x86_64", iteration="20140719025242", dependencies=[], build_dependencies=[], auto=false, clean=true, edge=true, env=[], version="0.0.0", compile_cache_dir="/home/cleesmith/apps/cg_oneview/.git/cache", name="cg_oneview">
[2014-07-19T02:52:42+00:00] DEBUG: sh(tar xzf /tmp/pkgr-tarball20140719-25270-tbona1.tar.gz -C /tmp/d20140719-25270-1b8174q/opt/cg_oneview)
[2014-07-19T02:52:42+00:00] DEBUG: sh(dpkg -s 'curl' > /dev/null 2>&1)
[2014-07-19T02:52:42+00:00] DEBUG: sh(dpkg -s 'libmysqlclient-dev' > /dev/null 2>&1)
[2014-07-19T02:52:42+00:00] DEBUG: sh(dpkg -s 'libpq-dev' > /dev/null 2>&1)
[2014-07-19T02:52:42+00:00] DEBUG: sh(dpkg -s 'libsqlite3-0' > /dev/null 2>&1)
[2014-07-19T02:52:42+00:00] DEBUG: sh(dpkg -s 'libevent-dev' > /dev/null 2>&1)
[2014-07-19T02:52:42+00:00] DEBUG: sh(dpkg -s 'libssl-dev' > /dev/null 2>&1)
[2014-07-19T02:52:42+00:00] DEBUG: sh(dpkg -s 'libxml2-dev' > /dev/null 2>&1)
[2014-07-19T02:52:42+00:00] DEBUG: sh(dpkg -s 'libxslt1-dev' > /dev/null 2>&1)
[2014-07-19T02:52:42+00:00] DEBUG: sh(dpkg -s 'libreadline-dev' > /dev/null 2>&1)
[2014-07-19T02:52:42+00:00] DEBUG: sh(dpkg -s 'build-essential' > /dev/null 2>&1)
[2014-07-19T02:52:42+00:00] DEBUG: sh(dpkg -s 'libssl1.0.0' > /dev/null 2>&1)
[2014-07-19T02:52:42+00:00] DEBUG: sh(git fetch origin && git reset --hard $(git describe 'origin/487c79e8cc3ab038ac13fef82d1e59a9c6ac39e6' || git describe '487c79e8cc3ab038ac13fef82d1e59a9c6ac39e6'))
[2014-07-19T02:52:43+00:00] DEBUG: sh(find . -type f -print0 | xargs -0 perl -pi -e s,/app,/opt/cg_oneview,g)
[2014-07-19T02:52:43+00:00] DEBUG: sh(/home/cleesmith/.pkgr/buildpacks/builtin/3ddc51f773491b45757e39abe5bc7715d64620b8/heroku-buildpack-ruby/bin/detect "/tmp/d20140719-25270-1b8174q/opt/cg_oneview")
-----> Ruby app
[2014-07-19T02:52:43+00:00] DEBUG: Running "env -i PATH=\"$PATH\" BUILDPACK_VENDOR_URL=\"https://s3-external-1.amazonaws.com/pkgr-buildpack-ruby/20140408175240-ubuntu-12.04\" BUILDPACK_NODE_VERSION=\"0.6.8\" CURL_CONNECT_TIMEOUT=60 CURL_TIMEOUT=300 /home/cleesmith/.pkgr/buildpacks/builtin/3ddc51f773491b45757e39abe5bc7715d64620b8/heroku-buildpack-ruby/bin/compile \"/tmp/d20140719-25270-1b8174q/opt/cg_oneview\" \"/home/cleesmith/apps/cg_oneview/.git/cache\" "
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-1.9.3
 !
 !     Problem detecting bundler vendor directory:
 !
[2014-07-19T02:52:47+00:00] DEBUG: RuntimeError : compile failed
[2014-07-19T02:52:47+00:00] DEBUG: /var/lib/gems/1.9.1/gems/pkgr-1.3.2/lib/pkgr/buildpack.rb:49:in `block in compile'
[2014-07-19T02:52:47+00:00] DEBUG: /var/lib/gems/1.9.1/gems/pkgr-1.3.2/lib/pkgr/buildpack.rb:42:in `chdir'
[2014-07-19T02:52:47+00:00] DEBUG: /var/lib/gems/1.9.1/gems/pkgr-1.3.2/lib/pkgr/buildpack.rb:42:in `compile'
[2014-07-19T02:52:47+00:00] DEBUG: /var/lib/gems/1.9.1/gems/pkgr-1.3.2/lib/pkgr/builder.rb:88:in `compile'
[2014-07-19T02:52:47+00:00] DEBUG: /var/lib/gems/1.9.1/gems/pkgr-1.3.2/lib/pkgr/builder.rb:24:in `call'
[2014-07-19T02:52:47+00:00] DEBUG: /var/lib/gems/1.9.1/gems/pkgr-1.3.2/lib/pkgr/dispatcher.rb:33:in `call'
[2014-07-19T02:52:47+00:00] DEBUG: /var/lib/gems/1.9.1/gems/pkgr-1.3.2/lib/pkgr/cli.rb:121:in `package'
[2014-07-19T02:52:47+00:00] DEBUG: /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
[2014-07-19T02:52:47+00:00] DEBUG: /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
[2014-07-19T02:52:47+00:00] DEBUG: /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
[2014-07-19T02:52:47+00:00] DEBUG: /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
[2014-07-19T02:52:47+00:00] DEBUG: /var/lib/gems/1.9.1/gems/pkgr-1.3.2/bin/pkgr:8:in `<top (required)>'
[2014-07-19T02:52:47+00:00] DEBUG: /usr/local/bin/pkgr:19:in `load'
[2014-07-19T02:52:47+00:00] DEBUG: /usr/local/bin/pkgr:19:in `<main>'
  ! ERROR: compile failed

Suggestions ?

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.