This makes installation of web services written in PHP a lot easier since right now one can't do "git clone .." followed by "composer install".
"npm", for example, is installed. Would be nice to have composer as well.
This makes installation of web services written in PHP a lot easier since right now one can't do "git clone .." followed by "composer install".
"npm", for example, is installed. Would be nice to have composer as well.
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
toollabs: add composer to dev hosts | operations/puppet | production | +29 -0 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | bd808 | T55704 Packages to be added to toollabs puppet | |||
Resolved | valhallasw | T104789 Install composer on tools-login |
There's a package in debian-unstable: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=714118
Work around:
$ ssh tools-login $ become mytool # https://getcomposer.org/download/ $ mkdir bin $ curl -sS https://getcomposer.org/installer | php -- --install-dir=bin --filename=composer # Now installed in ~/bin/composer # Make sure your bash PATH includes "$HOME/bin". Set in .bashrc if needed. $ which composer # /data/project/:tool/bin/composer
Now composer is available to e.g.
(mytool at tools-login in ~)$ cd my-repo (mytool at tools-login in ~/my-repo)$ composer install --no-dev
After discussing with @Joe and @hashar:
We could use the latter method for tool labs as well. See https://github.com/wikimedia/operations-puppet/blob/00c433345214115e5a5b05eb6d83eedabfbf7110/modules/contint/manifests/slave-scripts.pp#L29 and https://github.com/wikimedia/operations-puppet/blob/acacf97e2df962fef83487a461f3559fa07e4d6f/modules/extdist/manifests/init.pp#L74 for current usage.
A few things I tried.
Backporting log for @hashar:
jsonlint:
after hacking the debian/rules, changing the version parsing to
| sed 's/.*(//' | sed 's/).*//')
works, but
fails
(this is after ca. 50 minutes of fiddling...)
php-cli-prompt:
worked immediately.
json-schema: same sed issue, but works with the same hack
composer:
This took me > 1 hour, so I gave up at this point.
Let's just do the git checkout + symlink option via puppet? We can make it a composer::install class or something and include it in both tools and integration
Change 246072 had a related patch set uploaded (by Merlijn van Deen):
toollabs: add composer to dev hosts
Notice: /Stage[main]/Toollabs::Composer/File[/srv/composer]/ensure: created Notice: /Stage[main]/Toollabs::Composer/Git::Clone[composer]/Exec[git_clone_composer]/returns: executed successfully Notice: /Stage[main]/Toollabs::Composer/File[/usr/local/bin/composer]/ensure: created
valhallasw@tools-bastion-01:~$ composer --version Composer version @package_branch_alias_version@ (@package_version@) @release_date@
uuuuh. According to the git log it's version 1.0.0-alpha10.