Posted by & filed under Categorized.


Install Packages

sudo apt-get update   
sudo apt-get upgrade -y

Install sshd

sudo aptitude search openssh
sudo apt-get install openssh-server -y

Install puppet

sudo apt-get install puppet puppetmaster -y

Use an auto-mounted shared folder (optional)

vboxmanage sharedfolder add ubuntu-12.04.2-basebox --name basebox --hostpath C:\vagrant\basebox --automount
sudo usermod -a -G vboxsf vagrant

Remark: probably want to remove before building the vagrant box.

Install Virtualbox Guest Additions

installation guide

mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
cd /mnt/cdrom
apt-get install dkms
sudo apt-get install xorg
sh ./

Trouble in paradise?

warning: Could not retrieve fact fqdn

Installing Guest Additions with Puppet (i.e. alternative installation)

file { "/mnt/cdrom":
  ensure => "directory",
} -> 

mount { "/mnt/cdrom":
  device => "/dev/cdrom",
  ensure => mounted,
  fstype => "iso9660",
  options => "ro",
} -> 

package { "dkms":
  ensure => "installed",
} ->

package { "xorg":
  ensure => "installed",
} ->

exec { "sh":
  cwd => "/mnt/cdrom",  
  path => ["/bin","/usr/bin"],
  logoutput => true,
  returns => [0,1],

Generate SSH keys with Puppet

file { "/home/vagrant/.ssh":
  ensure => "directory",
  mode => 700,
  owner => vagrant,
  group => vagrant,
} ->

exec { "ssh-keygen -f development -C 'development' -N '' -t rsa -q":
  cwd => "/home/vagrant/.ssh",
  path => ["/bin","/usr/bin"],
} ->

file { "/home/vagrant/.ssh/development":
  mode => 600,
  owner => vagrant,
  group => vagrant,

file { "/home/vagrant/.ssh/":
  mode => 600,
  owner => vagrant,
  group => vagrant,

file { "/home/vagrant/.ssh/authorized_keys":
  mode => 600,
  owner => vagrant,
  group => vagrant,
  source => "/home/vagrant/.ssh/"
} ->

file { "/media/sf_basebox/development":
  mode => 600,
  owner => vagrant,
  group => vboxsf,
  source => "/home/vagrant/.ssh/development", 

Set groups for the vagrant user

sudo usermod -G vagrant vagrant
sudo usermod -a -G vboxsf vagrant

sudo groupadd admin
sudo usermod -a -G admin vagrant
groups vagrant

Change the sudoers configuration !important!

visudo reference

[add line] 

[add line]
Defaults env_keep += "SSH_AUTH_SOCK"        

[comment line] 
# Defaults requiretty     

Create a ssh port forward for the NAT and test it

VBoxManage modifyvm "ubuntu-12.04.2-basebox" --natpf1 "guestssh,tcp,,2222,,22"

Test with PuTTY download.
Convert the private key first with PuTTYgen to a PuTTY compatible format (.ppk file). Set the user name in the “Connection -> Data” to “vagrant”. And don’t forget to set the private key in “Connection -> Auth”. There is no need to enable the “Bypass authentication entirely” option because it will already authenticate automatically.

Another option is to enable an additional HOSTONLY network and connect to that IP on port 22.

Unleash the kraken

Create the box

vagrant package --base ubuntu-12.04.2-basebox --output

Add the box

vagrant box add ubuntu-dev
vagrant box list

Use it

vagrant init ubuntu-dev

[edit] Vagrantfile
[add line]
config.ssh.private_key_path = "C:\\vagrant\\basebox\\keys\\development"

vagrant up

Tech to check out

  • Librarian Puppet – Still need to try this one.

  • VeeWee – Although interesting, I couldn’t get it up and running the first time around but I’m not a Ruby expert.

Posted by & filed under Programming.

Which basically means that running as root will not load the OCI8 extension *facepalm*

export DYLD_LIBRARY_PATH="/usr/local/oracle/instantclient_10_2"
export SQLPATH="/usr/local/oracle/instantclient_10_2"
export TNS_ADMIN="/usr/local/oracle/network/admin"

Posted by & filed under Categorized.

MyKerbal (8)If your KSP (0.18) won’s run after downloading, the following might help (worked for me):

1. Open your terminal and navigate to the directory where you are keeping the KSP_osx folder.

cd <path to KSP folder>

2. Run the following commands:

chmod -R a+r KSP_osx/

This will ensure the operating system can read everything the patcher has downloaded

chmod a+x KSP_osx/\ Space\ Program

This ensures the operating system can execute KSP.

See also:!

Posted by & filed under Categorized.

I’ve got some bitbucket repositories which I wanted to access with a MacBook Pro. To access my Git repositories I had to disable certificate checking to be able to clone them:

git config --global http.sslVerify false

I couldn’t find another proper way to do this. See HTTPS gibhub access – Stackoverflow

To clone mercurial repositories I had to add hostfingerprints configuration and a dummy cacerts certificate. See: Continue operation on failed certificate verification – Atlassian Answers

My .hgrc file:

cacerts = /etc/hg-dummy-cert.pem

[hostfingerprints] = 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b

Posted by & filed under Categorized.

A colleague (thanks Danny) pointed me to this solution to host multiple development environments under a single sub-domain name.

Step 1. Configure a type A domain record by using a wildcard and a fixed sub-domain name like:

*.lab    A

( why didn’t I think of that x_X )

Step 2. Enable mod_vhost_alias in Apache if not already active.

Step 3. Configure a virtual host and use the wildcards from mod_vhost_alias to your liking, for example

    VirtualDocumentRoot /var/my_flexible_friends/%1

would redirect to and serve pages from /var/my_flexible_friends/myproject but would also redirect to and serve pages from /var/my_flexible_friends/jquery.

Just look at the mod_vhost_alias documentation for more possibilities.
Also a nice consistent setup to share in development teams.

If you happen to stumble upon apache error messages like ‘Request exceeded the limit of 10 internal redirects due to probable configuration error.’, just change your .htaccess file by added the rule RewriteBase /. This will most likely happen when you are using the windows hosts file instead of a real domain.

See also Stackoverflow Infinite Rewrite Loop

SetEnv APPLICATION_ENV development
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteBase /
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

Posted by & filed under Categorized.

OpenJDK Runtime Environment (IcedTea6 1.9.10) (6b20-1.9.10-0ubuntu1~10.04.2)
OpenJDK Client VM (build 19.0-b09, mixed mode, sharing)
WARNING: You are launching IDE using OpenJDK Java runtime


NOTE: If you have both Sun JDK and OpenJDK installed
please validate either WEBIDE_JDK or JDK_HOME environment variable points to valid Sun JDK installation

Ubuntu Sun (Oracle) Java Installation Guide

sudo add-apt-repository "deb lucid partner"
sudo apt-get update
aptitude install sun-java6-jdk
sudo update-alternatives --config java