Page MenuHomePhabricator

have a phabricator test instance in labs that uses a working puppet role
Closed, ResolvedPublic

Description

There is not a single instance in labs that uses the "production" OR the "labs" puppet role for phabricator. They fail for different reasons.

We should get to a place where at least the "labs" role can be applied, even better would be to use the same role as in production and not even have "labs" roles in the first place.

Manually setup phab-XX instances have limited usefulness for testing because we never know if they are like production at all and after every change in production they need to be manually synced (which is super error prone).

It has been said that phab2001 could be used for this, but i also see a conflict here. It can either be the failover host or the test/staging host, but probably not both at the same time.

Event Timeline

Change 322980 had a related patch set uploaded (by Paladox):
Make setting ipv6 optional in phabricator

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

Change 322980 merged by Dzahn:
Phabricator: define vcs interfaces only when configured in hiera

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

Change 323146 had a related patch set uploaded (by Paladox):
Phabricator: Allow setting the mysql.user and mysql.pass in labs

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

Change 323146 merged by Dzahn:
Phabricator: Allow setting the mysql.user and mysql.pass in labs

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

Patch https://gerrit.wikimedia.org/r/#/c/324408/ and https://gerrit.wikimedia.org/r/#/c/324551/ allows you to configure a different domain through heira.

This class is all working now.

Working domain is http://phabricator-01.wmflabs.org/ using this puppet class.

Adding screenshot to show it working

Screenshot (15).png (768×1 px, 111 KB)

Paladox claimed this task.

CLosing as resolved, as it installs.

Creating a doc at

1I did this on Jessie so may be different on different distro's
2
31. apt-get install mariadb-server-10.1
4(set password to something like phabricator)
5
62. go to https://horizon.wikimedia.org/project/proxy/ and create a web proxy domain (on port 80)
7
82. Add this to Heira:<project name> (example phabricator)
9
10Note: Please change the ip to your instance ip otherwise this will not work, also change the domain name phabricator-01.wmflabs.org to your own domain which you created on step 2.
11
12"role::deployment::repo_config":
13 phabricator/deployment:
14 upstream: https://gerrit.wikimedia.org/r/p/phabricator/deployment.git
15deployment_server: localhost <-- keep localhost as changing this will fail in labs
16"scap::deployment_server": localhost <-- keep localhost as scap will fail if you change this
17"phabricator::trusted_proxies":
18 - 10.68.16.15
19"scap::server::keyholder_agents":
20 phabricator:
21 trusted_groups:
22 - 'project-%{::labsproject}'
23"scap::server::sources":
24 phabricator/deployment:
25 repository: phabricator/deployment
26phabricator_servers:
27 - phabricator.phabricator.eqiad.wmflabs <-- change phabricator.phabricator to instance_name.project_name
28
29"cache::misc::nodes":
30 eqiad:
31 - phabricator.phabricator.eqiad.wmflabs <-- change phabricator.phabricator to instance_name.project_name
32"phabricator::vcs::address::v4":
33 - 10.68.16.15 <-- change ip to the ip of your instance
34phabricator_app_user: root <-- change the MySQL user to the user you created in MySQL you choose
35phabricator_app_pass: phabricator <-- change the pass to the pass you choose
36phabricator_daemons_user: root <-- change the MySQL user to the user you created in MySQL you choose
37phabricator_daemons_pass: phabricator <-- change the pass to the pass you choose
38"phabricator::mysql_admin_user": root <-- change the MySQL user to the user you created in MySQL you choose
39"phabricator::mysql_admin_pass": phabricator <-- change the pass to the pass you choose
40phabricator_admin_user: root <-- change the MySQL user to the user you created in MySQL you choose
41phabricator_admin_pass: phabricator <-- change the pass to the pass you choose
42phabricator_domain: phabricator-01.wmflabs.org <-- change the domain you created on step 2
43phabricator_altdomain: phabricator-01.wmflabs.org <-- change the domain you created on step 2
44phabricator_diffusion_ssh_host: git-ssh.wmflabs.org
45"phabricator::vcs::listen_addresses":
46 - 10.68.16.15 <-- change ip to the ip of your instance
47
483. add this role::phabricator::main puppet role to your instance.
49
504. then run sudo puppet agent -tv
51
525. cd /srv/phab/phabricator
53
546. bin/storage upgrade (when asked input yes)
55
567. you should now be able to access your domain
57
58This is optional in case it does not work use this
59
60export PHABRICATOR_ENV=phd
61
62sudo -E bin/storage upgrade <-- command you run ie that

Can confirm we now have a jessie instance using the regular "role::phabricator::main" role and puppet run finishes without errors.

Paladox did the manual mariadb install on localhost but the rest is all from the prod role.

Very nice!

Linux phabricator 4.4.0-3-amd64 #1 SMP Debian 4.4.2-3+wmf7 (2016-11-04) x86_64
Debian GNU/Linux 8.6 (jessie)
phabricator is a Phabricator (Main) (role::phabricator::main)
The last Puppet run was at Thu Dec  1 18:56:10 UTC 2016 (26 minutes ago).

Change 327690 had a related patch set uploaded (by Dzahn):
phabricator: delete labs role

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

Change 327690 merged by Dzahn:
phabricator: delete labs role

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