Documentation update
by Tomas Sedovic
Three things are going on here:
Firstly, this adds the Image Builder documentation to the project website.
Secondly, a small fix to make the doc pages look a bit more natural.
Thirdly, a little bit of code cleanup that makes it easier to add new
documentation pages in the future.
13 years, 12 months
Site update: the Download section and the CLI client
by Tomas Sedovic
Two small updates to the site: we removed that rusty old Aggregator RPM we had
on the site and instead pointed the visitors to the source code.
Secondly, the documentation page about our CLI client was brought to the 21st
century.
13 years, 12 months
Added No Limits on Quota, force Quota creation on Parent create
by Martyn Taylor
These two patches allow users to create quotas with nil values on the resource limits, allowing restriction of only a subset of resources. In addition it gives the ability to monitor usage of pool and cloud account objects, without specifying quotas.
13 years, 12 months
[PATCH aggregator] Image Builder - rake task for caching xml files
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
You can run "rake dc:download_repos" to cache repository XML
files. This action is optional (if cache files are not found,
Image Builder tries to download them). XML files are stored in
config/image_descriptor_xmls.
---
src/app/util/repository_manager.rb | 42 +++++++++++++++++++++--------------
src/lib/tasks/dc_tasks.rake | 21 ++++++++++++++++++
2 files changed, 46 insertions(+), 17 deletions(-)
diff --git a/src/app/util/repository_manager.rb b/src/app/util/repository_manager.rb
index abb2cee..6770faf 100644
--- a/src/app/util/repository_manager.rb
+++ b/src/app/util/repository_manager.rb
@@ -66,8 +66,31 @@ class RepositoryManager
return groups
end
+ def download_xml(type)
+ begin
+ url = get_url(type)
+ rescue
+ return ''
+ end
+
+ xml_data = open(url)
+ if url =~ /\.gz$/
+ return Zlib::GzipReader.new(xml_data).read
+ else
+ return xml_data.read
+ end
+ end
+
private
+ def get_xml(type)
+ begin
+ return File.open("#{RAILS_ROOT}/config/image_descriptor_xmls/#{(a)id}.#{type}.xml") { |f| f.read }
+ rescue
+ return download_xml(type)
+ end
+ end
+
def get_group_packages(group_node)
pkgs = {}
group_node.xpath('packagelist/packagereq').each do |p|
@@ -78,7 +101,7 @@ class RepositoryManager
def get_packages_nodes
unless @packages_nodes
- data = get_xml(get_url('primary'))
+ data = get_xml('primary')
xml = Nokogiri::XML(data)
@packages_nodes = xml.xpath('/xmlns:metadata/xmlns:package')
end
@@ -87,28 +110,13 @@ class RepositoryManager
def get_groups_nodes
unless @groups_nodes
- # if there is no group definition, group list will be empty
- begin
- url = get_url('group')
- rescue
- return []
- end
- data = get_xml(url)
+ data = get_xml('group')
xml = Nokogiri::XML(data)
@groups_nodes = xml.xpath('/comps/group')
end
return @groups_nodes
end
- def get_xml(url)
- xml_data = open(url)
- if url =~ /\.gz$/
- return Zlib::GzipReader.new(xml_data).read
- else
- return xml_data
- end
- end
-
def get_url(type)
location = @repomd.xpath("/xmlns:repomd/xmlns:data[@type=\"#{type}\"]/xmlns:location").first
raise "location for #{type} data not found" unless location
diff --git a/src/lib/tasks/dc_tasks.rake b/src/lib/tasks/dc_tasks.rake
index 4c1a9e0..6fa9e9d 100644
--- a/src/lib/tasks/dc_tasks.rake
+++ b/src/lib/tasks/dc_tasks.rake
@@ -24,4 +24,25 @@ namespace :dc do
)
puts "Granting administrator privileges for #{args.login}..."
end
+
+
+ desc 'Download repository xml files'
+ task :download_repos => :environment do |t, args|
+ require 'util/repository_manager'
+
+ base_dir = "#{RAILS_ROOT}/config/image_descriptor_xmls"
+ Dir.mkdir(base_dir) unless File.directory?(base_dir)
+
+ mgr = RepositoryManager.new
+ mgr.repositories.keys.each do |repid|
+ rep = mgr.get_repository(repid)
+
+ %w(primary group).each do |type|
+ path = "#{base_dir}/#{repid}.#{type}.xml"
+ puts "Downloading #{type} file for #{repid} repository -> #{path}"
+ File.open(path , "w") { |f| f.write rep.download_xml(type) }
+ end
+ end
+ end
+
end
--
1.7.0.1
13 years, 12 months
Grab instance launch time when available - ec2/rimuhosting
by marios@redhat.com
Rather than adding a new field to the Instance model, the 'launch_time' field is added in the drivers themselves - currently only ec2 and rimuhosting provide an 'instance creation' time in their response to 'get instance'. The haml then checks if 'launch_time' variable exists before trying to display it. Time is displayed as iso time (eg "2010-06-17T16:28:50.000Z").
13 years, 12 months
Update the Getting Started guide
by Tomas Sedovic
Hi everyone,
this patch provides the minimal number of steps necessary for contributors to
get Deltacloud quickly up and running.
Tested to work on Fedora and Ubuntu, noting the possibles gotchas.
I've removed the full dependency list and the Postgres setup as that would be
better on different pages.
These things remain to be done wrt the site:
* List of full dependencies
* Guide to set Aggregator up with PostgreSQL
* List of authors
* Update of the remaining parts of the documentation
* Dropping the old release from the Download page, adding the new one (when it's available)
I'll get to them on Monday.
14 years