Page MenuHomePhabricator

Provide composer on the nodepool servers so OOjs UI can use it in the npm job
Closed, ResolvedPublic

Related Objects

Event Timeline

I doint think composer will be installed on nodepool because it requires php but as a work around we can setup an different npm test that can run a different test command so we can upgrade the tests that can be used In npm 4.3 and put the tests that carn't in the old test command for example

npm test will be for npm 4.3

npm test-old will be for 0.10.

Change 285236 had a related patch set uploaded (by Hashar):
dib: provide composer

https://gerrit.wikimedia.org/r/285236

Change 285235 had a related patch set uploaded (by Hashar):
contint: decouple slave_scripts and composer

https://gerrit.wikimedia.org/r/285235

hashar claimed this task.Apr 25 2016, 7:27 PM

Need some puppet refactoring then we will be able to provision composer using contint::composer which is merely git clone integration/composer and symlink from /usr/local/bin/composer .

Pending merge in puppet.git of the following patches:

https://gerrit.wikimedia.org/r/#/c/285226/ contint: drop integration/{phpcs,phpunit}
https://gerrit.wikimedia.org/r/#/c/285235/ contint: decouple slave_scripts and composer

Then we can have Nodepool instances to be provisioned via https://gerrit.wikimedia.org/r/285236

Change 285235 merged by Filippo Giunchedi:
contint: decouple slave_scripts and composer

https://gerrit.wikimedia.org/r/285235

Change 285236 merged by jenkins-bot:
dib: composer and Zend PHP for mw on Trusty

https://gerrit.wikimedia.org/r/285236

I have rebuild the Trusty image applying https://gerrit.wikimedia.org/r/285236 to the base image:

/Stage[main]/Mediawiki::Packages::Php5/Package[php5-mysql]/ensure: ensure changed 'purged' to 'present'
/Stage[main]/Mediawiki::Packages::Php5/Package[php5-geoip]/ensure: ensure changed 'purged' to 'present'
/Stage[main]/Mediawiki::Packages::Php5/Package[php5-xmlrpc]/ensure: ensure changed 'purged' to 'present'
/Stage[main]/Mediawiki::Packages::Php5/Package[php5-dbg]/ensure: ensure changed 'purged' to 'present'
/Stage[main]/Mediawiki::Packages::Php5/Package[php5-memcached]/ensure: ensure changed 'purged' to 'present'
/Stage[main]/Mediawiki::Packages::Php5/Package[php-wikidiff2]/ensure: ensure changed 'purged' to 'present'
/Stage[main]/Mediawiki::Packages::Php5/Package[php5-curl]/ensure: ensure changed 'purged' to 'present'
/Stage[main]/Mediawiki::Packages::Php5/Package[php5-fss]/ensure: ensure changed 'purged' to 'present'
/Stage[main]/Mediawiki::Packages::Php5/Package[php-luasandbox]/ensure: ensure changed 'purged' to 'present'
/Stage[main]/Mediawiki::Packages::Php5/Package[php5-redis]/ensure: ensure changed 'purged' to 'present'
/Stage[main]/Contint::Composer/File[/usr/local/bin/composer]/ensure: created
/Stage[main]/Contint::Composer/Git::Clone[jenkins CI Composer]/File[/srv/deployment/integration/composer]/ensure: created
/Stage[main]/Contint::Composer/Git::Clone[jenkins CI Composer]/Exec[git_clone_jenkins CI Composer]/returns: executed successfully
/Stage[main]/Mediawiki::Packages::Php5/Package[php5-intl]/ensure: ensure changed 'purged' to 'present'

./setup_node.sh complete (hostname: ci-trusty-wikimedia-1461689769)

Nodepool is stuck on the OpenStack API though

INFO urllib3.connectionpool: Starting new HTTP connection (1): labnet1002.eqiad.wmnet

So I can not verify right now whether composer works properly :(

jenkins@ci-trusty-wikimedia-84003:~$ which composer
/usr/local/bin/composer
jenkins@ci-trusty-wikimedia-84003:~$ composer --version
Composer version @package_branch_alias_version@ (@package_version@) @release_date@
jenkins@ci-trusty-wikimedia-84003:~$

Giving it a try against MediaWiki

jenkins@ci-trusty-wikimedia-84003:~$ git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git --reference /srv/git/mediawiki/core.git
Cloning into 'core'...
remote: Counting objects: 13409, done
remote: Finding sources: 100% (156/156)
remote: Getting sizes: 100% (76/76)
remote: Compressing objects: 100% (448143/448143)
remote: Total 156 (delta 58), reused 103 (delta 52)
Receiving objects: 100% (156/156), 402.75 KiB | 0 bytes/s, done.
Resolving deltas: 100% (74/74), completed with 35 local objects.
Checking connectivity... done.
Checking out files: 100% (6168/6168), done.

jenkins@ci-trusty-wikimedia-84003:~$ cd core
jenkins@ci-trusty-wikimedia-84003:~/core$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)

...

Writing lock file
Generating optimized autoload files
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating optimized autoload files
jenkins@ci-trusty-wikimedia-84003:~/core$ composer lint
PHP 5.5.9 | 10 parallel jobs
............................................................   60/2116 (2 %)
---
................                                             2116/2116 (100 %)

Checked 2116 files in 18.4 seconds
No syntax error found

Change 285451 had a related patch set uploaded (by Hashar):
dib: composer and Zend PHP for mw on Jessie

https://gerrit.wikimedia.org/r/285451

@Jdforrester-WMF that is for Trusty but the Nodepool npm jobs are running on Jessie.

I can not get Zend installed via mediawiki::packages::php5 on Jessie because php5-fss is still defined in Puppet but not available on that distro (being discussed on T95002).

For Jessie I will get composer installed and HHVM has the PHP interpreter. We will see.

Change 285514 had a related patch set uploaded (by Hashar):
dib: composer and HHVM on Jessie

https://gerrit.wikimedia.org/r/285514

Change 285451 abandoned by Hashar:
dib: composer and Zend PHP for mw on Jessie

Reason:
Went with HHVM as a PHP interpreter on Jessie with https://gerrit.wikimedia.org/r/#/c/285514/

https://gerrit.wikimedia.org/r/285451

Change 285514 merged by jenkins-bot:
dib: composer and HHVM on Jessie

https://gerrit.wikimedia.org/r/285514

Mentioned in SAL [2016-04-26T20:45:46Z] <hashar> Regenerating Nodepool Jessie snapshot to include composer and HHVM | T128092

Change 285516 had a related patch set uploaded (by Hashar):
dib: hhvm puppet class requires 'cron'

https://gerrit.wikimedia.org/r/285516

Change 285516 merged by jenkins-bot:
dib: hhvm puppet class requires 'cron'

https://gerrit.wikimedia.org/r/285516

Still a WIP :)

Did progress on provisioning PHP:

DistroZendHHVM
TrustyYesYes
JessieNOYes

So in theory if we set PHP_BIN=hhvm for the npm job, that should pass.

And composer is available. Will follow up on T128091.

hashar closed this task as Resolved.Apr 28 2016, 3:23 PM