Setting up Galera Cluster is somewhat tricky at first, however there are many tutorials describing the process. Minimum cluster size size is two, so we need at least two servers running MariaDB instances, configured to interchange data with each other.
In this example configuration of two nodes, we assume that the
servers are connected over private network. This allows direct
connections without requiring SSH tunnels. The most important
parts is to enable listening on IP protocol and to configure
addresses and names of the cluster nodes. The config files are
similar for each nodes. To avoid editing distribution provided
configuration files, the new files are added
/etc/mysql/mariadb.conf.d directory, and on
both servers are named
layout is provided on Ubuntu system, different operating
system or other Linux distributions might have different
layout. The number 70 at the beginning ensures, that the file
will be included last. In fact configuration files could be split
into even more chunks, as only last three lines differ.
One of the tasks I've stumbled upon was to generate a set of Word
documents based on template. The template itself was a Microsoft
Word document with special tokens enclosed with curly braces.
These were added just in word processor by inserting some word
wrapped with said braces, for example
which later were replaced with proper address en-masse from CSV
data. For each row of CSV data, the tokens were replaced
with corresponding value and one document was created. This
article is mostly based on DOCX format, however similar
technique can be used to process ODT format as well
Normally, when you use computer, there are numerous background processes which allows you to use them as a services. That is, these processes are always ready to be used. Most obvious examples for web applications are HTTP Server, Database servers - MySQL, PostgreSQL, MongoDB, ElasticSearch or many, many other. When developing web application it is sometimes desirable to have strictly application-related service which cooperates with web application in some way. The use case I plan to describe here is a service that will react on RabbitMQ messages sent by front-end. The messages are generated by using web application and the reason for using message queue is that often these tasks require additional permissions or are time consuming.
The messages are the kind of triggers for batch processing, which might include:
- Generating configuration files
- Dumping database backups
- Getting SSL certificates
Total Commander is great file manager, however renaming files is annoying requiring slow double click. The fix for this issue is to create shortcut.
- From top menu navigate to Configuration > Change Settings Directly
- Ensure that opened file is wincmd.ini
- Search for
[shortcuts]in this file
If you have
F2=1002 in next line to have
something like the following:
If you don't have [shortcuts] part in configuration file just add the above snipped to the end of file.
Restart Total Commander - from now on, pressing F2 will trigger in-place rename.