Migrating MongoDB from Ubuntu to SmartOS

I installed the mongodb 14.2.0 (uuid a5775e36-2a02-11e4-942a-67ae7a242985) dataset and launched a new zone. The zone automatically creates a username and password for admin and “quickbackup”. You can find these passwords by running the following command inside the zone: cat /var/svc/log/system-zoneinit\:default.log | grep -i mon First thing I did was disable authentication by modifying /opt/local/etc/mongod.conf: #auth […]

Set Root Password SmartOS Percona MySQL Zone

I used project-fifo to launch the percona (14.2.0) MySQL dataset. I couldn’t get into the MySQL instance so I reached out on IRC. Johngrasty, a friendly guy in the #smartos IRC channel, provided a command to display the randomly generated MySQL password emitted to the zone-init log: cat /var/svc/log/system-zoneinit\:default.log | grep MYSQL_PW I used this […]

Heka, World2!

This article expands on my “Hello World” for Heka blog post. Check that one out first if you are new to Heka. In this guide we introduce using Heka over the network by utilizing two Hekad processes on localhost. For discussion purposes we name one of the Hekad processes “sender” and the other “receiver”. The […]

Mailpile Salt States for Ubuntu or Debian

I wrote these Salt States to install Mailpile on an Ubuntu host. Fun fact, it took me 20 minutes to write these states and they worked the first time I ran them. Disclaimer – I used a throw away server and wasn’t concerned that buckets of packages were installed to the system instead of using […]

You can hack on FreeNAS 9

This post analyses the FreeNAS 9 code base and discusses the various places users may feel confident to hack on. FreeNAS uses the following software stack: Django A Python Web Application Framework which complies with WSGI Nginx A very fast web server which may act as a reverse proxy server for HTTP, HTTPS, SMTP, POP3, […]

Nginx with SSL and mixed content errors with upstream WSGI servers

Mixed content errors occur because Nginx (the front-end server) communicates to the upstream WSGI server using http. WSGI does not know (or care) about the SSL session between Nginx and the user. The WSGI server will naively generate URIs and serve assets as http. To fix mixed content errors, we need to communicate the inbound […]

How to patch Heartbleed OpenSSL defect (libssl) on Ubuntu

Lots of people claim that you need to upgrade openssl package, but this will not fix the issue. The issue is not the openssl package, it is one of the libraries that the package relies on (libssl). http://www.ubuntu.com/usn/usn-2165-1/ The output of openssl version -a command should have a built on date older then Mon Apr […]

Filter Salt Stack Return Data Output

Sometimes you only want to see what has changed, and that is OK. Create a file like this: filter.py #!/usr/bin/python from json import loads from json import dumps import fileinput stdin_lines = [line for line in fileinput.input()] ret = loads(”.join(stdin_lines)) for minion_id, data in ret.items(): print(minion_id) print(‘=’*len(minion_id)) for key, value in ret[minion_id].items(): if value['changes'] or […]

Replace the Nagios Scheduler and NRPE with Salt Stack

Note: I will update this post as I progress. So the idea is to use Salt Stack’s remote execution to communicate with all nodes and run the Nagios checks and collect the return output instead of using the NRPE client/service protocol. This reduces the number of agents running on each host and appears significantly more […]