summaryrefslogtreecommitdiffstats
path: root/cloudmasterd/extra/cloudmasterd.spec
blob: 50575b8d0d7323e72dbd06797c9fa718235d4296 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
%define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
%define gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
%define gemname cloudmasterd
%define geminstdir %{gemdir}/gems/%{gemname}-%{version}

Summary: Genome library and web application for managing cloud machines
Name: rubygem-%{gemname}
Version: 1.0.0
Release: 9%{?dist}
Group: Applications/System
License: GPLv2
URL: https://fedorahosted.org/genome
Source0: %{gemname}-%{version}.gem
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: httpd
Requires: sqlite
Requires: genome-func
Requires: genome-styling
Requires: genome-autostarter
Requires: koan
Requires: libvirt
Requires: rubygems
Requires: rubygem(picnic) 
Requires: rubygem(activesupport) 
Requires: rubygem(activerecord) 
Requires: rubygem(sqlite3-ruby) 
Requires: rubygem(reststop) >= 0.2.1
Requires: genome-styling
BuildRequires: rubygems
BuildArch: noarch
Provides: rubygem(%{gemname}) = %{version}

%description
The cloudmasterd daemon runs by default on port 8107 that is proxy passed by
apache from the root context.  This daemon provides a REST style interface to 
both create new machine instances and manage the existing machine instances.
It also provides a view of the cloud instances available and the amount of
free memory that is available.  A cloud consists of multiple cloud instances
(e.g. cloud1.example.org, cloud2.example.org) which in turn host multiple
machine instances (e.g. jboss1.example.org, jboss2.example.org).

Func (https://fedorahosted.org/func) is used to aggregate all the information
from the individual cloud instances to store in a sqlite database on the
cloud master. 

%prep

%build

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{gemdir} %{buildroot}/etc/init.d %{buildroot}/etc/cloudmasterd
gem install --local --install-dir %{buildroot}%{gemdir} \
            --force --rdoc %{SOURCE0}
mkdir -p %{buildroot}/%{_bindir}
mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir}
mv %{buildroot}%{geminstdir}/extra/cloudmasterd.init %{buildroot}/etc/init.d/cloudmasterd
mv %{buildroot}%{geminstdir}/extra/config.yml %{buildroot}/etc/cloudmasterd/config.yml
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/cloudmasterd.apache %{buildroot}/etc/httpd/conf.d/cloudmasterd.conf

%clean
rm -rf %{buildroot}

%files
%{_bindir}/cloudmasterd
%{_bindir}/cloudmasterd-ctl
%{_bindir}/cloudmasterd-sync
%{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/cloudmasterd/config.yml
/etc/httpd/conf.d/cloudmasterd.conf

%defattr(755, root, root, -)
/etc/init.d/cloudmasterd

%changelog
* Tue Jun 24 2008  <mhicks@redhat.com> - 1.0.0-1
- Initial package