This site uses cookies for analytics. By continuing to browse this site, you agree to use this.  Learn more

How to install Rocket.Chat using cdist

New cdist type installs Rocket.Chat!

Posted on May 6, 2016

This articles describes how to setup Rocket.Chat using cdist configuration
management tool. It is assumed that you are familiar with cdist.


Introduction

Rocket.Chat is a Web Chat Server, a great solution for communities and companies wanting to privately host their own chat service.


About __ungleich_rocketchat type

__ungleich_rocketchat type installs and configures Rocket.Chat. It first sets up all Rocket.Chat requirements, mongodb, nodejs and nginx. Then it sets up reverse proxy via nginx. You can also specify bindip parameter to bind Rocket.Chat to specified address/interface. If, for example, bindip parameter is set to localhost then Rocket.Chat is only accessible on its port from localhost. From the internet it is accessible through the port configured in nginx (default 80 forwarded to 443). The installation uses debian's snakeoil SSL cert. Please adapt nginx config to use your own SSL cert paths. This type currently supports only Debian 8 target host.


Requirements

  • Source host with cdist - this is the host you will use to configure Rocket.Chat on target host.
  • Rocket.Chat cdist type on source host.
  • Target host with ssh access - this is the host you want to setup Rocket.Chat on (target host and source host can be the same machine).


Rocket.Chat configuration with cdist

It is assumed that you already have source host with cdist and target host with ssh access ready.

First, you need to get __ungleich_rocketchat type, let's say into cdist conf/type directory:

git clone https://github.com/ungleich/__ungleich_rocketchat.git

Then you need entry in your manifest for target host:


case "$__target_host" in
    localhost)
        __ungleich_rocketchat /opt/rocketchat \

            --admin-email admin@server.com \
            --admin-pass secret --bindip localhost
    ;;
esac


Rocket.Chat can now be configured by running:

cdist config -v localhost

After cdist has finished it takes a minute or two before all is up and running. Just try to connect to https://localhost. You can now login with your admin account and further configure it.


What follows?

In a week we will write a followup on our switching to Rocket.Chat experience.