What is Active Collab?

ActiveCollab is a project management software with a clean interface and is available as SaaS Cloud Hosted/Self-Hosted model.

AWS Resources used for this project were

  • EC2 — For Server and Application Hosting.
  • RDS — Managed Database.
  • ElastiCache — Caching.
  • ElasticSearch — Search and Indexing.
  • EBS — Block Storage for EC2 Instance.
  • EBS and RDS Snapshot — for easy restoration.

The experience

Active Collab is enterprise focused business app. Cloud and Self hosted model serve a purpose, Cloud is suitable for non-tech companies who don't want to focus at infrastructure, maintenance and uptime whereas Self hosted version is for businesses who want to avoid centrally hosted service i.e. full control of their Data, Hosting and Maintenance.

The application is wonderful to use once setup but I found their guides a bit lacking for AWS deployments.

We wanted to use nginx, but the documentation lacks the guide for it, here is a sample that anyone can refer.

#
# Default server configuration
#
server {
        listen 80 default_server;
        listen [::]:80 default_server;
#
# Public folder should be the document root.
#
        root /var/www/site-directory/public;

#
# Active collab setup stuff
#
        index router.php;
        access_log /var/log/nginx/activecollab-{version}-access.log;
        error_log /var/log/nginx/activecollab-{version}-error.log debug;
        server_name _;

#
# URL Rewrite
#
        location / {
            if (!-e $request_filename) {
                rewrite ^/assets/(.*)$ /assets/$1 last;
                rewrite ^/avatars/(.*)$ /avatars/$1 last;
                rewrite ^/wallpapers/(.*)$ /wallpapers/$1 last;
                rewrite ^/verify-existence$ /verify.php last;
                rewrite ^/proxy.php$ /proxy.php last;
                rewrite ^/api/v([0-9]*)/(.*)$ /api.php?path_info=$2&api_version=$1 last;
                rewrite ^$ /router.php last;
                rewrite ^(.*) /router.php?path_info=$1 last;
            }
        }

#
# PHP FPM Backend
#
        location ~ \.php$ {
            fastcgi_pass unix:/run/php/php{version}-fpm.sock;
            include         fastcgi_params;
            fastcgi_param   SCRIPT_FILENAME    $document_root$fastcgi_script_name;
            fastcgi_param   SCRIPT_NAME        $fastcgi_script_name;

            if (!-e $request_filename) {
                rewrite ^(.*) /router.php?path_info=$1 last;
            }
        }

}
And Setup instructions for ElasticSearch on AWS is not documented too.

You need to spin up ES instance on AWS and connect all the different services in a VPC lock them down using Security groups.

Once you set up the VPC(Kinda like VLAN) and SG(Firewall) correctly all the services will be accessible internally in AWS.

Overall experience was good and you can scale the app easily by resizing EC2, EBS and add load balancing.