PHABRICATOR on NS

has anyone had success installing phabricator on nethserver. or saying setting up a module for the suite.
it seems promising tool to make use of
https://www.phacility.com/phabricator/

UPDATE: there is a wiki with the procedure here https://wiki.nethserver.org/doku.php?id=ht_phabricator

It looks very cool!

You should’n have any problem installing it, just follow the Red Hat section from the documentation:
https://secure.phabricator.com/book/phabricator/article/installation_guide/

To enable mysql support, just execute: yum install nethserver-mysql.

Just make sure you’re using a “real computer”, and it’s OK if it’s running on Mac OS X Linux. IOW, the docs could use some work, but at least they get that FreeBSD isn’t Linux.

From the phbricator docs:

a normal computer to install it on (shared hosts and unusual environments are not supported) running some flavor of Linux or a similar OS;

I guess this could be a virtualized system.
Good they provide an install script, but I would prefer to see a step by step install instruction.

Yes, but also:

In seriousness, I’m not at all sure why they lump the Raspberry Pi in with routers and gaming consoles; unless Phabricator is much more computationally intensive than is apparent it ought to run there just fine.

That’s there as well–it specifies the components that need to be installed, then a git clone of three packages. I’m not sure that, in the case of Neth, the script really buys anything, as the rest of the required packages will (should) be installed through the Software Center anyway.

Edit: I’d also note that, while I appreciate the humor on the home page, it doesn’t do much to help me understand what the project is. But hey, it looks pretty.

1 Like

Think of it as bitbucket server on steroids,
it has an inbuilt chat and group function, as well as a wiki, basicall some small version of confluence, and also has a Kanban board… so no need for trello…

I keep getting a 502 error page when I try, I am not very sure why that is the case.
Also I tried using the script to install. that was a mistake… as far as It seemed. most of what was supposed to be installed did not install, I hve to try to install the other programs separately.

I’m playing with this just for the heck of it using their manual installation, and it seems like they’re going out of their way to make it a pain to install–or, to be perhaps nicer to those devs, their design doesn’t work well with the Neth paradigm. Need to install a web app? Should just be able to git clone/untar/otherwise extract it into a directory and be set. Nope, not here. You can set up a virtual host, but then you need to git clone three repos into that vhost’s directory, and then you need to mess around with the virtual host configuration to set its documentroot properly.

…and then the bin/storage script runs as root, but isn’t smart enough to use root’s .my.cnf file to get the password…

But at the moment I’m fighting with Nethserver’s handling of virtual hosts to get to the web interface at all.

1 Like

I believe in you @danb35 I know you can make it.
our entire development team at the office tried installing it on machines, some with nethserver, and others without nethserver just centos.
it was as painful, as you put it. we have tried with nginx, and also with apache, but were not able.
I tasked myself to trying installing it today, but I still face challenges I can not understand.

generally though itsa nice tool, I have taken it for a spin on the hosted version, which does not support ldap. etc…
for a small dev team, its worthwhile, it will save the trouble of using, jira, confluence and bitbucket…
its more of a one toll fits all.

if you can manage to set it up, thumbs up, you could then set a module in the software center… :wink:

OK, I have it up and running to the point where I can log in. I haven’t tried to do anything further with it yet. Starting with a clean Neth 7.5 installation with all updates so far, as well as a trusted TLS cert that includes phab.yourdomain. First, go to the software center and install MySQL/MariaDB and the Web Server (along with all its options). Then:
yum -y install git nano
cd /var/lib/nethserver/vhost
mkdir phab
cd phab
git clone https://github.com/phacility/libphutil.git
git clone https://github.com/phacility/arcanist.git
git clone https://github.com/phacility/phabricator.git
chown -R apache:apache .
cd phabricator
bin/config set mysql.pass $(cat /var/lib/nethserver/secrets/mysql)
bin/storage upgrade
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf.d/virtualhosts.conf/
cd /etc/e-smith/templates-custom/etc/httpd/conf.d/virtualhosts.conf/
nano 05_phabricator
Contents should look like:

