Permalink
Browse files

Added some basic commands to ease instalation.

  • Loading branch information...
1 parent 432cff4 commit d3eb91af690179cc0eec0f0135441e1d0da532f2 @cyphactor committed Sep 21, 2011
Showing with 121 additions and 8 deletions.
  1. +48 −1 README
  2. +1 −1 Rakefile
  3. +10 −0 bin/octopusci-db-migrate
  4. +52 −0 bin/octopusci-skel
  5. +10 −6 octopusci.gemspec
View
49 README
@@ -13,4 +13,51 @@ identify branch then I can maintain individual queues for each branch.
Then the execution would look at config values for predefined branches and
priorities for order of running them so that the mainline branch running its
-jobs could take precedence over non specified topic branches.
+jobs could take precedence over non specified topic branches.
+
+Install redis and get it starting up appropriately
+
+gem install octopusci
+sudo octopusci-skel
+octopusci-db-migrate
+
+Then update the /etc/octopusci/config.yml appropriately.
+
+Add any jobs you would like to the /etc/octopusci/jobs directory as rb files
+and octopusci will load them appropriately when started.
+
+Figure out what directory the gem is installed in by running the following
+command and stripping off the lib/octopusci.rb at the end.
+
+gem which octopusci
+
+Once you have the path we can use that path to setup Passenger with Apache
+or something else like nginx as well as setup the database. Note: You will
+need to setup a database user and a database for octopusci. The settings for
+these should be stored in /etc/octopusci/config.yml.
+
+rake -f /path/of/octpusci/we/got/before/Rakefile db:migrate
+
+<VirtualHost *:80>
+ ServerName octopusci.example.com
+ PassengerAppRoot /path/of/octpusci/we/got/before
+ DocumentRoot /path/of/octpusci/we/got/before/lib/octopusci/server/public
+ <Directory /path/of/octpusci/we/got/before/lib/octopusci/server/public>
+ Order allow,deny
+ Allow from all
+ AllowOverride all
+ Options -MultiViews
+ </Directory>
+</VirtualHost>
+
+The above will give us the web Octopusci web interface.
+
+If you are developing you can simply start this up by running
+rackup -p whatever_port while inside the octopusci directory where the
+config.ru file exists.
+
+I recommend you setup the second half of Octopusci (octopusci-tentacles) with
+God or some other monitoring system. However, for development you can simply
+run octopusci-tentacles directoly as follows:
+
+otopusci-tentacles
View
@@ -9,6 +9,6 @@ namespace :db do
task(:migrate => :environment) do
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Migration.verbose = true
- ActiveRecord::Migrator.migrate("db/migrate")
+ ActiveRecord::Migrator.migrate(File.expand_path(File.dirname(__FILE__) + "/db/migrate"))
end
end
View
@@ -0,0 +1,10 @@
+#!/usr/bin/env ruby
+
+$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
+
+require 'rubygems'
+require 'octopusci'
+
+ActiveRecord::Base.logger = Logger.new(STDOUT)
+ActiveRecord::Migration.verbose = true
+ActiveRecord::Migrator.migrate(File.expand_path(File.dirname(__FILE__) + "/../db/migrate"))
View
@@ -0,0 +1,52 @@
+#!/usr/bin/env ruby
+
+$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
+
+require 'rubygems'
+require 'fileutils'
+
+if Process.uid != 0
+ puts "Must run as root"
+ exit 1
+end
+
+JOBS_PATH = '/etc/octopusci/jobs'
+CONFIG_PATH = '/etc/octopusci/config.yml'
+
+FileUtils.mkdir_p(JOBS_PATH)
+
+if !File.exists?(CONFIG_PATH)
+ File.open(CONFIG_PATH, 'w') do |f|
+ f << "general:
+ jobs_path: \"/etc/octopusci/jobs\"
+
+smtp:
+ notification_from_email: somefrom@example.com
+ address: smtp.gmail.com
+ port: 587
+ authentication: plain
+ enable_starttls_auto: true
+ user_name: someuser@example.com
+ password: somepassword
+ raise_delivery_errors: true
+
+db:
+ adapter: mysql
+ host: localhost
+ database: octopusci
+ username: someusername
+ password: somepassword
+
+projects:
+ - { name: octopusci, owner: cyphactor, job_klass: SomeJobClass, repo_uri: 'git@github.com:cyphactor/octopusci.git', default_email: devs@example.com }
+
+stages:
+ - test_b
+ "
+ end
+ puts "Created example #{CONFIG_PATH}, please modify appropriately"
+else
+ puts "#{CONFIG_PATH} already exists, exiting to avoid modification."
+ puts "If you would like to generated the example config again please rename the existing #{CONFIG_PATH}."
+end
+
View
@@ -1,20 +1,24 @@
+$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/lib')
+
+require 'octopusci/version'
+
Gem::Specification.new do |s|
s.name = 'octopusci'
s.platform = Gem::Platform::RUBY
- s.version = '0.0.1'
- s.date = '2011-09-07'
- s.summary = 'A continuous integration application using Sinatra.'
- s.description = 'A multi-branch Continous Integration server that integrates with GitHub'
+ s.version = Octopusci::VERSION
+ s.summary = %q{A continuous integration application using Sinatra.}
+ s.description = %q{A multi-branch Continous Integration server that integrates with GitHub}
s.authors = ['Andrew De Ponte']
s.email = ['cyphactor@gmail.com']
s.homepage = 'https://github.com/cyphactor/octopusci'
- s.files = %w( README Rakefile LICENSE )
+ s.files = %w( README LICENSE config.ru )
s.files += Dir.glob("lib/**/*")
s.files += Dir.glob("bin/**/*")
s.files += Dir.glob("man/**/*")
s.files += Dir.glob("spec/**/*")
- s.executables = [ "octopusci", "octopusci-tentacles" ]
+ s.files += Dir.glob("db/**/*")
+ s.executables = [ "octopusci-tentacles", "octopusci-skel", "octopusci-db-migrate" ]
s.add_dependency 'sinatra'
s.add_dependency 'json'

0 comments on commit d3eb91a

Please sign in to comment.