Skip to content

Commit

Permalink
Example Dollhouse configuration for building a hudson-ci server from …
Browse files Browse the repository at this point in the history
…scratch.
  • Loading branch information
quamen committed Oct 27, 2010
1 parent c79f0f0 commit 434dd97
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 50 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
.rvmrc
46 changes: 46 additions & 0 deletions README.markdown
@@ -0,0 +1,46 @@
# Dollhouse Hudson

[Dollhouse](http://github.com/geelen/dollhouse) configuration for turning a vanilla ubuntu install into a functioning hudson-ci server.

All you need to get started is a freshly install Ubuntu Machine (Mine is in VMWare) and another computer with Ruby installed.

## Usage

1. Get [Dollhouse](http://github.com/geelen/dollhouse) set up.
2. Install openssh on your Ubuntu machine.

$ sudo apt-get install openssh-server openssh-client

3. Create a password for the root account on your Ubuntu machine.

$ sudo su -
$ passwd

4. Ensure the .ssh directory is present on your Ubuntu machine's root home directory.

$ sudo su -
$ mkdir .ssh

5. From now on, everything happens on your own computer. Copy your ssh public key over to the server.

$ scp ~/.ssh/id_rsa.pub root@remote.server.com:.ssh/authorized_keys

6. Update config/dollhouse/instances/server.yml with the IP address of your vanilla ubuntu machine.

7. Update config/dollhouse/auth.rb with your authentication details.

8. Giddy Up
$ /path/to/dollhouse.rb run hudson setup

9. Visit http://remote.server.com:8080 and bathe in the glory of your fresh Hudson install, with the git, github, ruby and rake plugins pre-installed.

## Where's the Magic?

[Dollhouse](http://github.com/geelen/dollhouse) uses [Babushka](http://github.com/benhoskings/babushka) to build servers. The dollhouse configuration is stored in config/dollhouse/deployments/hudson.rb

Here's what the setup task does:

1. bootstraps the server, installs [Babushka](http://github.com/benhoskings/babushka) so that the rest can function.
2. Creates a hudson user with the password specified in Auth and copies the public ssh key to the hudson users account.
3. Installs Hudson and all of its dependencies.
4. Installs some useful Hudson plugins for rails.
4 changes: 2 additions & 2 deletions config/dollhouse/auth.rb
@@ -1,5 +1,5 @@
module Auth
KEYPAIR = Dir.glob(File.expand_path "~/.ssh/id_[dr]sa").first
DB_USER_PASSWORD = "sekret"
SERVER_PASSWORD = "evenmoarsekret"
DB_USER_PASSWORD = "password"
SERVER_PASSWORD = "password"
end
18 changes: 0 additions & 18 deletions config/dollhouse/deployments/common.rb

This file was deleted.

19 changes: 19 additions & 0 deletions config/dollhouse/deployments/hudson.rb
@@ -0,0 +1,19 @@
deployment :hudson do
server "hudson" do

task 'setup' do
bootstrap

babushka 'quamen:user set up from root',
:username => 'hudson',
:password => Auth::SERVER_PASSWORD,
:your_ssh_public_key => File.read(Auth::KEYPAIR + '.pub')

as "hudson", :password => Auth::SERVER_PASSWORD do
babushka 'quamen:hudson'
babushka 'quamen:hudson plugins for rails'
end
end

end
end
25 changes: 0 additions & 25 deletions config/dollhouse/deployments/staging-demo.rb

This file was deleted.

10 changes: 5 additions & 5 deletions config/dollhouse/instances/servers.yml
@@ -1,7 +1,7 @@
---
stagingX: !ruby/struct:Dollhouse::OnlineServer
name_in_cloud: stagingX
server_name: staging_server
ip: IP.GO.HERE
hudson: !ruby/struct:Dollhouse::OnlineServer
name_in_cloud: hudson
server_name: hudson
ip: 172.16.106.128
status: :running
deployment_name: staging
deployment_name: hudson

0 comments on commit 434dd97

Please sign in to comment.