diff options
Diffstat (limited to 'genomed/extra')
-rw-r--r-- | genomed/extra/config.yml | 88 | ||||
-rw-r--r-- | genomed/extra/genomed.apache | 5 | ||||
-rwxr-xr-x | genomed/extra/genomed.redhat | 43 | ||||
-rw-r--r-- | genomed/extra/genomed.spec | 70 |
4 files changed, 206 insertions, 0 deletions
diff --git a/genomed/extra/config.yml b/genomed/extra/config.yml new file mode 100644 index 0000000..9d91e46 --- /dev/null +++ b/genomed/extra/config.yml @@ -0,0 +1,88 @@ +# AN IMPORTANT NOTE ABOUT YAML CONFIGURATION FILES: +# !!! Be sure to use spaces instead of tabs for indentation, as YAML is very +# !!! sensitive to white-space inconsistencies! + +##### HTTP SERVER ##################################################################### + +# Under what HTTP environment are you running the Cloudmasterd server? The following methods +# are currently supported: +# +# webrick -- simple stand-alone HTTP server; this is the default method +# mongrel -- fast stand-alone HTTP server; much faster than webrick, but +# you'll have to first install the mongrel gem +# + +### webrick example + +server: webrick +port: 8106 + +### webrick SSL example + +#server: webrick +#port: 443 +#ssl_cert: /path/to/your/ssl.pem + +# if the private key is separate from cert: +#ssl_key: /path/to/your/private_key.pem + + +### mongrel example + +#server: mongrel +#port: 8106 + +# It is possible to run mongrel over SSL, but you will need to use a reverse proxy +# (try Pound or Apache). + + +##### DATABASE ######################################################################## + +# The Blog needs a database to store its records. +# +# By default, we use MySQL, since it is widely used and does not require any additional +# ruby libraries besides ActiveRecord. +# +# With MySQL, your config would be something like the following: +# (be sure to create the blog database in MySQL beforehand, +# i.e. `mysqladmin -u root create blog`) + +#database: +# adapter: mysql +# database: blog +# username: root +# password: +# host: localhost + + +# Instead of MySQL you can use SQLite3, PostgreSQL, MSSQL, or anything else supported +# by ActiveRecord. +# +# If you do not have a database server available, you can try using the SQLite3 +# back-end. SQLite3 does not require it's own server. Instead all data is stored +# in local files. For SQLite3, your configuration would look something like the +# following (don't forget to install the 'sqlite3-ruby' gem first!): +# +#database: +# adapter: sqlite3 +# dbfile: /var/lib/blog.db + +##### GENOMED ######################################################################## + + +##### LOGGING ######################################################################### + +# This log is where you'll want to look in case of problems. +# +# By default, we will try to create a log file named 'blog.log' in the current +# directory (the directory where you're running the blog from). A better place to put +# the log is in /var/log, but you will have to run blog as root or otherwise give +# it permissions. +# +# Set the level to DEBUG if you want more detailed logging. Other options are +# INFO, WARN, and ERROR (DEBUG is most verbose, ERROR is least). + +log: + level: DEBUG + file: /var/log/genomed.log +# level: INFO diff --git a/genomed/extra/genomed.apache b/genomed/extra/genomed.apache new file mode 100644 index 0000000..deaee88 --- /dev/null +++ b/genomed/extra/genomed.apache @@ -0,0 +1,5 @@ +RewriteEngine On +RewriteRule ^/genome$ http://%{SERVER_NAME}/genome/nodes.html [NE] + +ProxyPass /genome http://localhost:8106 +ProxyPassReverse /genome http://localhost:8106 diff --git a/genomed/extra/genomed.redhat b/genomed/extra/genomed.redhat new file mode 100755 index 0000000..0b4fd29 --- /dev/null +++ b/genomed/extra/genomed.redhat @@ -0,0 +1,43 @@ +#!/bin/bash +# +# genomed: Init script for Genome daemon. +# +# chkconfig: 35 91 03 +# +# description: Web service for Genome repositories. +# +# +# + +# Source function library. +. /etc/init.d/functions + +CTL=genomed-ctl + +[ -z "$HOME" ] && export HOME=/ + +case "$1" in + start) + echo -n $"Starting genomed: " + $CTL start + RETVAL=$? + ;; + stop) + echo -n $"Stopping genomed: " + $CTL stop + RETVAL=$? + ;; + restart) + $0 stop + $0 start + ;; + status) + $CTL status + RETVAL=$? + ;; + *) + echo $"Usage: $0 {start|stop|status|restart}" + RETVAL=1 +esac + +exit $RETVAL diff --git a/genomed/extra/genomed.spec b/genomed/extra/genomed.spec new file mode 100644 index 0000000..b6b4183 --- /dev/null +++ b/genomed/extra/genomed.spec @@ -0,0 +1,70 @@ +# Generated from genomed-0.1.0.gem by gem2rpm -*- rpm-spec -*- +%define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']") +%define gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) +%define gemname genomed +%define geminstdir %{gemdir}/gems/%{gemname}-%{version} + +Summary: Genome Repository daemon for machine configuration +Name: rubygem-%{gemname} +Version: 1.0.0 +Release: 6%{?dist} +Group: Applications/System +License: GPLv2+ +URL: http://fedorahosted.org/genome +Source0: %{gemname}-%{version}.gem +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Requires: httpd +Requires: rubygems +Requires: rubygem(picnic) +Requires: rubygem(activesupport) +Requires: rubygem(reststop) >= 0.2.1 +Requires: rubygem(genome-dsl) +Requires: genome-styling +BuildRequires: rubygems +BuildArch: noarch +Provides: rubygem(%{gemname}) = %{version} + +%description +Genome Repository daemon for machine configuration + +%prep + +%build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{gemdir} %{buildroot}/etc/init.d %{buildroot}/etc/genomed +gem install --local --install-dir %{buildroot}%{gemdir} \ + --force --rdoc %{SOURCE0} +mkdir -p %{buildroot}/%{_bindir} +mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir} +mv %{buildroot}%{geminstdir}/extra/genomed.redhat %{buildroot}/etc/init.d/genomed +mv %{buildroot}%{geminstdir}/extra/config.yml %{buildroot}/etc/genomed/config.yml +rmdir %{buildroot}%{gemdir}/bin +find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x + +# Put in the apache rules +mkdir -p %{buildroot}/etc/httpd/conf.d +mv %{buildroot}%{geminstdir}/extra/genomed.apache %{buildroot}/etc/httpd/conf.d/genomed.conf + +%clean +rm -rf %{buildroot} + +%files +%{_bindir}/genomed +%{_bindir}/genomed-ctl +%{gemdir}/gems/%{gemname}-%{version}/ +%doc %{gemdir}/doc/%{gemname}-%{version} +%doc %{geminstdir}/LICENSE +%doc %{geminstdir}/README +%{gemdir}/cache/%{gemname}-%{version}.gem +%{gemdir}/specifications/%{gemname}-%{version}.gemspec +%config /etc/genomed/config.yml +/etc/httpd/conf.d/genomed.conf + +%defattr(755, root, root, -) +/etc/init.d/genomed + +%changelog +* Mon Jun 23 2008 <bleanhar@redhat.com> - 1.0.0-1 +- 1.0 Release |