This repository is used to build a generic server via Chef Solo.
Chef Solo allows you to run Chef Cookbooks in the absence of a Chef Server. It does this by requiring that the complete cookbook be present on disk, which it will fetch by getting a tarball from a remote URL.
Ubuntu 32 and 64-bit
8.04 LTS Hardy Heron 8.10 Intrepid Ibex 9.04 Jaunty Jackalop 9.10 Karmic Koala
Debian 32 and 64-bit
4.0 Etch 5.0 Lenny
wget -q -O - http://github.com/freerange/chef_solo_os/raw/master/build.sh | sh
This setup creates a user deploy. You will have to manually add authorized keys, private keys for github, etc.
To set up the server as a CI server, run the following rake on the server. This will run the required chef recipes and apache setup.
cd /opt/chef_solo_os sudo git pull (just in case updates have been made) sudo rake ci:setup HOSTNAME="ci.mycompany.com"
Then to add an application you can run this rake task from the same directory.
sudo rake ci:add_project GIT_URL="git@github.com:user/example_project.git" PROJECT_NAME=example_project
This task will create a new directory in /var/www/ci/projects named after PROJECT_NAME. This folder will contain app which is the git clone and configuration files and folders for it to run as CI Joe rack application. There will also be a symlink with the PROJECT_NAME in /var/www/ci that is used for passenger. If the application requires a database connection or other configuration go to /var/www/ci/projects/#{PROJECT_NAME}/app and you’ll find the application. Once all done, you can visit the application at this url.
http://#{HOSTNAME}/example_project
To install Mongodb on the server do the below.
cd /opt/chef_solo_os sudo git pull (just in case updates have been made) sudo rake mongodb:setup