Monthly Archives: May 2012
May 28, 2012Posted by on
I was looking for a way to automate user configuration management on 20 Linux machines that I have been administering for several months now. In my setup I want to see following:
- add a user once, have him/her on as many machines as you define
- share users’ home directories over the network
There are many ways to have it done. I wanted to see how this can be achieved with Puppet for several reasons, mainly, because I want to have as much config management under the same hood as possible. And I am just starting with Puppet, so comments are welcome.
To implement the user management setup I need three modules:
- users – will define users, their passwords, ssh-keys (optional), default shells etc
- nfs_server – will share /home directory over NFS
- nfs_client – will mount the shared /home directory as /home
In this demo I have three machines, all running Debian Squeeze:
- puppet.mydomain.com – is the puppet master
- node1.mydomain.com – NFS server, will share /home over the network
- node2.mydomain.com – NFS client, will mount /home from node1
May 11, 2012Posted by on
Slightly easier topic today 🙂
A while ago I had to set up an Ubuntu machine so that after a reboot it would automatically log in to Gnome and connect to WLAN with the correct wlan key. There’s propably many ways of doing this and it might be quite easy to do with GUI but here’s how to do it from the command line.
WLAN key configuration
For setting the wlan key we need to modify the Network Manager configuration.
The configuration files for all your known connections are here:
You need to add the key to the appropriate config. In my case it was Auto Wlan212. Sudo is needed for editing the file. There’s a lot of settings you can play with but the section for the wlan key is under
Before I modified anything these two lines were there already: Read more of this post
May 6, 2012Posted by on
I’ve been using Vagrant for a while now to test new configurations with simple virtual machines. Usually it’s just a single VM that I’m using but now I wanted to do some tests on more than one machine at the same time.
So I was looking for a way to easily create multiple identical virtual machines with Vagrant but couldn’t find a good solution so I made this small script to do it for me. If you know a better way, could you leave a comment and then we can both laugh at this script. I have also included a guide for controlling these new VMs with Fabric.
The script copies a packaged vagrant box as many times as you define and adds them to vagrant. Then adds the new virtual boxes to the Vagrantfile config. These new vagrant machines have hostonly static IP network setting but you can change it to bridged in the script if you want IPs from DHCP. The hostonly means that the machines can only be accessed from the host machine that’s running vagrant.
If you want to use multiple vagrant boxes without the script, here are the steps:
Create a single Vagrant box. Guide
Package it. Guide
Copy the package.box file. You need a copy for each virtual box. Guide 😉
Add the new box copies to vagrant. Guide
Add new config to Vagrantfile for each new box. Guide
Start the boxes with ‘vagrant up’
And here’s the guide for using my script:
Read more of this post
May 2, 2012Posted by on
So I felt like setting up Github repository for awaseroot. Git is a version control system and with Github you can share your git project/repository online. We use Github as a place to share all our awaseroot material. There’s many good tutorials available (for example: http://help.github.com/win-set-up-git/) but here’s the steps I took one by one. Replace awaseroot with whatever you want.
Git version 126.96.36.199
Like this: Read more of this post