This patch changes the way we generate documentation pages. Instead of using HTML/HAML sources, we're generating them from the docs/*.mdown sources.
I've introduced new webby layout specifically for the documentation. The rest is left untouched.
From: Tomas Sedovic tsedovic@redhat.com
Replaced the content of the documentation *.haml files by reference to their markdown sources.
Added new layout into which (only) the documentation output is rendered. --- deltacloud.org/content/_documentation-menu.haml | 20 + deltacloud.org/content/api.haml | 696 +---------------------- deltacloud.org/content/client-ruby.haml | 299 +---------- deltacloud.org/content/documentation.haml | 127 +---- deltacloud.org/content/drivers.haml | 276 +--------- deltacloud.org/content/framework.haml | 680 +---------------------- deltacloud.org/layouts/documentation.haml | 99 ++++ 7 files changed, 158 insertions(+), 2039 deletions(-) create mode 100644 deltacloud.org/content/_documentation-menu.haml create mode 100644 deltacloud.org/layouts/documentation.haml
diff --git a/deltacloud.org/content/_documentation-menu.haml b/deltacloud.org/content/_documentation-menu.haml new file mode 100644 index 0000000..05cd8cc --- /dev/null +++ b/deltacloud.org/content/_documentation-menu.haml @@ -0,0 +1,20 @@ +--- +filter: + - erb + - haml +--- +<% menu = [ + { :href => 'documentation.html', :text => 'Overview' }, + { :href => "api.html" , :text => 'REST API' }, + { :href => "client-ruby.html" , :text => 'Ruby Client' }, + { :href => "drivers.html" , :text => 'Drivers' }, + { :href => "framework.html" , :text => 'Framework' } ] %> + +#subnavigation + #submenu.container + %ul.l1 + <% menu.each do |link| %> + %li + %a.<%= 'in' unless link[:href] == current_page %>active{ :href => "<%= link[:href] %>" } + <%= link[:text] %> + <% end %> diff --git a/deltacloud.org/content/api.haml b/deltacloud.org/content/api.haml index 6c5ed23..5f18a0d 100644 --- a/deltacloud.org/content/api.haml +++ b/deltacloud.org/content/api.haml @@ -1,692 +1,12 @@ --- +title: Deltacloud - Documentation extension: html -filter: erb -filter: haml +layout: documentation.haml +filter: + - erb + - markdown + - outline --- -!!! Strict -%html - %head - %title - Deltacloud - Documentation - %meta{ :name => "keywords", :content => "" } - %meta{ :name => "description", :content => "" } - %meta{ :content => "text/html; charset=utf-8", "http-equiv" => "Content-Type" } - %link{ :href => "./styles/favicon.ico", :rel => "shortcut icon", :type => "image/x-icon" } - %link{ :href => "./styles/default.css", :title => "Main style", :rel => "StyleSheet", :type => "text/css" } - %link{ :href => "./styles/default-debug.css", :title => "Debug main style", :rel => "Alternate StyleSheet", :type => "text/css" } - %body - #header - .container - #headerLogo{ :onclick => "location.href='index.html';", :style => "cursor: pointer;" } - %h1 - Deltacloud - Many clouds. One API. No problem. - #navigation - #menu.container - %ul.l0 - %li - %a.inactive{ :href => "./index.html", :title => "Deltacloud Home" } - Home - %li - %a.inactive{ :href => "./tools.html", :title => "Tools" } - Tools - %li - %a.inactive{ :href => "./download.html", :title => "Get the latest releases" } - Download - %li - %a.inactive{ :href => "./contribute.html", :title => "Information about design/development process" } - Contribute - %li - %a.active{ :href => "./documentation.html", :title => "Project documentation" } - Documentation - %li - %a.inactive{ :href => "./page", :title => "Project wiki" } - Wiki - #subnavigation - #submenu.container - %ul.l1 - %li - %a.inactive{ :href => "documentation.html" } - Overview - %li - %a.active{ :href => "api.html" } - REST API - %li - %a.inactive{ :href => "client-ruby.html" } - Ruby Client - %li - %a.inactive{ :href => "drivers.html" } - Drivers - %li - %a.inactive{ :href => "framework.html" } - Framework - #main - #content-deltacloud.container - %ul.toc - %li - %a{ :href => "#rest" } - REST - %li - %a{ :href => "#authentication" } - Authentication - %li - %a{ :href => "#primary_entry_point" } - Primary Entry Point - %li - %a{ :href => "#resources" } - Resources - %ul - %li - %a{ :href => "#resources_flavors" } - Flavors - %li - %a{ :href => "#resources_realms" } - Realms - %li - %a{ :href => "#resources_images" } - Images - %li - %a{ :href => "#resources_instances" } - Instances - %h1 - Deltacloud API - %p - The Deltacloud API is built as a service-based REST API. - You do not directly link a Deltacloud library into your - program to use it. Instead, a client speaks the Deltacloud - API over HTTP to a server which implements the REST interface. - %p - Of course, at this point in time, no cloud provider - natively speaks the Deltacloud API. To accomodate - the native APIs used by the various cloud providers, - the Deltacloud project also provides a - %em - framework - and a set of - %em - drivers - that work with the framework. - %p - By running a framework & driver combination on some - host, your application can use the Deltacloud API, - and the driver is responsible for translating these - calls into each provider's own API. - %h2 - %a{ :name => "rest" } - REST - %p - The Deltacloud API is a RESTful API, using HATEOAS - architectural style. The API requires no client-side - URL construction. Access is based entirely off a - single entry-point resource. This allows other implementors - to structure their URL space however they like. - %p - Additionally, the Deltacloud API uses - %em - content negotiation - to determine the format of the returned representation. As - of the current revision, the only required representation is - XML. Clients wishing to receive XML representations must - specify the HTTP - %code - Accept - header as - %code - text/xml - . - %h2 - %a{ :name => "authentication" } - Authentication - %p - The Deltacloud API uses HTTP authentication methods for - authenticating a given client. There is no explicit - %em - login - action required. If authentication is required, - an HTTP status of 401 will be returned to challenge - for credentials. - %h2 - %a{ :name => "primary_entry_point" } - Primary Entry Point - %p - Any Deltacloud implementor - %em - must - provide exactly - one well-known URL as an entry-point. For example, - %code - http://fancycloudprovider.com/api - . - %p - The result of this entry-point is a set of entry-points - into other collections, such as - %em - images - , - %em - instances - , - %em - flavors - and - %em - realms - , among others. - %p - Each collection is defined by a - %code - <link> - tag with an - %code - href - attribute which includes the fully-qualified URL - to the collection (which - %em - may - exist on different servers) - and a - %code - rel - attribute to denote which collection is being - specified. - %pre - %code - <api driver='ec2' version='1.0'> - <link href='http://fancycloudprovider.com/api/flavors' rel='flavors' /> - <link href='http://fancycloudprovider.com/api/instance-states' rel='instance_states' /> - <link href='http://fancycloudprovider.com/api/realms' rel='realms' /> - <link href='http://fancycloudprovider.com/api/images' rel='images' /> - <link href='http://fancycloudprovider.com/api/instances' rel='instances' /> - </api> - %h2 - %a{ :name => "resources" } - Resources - %p - From the primary entry-point, a client may follow the URL provided for - a collection to retrieve the resources within that collection. The collection - representation will include the full representations of the items within it, - along with links to retrieve each item individually. - %p - %img{ :src => "styles/basic-relationships.png", :alt => "Basic relationships" } - %h3 - %a{ :name => "resources_flavors" } - Flavors - %p - Within a cloud provider a - %em - flavor - represents a configuration of resources upon - which a machine may be deployed. A flavor defines aspects such as local disk storage, - available RAM, and architecture. A future revision of the Deltacloud API will - include more aspects, including number and speed of CPUs available. Each provider - is free to define as many (or as few) flavors as desired. - %pre - %code - <flavors> - <flavor href="http://fancycloudprovider.com/api/flavors/m1-small%22%3E; - <id>m1-small</id> - <architecture>i386</architecture> - <memory>1.7</memory> - <storage>160</storage> - </flavor> - <flavor href="http://fancycloudprovider.com/api/flavors/m1-large%22%3E; - <id>m1-large</id> - <architecture>x86_64</architecture> - <memory>7.5</memory> - <storage>850</storage> - </flavor> - </flavors> - %p - Each - %code - <flavor> - block shall contain an - %code - href - attribute providing a URL to manipulate a - specific flavor, along with elements for each attribute of a flavor. - %ul - %li - %strong - %code - id - A unique identifier for the flavor - %li - %strong - %code - architecture - The architecture - %ul - %li - i386 - %li - x86_64 - %li - %strong - %code - memory - The amount of RAM, in gigabytes. - %li - %strong - %code - storage - The amount of local disk storage, in gigabytes. - %p - At this time, flavor resources are immutable and read-only. In a future revision - they may be mutable. - %h3 - %a{ :name => "resources_realms" } - Realms - %p - Within a cloud provider a - %em - realm - represents a boundary containing resources. The - exact definition of a realm is left to the cloud provider. In some cases, a realm - may represent different datacenters, different continents, or different pools of - resources within a single datacenter. A cloud provider may insist that resources - must all exist within a single realm in order to cooperate. For instance, storage - volumes may only be allowed to be mounted to instances within the same realm. - %pre - %code - <realms> - <realm href="http://fancycloudprovider.com/api/realms/us%22%3E; - <id>us</id> - <name>United States</name> - <state>AVAILABLE</state> - <limit/> - </realm> - <realm href="http://fancycloudprovider.com/api/realms/eu%22%3E; - <id>eu</id> - <name>Europe</name> - <state>AVAILABLE</state> - <limit/> - </realm> - </realms> - %p - Each - %code - <realm> - block shall contain an - %code - href - attribute providing a URL to manipulate a - specific realm, along with elements for each attribute of a realm. - %ul - %li - %strong - %code - id - A unique identifier for the realm - %li - %strong - %code - name - A short label - %li - %strong - %code - state - Indicator of the current state of a realm - %ul - %li - AVAILABLE - %li - UNAVAILABLE - %li - %strong - %code - limit - Limits applicable for the - %em - current requester - %h3 - %a{ :name => "resources_images" } - Images - %p - An - %em - image - is a platonic form of a machine. Images are not directly - executable, but are a template for creating actual instances of - machines. - %p - The instances collection will return a set of all images available to - the current user. - %pre - %code - <images> - <image href="http://fancycloudprovider.com/api/images/img1%22%3E; - <id>img1</id> - <owner_id>fedoraproject</owner_id> - <name></name> - <description>Fedora 10</description> - <architecture>x86_64</architecture> - </image> - <image href="http://fancycloudprovider.com/api/images/img2%22%3E; - <id>img2</id> - <owner_id>fedoraproject</owner_id> - <name></name> - <description>Fedora 10</description> - <architecture>i386</architecture> - </image> - <image href="http://fancycloudprovider.com/api/images/img3%22%3E; - <id>img3</id> - <owner_id>ted</owner_id> - <name></name> - <description>JBoss</description> - <architecture>i386</architecture> - </image> - </images> - %p - Each - %code - <image> - block - %em - shall - contain an - %code - href - attribute providing - a URL to manipulate a specific image, along with elements for each - attribute of an image. Each element, including those for optional - attributes must be present. Optional attributes may be specified - as a element with empty content. - %p - These attributes include - %ul - %li - %strong - %code - id - A unique identifier for the image - %li - %strong - %code - owner_id - An opaque identifier which indicates the owner of an image - %li - %strong - %code - name - An - %em - optional - short label describing the image - %li - %strong - %code - description - An - %em - optional - description describing the image more fully - %li - %strong - %code - architecture - A description of the machine architecture of the image - which may contain values such as: - %ul - %li - %code - i386 - %li - %code - x86_64 - %p - At this time, image resources are immutable and read-only. In a future revision - they will be mutable. - %h3 - %a{ :name => "resources_instances" } - Instances - %p - An - %em - instance - is a concrete machine realized from an - %em - image - . The images - collection may be obtained by following the link from the primary entry-point. - %pre - %code - <instances> - <instance href="http://fancycloudprovider.com/api/instances/inst1%22%3E; - <id>inst1</id> - <owner_id>larry</owner_id> - <name>Production JBoss Instance</name> - <image href="http://fancycloudprovider.com/api/images/img3%22/%3E; - <flavor href="http://fancycloudprovider.com/api/flavors/m1-small%22/%3E; - <realm href="http://fancycloudprovider.com/api/realms/us%22/%3E; +<toc numbering="off" toc_style="ul" toc_range="h2-h3" />
- <state>RUNNING</state> - <actions> - <link rel="reboot" href="http://fancycloudprovider.com/api/instances/inst1/reboot%22/%3E; - <link rel="stop" href="http://fancycloudprovider.com/api/instances/inst1/stop%22/%3E; - </actions> - <public-addresses> - <address>inst1.larry.fancycloudprovider.com</address> - </public-addresses> - - <private-addresses> - <address>inst1.larry.internal</address> - </private-addresses> - </instance> - </instances> - %p - Each - %code - <instance> - block shall contain an href attribute providing a URL to manipulate a - specific instance, along with elements for each attribute of an instance. Each element, - including those for optional attributes must be present. Optional attributes may be - specified as a element with empty content. - %p - Simple attributes include - %ul - %li - %strong - %code - id - A unique identifier for the instance - %li - %strong - %code - owner_id - An opaque identifier which indicates the owner of an instance - %li - %strong - %code - name - An - %em - optional - short label describing the instance - %li - %strong - %code - image - Provides a link to the platonic image from which the instance is based - %li - %strong - %code - flavor - Provides a link to flavor of virtual hardware in use by the instance - %li - %strong - %code - realm - Provides a link to the realm where the instance is deployed - %li - %strong - %code - state - Indicator of the instance's current state - %ul - %li - %code - PENDING - %li - %code - STOPPED - %li - %code - RUNNING - %p - Multiple-valued attributes include - %ul - %li - %strong - %code - public-addresses - Publicly routable IP addresses or names for the instance - %li - %strong - %code - private-addresses - Private network IP addresses or names for the instance - %p - In addition to the abovementioned attributes, each - %code - <instance> - may contain an - %code - <actions> - block specifying valid actions for the instance, along with the URL - which may be used to perform the action. Each action is specified by a - %code - <link> - with an - %code - href - attribute providing the URL, and a - %code - rel - attribute providing - a key to determine what the action will do. - %p - Representative actions include - %ul - %li - %code - reboot - %li - %code - start - %li - %code - stop - %p - Not all actions may be valid at all times for all instances. To invoke an - action, a client must perform an HTTP - %code - POST - to the URL indicated. - %h4 - Creating a new Instance - %p - Per usual REST architectural style, new instances are created by issuing - an HTTP - %code - POST - to the instances collection as defined through the - primary entry-point URL. Data should be sent in - %code - application/x-www-form-urlencoded - format. - %p - To create a new instance, only one parameter is required - %ul - %li - %strong - %code - image_id - The identifier (not URL) of the image from which to base the instance - %p - Optional parameters may also be provided - %ul - %li - %strong - %code - realm_id - The realm in which to launch the instance - %li - %strong - %code - flavor_id - The machine flavor upon which to launch the instance - %li - %strong - %code - name - A short label to identify the instance - %p - If - %code - realm_id - or - %code - flavor_id - are not specified, the provider - %em - must - select - reasonable defaults. The architecture of the selected flavor - %em - must - match the - architecture of the specified image. - %p - After - %code - POST - ing the data, the server - %em - shall - return a representation of - the newly-created instance's XML, including a URL to retrieve the instance - in the future. - #footer-deltacloud - #projects.container - %p#et - %a{ :href => "http://et.redhat.com/" } - %img{ :src => "./styles/et_logo.png", :alt => "A Red Hat Emerging Technology Project" } - %dl#p1 - %dt - %a{ :href => "http://augeas.net/" } - Augeas - %dd - %span - A configuration editing tool and API - %dt - %a{ :href => "http://libvirt.org/" } - libvirt - %dd - %span - The open source virtualization API - %dl#p2 - %dt - %a{ :href => "http://cobbler.et.redhat.com/" } - Cobbler - %dd - OS provisioning and profile management - %dt - %a{ :href => "http://libguestfs.org/" } - virt-v2v - %dd - %span - Migrate guests from one hypervisor to another - %dl#p3 - %dt - %a{ :href => "http://freeipa.org/" } - FreeIPA - %dd - %span - Identity, policy and audit management - %dt - %a{ :href => "http://virt-manager.org/" } - Virtual Machine Manager - %dd - %span - Virtualization management from the desktop +<%= File.open('../docs/api.mdown').read %> diff --git a/deltacloud.org/content/client-ruby.haml b/deltacloud.org/content/client-ruby.haml index 77300e9..9b2cf26 100644 --- a/deltacloud.org/content/client-ruby.haml +++ b/deltacloud.org/content/client-ruby.haml @@ -1,295 +1,12 @@ --- +title: Deltacloud - Documentation extension: html -filter: erb -filter: haml +layout: documentation.haml +filter: + - erb + - markdown + - outline --- -!!! Strict -%html - %head - %title - Deltacloud - Documentation - %meta{ :name => "keywords", :content => "" } - %meta{ :name => "description", :content => "" } - %meta{ :content => "text/html; charset=utf-8", "http-equiv" => "Content-Type" } - %link{ :href => "./styles/favicon.ico", :rel => "shortcut icon", :type => "image/x-icon" } - %link{ :href => "./styles/default.css", :title => "Main style", :rel => "StyleSheet", :type => "text/css" } - %link{ :href => "./styles/default-debug.css", :title => "Debug main style", :rel => "Alternate StyleSheet", :type => "text/css" } - %body - #header - .container - #headerLogo{ :onclick => "location.href='index.html';", :style => "cursor: pointer;" } - %h1 - Deltacloud - Many clouds. One API. No problem. - #navigation - #menu.container - %ul.l0 - %li - %a.inactive{ :href => "./index.html", :title => "Deltacloud Home" } - Home - %li - %a.inactive{ :href => "./tools.html", :title => "Tools" } - Tools - %li - %a.inactive{ :href => "./download.html", :title => "Get the latest releases" } - Download - %li - %a.inactive{ :href => "./contribute.html", :title => "Information about design/development process" } - Contribute - %li - %a.active{ :href => "./documentation.html", :title => "Project documentation" } - Documentation - %li - %a.inactive{ :href => "./page", :title => "Project wiki" } - Wiki - #subnavigation - #submenu.container - %ul.l1 - %li - %a.inactive{ :href => "documentation.html" } - Overview - %li - %a.inactive{ :href => "api.html" } - REST API - %li - %a.active{ :href => "client-ruby.html" } - Ruby Client - %li - %a.inactive{ :href => "drivers.html" } - Drivers - %li - %a.inactive{ :href => "framework.html" } - Framework - #main - #content-deltacloud.container - %ul.toc - %li - %a{ :href => "#basics" } - Basics - %li - %a{ :href => "#connecting_to_a_deltacloud_provider" } - Connecting to a Deltacloud provider - %li - %a{ :href => "#listing_realms" } - Listing realms - %li - %a{ :href => "#listing_flavors" } - Listing flavors - %li - %a{ :href => "#listing_images" } - Listing images - %li - %a{ :href => "#listing_instances" } - Listing instances - %li - %a{ :href => "#launching_instances" } - Launching instances - %li - %a{ :href => "#manipulating_instances" } - Manipulating instances - %h1 - Deltacloud Client (Ruby) - %p - The Deltacloud project includes a Ruby client. Other language-bindings - are possible and will be supported soon. The client aims to insulate - users from having to deal with HTTP and REST directly. - %p - Each resource type has an associated model to ease usage. Where - resource reference other resources, natural navigation across the - object model is possible. - %p - For example - %pre - %code - puts instance.image.name - puts instance.flavor.architecture - %h2 - %a{ :name => "basics" } - Basics - %p - To use the client, you must require - %code - deltacloud - . - %pre - %code - require 'deltacloud' - %h2 - %a{ :name => "connecting_to_a_deltacloud_provider" } - Connecting to a Deltacloud provider - %pre - %code - require 'deltacloud' +<toc numbering="off" toc_style="ul" toc_range="h2-h3" />
- api_url = 'http://fancycloudprovider.com/api' - api_name = 'larry' - api_password = 'swordfish' - - client = DeltaCloud.new( api_url, api_name, api_password ) - - # work with client here - %p - In addition to creating a client, operations may occur within a block - included on the initialization - %pre - %code - DeltaCloud.new( api_url, api_name, api_password ) do |client| - # work with client here - end - %p - In the event of a failure, any underlying HTTP transport exceptions - will be thrown all the way out to the caller. - %h2 - %a{ :name => "listing_realms" } - Listing realms - %p - You may retrieve a complete list of realms available to you - %pre - %code - realms = client.realms - %p - You may retrieve a specific realm by its identifier - %pre - %code - realm = client.realm( 'us' ) - %h2 - %a{ :name => "listing_flavors" } - Listing flavors - %p - You may retrieve a complete list of flavors available for launching - machines - %pre - %code - flavors = client.flavors - %p - You may filter flavors by architecture - %pre - %code - flavors = client.flavors( :architecture=>'x86_64' ) - %p - You may retrieve a specific flavor by its identifier - %pre - %code - flavor = client.flavor( 'm1-small' ) - %h2 - %a{ :name => "listing_images" } - Listing images - %p - You may retrieve a complete list of images - %pre - %code - images = client.images - %p - You may retrieve a list of images owned by the currently authenticated - user - %pre - %code - images = client.images( :owner_id=>:self ) - %p - You may retrieve a list of images visible to you but owned by a specific - user - %pre - %code - images = client.images( :owner_id=>'daryll' ) - %p - You may retrieve a specific image by its identifier - %pre - %code - image = client.image( 'ami-8675309' ) - %h2 - %a{ :name => "listing_instances" } - Listing instances - %p - You may retrieve a list of all instances visible to you - %pre - %code - instances = client.instances - %p - You may retrieve a specific instance by its identifier - %pre - %code - instance = client.instance( 'i-90125' ) - %h2 - %a{ :name => "launching_instances" } - Launching instances - %p - An instance may be launched using just an image identifier - %pre - %code - image = client.image( 'ami-8675309' ) - instance = client.create_instance( image.id ) - %p - Optionally, a flavor or realm may be specified - %pre - %code - instance = client.create_instance( image.id, :flavor=>'m1-small', :realm=>'us' ) - %h2 - %a{ :name => "manipulating_instances" } - Manipulating instances - %p - Given an instance, depending on its state, various actions - %em - may - be available. - %p - To determine what's available, the - %code - instance#available_actions - method may be used. - %pre - %code - instance.available_actions # [ 'reboot', 'stop' ] - %p - For a valid action, the method matching the action with an exclamation point may be called. - %pre - %code - instance.reboot! - %p - Upon invoking an action, the instance will refresh its contents, in case the state has changed. - To determine later if the state has changed again, the instance must be refetched using - the - %code - client.instance(...) - method. - #footer-deltacloud - #projects.container - %p#et - %a{ :href => "http://et.redhat.com/" } - %img{ :src => "./styles/et_logo.png", :alt => "A Red Hat Emerging Technology Project" } - %dl#p1 - %dt - %a{ :href => "http://augeas.net/" } - Augeas - %dd - %span - A configuration editing tool and API - %dt - %a{ :href => "http://libvirt.org/" } - libvirt - %dd - %span - The open source virtualization API - %dl#p2 - %dt - %a{ :href => "http://cobbler.et.redhat.com/" } - Cobbler - %dd - OS provisioning and profile management - %dt - %a{ :href => "http://libguestfs.org/" } - virt-v2v - %dd - %span - Migrate guests from one hypervisor to another - %dl#p3 - %dt - %a{ :href => "http://freeipa.org/" } - FreeIPA - %dd - %span - Identity, policy and audit management - %dt - %a{ :href => "http://virt-manager.org/" } - Virtual Machine Manager - %dd - %span - Virtualization management from the desktop +<%= File.open('../docs/client-ruby.mdown').read %> diff --git a/deltacloud.org/content/documentation.haml b/deltacloud.org/content/documentation.haml index 2fc1838..f8a3b69 100644 --- a/deltacloud.org/content/documentation.haml +++ b/deltacloud.org/content/documentation.haml @@ -1,124 +1,9 @@ --- +title: Deltacloud - Documentation extension: html -filter: erb -filter: haml +layout: documentation.haml +filter: + - erb + - markdown --- -!!! Strict -%html - %head - %title - Deltacloud - Documentation - %meta{ :name => "keywords", :content => "" } - %meta{ :name => "description", :content => "" } - %meta{ :content => "text/html; charset=utf-8", "http-equiv" => "Content-Type" } - %link{ :href => "./styles/favicon.ico", :rel => "shortcut icon", :type => "image/x-icon" } - %link{ :href => "./styles/default.css", :title => "Main style", :rel => "StyleSheet", :type => "text/css" } - %link{ :href => "./styles/default-debug.css", :title => "Debug main style", :rel => "Alternate StyleSheet", :type => "text/css" } - %body - #header - .container - #headerLogo{ :onclick => "location.href='index.html';", :style => "cursor: pointer;" } - %h1 - Deltacloud - Many clouds. One API. No problem. - #navigation - #menu.container - %ul.l0 - %li - %a.inactive{ :href => "./index.html", :title => "Deltacloud Home" } - Home - %li - %a.inactive{ :href => "./tools.html", :title => "Tools" } - Tools - %li - %a.inactive{ :href => "./download.html", :title => "Get the latest releases" } - Download - %li - %a.inactive{ :href => "./contribute.html", :title => "Information about design/development process" } - Contribute - %li - %a.active{ :href => "./documentation.html", :title => "Project documentation" } - Documentation - %li - %a.inactive{ :href => "./page", :title => "Project wiki" } - Wiki - #subnavigation - #submenu.container - %ul.l1 - %li - %a.active{ :href => "documentation.html" } - Overview - %li - %a.inactive{ :href => "api.html" } - REST API - %li - %a.inactive{ :href => "client-ruby.html" } - Ruby Client - %li - %a.inactive{ :href => "drivers.html" } - Drivers - %li - %a.inactive{ :href => "framework.html" } - Framework - #main - #content-deltacloud.container - %ul.toc - %h1 - Documentation - %p - The Deltacloud documentation is broken into 4 parts - %ul - %li - %a{ :href => "api.html" } - REST API definition - %li - %a{ :href => "client-ruby.html" } - Ruby client - %li - %a{ :href => "drivers.html" } - Currently-supported drivers - %li - %a{ :href => "framework.html" } - Framework for writing additional drivers - #footer-deltacloud - #projects.container - %p#et - %a{ :href => "http://et.redhat.com/" } - %img{ :src => "./styles/et_logo.png", :alt => "A Red Hat Emerging Technology Project" } - %dl#p1 - %dt - %a{ :href => "http://augeas.net/" } - Augeas - %dd - %span - A configuration editing tool and API - %dt - %a{ :href => "http://libvirt.org/" } - libvirt - %dd - %span - The open source virtualization API - %dl#p2 - %dt - %a{ :href => "http://cobbler.et.redhat.com/" } - Cobbler - %dd - OS provisioning and profile management - %dt - %a{ :href => "http://libguestfs.org/" } - virt-v2v - %dd - %span - Migrate guests from one hypervisor to another - %dl#p3 - %dt - %a{ :href => "http://freeipa.org/" } - FreeIPA - %dd - %span - Identity, policy and audit management - %dt - %a{ :href => "http://virt-manager.org/" } - Virtual Machine Manager - %dd - %span - Virtualization management from the desktop +<%= File.open('../docs/documentation.mdown').read %> diff --git a/deltacloud.org/content/drivers.haml b/deltacloud.org/content/drivers.haml index 300cbfc..bf5554c 100644 --- a/deltacloud.org/content/drivers.haml +++ b/deltacloud.org/content/drivers.haml @@ -1,270 +1,12 @@ --- +title: Deltacloud - Documentation extension: html -filter: erb -filter: haml +layout: documentation.haml +filter: + - erb + - markdown + - outline --- -!!! Strict -%html - %head - %title - Deltacloud - Documentation - %meta{ :name => "keywords", :content => "" } - %meta{ :name => "description", :content => "" } - %meta{ :content => "text/html; charset=utf-8", "http-equiv" => "Content-Type" } - %link{ :href => "./styles/favicon.ico", :rel => "shortcut icon", :type => "image/x-icon" } - %link{ :href => "./styles/default.css", :title => "Main style", :rel => "StyleSheet", :type => "text/css" } - %link{ :href => "./styles/default-debug.css", :title => "Debug main style", :rel => "Alternate StyleSheet", :type => "text/css" } - %body - #header - .container - #headerLogo{ :onclick => "location.href='index.html';", :style => "cursor: pointer;" } - %h1 - Deltacloud - Many clouds. One API. No problem. - #navigation - #menu.container - %ul.l0 - %li - %a.inactive{ :href => "./index.html", :title => "Deltacloud Home" } - Home - %li - %a.inactive{ :href => "./tools.html", :title => "Tools" } - Tools - %li - %a.inactive{ :href => "./download.html", :title => "Get the latest releases" } - Download - %li - %a.inactive{ :href => "./contribute.html", :title => "Information about design/development process" } - Contribute - %li - %a.active{ :href => "./documentation.html", :title => "Project documentation" } - Documentation - %li - %a.inactive{ :href => "./page", :title => "Project wiki" } - Wiki - #subnavigation - #submenu.container - %ul.l1 - %li - %a.inactive{ :href => "documentation.html" } - Overview - %li - %a.inactive{ :href => "api.html" } - REST API - %li - %a.inactive{ :href => "client-ruby.html" } - Ruby Client - %li - %a.active{ :href => "drivers.html" } - Drivers - %li - %a.inactive{ :href => "framework.html" } - Framework - #main - #content-deltacloud.container - %ul.toc - %li - %a{ :href => "#setting_up_the_code" } - Setting up the code - %li - %a{ :href => "#launch_the_server" } - Launch the server - %ul - %li - %a{ :href => "#launch_the_server_ec2_driver" } - EC2 Driver - %li - %a{ :href => "#launch_the_server_rhev-m_driver" } - RHEV-M Driver - %li - %a{ :href => "#launch_the_server_rackspace_driver" } - Rackspace Driver - %li - %a{ :href => "#launch_the_server_rimuhosting" } - RimuHosting - %li - %a{ :href => "#launch_the_server_opennebula" } - OpenNebula - %h1 - Deltacloud Drivers - %p - The Deltacloud project current delivers two functional drivers, plus - a mock driver for testing without a cloud provider. - %ul - %li - Amazon EC2 - %li - Red Hat Enterprise Virtualization Manager (RHEV-M) - %li - Rackspace Cloud - %li - RimuHosting Cloud - %li - OpenNebula - %h2 - %a{ :name => "setting_up_the_code" } - Setting up the code - %p - To set up a given driver, currently, you must checkout the code - for both the - %a{ :href => "framework.html" } - framework - and the drivers you wish to use. - %p - Check out the core repository - %pre - %code - deltacloud/ - core/ - %h2 - %a{ :name => "launch_the_server" } - Launch the server - %p - First, go into the server directory - %pre - %code - cd server/ - %p - To launch the server, you must tell it which driver to use. This can - be accomplished either through editing the - %code - config/environment.rb - of the framework, - or by setting the - %code - $DRIVER - environment variable. - %p - If adjusting - %code - config/environment.rb - the - %code - DEFAULT_DRIVER - variable should be set - %pre - %code - DEFAULT_DRIVER=:rhevm - %p - Even if set, it may still be overwritten by the - %code - $DRIVER - environment variable - which takes precendence. - %p - Once configured, simply launch - %code - script/server - for the framework. - %pre - %code - $ ./script/server - %p - (Or using the - %code - $DRIVER - variable) - %pre - %code - $ DRIVER=ec2 ./script/server - %h3 - %a{ :name => "launch_the_server_ec2_driver" } - EC2 Driver - %p - When using the driver for Amazon EC2, the credentials passed in - response to the HTTP 401 authentication challenge should be your - %em - access_key - and - %em - secret_access_key - %p - These credentials may be found on the - %a{ :href => "http://aws-portal.amazon.com/gp/aws/developer/account/index.html?action=acce..." } - Access Identifiers - page at Amazon AWS. - %h3 - %a{ :name => "launch_the_server_rhev-m_driver" } - RHEV-M Driver - %p - The RHEV-M driver needs to be installed on a Windows machine which has the - RHEV-M Powershell API installed and configured. Assuming the directory - structure above is followed, you should copy the file - deltacloud/deltacloud-driver-rhevm/config/rhevm - %em - config.yaml.EXAMPLE to be - rhevm - config.yaml and edit the file woith the domain you are logging into. - The username and pasword is provided via the API. - %p - The actual RHEVM instance you are connecting to is controlled by - the RHEVM.dll.config file which is referenced from the profile.ps1 - file located in My Documents/WindowsPowershell directory - %h3 - %a{ :name => "launch_the_server_rackspace_driver" } - Rackspace Driver - %p - When using the Rackspace-cloud driver (Rackspace cloud used to be called - "Mosso") - the password in a HTTP 401 challenge should be your API key, NOT - your rackspace account password. (you can get the API-key, or generate a - new one, from the rackspace console). - %h3 - %a{ :name => "launch_the_server_rimuhosting" } - RimuHosting - %p - Further details coming soon. - %h3 - %a{ :name => "launch_the_server_opennebula" } - OpenNebula - %p - When using the - %a{ :href => "http://www.opennebula.org/" } - OpenNebula - driver, the - credentials passed in response to the HTTP 401 authentication challenge - should be your OpenNebula user and password. - %p - The address, on which the OCCI server is listening, needs to be defined in - an environment variable called OCCI_URL. - #footer-deltacloud - #projects.container - %p#et - %a{ :href => "http://et.redhat.com/" } - %img{ :src => "./styles/et_logo.png", :alt => "A Red Hat Emerging Technology Project" } - %dl#p1 - %dt - %a{ :href => "http://augeas.net/" } - Augeas - %dd - %span - A configuration editing tool and API - %dt - %a{ :href => "http://libvirt.org/" } - libvirt - %dd - %span - The open source virtualization API - %dl#p2 - %dt - %a{ :href => "http://cobbler.et.redhat.com/" } - Cobbler - %dd - OS provisioning and profile management - %dt - %a{ :href => "http://libguestfs.org/" } - virt-v2v - %dd - %span - Migrate guests from one hypervisor to another - %dl#p3 - %dt - %a{ :href => "http://freeipa.org/" } - FreeIPA - %dd - %span - Identity, policy and audit management - %dt - %a{ :href => "http://virt-manager.org/" } - Virtual Machine Manager - %dd - %span - Virtualization management from the desktop +<toc numbering="off" toc_style="ul" toc_range="h2-h3" /> + +<%= File.open('../docs/drivers.mdown').read %> diff --git a/deltacloud.org/content/framework.haml b/deltacloud.org/content/framework.haml index f7ec8f9..6f9a1b3 100644 --- a/deltacloud.org/content/framework.haml +++ b/deltacloud.org/content/framework.haml @@ -1,676 +1,12 @@ --- +title: Deltacloud - Documentation extension: html -filter: erb -filter: haml +layout: documentation.haml +filter: + - erb + - markdown + - outline --- -!!! Strict -%html - %head - %title - Deltacloud - Documentation - %meta{ :name => "keywords", :content => "" } - %meta{ :name => "description", :content => "" } - %meta{ :content => "text/html; charset=utf-8", "http-equiv" => "Content-Type" } - %link{ :href => "./styles/favicon.ico", :rel => "shortcut icon", :type => "image/x-icon" } - %link{ :href => "./styles/default.css", :title => "Main style", :rel => "StyleSheet", :type => "text/css" } - %link{ :href => "./styles/default-debug.css", :title => "Debug main style", :rel => "Alternate StyleSheet", :type => "text/css" } - %body - #header - .container - #headerLogo{ :onclick => "location.href='index.html';", :style => "cursor: pointer;" } - %h1 - Deltacloud - Many clouds. One API. No problem. - #navigation - #menu.container - %ul.l0 - %li - %a.inactive{ :href => "./index.html", :title => "Deltacloud Home" } - Home - %li - %a.inactive{ :href => "./tools.html", :title => "Tools" } - Tools - %li - %a.inactive{ :href => "./download.html", :title => "Get the latest releases" } - Download - %li - %a.inactive{ :href => "./contribute.html", :title => "Information about design/development process" } - Contribute - %li - %a.active{ :href => "./documentation.html", :title => "Project documentation" } - Documentation - %li - %a.inactive{ :href => "./page", :title => "Project wiki" } - Wiki - #subnavigation - #submenu.container - %ul.l1 - %li - %a.inactive{ :href => "documentation.html" } - Overview - %li - %a.inactive{ :href => "api.html" } - REST API - %li - %a.inactive{ :href => "client-ruby.html" } - Ruby Client - %li - %a.inactive{ :href => "drivers.html" } - Drivers - %li - %a.active{ :href => "framework.html" } - Framework - #main - #content-deltacloud.container - %ul.toc - %li - %a{ :href => "#driver_spi" } - Driver SPI - %ul - %li - %a{ :href => "#driver_spi_credentials" } - Credentials - %li - %a{ :href => "#driver_spi_object_models_used_by_drivers" } - Object models used by drivers - %li - %a{ :href => "#driver_spi_driver_methods" } - Driver methods - %h1 - Deltacloud Framework (Ruby) - %p - The - %em - Deltacloud Framework - is provided to assist in creating - intermediary - %a{ :href => "drivers.html" } - drivers - which speak the - %a{ :href => "api.html" } - Deltacloud REST API - on - the front while communicating with cloud providers using - their own native APIs on the back. - %p - %img{ :src => "styles/framework.png", :alt => "Deltacloud framework" } - %p - The Deltacloud Framework handles all aspects of the REST - API, while allowing driver implementors to focus on the - specific cloud provider native API. - %p - The framework is implemented as a Ruby-on-Rails application. - Drivers may be implemented in as little as one Ruby class - and plugged into the framework for deployment. - %h2 - %a{ :name => "driver_spi" } - Driver SPI - %h3 - %a{ :name => "driver_spi_credentials" } - Credentials - %p - The framework will collect credentials when the driver indicates - they are required by throwing a - %code - DeltaCloud::AuthException - . Each - driver method takes a credentials hash as the first parameter, - but unless the client has provided credentials, this hash will be empty. - %pre - %code - def images(credentials, opts) - if ( credentials[:name].nil? ) - throw DeltaCloud::AuthException.new - end - unless ( credentials_valid?( credentials ) ) - throw DeltaCloud::AuthException.new - end +<toc numbering="off" toc_style="ul" toc_range="h2-h3" />
- # do work - - end - %h3 - %a{ :name => "driver_spi_object_models_used_by_drivers" } - Object models used by drivers - %p - To assist driver authors, the framework provides a handful of - model classes, representing each resource available through - the Deltacloud API. Please see the - %a{ :href => "api.html" } - API reference - for details - about each model. All of these model objects may be initialized - with a hash. Every instance - %em - must - be assigned an - %code - id - in addition - to other attributes it may have. Unless otherwise noted, attributes - are text. - %p - For example - %pre - %code - Flavor.new( - :architecture=>'x86_64', - :memory=>4, - :storage=>650, - ) - %h4 - %code - Flavor - ( - %code - app/models/flavor.rb - ) - %p - Attributes are - %ul - %li - %strong - %code - id - %li - %strong - %code - architecture - %li - %strong - %code - memory - - Decimal, gigabytes - %li - %strong - %code - storage - - Decimal, gigabytes - %h4 - %code - Realm - ( - %code - app/models/realm.rb - ) - %p - Attributes are - %ul - %li - %strong - %code - id - %li - %strong - %code - name - %li - %strong - %code - state - %li - %strong - %code - limit - %h4 - %code - Image - ( - %code - app/models/image.rb - ) - %p - Attributes are - %ul - %li - %strong - %code - id - %li - %strong - %code - name - %li - %strong - %code - architecture - %li - %strong - %code - owner_id - %li - %strong - %code - description - %h4 - %code - Instance - ( - %code - app/models/instance.rb - ) - %p - Attributes are - %ul - %li - %strong - %code - id - %li - %strong - %code - name - %li - %strong - %code - owner_id - - Opaque, external reference - %li - %strong - %code - image_id - - References an image by identifier - %li - %strong - %code - flavor_id - - References a flavor image by identifier - %li - %strong - %code - realm_id - - References a realm by identifier - %li - %strong - %code - state - - One of - %code - PENDING - , - %code - RUNNING - , 'SHUTTING_DOWN', 'STOPPED' - %li - %strong - %code - actions - - Array of applicable actions - %li - %strong - %code - public_addresses - - Array of IP addresses or hostnames as text - %li - %strong - %code - private_addresses - - Array of IP addresses or hostnames as text - %h3 - %a{ :name => "driver_spi_driver_methods" } - Driver methods - %p - The primary methods a driver class must implement are - %ul - %li - %code - flavors(credentials, opts=nil) - %li - %code - images(credentials, opts=nil ) - %li - %code - realms(credentials, opts=nil) - %li - %code - instances(credentials, opts=nil) - %li - %code - create_instance(credentials, image_id, opts) - %li - %code - reboot_instance(credentials, id) - %li - %code - stop_instance(credentials, id) - %li - %code - destroy_instance(credentials, id) - %p - Generally, the - %code - BaseDriver - handles singular cases while the - specific provider driver must implement only the plural cases, - along with specific action methods against resources. - %p - Additionally, to assist clients in determining what actions - may be available without making additional requests, the following - must be implemented. - %p - While the - %code - credentials - hash is passed as the first parameter to each - method, it - %em - may - be empty until the driver throws at least one - %code - DeltaCloud::AuthException - . This exception will indicate to the - framework that a normal HTTP authentication challenge should be - issued to the client. Depending on the underlying provider the driver - is connecting to, the credentials may not be required for some methods. - %p - Some methods also allow an optional - %code - opts - hash, which may be - %code - nil - or - empty if not used for a particular invocation. The - %code - BaseDriver - provides - a method - %code - filter_on(...) - which may be used to safely filter collections. - The - %code - filter_on(..) - method will be demonstrated below. - %ul - %li - %code - instance_states() - %p - Each method will be described in more detail below. - %h4 - %code - flavors(credentials, opts=nil) - %p - The - %code - flavors(...) - method should return an array of - %code - Flavor - objects. - The - %code - opts - hash, if present, must be inspected for - %code - :id - and - %code - :architecture - keys. If these keys are present, the results should be filtered by the value - associated with each key. The - %code - filter_on(...) - method is useful in this case. - %p - For example - %pre - %code - def flavors(credentials, opts=nil) - flavors = fetch_all_flavors() - flavors = filter_on( flavors, :id, opts ) - flavors = filter_on( flavors, :architecture, opts ) - return flavors - end - %h4 - %code - realms(credentials, opts=nil) - %p - The - %code - realms(...) - method should return an array of - %code - Realm - objects. - %h4 - %code - images(credentials, opts=nil ) - %p - The - %code - images(...) - method should return an array of - %code - Image - objects - visible and accessible to the current user, as defined by the - %code - credentials - hash. - %p - The - %code - opts - hash, if present, must be inspected for - %code - :id - , - %code - :owner_id - and - %code - :architecture - keys. If these keys are present, the results should be filtered - by the value assocaited with each key. - %h4 - %code - instances(credentials, opts=nil) - %p - The - %code - instances(...) - method should return an array of - %code - Instance - objects - visible and accessible to the current user, as defined bv the - %code - credentials - hash. If the - %code - opts - hash is present and contains an - %code - :id - key, the results - should be filtered by the value associated with the key. - %h4 - %code - create_instance(credentials, image_id, opts) - %p - The - %code - create_instance(...) - method should create within the cloud, a new - running instance based from an image identifier. The method should return - an - %code - Instance - object representing the newly-created instance. - %p - The - %code - image_id - parameter must be non-nil. The - %code - opts - has may contain keys - for - %code - flavor_id - and - %code - realm_id - . If they are present, they should be used - for the creation of the instance. If they are not present, reasonable - defaults should be used. In the case of flavor, one compatible with the - image should be used as the default. - %h4 - %code - reboot_instance(credentials, id) - %p - The - %code - reboot_instance(...) - method should trigger a running instance to be - rebooted. This method has no return value. - %h4 - %code - stop_instance(credentials, id) - %p - The - %code - stop_instance(...) - method should trigger a running instance to be - stopped. This method has no return value. A cloud provider may allow - restarting an instance, or may not. - %h4 - %code - destroy_instance(credentials, id) - %p - The - %code - destroy_instance(...) - method should remove the instance from the - cloud provider, stopping it if necessary first. - %h4 - %code - instance_states() - %p - The - %code - instance_states() - method should return an complex array/hash - structure representing the finite-state-machine for instances. - Each state an instance may be in should be an element in the returned array. - Each state itself is also an array with 2 member. The first member is the - name of the state, and the second member is a hash indicating valid transitions. - %p - The general format for the entire FSM structure is - %pre - %code - [ - [ :origin_state1, { - :destination_state1=>:action1, - :destination_state2=>:action2, - } ], - [ :origin_state2, { - :destination_state3=>:action3, - :destination_state4=>:action4, - } ], - ] - %p - Valid states are - %ul - %li - %strong - %code - :begin - %li - %strong - %code - :pending - %li - %strong - %code - :running - %li - %strong - %code - :shutting_down - %li - %strong - %code - :stopped - %li - %strong - %code - :end - %p - The - %code - :begin - state is the state an instance is in immediate before - being created. The - %code - :end - state is the state an instance is in immediately - after being destroyed. - %p - Valid transition actions are - %ul - %li - %strong - %code - :stop - %li - %strong - %code - :start - %li - %strong - %code - :reboot - %p - Additionally, to indicate a transition that may occur - %em - without - an - action being triggered, the action ** - %code - :_auto_ - may be used. - #footer-deltacloud - #projects.container - %p#et - %a{ :href => "http://et.redhat.com/" } - %img{ :src => "./styles/et_logo.png", :alt => "A Red Hat Emerging Technology Project" } - %dl#p1 - %dt - %a{ :href => "http://augeas.net/" } - Augeas - %dd - %span - A configuration editing tool and API - %dt - %a{ :href => "http://libvirt.org/" } - libvirt - %dd - %span - The open source virtualization API - %dl#p2 - %dt - %a{ :href => "http://cobbler.et.redhat.com/" } - Cobbler - %dd - OS provisioning and profile management - %dt - %a{ :href => "http://libguestfs.org/" } - virt-v2v - %dd - %span - Migrate guests from one hypervisor to another - %dl#p3 - %dt - %a{ :href => "http://freeipa.org/" } - FreeIPA - %dd - %span - Identity, policy and audit management - %dt - %a{ :href => "http://virt-manager.org/" } - Virtual Machine Manager - %dd - %span - Virtualization management from the desktop +<%= File.open('../docs/framework.mdown').read %> diff --git a/deltacloud.org/layouts/documentation.haml b/deltacloud.org/layouts/documentation.haml new file mode 100644 index 0000000..7e94473 --- /dev/null +++ b/deltacloud.org/layouts/documentation.haml @@ -0,0 +1,99 @@ +--- +extension: html +filter: + - haml + - erb +--- +!!! Strict +%html + %head + %title + <%= @page.title %> + %meta{ :name => "keywords", :content => "" } + %meta{ :name => "description", :content => "" } + %meta{ :content => "text/html; charset=utf-8", "http-equiv" => "Content-Type" } + %link{ :href => "./styles/favicon.ico", :rel => "shortcut icon", :type => "image/x-icon" } + %link{ :href => "./styles/default.css", :title => "Main style", :rel => "StyleSheet", :type => "text/css" } + %link{ :href => "./styles/default-debug.css", :title => "Debug main style", :rel => "Alternate StyleSheet", :type => "text/css" } + %body + #header + .container + #headerLogo{ :onclick => "location.href='index.html';", :style => "cursor: pointer;" } + %h1 + Deltacloud - Many clouds. One API. No problem. + #navigation + #menu.container + %ul.l0 + %li + %a.inactive{ :href => "./index.html", :title => "Deltacloud Home" } + Home + %li + %a.inactive{ :href => "./tools.html", :title => "Tools" } + Tools + %li + %a.inactive{ :href => "./download.html", :title => "Get the latest releases" } + Download + %li + %a.inactive{ :href => "./contribute.html", :title => "Information about design/development process" } + Contribute + %li + %a.active{ :href => "./documentation.html", :title => "Project documentation" } + Documentation + %li + %a.inactive{ :href => "./page", :title => "Project wiki" } + Wiki + <%= render(:partial => "documentation-menu", :locals => {:current_page => "#{@page.filename}.#{@page.extension}"} ) %> + #main + #content-deltacloud.container + <%= @content %> + #footer-deltacloud + #projects.container + %p#et + %a{ :href => "http://et.redhat.com/" } + %img{ :src => "./styles/et_logo.png", :alt => "A Red Hat Emerging Technology Project" } + %dl#p1 + %dt + %a{ :href => "http://augeas.net/" } + Augeas + %dd + %span + A configuration editing tool and API + %dt + %a{ :href => "http://libvirt.org/" } + libvirt + %dd + %span + The open source virtualization API + %dl#p2 + %dt + %a{ :href => "http://fedorahosted.org/cobbler/" } + Cobbler + %dd + OS provisioning and profile management + %dt + %a{ :href => "http://libguestfs.org/" } + virt-v2v + %dd + %span + Migrate guests from one hypervisor to another + %dl#p3 + %dt + %a{ :href => "http://freeipa.org/" } + FreeIPA + %dd + %span + Identity, policy and audit management + %dt + %a{ :href => "http://virt-manager.org/" } + Virtual Machine Manager + %dd + %span + Virtualization management from the desktop + %script{ :type => "text/javascript" } + var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); + document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); + %script{ :type => "text/javascript" } + try { + var pageTracker = _gat._getTracker("UA-10510561-1"); + pageTracker._trackPageview(); + } catch(err) {}
From: Tomas Sedovic tsedovic@redhat.com
Changed extension from HAML to ERB for the Documentation files because it fits their new purpose better.
Rename files to match the new structure.
The documentation pages are note HAML anymore.
Rename documentation submenu partial.
It had 2 extensions which made it work incorrectly. --- deltacloud.org/content/_documentation-menu.haml | 20 -------------------- deltacloud.org/content/_submenu-documentation.erb | 20 ++++++++++++++++++++ deltacloud.org/content/api.erb | 12 ++++++++++++ deltacloud.org/content/api.haml | 12 ------------ deltacloud.org/content/client-ruby.erb | 12 ++++++++++++ deltacloud.org/content/client-ruby.haml | 12 ------------ deltacloud.org/content/documentation.erb | 9 +++++++++ deltacloud.org/content/documentation.haml | 9 --------- deltacloud.org/content/drivers.erb | 12 ++++++++++++ deltacloud.org/content/drivers.haml | 12 ------------ deltacloud.org/content/framework.erb | 12 ++++++++++++ deltacloud.org/content/framework.haml | 12 ------------ deltacloud.org/layouts/documentation.haml | 2 +- 13 files changed, 78 insertions(+), 78 deletions(-) delete mode 100644 deltacloud.org/content/_documentation-menu.haml create mode 100644 deltacloud.org/content/_submenu-documentation.erb create mode 100644 deltacloud.org/content/api.erb delete mode 100644 deltacloud.org/content/api.haml create mode 100644 deltacloud.org/content/client-ruby.erb delete mode 100644 deltacloud.org/content/client-ruby.haml create mode 100644 deltacloud.org/content/documentation.erb delete mode 100644 deltacloud.org/content/documentation.haml create mode 100644 deltacloud.org/content/drivers.erb delete mode 100644 deltacloud.org/content/drivers.haml create mode 100644 deltacloud.org/content/framework.erb delete mode 100644 deltacloud.org/content/framework.haml
diff --git a/deltacloud.org/content/_documentation-menu.haml b/deltacloud.org/content/_documentation-menu.haml deleted file mode 100644 index 05cd8cc..0000000 --- a/deltacloud.org/content/_documentation-menu.haml +++ /dev/null @@ -1,20 +0,0 @@ ---- -filter: - - erb - - haml ---- -<% menu = [ - { :href => 'documentation.html', :text => 'Overview' }, - { :href => "api.html" , :text => 'REST API' }, - { :href => "client-ruby.html" , :text => 'Ruby Client' }, - { :href => "drivers.html" , :text => 'Drivers' }, - { :href => "framework.html" , :text => 'Framework' } ] %> - -#subnavigation - #submenu.container - %ul.l1 - <% menu.each do |link| %> - %li - %a.<%= 'in' unless link[:href] == current_page %>active{ :href => "<%= link[:href] %>" } - <%= link[:text] %> - <% end %> diff --git a/deltacloud.org/content/_submenu-documentation.erb b/deltacloud.org/content/_submenu-documentation.erb new file mode 100644 index 0000000..05cd8cc --- /dev/null +++ b/deltacloud.org/content/_submenu-documentation.erb @@ -0,0 +1,20 @@ +--- +filter: + - erb + - haml +--- +<% menu = [ + { :href => 'documentation.html', :text => 'Overview' }, + { :href => "api.html" , :text => 'REST API' }, + { :href => "client-ruby.html" , :text => 'Ruby Client' }, + { :href => "drivers.html" , :text => 'Drivers' }, + { :href => "framework.html" , :text => 'Framework' } ] %> + +#subnavigation + #submenu.container + %ul.l1 + <% menu.each do |link| %> + %li + %a.<%= 'in' unless link[:href] == current_page %>active{ :href => "<%= link[:href] %>" } + <%= link[:text] %> + <% end %> diff --git a/deltacloud.org/content/api.erb b/deltacloud.org/content/api.erb new file mode 100644 index 0000000..5f18a0d --- /dev/null +++ b/deltacloud.org/content/api.erb @@ -0,0 +1,12 @@ +--- +title: Deltacloud - Documentation +extension: html +layout: documentation.haml +filter: + - erb + - markdown + - outline +--- +<toc numbering="off" toc_style="ul" toc_range="h2-h3" /> + +<%= File.open('../docs/api.mdown').read %> diff --git a/deltacloud.org/content/api.haml b/deltacloud.org/content/api.haml deleted file mode 100644 index 5f18a0d..0000000 --- a/deltacloud.org/content/api.haml +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Deltacloud - Documentation -extension: html -layout: documentation.haml -filter: - - erb - - markdown - - outline ---- -<toc numbering="off" toc_style="ul" toc_range="h2-h3" /> - -<%= File.open('../docs/api.mdown').read %> diff --git a/deltacloud.org/content/client-ruby.erb b/deltacloud.org/content/client-ruby.erb new file mode 100644 index 0000000..9b2cf26 --- /dev/null +++ b/deltacloud.org/content/client-ruby.erb @@ -0,0 +1,12 @@ +--- +title: Deltacloud - Documentation +extension: html +layout: documentation.haml +filter: + - erb + - markdown + - outline +--- +<toc numbering="off" toc_style="ul" toc_range="h2-h3" /> + +<%= File.open('../docs/client-ruby.mdown').read %> diff --git a/deltacloud.org/content/client-ruby.haml b/deltacloud.org/content/client-ruby.haml deleted file mode 100644 index 9b2cf26..0000000 --- a/deltacloud.org/content/client-ruby.haml +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Deltacloud - Documentation -extension: html -layout: documentation.haml -filter: - - erb - - markdown - - outline ---- -<toc numbering="off" toc_style="ul" toc_range="h2-h3" /> - -<%= File.open('../docs/client-ruby.mdown').read %> diff --git a/deltacloud.org/content/documentation.erb b/deltacloud.org/content/documentation.erb new file mode 100644 index 0000000..f8a3b69 --- /dev/null +++ b/deltacloud.org/content/documentation.erb @@ -0,0 +1,9 @@ +--- +title: Deltacloud - Documentation +extension: html +layout: documentation.haml +filter: + - erb + - markdown +--- +<%= File.open('../docs/documentation.mdown').read %> diff --git a/deltacloud.org/content/documentation.haml b/deltacloud.org/content/documentation.haml deleted file mode 100644 index f8a3b69..0000000 --- a/deltacloud.org/content/documentation.haml +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Deltacloud - Documentation -extension: html -layout: documentation.haml -filter: - - erb - - markdown ---- -<%= File.open('../docs/documentation.mdown').read %> diff --git a/deltacloud.org/content/drivers.erb b/deltacloud.org/content/drivers.erb new file mode 100644 index 0000000..bf5554c --- /dev/null +++ b/deltacloud.org/content/drivers.erb @@ -0,0 +1,12 @@ +--- +title: Deltacloud - Documentation +extension: html +layout: documentation.haml +filter: + - erb + - markdown + - outline +--- +<toc numbering="off" toc_style="ul" toc_range="h2-h3" /> + +<%= File.open('../docs/drivers.mdown').read %> diff --git a/deltacloud.org/content/drivers.haml b/deltacloud.org/content/drivers.haml deleted file mode 100644 index bf5554c..0000000 --- a/deltacloud.org/content/drivers.haml +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Deltacloud - Documentation -extension: html -layout: documentation.haml -filter: - - erb - - markdown - - outline ---- -<toc numbering="off" toc_style="ul" toc_range="h2-h3" /> - -<%= File.open('../docs/drivers.mdown').read %> diff --git a/deltacloud.org/content/framework.erb b/deltacloud.org/content/framework.erb new file mode 100644 index 0000000..6f9a1b3 --- /dev/null +++ b/deltacloud.org/content/framework.erb @@ -0,0 +1,12 @@ +--- +title: Deltacloud - Documentation +extension: html +layout: documentation.haml +filter: + - erb + - markdown + - outline +--- +<toc numbering="off" toc_style="ul" toc_range="h2-h3" /> + +<%= File.open('../docs/framework.mdown').read %> diff --git a/deltacloud.org/content/framework.haml b/deltacloud.org/content/framework.haml deleted file mode 100644 index 6f9a1b3..0000000 --- a/deltacloud.org/content/framework.haml +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Deltacloud - Documentation -extension: html -layout: documentation.haml -filter: - - erb - - markdown - - outline ---- -<toc numbering="off" toc_style="ul" toc_range="h2-h3" /> - -<%= File.open('../docs/framework.mdown').read %> diff --git a/deltacloud.org/layouts/documentation.haml b/deltacloud.org/layouts/documentation.haml index 7e94473..7b5200e 100644 --- a/deltacloud.org/layouts/documentation.haml +++ b/deltacloud.org/layouts/documentation.haml @@ -42,7 +42,7 @@ filter: %li %a.inactive{ :href => "./page", :title => "Project wiki" } Wiki - <%= render(:partial => "documentation-menu", :locals => {:current_page => "#{@page.filename}.#{@page.extension}"} ) %> + <%= render(:partial => "submenu-documentation", :locals => {:current_page => "#{@page.filename}.#{@page.extension}"} ) %> #main #content-deltacloud.container <%= @content %>
On Tue, Mar 16, 2010 at 10:55 AM, tsedovic@redhat.com wrote:
This patch changes the way we generate documentation pages. Instead of using HTML/HAML sources, we're generating them from the docs/*.mdown sources.
I've introduced new webby layout specifically for the documentation. The rest is left untouched. _
ACK to both, this looks nice, glad to see the duplication on docs gone. Curious why you chose to bring in erb though? What were you not able to do in haml that you needed erb for?
Also, this can be in a separate patch, but you should probably add a readme or build file to docs explaining both the process of building the site with webby (simple enough, but newcomers won't know) as well as gems needed (webby, haml, rdiscount, etc).
Lastly, you might want to synch up with David L wrt the documentation page currently called 'framework', as that name is obsolete. I would think change the name to 'core server' or just core, both in the title and throughout the doc. That is his call though.
Great work, this is coming along nicely.
-j
deltacloud-devel@lists.fedorahosted.org