Random   •   Archives   •   RSS   •   About   •   Contact > Tag: guide

How-to Work From Home

"I work from home" — a phrase I have uttered hundreds of times and is often met with instant amazement, envy, or jokes about pants. My goal for this book is to teach you the hacks I have learned in my career to help you land your dream job. If you …

Continue Reading

Minikube

Minikube allows you to run a self contained, single node, Kubernetes cluster on your workstation. Once installed and configured, you may use kubectl to interact with it, just like a production Kubernetes cluster.

Continue Reading

Set DNS resolver options

The right way to persist resolver options across many Linux distributions.

Continue Reading

SmartOS Ubuntu guest, apt-get not working because IPv6

My brutal yet simple work around.

Continue Reading

Migrating libvirt KVM guest to SmartOS KVM guest

Stop worrying and replace your Linux hypervisor with SmartOS.

Continue Reading

Securely publish Jenkins build artifacts on Salt Master

Your project deserves an asset pipeline.

Continue Reading

Set postgres user password on PostgreSQL SmartOS Zone

Continue Reading

Migrating MongoDB from Ubuntu to SmartOS

First, I installed the mongodb 14.2.0 (uuid a5775e36-2a02-11e4-942a-67ae7a242985) dataset:

imgadm avail | grep mongo
imgadm import a5775e36-2a02-11e4-942a-67ae7a242985

Next, I launched a new zone with this image.

Then I grabbed the uuid of the zone (211b992b-a448-40b4-94c9-00fa82615cec) and I connected into the zone

zlogin 211b992b-a448-40b4-94c9-00fa82615cec

The zone automatically creates a username …

Continue Reading

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 …
Continue Reading

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 …

Continue Reading

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 …

Continue Reading

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).

The output of openssl version -a command …

Continue Reading

How to reset HP iLO Lights-Out User and Password Settings with IPMItool

Warning:
Do NOT follow guides that suggest to make a DOS boot disk, this is over complicated.

Use the ipmitool which ships with most Unix based operating systems. I tested on SmartOS and Ubuntu Linux. Use a live boot disk if you must.

  1. Run ipmitool user list to list all …
Continue Reading

How I added two Seagate 240G SSDs as SmartOS L2ARC

How I added two Seagate 240G SSDs as SmartOS L2ARC

  1. removed icepacks from two western digital velociraptors
  2. installed ssds into icepacks
  3. installed icepacks into HP hotswap trays
  4. installed trays into HP prolaient g6 server

How to list all drive installed in Solaris, Open Solaris, or SmartOS

iostat -eE
format

AVAILABLE …
Continue Reading

Heka, World!

This post serves as a "Hello World" for the data collection and processing software called Heka. Heka is written in Go and was open sourced by Mozilla, the same fabulous group that brings us Firefox!

I intend to use Heka to replace Logstash agents by sending logs directly to ElasticSearch …

Continue Reading

sensu-salt

A while back I explained how to Create your own fleet of servers with Digital Ocean and salt-cloud. Today I will extend that post and show how I deployed a test environment for Sensu, an open source monitoring framework.

Before I test out new infrastructure software, I always attempt to …

Continue Reading

Backup all virtual machines on a SmartOS hypervisor with smart-back.sh

This post will explain how to create a cronjob to backup of every virtual machine on a SmartOS hypervisor.

Create the following bash script in /opt/smart-back.sh:

#!/usr/bin/bash

# Backup all virtual machines on a SmartOS hypervisor
# Author:  russell@ballestrini.net
# Website: https://russell.ballestrini.net/

# Backup directory …
Continue Reading

Postfix Salt State Formula

Continue Reading

Control a MongoDB collection in configuration management

This post explains how to use configuration management (Salt Stack) to completely control a MongoDB collection. In our example we want to control a store's collection of plans.

First we create a JSON representation of the collection.

mongodb/plan.json:

