Giter Site home page Giter Site logo

tjtoml / mattermost-ansible Goto Github PK

View Code? Open in Web Editor NEW
126.0 8.0 78.0 81 KB

Ansible playbook to provide a turnkey solution for the Team Edition of Mattermost

License: MIT License

Shell 69.79% HTML 30.21%
mattermost ansible playbook mattermost-ansible ubuntu standalone postgresql redhat centos debian

mattermost-ansible's Introduction

Maintainer Wanted

If someone would like to take over the maintenance of this repo, please submit an issue or PR. I originally wrote this as a way to learn ansible when I was in college, and no longer have the time/inclination to maintain it now that I have a real job - mostly working with ansible.

mattermost-ansible

This is an Ansible Playbook that installs a standalone version of Mattermost, which is an open-source Slack alternative. This playbook installs Mattermost version 4.3.2 (Team Edition) by default.

It downloads the binary from mattermost.org. If you need to install the Enterprise edition, consult the Mattermost documentation. This playbook installs

  • postgresql - Database Server
  • nginx - Web Server (acts as a reverse proxy)
  • SSL certificates are automatically generated from the letsencrypt project. A cron job is created that automatically renews the SSL certificates once a month.

This playbook currently works with

  • Ubuntu 14.04.5 LTS, Trusty Tahr (DigitalOcean)
  • Ubuntu 16.04.2 LTS, Xenial Xerus (DigitalOcean)
  • CentOS 6.9 (DigitalOcean)
  • CentOS 7.3 (DigitalOcean)
  • Red Hat Enterprise Linux 6.9 (Santiago) (Installed from RedHat DVD on a Vultr VPS)
  • Red Hat Enterprise Linux 7.3 (Maipo) (Installed from RedHat DVD on a Vultr VPS)
  • Debian 7.11 Wheezy
  • Debian 8.8 Jessie (thanks fgbreel!)

I have no reason to think that versions of these operating systems installed locally or by other providers will not work, but I have not tested them. If you are going to run into an issue, it will probably be with the firewall, as DigitalOcean has very permissive firewall rules by default. If you are having an issue, try opening port 80 and 443.

Distro Specific Instructions/Info

RHEL 6.8

The playbook completely disables the iptables firewall. This is not strictly necessary, but I hate iptables with my whole body and I was tired of fighting with it. If you want or need it, you should re-enable it, but none of the required ports will be open. Even better, submit a PR that fixes this issue (so I don't have to do it).


Usage

  • Install ansible with your package manager of choice. Ansible can also be installed via pip. This playbook was tested with Ansible 2.3.1 If you can, I would recommend running the most recent version of ansible.

  • Clone this repository.

  • Make sure that the server you are installing Mattermost is properly configured with a FQDN. You should also have root access via ssh. Reverse DNS should also be properly configured for letsencrypt to work. If you are using a cloud hosting provider, this should be trivial.

  • Edit play.yml and change the vars to reflect any changes you may want to make for your system. This playbook does not do a complete installation with full configuration of all of the Mattermost options, but rather installs it to the point where you can edit the relevant settings from within the web browser.

  • You should always edit the email address and db_password fields.

  • Create a hosts file in the project directory. It only needs to contain one line, which is the IP address of the server you wish to install Mattermost on.

  • Run ansible-playbook play.yml -i hosts from the top of level of the project directory.

  • Navigate to the FQDN of your server in a web browser. Consult the Mattermost documentation for further configuration options.


Post-Install

If you are planning to use MatterMost for any length of time, you should probably change the location of the data directory. A large volume of attached block storage would not be a bad idea. A working email server should also be configured for email notifications and invites. You can do most of this from within the browser without manually editing configuration files.


Contributing

Please submit pull requests! They make my day.

Moving Forward

I am currently working on porting this standalone playbook into a more defined Ansible role with a complete implementation of all the options in the Mattermost config file. You can check on the status of this project here.

mattermost-ansible's People

Contributors

ctownsen357 avatar fgbreel avatar it33 avatar joshuaclausen avatar luclis avatar mikeclark avatar teadur avatar tjtoml avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mattermost-ansible's Issues

[APPRECIATION POST] Great work!

Hey Tyler,

Here at Openbook we just set up a Mattermost server in less than an hour thanks to your work.

We thought would be nice to show some appreciation!

Thanks for making this available for everyone, you rock!

SSL certificates : letsencrypt doesn't like private clouds

@tjtoml : I could not make letsencrypt work from a private cloud because of letsencrypt limitations to public DNS names and IP networks.
I managed to write a role that uses ansible's crypto modules and creates a self-signed certificate.
See https://docs.ansible.com/ansible/2.4/list_of_crypto_modules.html
It installs python crypto requirements.
You can switch between both options with selfsigned_ssl_cert: true as a variable in the playbook. This enables my new role, disables letsencrypt and cron roles, and adapts nginx config from template.
Now it works for me. Are you interested in a pull request ?

Letsencrypt task fails complaining that "Name does not end in a public suffix".

This might be a problem with my config, but I can verify with dig -x that reverse DNS is set up for our FQDN.

Steps to reproduce:

*Create hosts file with IP (not url) of server
*Modify db password in play.yml and cert_email_address
*Run targeting Amazon EC2 Ubuntu host

Error: Error creating new authz :: Name does not end in a public suffix

Upcoming breaking change when using Mattermost with a reverse proxy

My name is Jason Blais and I'm a product manager for the Mattermost open source project.

Mattermost is moving to new APIv4 endpoints, which will allow for more powerful integrations and server interaction.

As part of this move, we will be moving the WebSocket endpoint to APIv4 in Q3 of 2017 (tentatively scheduled for July 16, 2017 release). This will result in a breaking change for deployments using a reverse proxy.

For those configuring NGINX proxy, just a single one-line change is required, replacing the location /api/v3/users/websocket { line with location ~ /api/v[0-9]+/(users/)?websocket$ { in the /etc/nginx/sites-available/mattermost NGINX configuration file. We've noted this in our documentation.

I'm opening an issue so we can discuss if any changes are needed for the Ansible package, as we weren't sure what kind of configuration is recommended on your end.

Interested in becoming a maintainer

Hey there I'm new to Devops and what not , but I've been playing around with docker, ubuntu, etc I would like to become a maintainer for this project. Might need to learn the ins & outs first, but open to learn.How can I start ?

Thanks

Maintener Wanted

Hi there,

I've got some spare time so I can manage your repository as you requested. You've got somes pretty awesome PR like #26 and I'ld be gratefull to include them in Master.

Best Regards,
Luclis.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.