On 12/22/2010 02:59 PM, Mohammed Morsi wrote: > --- > .gitignore | 1 - > README | 36 +++--------- > Rakefile | 48 +-------------- > contrib/deltacloud_recipe.spec | 70 ++++++++++++++++++++++ > deltacloud_appliance.ks | 125 > ---------------------------------------- > deltacloud_recipe.spec | 70 ---------------------- > 6 files changed, 81 insertions(+), 269 deletions(-) > create mode 100644 contrib/deltacloud_recipe.spec > delete mode 100644 deltacloud_appliance.ks > delete mode 100644 deltacloud_recipe.spec > > diff --git a/.gitignore b/.gitignore > index dac3e84..50fa14f 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -2,4 +2,3 @@ deltacloud > build/ > pkg/ > repo/ > -deltacloud_appliance.ks.new > diff --git a/README b/README > index f25ca07..229d453 100644 > --- a/README > +++ b/README > @@ -1,4 +1,4 @@ > -The Deltacloud Recipe and Appliance > +The Deltacloud Recipe > > You can find more documentation at the Deltacloud web site at > http://deltacloud.org/ > @@ -7,14 +7,10 @@ http://deltacloud.org/ > Prerequisites > ------------- > > -The deltacloud appliance makes uses of the deltacloud recipe rpm > -to install and configure all components. The appliance is built > -using the appliance tools and is deployed via libvirt > - > -See http://thincrust.net/ and http://libvirt.org/ for more information. > - > -Some commands require root access. Those commands will be executed using > sudo, so ensure that > -the user building the appliance has an appropriate entry in /etc/sudoers. > +The deltacloud recipe is a puppet module which can be used > +to install and configure deltacloud components. To make use > +of this recipe, drop it into your puppet module path or > +alternatively build and install the recipe rpm. > > > Building and Installing the Deltacloud Recipe > @@ -22,28 +18,12 @@ Building and Installing the Deltacloud Recipe > > $ rake rpms > > -The rpm will be placed into the pkg build dir, install it via yum > +The rpm will be placed into the build dir, install it via yum > $ sudo yum install --nogpgcheck \ > build/rpmbuild/RPMS/noarch/deltacloud_recipe-0.0.3-1.fc13.noarch.rpm > > -Install the recipe via > +Install deltacloud via the recipe via > $ sudo /usr/sbin/dc-install > > -Uninstall it via > +Uninstall deltacloud via > $ sudo /usr/sbin/dc-uninstall > - > -Starting the Appliance > ------------------------------------ > - > -Run the following command from the appliance project checkout directory > - > -$ rake image:deploy > - > -This will start the appliance via libvirt bringing up virt-viewer for > -graphical access. If the appliance is already found running locally this > -will fail, and you will have to run the following to destroy and delete > -the appliance. > - > -$ rake image:destroy > - > -NOTE this will destroy the image, make sure to backup any changes to it > diff --git a/Rakefile b/Rakefile > index a63d18a..e5722c0 100644 > --- a/Rakefile > +++ b/Rakefile > @@ -1,4 +1,4 @@ > -# Deltacloud Appliance Rakefile > +# Deltacloud Recipe Rakefile > > require 'rake/clean' > require 'rake/rpmtask' > @@ -8,12 +8,10 @@ CURRENT_DIR = File.dirname(__FILE__) > RPMBUILD_DIR = "#{CURRENT_DIR}/build/rpmbuild" > YUM_REPO = "#{CURRENT_DIR}/repo" > > -CLEAN.include('pkg', 'build', 'repo', 'deltacloud_appliance.ks.new') > +CLEAN.include('pkg', 'build', 'repo') > CLOBBER.include('deltacloud') > PKG_NAME = "deltacloud_recipe" > -RPM_SPEC = "deltacloud_recipe.spec" > - > -task :default => :"image:create" > +RPM_SPEC = "contrib/deltacloud_recipe.spec" > > # Build the rpm > Rake::RpmTask.new(RPM_SPEC) do |rpm| > @@ -26,43 +24,3 @@ end > Rake::YumTask.new(YUM_REPO) do |repo| > repo.rpms<< "#{RPMBUILD_DIR}/RPMS/noarch/#{PKG_NAME}*.rpm" > end > - > -namespace "image" do > - desc "create appliance image" > - task :create => :create_repo do |t,args| > - puts "NOTE: This command will only work if run as root, so we're using > 'sudo'. You have been warned!" > - cp_r "deltacloud_appliance.ks", "deltacloud_appliance.ks.new" > - sh "sed -i s-DELTACLOUD_APPLIANCE_LOCAL_REPO-#{YUM_REPO}- > deltacloud_appliance.ks.new" > - if File.exists?("deltacloud")&& args.force.nil? > - puts "Appliance exist, specify 'force=true' to overwrite" > - else > - sh "sudo appliance-creator -n deltacloud -c > deltacloud_appliance.ks.new --vmem 1024 --cache /var/tmp/act" > - end > - end > - > - desc "deploy appliance from image" > - task :deploy => :create do > - puts "NOTE: These commands will only work if run as root, so we're > using 'sudo'. You have been warned!" > - system "sudo virsh domuuid deltacloud" > - if $? == 0 > - puts "Deltacloud appliance already defined, delete with 'rake > image:destroy'" > - else > - sh "sudo virt-image deltacloud/deltacloud.xml" > - sh "sudo virsh start deltacloud" > - sh "sudo virt-viewer deltacloud" > - end > - end > - > - desc "destroy appliance and image" > - task :destroy do > - puts "NOTE: These commands will only work if run as root, so we're > using 'sudo'. You have been warned!" > - system "sudo virsh domuuid deltacloud" > - if $? == 0 > - system "sudo virsh destroy deltacloud" > - sh "sudo virsh undefine deltacloud" > - end > - if File.exists?("deltacloud") > - sh "sudo rm -rf deltacloud" > - end > - end > -end > diff --git a/contrib/deltacloud_recipe.spec b/contrib/deltacloud_recipe.spec > new file mode 100644 > index 0000000..365d802 > --- /dev/null > +++ b/contrib/deltacloud_recipe.spec > @@ -0,0 +1,70 @@ > +%define dchome /usr/share/deltacloud-recipe > +%define pbuild %{_builddir}/%{name}-%{version} > + > +Summary: DeltaCloud Puppet Recipe > +Name: deltacloud_recipe > +Version: 0.0.3 > +Release: 1%{?dist} > + > +Group: Applications/Internet > +License: GPLv2+ > +URL: http://deltacloud.org > +Source0: %{name}-%{version}.tgz > +BuildRoot: %{_tmppath}/%{name}-%{version} > +BuildArch: noarch > +Requires: ruby > + > +# We only leverage the firewall module from this, > +# not worth the overhead of pulling this in, so > +# we should implmenet our own > +Requires: ace > + > +# To send a request to iwhd rest interface to > +# create buckets, eventually replace w/ an > +# iwhd client > +Requires: curl > + > +%description > +Deltacloud Puppet Recipe > + > +%prep > +%setup -q > + > +%build > + > +%install > +rm -rf %{buildroot} > +%{__mkdir} -p %{buildroot}/%{dchome}/modules/%{name} %{buildroot}/%{_sbindir} > +%{__cp} -R %{pbuild}/%{name}/deltacloud_recipe.pp %{buildroot}/%{dchome} > +%{__cp} -R %{pbuild}/%{name}/deltacloud_uninstall.pp %{buildroot}/%{dchome} > +%{__cp} -R %{pbuild}/%{name}/*/ %{buildroot}/%{dchome}/modules/%{name} > +%{__cp} -R %{pbuild}/bin/dc-install %{buildroot}/%{_sbindir}/ > +%{__cp} -R %{pbuild}/bin/dc-uninstall %{buildroot}/%{_sbindir}/ > + > +%clean > +rm -rf %{buildroot} > + > +%files > +%defattr(-,root,root,-) > +%attr(0755, root, root) %{_sbindir}/dc-install > +%attr(0755, root, root) %{_sbindir}/dc-uninstall > +%{dchome} > + > +%changelog > +* Wed Sep 29 2010 Mohammed Morsi<[email protected]> 0.0.3-1 > +- Renamed package from deltacloud appliance > +- to deltacloud recipe > + > +* Wed Sep 29 2010 Mohammed Morsi<[email protected]> 0.0.2-3 > +- Include curl-devel for typhoeus gem > + > +* Wed Sep 29 2010 Mohammed Morsi<[email protected]> 0.0.2-2 > +- Updated to pull in latest git changes > + > +* Fri Sep 17 2010 Mohammed Morsi<[email protected]> 0.0.2-1 > +- Updated packages pulled in to latest versions > +- Various fixes > +- Added initial image warehouse bits > + > +* Thu Sep 02 2010 Mohammed Morsi<[email protected]> 0.0.1-1 > +- Initial package > diff --git a/deltacloud_appliance.ks b/deltacloud_appliance.ks > deleted file mode 100644 > index b5b7af9..0000000 > --- a/deltacloud_appliance.ks > +++ /dev/null > @@ -1,125 +0,0 @@ > -# Deltacloud appliance kickstart > - > -# Yum repos to use > -repo --name=f13 > --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-13&arch=$basearch > -repo --name=f13-updates > --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f13&arch=$basearch > -repo --name=thincrust --baseurl=http://www.thincrust.net/repo/noarch/ > - > -# deltacloud yum repos: > -# * ruby 1.8.7 > -# * rails 2.3.8 > -# * patched activerecord, haml, and puppet rpms (to fix issues) > -# * deltacloud aggregator rpms > -# * condor-dcloud and libdeltacloud > -# * hail > -repo --name=deltacloud_arch > --baseurl=http://repos.fedorapeople.org/repos/deltacloud/appliance/fedora-13/$basearch > -repo --name=deltacloud_noarch > --baseurl=http://repos.fedorapeople.org/repos/deltacloud/appliance/fedora-13/noarch > - > -repo --name=deltacloud_local > --baseurl=file://DELTACLOUD_APPLIANCE_LOCAL_REPO > - > -# pull pulp in from here > -repo --name=pulp > --baseurl=http://repos.fedorapeople.org/repos/pulp/pulp/fedora-13/$basearch/ > - > -# Firewall / network configuration > -firewall --enable --ssh > -network --bootproto=dhcp --device=eth0 --onboot=on > - > -# System authorization information > -auth --useshadow --enablemd5 > - > -# System keyboard > -keyboard us > - > -# System language > -lang en_US.UTF-8 > - > -# System timezone > -timezone US/Eastern > - > -# System bootloader configuration > -bootloader --append="5 console=tty0 console=ttyS0,115200" --location=mbr > --timeout=1 > - > -# Disk partitioning information > -part / --fstype="ext3" --ondisk=sda --size=3072 > - > -# No need for additional config > -firstboot --disable > - > -%post > - /sbin/chkconfig --level 35 ace on > - mkdir /etc/sysconfig/ace > - echo deltacloud_appliance>> /etc/sysconfig/ace/appliancename > - > - # start mongodb and httpd for pulp server > - /sbin/chkconfig --level 35 mongod on > - /sbin/chkconfig --level 35 httpd on > -%end > - > -%packages --excludedocs --nobase --instLangs=en > -...@core > -...@base-x > -...@gnome-desktop > -acpid > -bash > -chkconfig > -dhclient > -e2fsprogs > -git > -gnuplot > -grub > -guestfish > -iputils > -libguestfs > -kernel > -lokkit > -parted > -passwd > -rootfiles > -rpmdevtools > -rubygem-boxgrinder-build > -rubygem-boxgrinder-build-centos-os-plugin > -rubygem-boxgrinder-build-ec2-platform-plugin > -rubygem-boxgrinder-build-fedora-os-plugin > -rubygem-boxgrinder-build-local-delivery-plugin > -rubygem-boxgrinder-build-rhel-os-plugin > -rubygem-boxgrinder-build-rpm-based-os-plugin > -rubygem-boxgrinder-build-s3-delivery-plugin > -rubygem-boxgrinder-build-sftp-delivery-plugin > -rubygem-boxgrinder-build-vmware-platform-plugin > -rubygem-boxgrinder-core > -rubygem-spqr > -rubygem-uuid > -ruby-libguestfs > -vim-enhanced > -wget > -bind-utils > -sudo > -qpidc > -qpidd > -yum > -yum-utils > -firefox > --authconfig > --checkpolicy > --dmraid > --ed > --fedora-logos > --fedora-release-notes > --kbd > --kpartx > --kudzu > --libselinux > --libselinux-python > --lvm2 > --mdadm > --policycoreutils > --prelink > --selinux-policy* > --setserial > --tar > --usermode > --wireless-tools > --firstboot > - > -deltacloud_appliance > -%end > diff --git a/deltacloud_recipe.spec b/deltacloud_recipe.spec > deleted file mode 100644 > index 365d802..0000000 > --- a/deltacloud_recipe.spec > +++ /dev/null > @@ -1,70 +0,0 @@ > -%define dchome /usr/share/deltacloud-recipe > -%define pbuild %{_builddir}/%{name}-%{version} > - > -Summary: DeltaCloud Puppet Recipe > -Name: deltacloud_recipe > -Version: 0.0.3 > -Release: 1%{?dist} > - > -Group: Applications/Internet > -License: GPLv2+ > -URL: http://deltacloud.org > -Source0: %{name}-%{version}.tgz > -BuildRoot: %{_tmppath}/%{name}-%{version} > -BuildArch: noarch > -Requires: ruby > - > -# We only leverage the firewall module from this, > -# not worth the overhead of pulling this in, so > -# we should implmenet our own > -Requires: ace > - > -# To send a request to iwhd rest interface to > -# create buckets, eventually replace w/ an > -# iwhd client > -Requires: curl > - > -%description > -Deltacloud Puppet Recipe > - > -%prep > -%setup -q > - > -%build > - > -%install > -rm -rf %{buildroot} > -%{__mkdir} -p %{buildroot}/%{dchome}/modules/%{name} %{buildroot}/%{_sbindir} > -%{__cp} -R %{pbuild}/%{name}/deltacloud_recipe.pp %{buildroot}/%{dchome} > -%{__cp} -R %{pbuild}/%{name}/deltacloud_uninstall.pp %{buildroot}/%{dchome} > -%{__cp} -R %{pbuild}/%{name}/*/ %{buildroot}/%{dchome}/modules/%{name} > -%{__cp} -R %{pbuild}/bin/dc-install %{buildroot}/%{_sbindir}/ > -%{__cp} -R %{pbuild}/bin/dc-uninstall %{buildroot}/%{_sbindir}/ > - > -%clean > -rm -rf %{buildroot} > - > -%files > -%defattr(-,root,root,-) > -%attr(0755, root, root) %{_sbindir}/dc-install > -%attr(0755, root, root) %{_sbindir}/dc-uninstall > -%{dchome} > - > -%changelog > -* Wed Sep 29 2010 Mohammed Morsi<[email protected]> 0.0.3-1 > -- Renamed package from deltacloud appliance > -- to deltacloud recipe > - > -* Wed Sep 29 2010 Mohammed Morsi<[email protected]> 0.0.2-3 > -- Include curl-devel for typhoeus gem > - > -* Wed Sep 29 2010 Mohammed Morsi<[email protected]> 0.0.2-2 > -- Updated to pull in latest git changes > - > -* Fri Sep 17 2010 Mohammed Morsi<[email protected]> 0.0.2-1 > -- Updated packages pulled in to latest versions > -- Various fixes > -- Added initial image warehouse bits > - > -* Thu Sep 02 2010 Mohammed Morsi<[email protected]> 0.0.1-1 > -- Initial package
ACK _______________________________________________ deltacloud-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/deltacloud-devel
