Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of git://github.com/djs55/driver-domain-template

  • Loading branch information...
commit 9228d6f120bb9bf9053c4afa950ac8079de0fa37 2 parents a970fc9 + 282e9e2
@djs55 authored
View
15 boxgrinder/Makefile
@@ -0,0 +1,15 @@
+
+.PHONY: appliance
+appliance: install
+ boxgrinder-build driver-domain.appl --plugins xcp-boxgrinder-build-driverdomain-os-plugin
+
+.PHONY: install
+install: xcp-boxgrinder-build-driverdomain-os-plugin-0.0.1.gem
+ gem install $<
+
+xcp-boxgrinder-build-driverdomain-os-plugin-0.0.1.gem: xcp-boxgrinder-build-driverdomain-os-plugin.gemspec
+ gem build $<
+
+.PHONY: clean
+clean:
+ rm -f *.gem
View
22 boxgrinder/driver-domain.appl
@@ -0,0 +1,22 @@
+name: driver-domain
+summary: minimal CentOS base image for service domains
+os:
+ name: driverdomain
+ version: 5
+ password: xenroot
+hardware:
+ partitions:
+ "/":
+ size: 2
+packages:
+ - openssh-clients
+ - bash
+ - blktap
+ - kernel
+repos:
+ - name: "XCP"
+ baseurl: http://ely.uk.xensource.com/extra
+ - name: "CentOS-base"
+ baseurl: http://ely.uk.xensource.com/CentOS/5/os/x86_64/
+default_repos: false
+
View
3  boxgrinder/lib/xcp-boxgrinder-build-driverdomain-os-plugin.rb
@@ -0,0 +1,3 @@
+require 'xcp-boxgrinder-build-driverdomain-os-plugin/driverdomain'
+
+plugin :class => BoxGrinder::DriverDomainPlugin, :type => :os, :versions => [ "5" ], :name => :driverdomain, :full_name => "XCP driver domain plugin", :require_root => true
View
54 boxgrinder/lib/xcp-boxgrinder-build-driverdomain-os-plugin/driverdomain.rb
@@ -0,0 +1,54 @@
+#
+# Copyright 2010 Red Hat, Inc.
+# Copyright 2012 Citrix, Inc.
+#
+# This is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 3 of
+# the License, or (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this software; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+require 'boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin'
+
+module BoxGrinder
+ class DriverDomainPlugin < RPMBasedOSPlugin
+
+ def after_init
+ super
+ register_supported_os('driverdomain', ['5', '6'])
+ end
+
+ def add_packages(packages, package_array)
+ package_array.each { |package| packages << package unless packages.include?(package) }
+ end
+
+ def execute(appliance_definition_file)
+ repos = {}
+
+ @plugin_info[:versions].each do |version|
+ repos[version] = {
+ "base" => {
+ "mirrorlist" => "http://mirrorlist.centos.org/?release=#OS_VERSION#&arch=#BASE_ARCH#&repo=os"
+ },
+ "updates" => {
+ "mirrorlist" => "http://mirrorlist.centos.org/?release=#OS_VERSION#&arch=#BASE_ARCH#&repo=updates"
+ }
+ }
+ end
+
+ add_packages(@appliance_config.packages, ['system-config-securitylevel-tui', 'rpm', 'passwd', 'setarch'])
+
+ build_with_appliance_creator(appliance_definition_file, repos)
+ end
+ end
+end
+
View
32 boxgrinder/xcp-boxgrinder-build-driverdomain-os-plugin.gemspec
@@ -0,0 +1,32 @@
+Gem::Specification.new do |s|
+ s.name = %q{xcp-boxgrinder-build-driverdomain-os-plugin}
+ s.version = "0.0.1"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Dave Scott"]
+ s.date = %q{2012-06-21}
+ s.description = %q{BoxGrinder Build XCP driver domain plugin}
+ s.email = %q{xen-api@lists.xen.org}
+ s.extra_rdoc_files = ["lib/xcp-boxgrinder-build-driverdomain-os-plugin.rb", "lib/xcp-boxgrinder-build-driverdomain-os-plugin/driverdomain.rb"]
+ s.files = ["lib/xcp-boxgrinder-build-driverdomain-os-plugin.rb", "lib/xcp-boxgrinder-build-driverdomain-os-plugin/driverdomain.rb", "xcp-boxgrinder-build-driverdomain-os-plugin.gemspec"]
+ s.homepage = %q{http://www.xen.org/}
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Xcp-boxgrinder-build-driverdomain-os-plugin"]
+ s.require_paths = ["lib"]
+ s.rubyforge_project = %q{BoxGrinder Build}
+ s.rubygems_version = %q{1.3.6}
+ s.summary = %q{XCP driverdomain plugin}
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<boxgrinder-build>, [">= 0.5.0"])
+ else
+ s.add_dependency(%q<boxgrinder-build>, [">= 0.5.0"])
+ end
+ else
+ s.add_dependency(%q<boxgrinder-build>, [">= 0.5.0"])
+ end
+end
+
Please sign in to comment.
Something went wrong with that request. Please try again.