Permalink
Browse files

Example Dollhouse configuration for building a hudson-ci server from …

…scratch.
  • Loading branch information...
1 parent c79f0f0 commit 434dd971776b194c73736f7676a4a0204c15dd98 @quamen committed Oct 27, 2010
View
@@ -0,0 +1 @@
+.rvmrc
View
@@ -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.
View
@@ -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
@@ -1,18 +0,0 @@
-# Defining constants for simple reuse of variables or tasks
-
-STATS = lambda {
- shell "hostname"
- shell "df -h"
- shell "ifconfig"
- shell "monit status"
-}
-
-COMMON_OPTIONS = {
- :app_name => 'applol',
- :rails_root => '/data/applol/current',
- :db_name => 'applol',
- :db_username => 'marketplace',
- :db_password => Auth::DB_USER_PASSWORD,
- :db_encoding => 'utf8',
- :symlink => '~/current_app'
-}
@@ -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
@@ -1,25 +0,0 @@
-deployment :staging do
- server "staging_server" do
- task "stats", &STATS
-
- task 'setup' do
- bootstrap
- babushka 'benhoskings:system'
- babushka 'geelen:user set up from root',
- :username => 'applol',
- :password => Auth::SERVER_PASSWORD,
- :your_ssh_public_key => File.read(Auth::KEYPAIR + '.pub'),
- :fixed_uid_and_gid => 1001
-
- as "applol", :password => Auth::SERVER_PASSWORD do
- babushka 'benhoskings:user setup',
- :your_ssh_public_key => File.read(Auth::KEYPAIR + '.pub'),
- :github_user => 'geelen'
- babushka 'geelen:time zone set', :timezone => 'Australia/Melbourne'
- babushka 'your_deps:rails_app', COMMON_OPTIONS.merge({
- :server_name => name_in_cloud
- })
- end
- end
- end
-end
@@ -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.