Close

Uncategorized

Linux – The dig command

You can use the nslookup command to find what ip address a url resolves to. But another way to do this is by using the dig command: $ dig google.com +short {list of ip address} This gives a list of ip addresses, since google.com website is load-balanced across several servers. […]

Read More

AWS – Increasing the size of an EC2 instance’s primary EBS volume

This is really good guide: http://cloud.tekgoblin.com/2013/04/29/aws-guides-how-to-increase-your-ec2-linux-root-volume-size/ basically stop your instance, detach the primary volume (/dev/sda1), create a snapshot from this ebs volume, create a volume (with increased diskspace) from the snapshot, attach the new bigger volume to the ec2 instance, as /dev/sda1. start the instance again.

Read More

spacewalk – notes

deregister vm from spacewalk: rm /etc/sysconfig/rhn/systemid Upload rpm to spacewalk $ Rpm –addsign name.rpm $ Rhnpush -c {channel’s-label} –server localhost name.rpm https://fedorahosted.org/spacewalk/wiki/UploadFedoraContent

Read More

Foreman – Render provisioning templates

#!/usr/bin/env ruby require “erb” require ‘ostruct’ class Basicerb def initialize name @name = name @template = File.read(‘/root/index.erb’) end def render @person = OpenStruct.new @person.name = “John Smith” @person.age = 70 @person.pension = 300 ERB.new(” Hello ERB World!! “).result( binding ) end end test = Basicerb.new “wow” puts test.render

Read More

yum error – Public key for *.rpm is not installed

the dirty way aroung this is doing: $ yum install {package-name} –nogpgcheck But best practice is: first cd to: $ cd /etc/pki/rpm-gpg Then do a wget command, here’s an example: $ wget -O http://yum.theforeman.org/releases/1.8/RPM-GPG-KEY-foreman then import it into rpm db like this: $ rpm –import RPM-GPG-KEY-foreman You can list all […]

Read More

Foreman – triggering a puppet run from the gui interface

https://github.com/ripienaar/mcollective-vagrant On the agent, add the following near to the top of the file: # vim /etc/puppet/auth.conf path /run allow * Note: later on change the “*” to the fqdn of the puppetmaster fqdn. On the puppetmaster enable mcollective: $ cat /etc/foreman-proxy/settings.d/puppet.yml . . .# valid providers: # puppetrun (for […]

Read More