Just some notes about OTOBO
OTOBO is an open source ticketing system that was derived from ((OTRS)) Community Edition.
Here are some ramblings.
- Required modules
- Using Regexp::Common and Regexp::Grammar
- use XML::LibXSLT, declare it as a requirement
- Log::Log4perl, RotherOSS/otobo#402
- DB
- last_insert_id(), RotherOSS/otobo#2232
- fetch-Loop, RotherOSS/otobo#1916
- Simplify SELECTS. RotherOSS/otobo#1916
- Some kind of OTOBO Middleware: RotherOSS/otobo#2229
- htmx: https://htmx.org/essays/when-to-use-hypermedia/
- require Perl 5.26 released in 2017
- https://metacpan.org/release/XSAWYERX/perl-5.26.0/view/pod/perldelta.pod
- indented heredocs: nice feature IMHO
- lexical subroutines: Should they be used?
- Stay ahead of the Perl toolchain: https://rjbs.cloud/blog/2023/05/pts-2023-lyon-amendment-2-5
- Support for
sd_notify()
in the OTOBO Daemon - Allow bypass of ObjectManager, e.g. Kernel::System::DateTime, RotherOSS/otobo#1112
- Streaming, RotherOSS/otobo#1348
- Cool URIs. RotherOSS/otobo#1599, RotherOSS/otobo#116, RotherOSS/otobo#1590
- Remove example config for FastCGI: RotherOSS/otobo#132, https://stackoverflow.com/questions/66417459/is-fcgi-dead-what-is-alternative-in-these-days
- less magic in Kernel::System::Main::Dump(), RotherOSS/otobo#694
- Unrelated:
- Take a look at issues for rel-10_0: https://github.com/RotherOSS/otobo/issues?q=is%3Aopen+is%3Aissue+milestone%3A%22OTOBO+10.0%22
- Adapt unit tests in OTOBO packages
- document deprecations and support policy: RotherOSS/otobo#1204
Some ideas I'm tinkering with.
- Database
- add SQLite backend, might be useful for devel and testing
- add H2 backend, interesting because of the compatability modes
- use DBD::MariaDB instead of DBD::mysql
- Implementation
- use
XML::Compile::WSDL11
for SOAP - use
Sereal
instead ofStorable
- use
Mail::Message and Mail::Transport
- use
Log::Log4perl
- use
CHI
- Enhance import statements: https://metacpan.org/pod/perlimports
- Debug modules: RotherOSS/otobo#1843
- use
- Testing
- maybe use Plack::Test
- check NYTProf again
- Devel::Cover
- Translation
- use N-tier translations, e.g. Portuguese falling back to Brazilian Portugues falling back to English
- A Louisiana Crèole translation
- API related
- specification as an OpenAPI document
- generate stubs, maybe for Raisin
- implement the backend
- Web related
- Websockets
- Check whether OpenGraph is supported
- Eliminate Apache altogether
- document how run OTOBO with plackup, without Docker
- Switch from REST::Client to Mojo::UserAgent in the generic interface
- Support for status 103 though the code is still experimental: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/103, https://metacpan.org/pod/Gazelle#psgix.informational
- Devops
- provide unit files for systemd
- Security
- Update CPAN::Audit
- File system
- When articles are stored in the file system the a directory tree with a lot of files is possible. This is a pain for backup. How about transfering old files to squashfs or such?
- Events
- Check whether the AsynchronousExecutor is good enough
- Alternatively switch to a real event queue like ActiveMQ or Minion
-
DBD::MariaDB instead of DBD::MySQL RotherOSS/otobo#1860
Rejected, because DBD::MariaDB has a different, more correct, take on encodings
-
use
Cpanel::JSON::XS
. RotherOSS/otobo#399Rejected because OTOBO is not prepared to deal with the differences with JSON::XS
-
use
Feature::Compat::Try
RotherOSS/otobo#1695Rejected, not until "try catch" is no longer experimental, use Try::Tiny in the mean time
-
use
Capture::Tiny
RotherOSS/otobo#1042Done, required in OTOBO 11.0
-
Use Github Issues for bugtracking
Done, see https://github.com/RotherOSS/otobo/issues/.
-
cpanfile generation from otobo.CheckModules.pl
Done. Even use Carton to some extent.
-
PSGI support
Done, see otobo.psgi.
-
Mojolicious
A sample had been done in /otobo/dbviewer. Removed in OTOBO 10.0.9.
-
Docker
Done, see https://hub.docker.com/repository/docker/rotheross/otobo.
-
The minimal version of Perl is now
5.24.0
.Say hi to the optional
postderef_qq
feature and the automatically activatedpostderef
feature. -
Minimal Apache Version defined as 2.4.
Hopefully gone altogether soon.
-
Support for Perl-Ex is removed
-
Define, document and check the minimal supported Linux and FreeBSD distributions
-
Define, document and check the minimal supported MySQL version
-
Define, document and check the minimal supported PostgreSQL version
-
Perl::Critic, part of the CodePolicy
-
Perl::Tidy, part of the CodePolicy
-
Test scripts can use
Test2::V0
andKernel::System::UnitTest
side by side -
favicon not needed as shortcut icon is set in HTMLHead.tt
-
Changed files in Kernel/Config/Files are reloaded in
Kernel::Config:Defaults::new()
-
In OTOBO 10.1 HTTP/2 is supported by the Nginx TLS terminating proxy
PSGI is now officially supported. But of course things can always be improved.
-
Make better use of middlewares
-
Saner support for webservices like SOAP, REST
-
Plack::Test
-
Streaming, chat server
Things that must be considered when porting OTOBO core or OTOBO modules to 10.1.x.
%ENV
no longer has the accustomed data. The Request-Object inKernel::System::Web::Request
must be used for that.- Encoding issues might be lurking. But the gut feeling is that things are more simple with PSGI.
- Care must be taken that HTTP headers are not set in the content.
Kernel::System::Web::Response
must be used. - There are dependencies on CPAN modules.
- Redirects must be done by calling K::O::H::Layout::Redirect()
- Fatal errors muse be thrown by calling K::O::H::Layout::FatalError()
- Printing to STDOUT is no longer a thing.
The scripts in bin/cgi-bin are now wrapping otobo.psgi.
Mojolicious itself is not based on PSGI. However there are adaptors that make a Mojo app behave like a PSGI app. Before migrating to Mojolicious there should be an analysis which benefits of Mojo warrant a migration. The PSGI interface is more simple and consistent than CGI. Therefore a migration to Mojo is more simple from a PSGI app than from a CGI app.I
It would be interesting to see how OTRS uses Mojolicious.
Kelp is a thin wrapper around Plack. This makes it IMHO an interesting option for OTOBO.
Deep support for PSGI in the 10.1 branch
These are the bash aliases I use, or at least have set up:
alias otobo_apache_start="sudo systemctl start apache2.service"
alias otobo_apache_status="sudo systemctl status apache2.service"
alias otobo_apache_restart="sudo systemctl restart apache2.service"
alias otobo_apache_stop="sudo systemctl stop apache2.service"
alias otobo_mysql="mysql -u otobo otobo -p"
alias otobo_docker_login_web="docker exec -it otobo_web_1 bash"
alias otobo_docker_login_db="docker exec -it otobo_db_1 bash"
alias otobo_docker_login_daemon="docker exec -it otobo_daemon_1 bash"
alias otobo_docker_login_redis="docker exec -it otobo_redis_1 sh"
alias otobo_docker_login_nginx="docker exec -it otobo_nginx_1 bash"
alias otobo_docker_login_selenium="docker exec -it otobo_selenium-chrome_1 bash"
alias otobo_docker_login_elastic="docker exec -it otobo_elastic_1 bash"
alias otobo_docker_update_local-rel-10_0="docker run -it --rm --volume otobo_opt_otobo:/opt/otobo otobo:local-rel-10_0 update"
alias otobo_docker_update_local-rel-10_1="docker run -it --rm --volume otobo_opt_otobo:/opt/otobo otobo:local-rel-10_1 update"
alias otobo_docker_update_10_0="docker run -it --rm --volume otobo_opt_otobo:/opt/otobo rotheross/otobo:devel update"
alias otobo_docker_update_10_1="docker run -it --rm --volume otobo_opt_otobo:/opt/otobo rotheross/otobo:devel-10_1 update"
alias otobo_docker_quick_setup="docker exec -t otobo_web_1 bash -c \"date ; hostname ; rm -f Kernel/Config/Files/ZZZAAuto.pm ; bin/docker/quick_setup.pl --db-password otobo_root --http-port 81\""
alias otobo_docker_test_suite="docker stop otobo_daemon_1 ; docker exec -t otobo_web_1 bash -c \" date ; hostname ; bin/docker/run_test_suite.sh\" ; date ; docker start otobo_daemon_1"
alias otobo_docker_test_progress="docker exec -t otobo_web_1 bash -c \" date ; ls -l prove_*.out ; wc -l prove_*.out ; grep '^not ok ' prove_*.out | grep -v -c '# TODO'\""
alias otobo_docker_backup="docker run -it --rm --volume otobo_opt_otobo:/opt/otobo --volume otobo_backup:/otobo_backup --network otobo_default otobo:local scripts/backup.pl -d /otobo_backup"
alias otobo_docker_restore="docker run -it --rm --volume otobo_opt_otobo:/opt/otobo --volume otobo_backup:/otobo_backup --network otobo_default otobo:local scripts/restore.pl -d /otobo_backup"
alias otobo_prove="prove -I . -I Kernel/cpan-lib -I Custom --verbose -r"
alias otobo_perl="perl -I . -I Kernel/cpan-lib -I Custom"
if [ "$color_prompt" = yes ]; then
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
PS1='${debian_chroot:+($debian_chroot)}bes:\[\033[01;34m\]\w\[\033[00m\] \[\033[01;32m\]$(__git_ps1 "(%s)")\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
find scripts/test/ -name '*.t' | xargs -L 1 perl -0777 -pi -e 's/\n\n\n\$Self->DoneTesting\(\);/\n\n\$Self->DoneTesting();/'