<VirtualHost *:80>
  DocumentRoot "/var/lib/nethserver/vhost/phab/phabricator/webroot"
  ServerName phab.yourdomain
  Redirect / https://phab.yourdomain/
</VirtualHost>

<VirtualHost *:443>
  DocumentRoot "/var/lib/nethserver/vhost/phab/phabricator/webroot"
  ServerName phab.yourdomain
  RewriteEngine on
  RewriteRule ^(.*)$          /index.php?__path__=$1  [B,L,QSA]
  SSLEngine on
  <Directory "/var/lib/nethserver/vhost/phab/phabricator/webroot">
    Require all granted
  </Directory>
</VirtualHost>

expand-template /etc/httpd/conf.d/virtualhosts.conf
systemctl restart httpd

Browse to phab.yourdomain and set up an admin account. You’re on your own from here.

Edit: There’s something wrong with the virtualhost configuration that’s interfering with Nextcloud at least. I’ll have to see if I can figure that out.

3 Likes

I tried it and it’s working. I can reach nextcloud via domain1 and phab via domain2. BTW, great work so far!

I used <VirtualHost *:443> instead of <VirtualHost hostip:443>.

That did it, thanks. I’ll edit above.

I did some more cosmetics for getting the issues away in dashboard:

mkdir /var/repo

yum -y remove php-mysql
yum -y install php-mysqlnd python-pygments

config setprop php PostMaxSize 32
signal-event nethserver-php-update

config setprop mysqld MaxAllowedPacket 32M
signal-event nethserver-mysql-save

/var/lib/nethserver/vhost/phab/phabricator/bin/config set phabricator.base-uri 'https://yourdomain.tld/'

Create /etc/php.d/phabricator.ini with following content:

always_populate_raw_post_data = "-1"

Create /etc/my.cnf.d/phabricator.cnf:

[mysqld]
sql_mode=STRICT_ALL_TABLES
innodb_buffer_pool_size=1600M

Restart httpd and mysqld:

systemctl restart httpd mysqld

Finally enable syntax highlighting (pygments) via web UI, just click on the issue to configure it.

I’d caught some of those after installation, but this catches more. It still looks like the daemons need to be started manually after restart.

I’m not sure about the complaint about APC. When I do yum install php-apc, I get Package php-pecl-apcu-4.0.11-1.el7.x86_64 already installed and latest version. But Phabricator doesn’t seem to either see that it’s installed, or consider it to be equivalent.

You’re right, to start the daemons:

/var/lib/nethserver/vhost/phab/phabricator/bin/phd start

I even tried to compile it with pecl install apc but no luck so far.

This remains for me after installing account provider, which I am actually working on:

grafik

Sure, that’s easy enough–but it would be good to have it auto-start on boot. The “alternate file domain” sounds like it’s going to depend on having your file storage somewhere else, so it just might not be available for a simple installation.

The “large file storage” looks like it would be resolved by

chown apache:apache /var/repo
bin/config set storage.local-disk.path /var/repo
1 Like

Right, we have to put it to systemd and make a nethservice out of it or be lazy and put the line to /etc/rc.local…

Agree, it’s not mandatory.

For AD account provider I had to add the “ldap server require strong auth = no” to /var/lib/machines/nsdc/etc/samba/smb.conf, didn’t try TLS. I set auth.require-approval to false in web UI.

LDAP Hostname: ldap://ad.domain.local
LDAP Port: 389
Base Distinguished Name: cn=Users,dc=AD,dc=DOMAIN,dc=LOCAL
Search Attributes: cn
Username Attribute: cn
Realname Attributes: displayName
ActiveDirectory Domain: ad.domain.local

After switching to LDAP account provider, I couldn’t login as admin anymore but AD users working so I had to recover the admin:

/var/lib/nethserver/vhost/phab/phabricator/bin/auth recover admin

I am slightly lost here.

but thanks for setting it up,highly appreciated, will try to set it up on my side

the below cosemtics are they after the procedure of @danb35 or somewhere in the middle.