developed since 2002, released under GPLv2 in 2006
Cyclone3 is extremely flexible and mature open source framework designed to develop content management systems, custom intranet applications, CLI and async job applications writen in Perl.
-
multi-engine
framework supports multiple engines for different kind of processes: generating webpages, async jobs, cli commands, ftp server, or any custom protocol ...
-
multi content-type CMS
publish engine generates content in XHTML, HTML5, SVG, XML, JSON, RPC/SOAP services, ...
-
multi-domain
one framework installation, unlimited number of domains and services.
-
multi-server
developed for HA cluster installations in master-master mode
- Perl & FastCGI
- MySQL/Percona
- RedisDB
- RabbitMQ
- ElasticSearch
- Template Toolkit 2
We are typically using Debian or Ubuntu for Cyclone3 Framework, so these are our two cents for Debian administrators. This installation process can take 15 minutes (without optimization).
Note: If any problem occurs, don't hesitate to ask us at open@comsultia.com.
This is just basic setup, but can be enhanced to get full Cyclone3 cluster.
- Linux operating system (mostly tested under Ubuntu Server LTS 14.04 and 16.04)
- git
- Perl >= 5.12
- MySQL >=5.5
- Apache2
- root access (no root access? forget about using Cyclone3)
Create cyclone3 user
groupadd cyclone3;useradd cyclone3 -g cyclone3 -G www-data,crontab,users -s /bin/bash -mAdd Cyclone3 binaries location to PATH and export CYCLONE3PATH. Edit /etc/profile file, or add this content into /etc/profile.d/cyclone3.sh file
CYCLONE3PATH="/srv/Cyclone3"
export CYCLONE3PATH
PATH="$PATH:$CYCLONE3PATH/.bin"Apply environment variables
source /etc/profileGet Cyclone3 Framework source codes and binaries from git to directory /srv/Cyclone3 (you can use different directory, but this is default and optimal setup). Don't create /srv/Cyclone3 as symlink.
You can clone from http://bit.comsultia.com/scm/cyc/framework.git repository (Comsultia) or https://github.com/rfordinal/cyclone3-framework.git (github)
Please, don't download as zip archive, the upgrade process after installation is provided using git too.
git clone http://bit.comsultia.com/scm/cyc/framework.git /srv/Cyclone3
chmod 770 /srv/Cyclone3
chown www-data:www-data /srv/Cyclone3Required libraries
apt-get install build-essential libinline-perl libmime-perl libdatetime-perl \
libxml-generator-perl libxml-xpath-perl libxml-simple-perl libsoap-lite-perl \
libnet-smtpauth-perl libstring-crc32-perl libfcgi-perl libcgi-fast-perl \
libparallel-forkmanager-perl libfile-type-perl \
libjson-any-perl perlmagick libtime-modules-perl libxml-libxml-perl \
libjson-perl libproc-processtable-perl libtie-ixhash-perl libmoosex-getopt-perl \
libanyevent-perlPerl libraries not available in Debian/Ubuntu as .deb packages
cpan CPAN
cpan Template::Stash::XS
cpan Digest::MurmurHash
cpan Digest::SHA1
cpan AnyEvent::ForkManager
cpan Sys::Info
cpan Net::RabbitFootMySQL >= 5.5 is the main database for Cyclone3, but connection to another type of databases can be configured too.
We recommend Percona Server (http://www.percona.com/)
sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2AAdd this to /etc/apt/sources.list, replacing VERSION with the name of your distribution:
deb http://repo.percona.com/apt VERSION main
sudo apt-get update && sudo apt-get install percona-server-server percona-server-clientLog in to MySQL and create Cyclone3 user (To exit MySQL type exit)
mysql -h localhost -u root -pPassworYouSetEarlierGRANT ALL PRIVILEGES ON *.* TO 'Cyclone3'@'localhost' WITH GRANT OPTION \
MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;mysql -h localhost -u Cyclone3 < /srv/Cyclone3/_data/TOM.sqlapt-get install redis-server
cpan RedisDBOptimize redis.conf
# much much faster
unixsocket /var/run/redis/redis.sock
unixsocketperm 777
# save io :)
save 86400 1
save 7200 1000000
save 3600 2000000
# save CPU
rdbcompression noCopy configuration template file to destination
cp /srv/Cyclone3/_config/TOM.conf.tmpl /srv/Cyclone3/_config/TOM.confThis is minimal working configuration example:
#!/usr/bin/perl
package TOM;
use strict;
$TOM::domain='nameofmycluster'; # "domain" of cyclone3 cluster nodes
$TOM::contact{'from'}='cyclone3@'.$TOM::hostname;
$TOM::contact{'_'}='cyclone3@'.$TOM::hostname; # default email to send notifications about health
# sending email over ...
$TOM::smtp_host='localhost';
# default databases
$TOM::DB{'main'}= {
host =>"localhost",
user =>"Cyclone3",
pass =>"",
sql => [
"SET NAMES 'utf8'",
"SET CHARACTER SET 'utf8'",
"SET character_set_connection='utf8'",
"SET character_set_database='utf8'",
]
};
$TOM::DB{'stats'}=$TOM::DB{'main'};
$TOM::DB{'sys'}=$TOM::DB{'main'};
# apache2 user
$TOM::user_www="www-data";
#$Ext::Redis::host='/var/run/redis/redis.sock';
$Ext::Redis::host='localhost:6379';
1;# don't remove me!Read more about all configuration options in TOM.conf
Check installed MySQL database scheme
tom3-chtablesCheck files permissions
tom3-chfilesInstall apache2 and mod_fcgid
apt-get install apache2
apt-get install libapache2-mod-fcgidAdd www-data user to cyclone3 group
usermod -a -G cyclone3 www-dataCopy virtualhost default template
cp /srv/Cyclone3/_config/httpd.virtual.conf.tmpl /srv/Cyclone3/_config/httpd.virtual.confSymlink configuration files
ln -s /srv/Cyclone3/.core/_config/httpd.conf /etc/apache2/conf-enabled/00-cyclone3.conf
ln -s /srv/Cyclone3/_config/httpd.virtual.conf /etc/apache2/sites-enabled/01-cyclone3-virtual.confEnable mod_expires and mod_rewrite
cd /etc/apache2/mods-enabled
ln -s ../mods-available/expires.load .
ln -s ../mods-available/rewrite.load .Restart apache2
service apache2 restartNow is everything configured properly, the next step is configuration/installation of first domain service (virtualhost)
- TODO: RabbitMQ and job.worker[d]
- TODO: ElasticSearch
- TODO: rlog ElasticSearch
- TODO: Cluster setup