Showing entries 1 to 10 of 21
10 Older Entries »
Displaying posts with tag: FreeBSD (reset)
How to Run Orchestrator on FreeBSD

In this post, I am going to show you how to run Orchestrator on FreeBSD. The instructions have been tested in FreeBSD 11.3 but the general steps should apply to other versions as well.

At the time of this writing, Orchestrator doesn’t provide FreeBSD binaries, so we will need to compile it.

Preparing the Environment

The first step is to install the prerequisites. Let’s start by installing git:

[vagrant@freebsd ~]$ sudo pkg update
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100% 944 B 0.9kB/s 00:01
Fetching packagesite.txz: 100% 6 MiB 492.3kB/s 00:13
Processing entries: 100%
FreeBSD repository update completed. 31526 packages processed.
All repositories are up to date.

[vagrant@freebsd ~]$ sudo pkg install git
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
New …
[Read more]
Obtaining an active-passive ProxySQL on FreeBSD

When designing a highly-available MySQL architecture, having a proxy to route the traffic to the appropriate instances is crucial to achieve transparent (or almost) failovers/switchovers. ProxySQL, a popular open source, SQL-level proxy is a great choice for this, and even though an experimental clustering feature is available, we could follow a simpler active-passive approach too, based on Common Address Redundancy Protocol (CARP), which will also provide a highly available IP for the applications to connect.

Solution overview

As mentioned before, this setup relies on a shared IP configured through CARP on the two hosts that will be running ProxySQL. CARP configuration is outside the scope of this post but the steps are on available on the FreeBSD documentation.

We then need to make sure all ProxySQL configuration changes performed on the …

[Read more]
MySQL on FreeBSD: old genes

Maintaining mission critical databases on our pitchfork wielding brother, the “Daemon” of FreeBSD, seems quite daunting, or even absurd, from the perspective of a die-hard Linux expert, or from someone who has not touched it in a long time. The question we ask when we see FreeBSD these days is “why?”.  Most of my own experience with FreeBSD was obtained 10-15 years ago.  Back then, in the view of the team I was working on, a custom compiled-from-source operating system like FreeBSD 5.x or 6.x was superior to a Linux binary release.

Package managers like YUM and APT were not as good.  They did not always perform MD5 checks and use SSL like today’s versions. RedHat wasn’t releasing security updates 5 minutes after a vulnerability was discovered. Ubuntu didn’t exist. Debian stable would get so very old before receiving a new version upgrade. FreeBSD was a great choice for a maintainable, secure, free open …

[Read more]
The USE Method: FreeBSD Performance Checklist

In this post, I’ll provide an example USE Method-based performance checklist for FreeBSD, for identifying common bottlenecks and errors. This is intended to be used early in a performance investigation, before moving onto more time consuming methodologies. This should be helpful for anyone using FreeBSD, especially system administrators.

This was developed on FreeBSD 10.0 alpha, and focuses on tools shipped by default. With DTrace, I was able to create a few new one-liners to answer some metrics. See the notes below the tables.

Physical Resources

component type metric
CPU utilization system-wide: vmstat 1, “us” + “sy”; per-cpu: vmstat -P; per-process: top, …
[Read more]
On operating system upgrades and a packager’s nightmare

A fairy tale

Once upon a time I did an operating system upgrade, a minor one that should do no harm, but just get me up to date by fixing any bugs in the version I had been using. It seemed like a good idea.

All seemed to be fine. I use a package provided by an external vendor and not the one produced by the operating system provider as this vendor provides a newer version of the package and I need that. The vendor has to make his package fit in the os environment his package is built for and normally does a pretty good job.

I use automation to build my systems and when I built a new one some issues appeared. Related to the new version of the OS the provider had enhanced one of his packages and the installation pulled in new dependencies. The install of the external package I use then broke as it conflicted with the new dependency provided by the OS.  While a workaround is possible: uninstall …

[Read more]
Moved to a new hosting provider

Again, I have moved to a new hosting provider after my free-tier with Amazon EC2 expired.  As usual I was looking for a good VPS provider with a decent price, providing good support and in particular a provider supporting FreeBSD, my favorite OS for server (for desktop I still prefer GNU/Linux.)

This time I have carefully reviewed many options and have finally settled with RootBSD, one of the reputed VPS hosting providers if you are choosing FreeBSD as your server OS.  One of the prime reasons for choosing FreeBSD is its performance, stability and the FreeBSD ports system.

Although my …

[Read more]
[FreeBSD] unicorn.god

I had a very strange problem concerning my Ruby on Rails installation, using FreeBSD, nginx, Unicorn and God.

When starting god from the command line as root, everything worked. However, as soon as I placed the god command into /etc/rc.local or a even service file in /usr/local/etc/rc.d, god didn’t start the Unicorn server but showed exit code 127 for “bundle exec unicorn -E production -c config/unicorn.rb”.

So I added a log directive to the god configuration and looked at the log file. It said:

env: ruby1.9: No such file or directory

Then I changed the god configuration to include /usr/local/bin in the PATH and now everything works. Here my configuration file:

RAILS_ROOT = '/srv/www/my-project-prod/current'

God.watch do |w|
    w.name = 'my-project'
    w.interval = 30.seconds

    w.uid = 'my-project'
    w.gid = 'my-project'

    w.pid_file = File.join(RAILS_ROOT, …
[Read more]
MariaDB in FreeBSD ports tree

You can now find MariaDB 5.2 in your ports tree in FreeBSD. Check out ports/databases/mariadb. Its currently at MariaDB 5.2.4 and the package maintainer will continue updating it as new releases are made. Naturally the documentation in the Knowledgebase has been updated to reflect this.

tcpdump errors on FreeBSD for mk-query-digest

While I use this tcpdump command for MySQL query analysis with mk-query-digest, I found recently that it didn’t work on FreeBSD

$ tcpdump -i bge0 port 3306 -s 65535 -x -n -q -tttt -c 5
tcpdump: syntax error

It left me perplexed and reading the man page seemed to indicate my options were valid. I tried a few variances just to be sure without success.

$ tcpdump -i bge0 -c 5 port 3306 -x
tcpdump: syntax error
$ tcpdump -i bge0 -c 5 port 3306 -q
tcpdump: syntax error
$ tcpdump -i bge0 -c 5 port 3306 -tttt
tcpdump: syntax error

The solution was actually quite simple in the end, it had nothing to do with the commands, it had everything to do with the order of them. Placing port as the last option solved the problem.

$ tcpdump -i bge0 -s 65535 -x -n -q -tttt -c 5  port 3306
$ uname -a
FreeBSD …
[Read more]
PostgreSQL – Rock Solid in the face of forking MySQL

Ever since Sun Microsystems agreed to acquire MySQL back in 2008, there has been a fair bit of uncertainty and chaos surrounding the world’s most popular Open Source database. With many big names in the MySQL community pulling in different directions and the recent Oracle / Sun acquisition, the choice of which Open Source database to use is now easier than ever – PostgreSQL. …

[Read more]
Showing entries 1 to 10 of 21
10 Older Entries »