Koozali.org: home of the SME Server

[NEW HOWTO] Rocket.Chat

guest22

Re: [NEW HOWTO] Rocket.Chat
« Reply #30 on: May 02, 2016, 04:30:25 AM »
Edit: At first glance, though, it seems to work with that property deleted as well.

Looking at the source code of smesever-webapps-common it seems that the priority evaluation order of db properties is:
1. ProxyPass
2. Rewrite
3. Redirect

So basically, next to the default command line arguments, only setting the ProxyPassTarget property would do the job in case of a ProxyPass situation.

ps. Need to add this to the wiki.

guest22

Re: [NEW HOWTO] Rocket.Chat
« Reply #31 on: May 02, 2016, 04:50:47 AM »
Somewhat surprisingly, the ProxyPass setup didn't interfere with getting a Let's Encrypt cert for that hostname either.

That may have to do with http://gitweb.firewall-services.com/?p=smeserver-webapps-common;a=patch;h=c200387012776f811e0b06408332add8535712eb

Offline ReetP

  • *
  • 3,738
  • +5/-0
Re: [NEW HOWTO] Rocket.Chat
« Reply #32 on: May 03, 2016, 06:50:49 PM »
Having a fiddle with this today.

As far as building a RPM the tricky bit is handling nodejs

For the moment I am looking at a manual install of node first, followed my the rpm which will take care of most of the rest and add some configurability.

Couple of things.

First is I cannot modify the installer.js as per the wiki. The forever service seems to install happily but......

And then this happens:

Code: [Select]
sed -i -e 's/(Oracle Linux)/(Oracle Linux)|(SME Server)/' \
/opt/rh/nodejs010/root/usr/lib/node_modules/forever-service/templates/sysvinit/installer.js

sed: can't read /opt/rh/nodejs010/root/usr/lib/node_modules/forever-service/templates/sysvinit/installer.js: No such file or directory

As a result I cannot see the startup script that it generates - I was wondering if it would be simpler to use our own (the forever service may not then be required) which could also then be modified as a template.

Any hints or tips ?

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

guest22

Re: [NEW HOWTO] Rocket.Chat
« Reply #33 on: May 03, 2016, 08:41:40 PM »
Something must have gone wrong in the previous step installing forever and forever-service, for those commands install the target file 'installer.js'

guest22

Re: [NEW HOWTO] Rocket.Chat
« Reply #34 on: May 03, 2016, 08:46:40 PM »
ps. from within a script you may have to use the following:


scl enable nodejs010 bash
npm install -g forever
npm install -g forever-service
exit 0


Offline ReetP

  • *
  • 3,738
  • +5/-0
Re: [NEW HOWTO] Rocket.Chat
« Reply #35 on: May 03, 2016, 08:49:34 PM »
ps. from within a script you may have to use the following:


scl enable nodejs010 bash
npm install -g forever
npm install -g forever-service
exit 0

Thanks. That seemed to work on the CLI - for some reason it failed before. Will re test.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

guest22

Re: [NEW HOWTO] Rocket.Chat
« Reply #36 on: May 03, 2016, 09:07:38 PM »
Appears to me that you did not reboot where the wiki said you should :wink:

guest22

Re: [NEW HOWTO] Rocket.Chat
« Reply #37 on: May 03, 2016, 09:17:05 PM »
Thanks. That seemed to work on the CLI - for some reason it failed before. Will re test.


From within an RPM, I guess a 'reboot' is not the preferred way :) So we need to make all boot scripts executable and execute them opposed to a reboot.


See Dan35 suggestion.

Offline ReetP

  • *
  • 3,738
  • +5/-0
Re: [NEW HOWTO] Rocket.Chat
« Reply #38 on: May 04, 2016, 12:23:38 AM »
Ok I am making a little progress.

I am not exactly sure how to get round the node js things so am tackling it a little differently by installing the node js bit first and then add the rpm to enable you to reconfigure stuff.

Basic code is here but I really wouldn't try it just yet ;-)

https://github.com/reetp/smeserver-rocketchat

As soon as I have something workable I'll post a link for those who like to break things  :hammer:
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

guest22

Re: [NEW HOWTO] Rocket.Chat
« Reply #39 on: May 04, 2016, 10:34:00 AM »
Koozali SME Server has been added to the PAAS deployment list by the Rocket.Chat team.

@Rocket.Chat team, Thanks!

https://rocket.chat/docs/master/installation/paas-deployments/koozali/

Offline ReetP

  • *
  • 3,738
  • +5/-0
Re: [NEW HOWTO] Rocket.Chat
« Reply #40 on: May 04, 2016, 10:56:48 AM »
Koozali SME Server has been added to the PAAS deployment list by the Rocket.Chat team.

@Rocket.Chat team, Thanks!

https://rocket.chat/docs/master/installation/paas-deployments/koozali/

Yes I saw that - nice one !

OK, I have a modifiable init script now. Need to sort some variables though.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: [NEW HOWTO] Rocket.Chat
« Reply #41 on: May 04, 2016, 03:09:30 PM »
ps. from within a script you may have to use the following:


scl enable nodejs010 bash
npm install -g forever
npm install -g forever-service
exit 0

Using npm should be avoided if possible. It means that you have software installed which isn't controlled and managed by rpm.

I know that npm is the 'standard' way that nodejs packages are installed, but it is problematic. See:

http://www.theregister.co.uk/2016/03/23/npm_left_pad_chaos/

guest22

Re: [NEW HOWTO] Rocket.Chat
« Reply #42 on: May 04, 2016, 03:12:22 PM »
Using npm should be avoided if possible. It means that you have software installed which isn't controlled and managed by rpm.

I know that npm is the 'standard' way that nodejs packages are installed, but it is problematic. See:

http://www.theregister.co.uk/2016/03/23/npm_left_pad_chaos/


Isn't this why we use Software Collections and all dependencies etc go into /opt/rh or other specific Software Collections directories?

Offline ReetP

  • *
  • 3,738
  • +5/-0
Re: [NEW HOWTO] Rocket.Chat
« Reply #43 on: May 04, 2016, 03:34:44 PM »
I've gotten rid of the forever-service module. and templated the initscript it generated

The forever module seems to be some sort of init wrappery type of thing. If I can figure how to dispense with it at some point I will, but I have spent my time on templating the other stuff so far.

Still working on it and will come back to this later.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Daniel B.

  • *
  • 1,699
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: [NEW HOWTO] Rocket.Chat
« Reply #44 on: May 04, 2016, 03:48:18 PM »

Isn't this why we use Software Collections and all dependencies etc go into /opt/rh or other specific Software Collections directories?

Nop, SCL are "just" rpms repo, and are fine (doesn't matter if they install in /usr or in /opt as long as they are managed by yum). Npm is NodeJS "package manager", just like cpan is to perl. When possible, it's best to install only RPM and not rely on this kind of package management. But with NodeJS, it's hard, most of the time, you have to use npm.
C'est la fin du monde !!! :lol: