Skip to content

Instantly share code, notes, and snippets.

View aussielunix's full-sized avatar
🤠
G`Day

Mick Pollard aussielunix

🤠
G`Day
View GitHub Profile
@aussielunix
aussielunix / ceph-manual-install.md
Last active April 20, 2022 02:12 — forked from kalaspuffar/ceph-manual-install.md
How to install a manual ceph cluster.

Manual install of a Ceph Cluster.

Fetching software.

First of I want to check that I have all the latest packages in my debian system.

apt update
apt upgrade
sudo cryptsetup luksOpen /dev/sda5 luks_container
#!/usr/bin/ruby
require 'rubygems'
require 'gruff'
# Let's hack almost everything
g = Gruff::Bar.new('800x700') # Define a custom size
g.sort = false # Do NOT sort data based on values
g.maximum_value = 40 # Declare a max value for the Y axis

For a moment, I'm going to throw away my automation and configuration management hat. I'll let you know when I put it back on. Also, let's ignore that we're talking about Riak specifically for a moment. Also also, let's ignore any (for a brief moment) the proper role of a package manager.

What's your target market?

If you're writing server software, you have two target markets. The system administrator/operations team and the developer.

Why do you want autostart?

The main reason you want autostart is to get people up and running quickly. To do this, you need to ship safe and sane defaults. This means something like a default configuration that listens only on localhost.

SSH agent forwarding and screen

When connecting to a remote server via SSH it is often convenient to use SSH agent forwarding so that you don't need a separate keypair on that server for connecting to further servers.

This is enabled by adding the

ForwardAgent yes

option to any of your Host entries in ~/.ssh/config (or alternatively with the -A option). Don't set this option in a wildcard Host * section since any user on the remote server that can bypass file permissions can now als use keys loaded in your SSH agent. So only use this with hosts you trust.

% git rev-list HEAD | xargs -n1 sh -c 'git ls-tree -lr $1 | awk "\$4 > (1024*1024*50) { print \"size:\",\$4, \$5 }" | sed -e "s,^,commit:$1 ,"' -
commit:fd93322c903a49febe8ad454c9e03a7e86327389 size: 69535125 debian/debian/logstash.war
require 'aws/s3' # gem name is 'aws-sdk'
class BucketSyncService
attr_reader :from_bucket, :to_bucket, :logger
attr_accessor :debug
DEFAULT_ACL = :public_read
# from_credentials and to_credentials are both hashes with these keys:
# * :aws_access_key_id
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
echo "in git pre-commit hook"