{
  "_id" : { "$oid" : "4ef8b9e2be329f491d98f74b" },
  "cost" : 20, "description" : "development",
  "name" : "good", "count …
Continue Reading

Understanding Salt Stack user and group management

This state will create a user:

russell:
  user:
    - present

This state will create a user and a group. This also makes the user part of the group, and handles creating the group first:

russell:
  group:
    - present
  user:
    - present
    - groups:
      - russell
    - require:
      - group: russell

This state handles user and group generation …

Continue Reading

Create your own fleet of servers with Digital Ocean and salt-cloud

Have you heard about Digital Ocean? They offer a polished user interface, KVM guests with SSD storage, and an API to interact with a cloud of hypervisors. API integration got you down? Don't worry, salt-cloud has already integrated Digital Ocean among it's list of providers! The rest of this post …

Continue Reading

Add a custom header to all Salt managed files using pillar and jinja templates

Salt-stack (salt) provides a solution for centralized configuration management and remote execution. One of the most basic things Salt provides is the ability to manage the contents of a file or a directory of files. Using Salt we can dictate the state of our minions and as a result we …

Continue Reading

Automatic event hangout with cron

Create an online only, hangout event

Create a new event with a date far into the future, like the year 2015. Go to the event's options > advanced and enable 'this event is online only' which will create a unique Hangout URI.

Create a cronjob

Create a cronjob on each device …

Continue Reading

How to overload default function arguments in python using lambda

Python Lambda functions are very powerful but I often forget how they work or the fun things they do. This post will document how to use a lambda to provide different default arguments to a function.

We will use the human function found in ago.py as an example - because …

Continue Reading

how to drain an iPhone battery without needing passcode

  1. Press home button [ ]
  2. Slide camera button up
  3. Slide mode to video
  4. Turn on flash
  5. Put iPhone on table with light pointed down
  6. Walk away inconspicuously

Extra points if you set the camera to record (just don't record yourself or sounds) which will fill up the iPhone capacity.

Continue Reading

How to rescue logs and config from a failed Citrix NetScaler App Gateway

Today our production Citrix NetScaler broke. The box wouldn't boot and our only backup copy of the config was on the NetScaler itself.

Being the only Unix guy around I attempted to help out the admins working the outage. I SSH'd into the development NetScaler and noticed it runs on …

Continue Reading

How to capture HTTPS SSL TLS packets with wireshark

This article will explain how to use wireshark to capture TCP/IP packets. Specifically I will show how to capture encrypted (HTTPS) packets and attempt to document the "dance" a client and server do to build an SSL tunnel.

What is Wireshark?

Wireshark is a network protocol analyzer for Windows …

Continue Reading

How to Incorporate Custom Configuration in a Pyramid Application

Note: This post shows an old way to modify the request object. I discuss a new way in my Pyramid add_request_method post.

Imagine that you have just built a wiki, blog, or cms web application that will be deployed multiple times by different people. You would like to provide the …

Continue Reading

Adding inline image support to a gmail messages

Enable ability to insert images into a message body. You can upload and insert image files in your computer, or insert images by URLs. This lab will not work if you have offline enabled.

  1. Go to google labs: https://mail.google.com/mail/#settings/labs
  2. Search "images".
  3. Enable "Inserting images …
Continue Reading

r8168 driver issues after Ubuntu 11.10 upgrade kernel linux 3.0

I had network issues after upgrading to Ubuntu 11.10 which has the linux 3.0 kernel.

I used this guide to compile the r8168 driver however, I needed to alter the Makefile to support for linux 3.0 kernel.

Edit src/Makefile:

#KEXT  := $(shell echo $(KVER) | sed -ne 's …
Continue Reading

A better way to show website backlinks

Early web pilgrims of the Internet fashioned search queries like
link:russell.ballestrini.net to gather backlinks for a domain.

I however advocate a revolutionary search pattern like -

"russell.ballestrini.net" -site:russell.ballestrini.net

to gather an improved representation of backlinks.

Click here to try now!

Continue Reading

CSS frameworks not rendering properly on all browsers

Read on for the one line fix.

Continue Reading

Hacker Olive Oil Lamp Crafted From Home Materials

Really fast and clean design.

Continue Reading

A system administrators guide to installing and maintaining multiple python environments

Some operating systems depend on a specific version of python to function properly. For example, Yum on Redhat Enterprise Linux 5 (RHEL5) depends on python 2.4.3. This version of python lacks support from many utilities …

Continue Reading

Python Image Grabber pig.py

Download all the images from a URI with this simple tool!

Continue Reading

virt-back: restoring from backups

In a perfect world we should create backups but never need them. Although this statement holds truth, creating guest backups provides many more benefits.

The most common reasons system administrators restore from a virt-back guest backup:

  • recovering from data corruption
  • recovering deleted files
  • recovering from a virus infection
  • recovering from …
Continue Reading

a hack to gain 80 percent efficiency when creating github projects

Continue Reading

Add a Breadcrumb Subscriber to a Pyramid project using 4 simple steps

Continue Reading

Voice Over IP with TeamSpeak

This article will cover running a Voice Over IP service like TeamSpeak on a VPS.

Voice Over IP allows users to communicate using audio over the Internet.

When planning for this article I originally was going to cover ventrilo, but their download link was obfuscated behind a heinous php session …

Continue Reading

virt-back: a python libvirt backup utility for kvm xen virtualbox

backup your virtual maching guests.

Continue Reading
© Russell Ballestrini.