Deltacloud API nightly builds repository
by Michal Fojtik
Hi,
I've created a nightly build Fedora repo for Deltacloud API on this URL:
http://devel.mifo.sk/deltacloud/
Directory structure:
- current (latest stable build)
- 0.3.9999-dfcf6f0 (0.3 is current release, 9999 indicate nightly build, dfcf6f0 is GIT revision)
Each build is triggered by 'post-merge' GIT hook, so after every push
to our GIT repository.
The latest version contain vSphere driver support baked in.
Required vSphere client package is included in this repository.
You can enable this repo using:
$ su
$ cd yum.repos.d && wget http://devel.mifo.sk/deltacloud/deltacloud-core.repo
$ yum update
-- Michal
------------------------------------------------------
Michal Fojtik, mfojtik(a)redhat.com
Deltacloud API: http://deltacloud.org
12 years, 11 months
Fix final failing test
by Matt Wagner
There was one failing test remaining: Scenario: View a deployment via XHR
This fixes the test. The partial for a deployment no longer includes the deployment name (since it's already on the page); I now create a (fake) instance in the test and check for that.
-- Matt
12 years, 11 months
Using config server for RHEV/VMWare instance IP addresses
by Mark McLoughlin
Hi Greg, Joe, Michal,
I'm curious about the plans around using the config server to make
available the IP address of RHEV and VMWare instances
Apologies if this is written down somewhere already, I just couldn't
find anything on it
AFAIK the plan is roughly:
- VM images will need the audrey_startup script installed and a file
which contains the IP address of the config server
- The VM's UUID will be available to the audrey script in the guest
via the DMI
- The script will do a PUT on config servers /params/.../$uuid and
config server will record the IP address
- This request cannot be authenticated, so there's an inherent hole
we're accepting here - anyone can do this PUT
- deltacloud will also be configured with the address of config
server and will do a GET on /ip/.../$uuid if the driver doesn't
return the instance IP address
In terms of how this will work in the upcoming release:
- How does the script get installed on the image? Will image factory
know that it needs to install aeolus-audrey_startup, or must the
user explicitly list the package in the template?
- Similarly, how does the config server address get on the image? I
see we have a aeolus-rhevm_config_server package containing the
config file. How is this RPM with the correct address? Is that the
users job? Or will image factory do it? Also, will image factory
know it needs to install this on RHEV/VMWare images?
- How is config server set up? For now, will we just have
aeolus-configure set up a config server instance alongside
conductor? Since we're only using it for RHEV and VMWare, we can
assume those VMs can connect back to the machine conductor is
running on
- Does conductor need to do a POST /configs/.../$uuid before starting
the instance in order for config server to record the IP address?
Will conductor gain that config server integration for the release?
If not, can we make the config server accept a PUT from VMs it
doesn't know anything about?
- When will deltacloud get support for querying the IP address from
config server?
Thanks in advance,
Mark.
12 years, 11 months
[PATCH conductor] Updated deployment launch error handling
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
- condormatic_instance_create method moved out of the instance create
transaction
- if an instance's start task has status failed, it's interpreted as an
instances start failure in the UI. This could be simplified by throwing
exceptions in condormatic_instance_create but I don't want to do bigger
changes at this point.
---
src/app/models/deployment.rb | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/app/models/deployment.rb b/src/app/models/deployment.rb
index 9251b36..de2dc63 100644
--- a/src/app/models/deployment.rb
+++ b/src/app/models/deployment.rb
@@ -124,6 +124,7 @@ class Deployment < ActiveRecord::Base
deployable_xml.assemblies.each do |assembly|
# TODO: for now we try to start all instances even if some of them fails
begin
+ task = nil
Instance.transaction do
hw_profile = HardwareProfile.frontend.find_by_name(assembly.hwp)
raise "Hardware Profile #{assembly.hwp} not found." unless hw_profile
@@ -142,9 +143,13 @@ class Deployment < ActiveRecord::Base
task = InstanceTask.create!({:user => user,
:task_target => instance,
:action => InstanceTask::ACTION_CREATE})
- condormatic_instance_create(task)
end
- status[:successes][assembly.name] = 'launched'
+ condormatic_instance_create(task)
+ if task.state == Task::STATE_FAILED
+ status[:errors][assembly.name] = 'failed'
+ else
+ status[:successes][assembly.name] = 'launched'
+ end
rescue
logger.error $!
logger.error $!.backtrace.join("\n ")
--
1.7.4
12 years, 11 months
Clead breadcrumbs when loging out
by Jirka Tomasek
This patch fixes BZ713727. Described bug does not occur any more because
root_url has changed to pools#index where breadcrumbs are cleared. This
patch adds clead_breadcrumbs call to logout (user_sessions#destroy) so
breadcrumbs are deleted when user logs out.
12 years, 11 months
[PATCH] New UI elements for deployable Launch
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/views/deployments/_launch_new.haml | 52 +++++++++------
src/app/views/deployments/_new.haml | 97 +++++++++++++++-------------
2 files changed, 83 insertions(+), 66 deletions(-)
diff --git a/src/app/views/deployments/_launch_new.haml b/src/app/views/deployments/_launch_new.haml
index a05408c..101de2b 100644
--- a/src/app/views/deployments/_launch_new.haml
+++ b/src/app/views/deployments/_launch_new.haml
@@ -1,29 +1,37 @@
= if request.xhr?
- = render :partial => '/layouts/notification'
+ = render :partial => '/layouts/new_notification'
%header.page-header
- %h1
+ %h1{:class => controller.controller_name}
New Deployment in
= @pool.name
-%h2
- Deployment Details
-- form_for :deployment, {:url => new_deployment_path, :method => :get} do
- = hidden_field :deployment, :pool_id
- %p
- What do you want to launch?
- %p
- Select the Deployable definition
- = select_tag :suggested_deployable_id, options_for_select([['custom -- type bellow', 'custom']] + @suggested_deployables.map {|d| [d.name, d.id]}, params[:suggested_deployable_id])
- %p
- Or provide the URL of the Deployable definition
- = text_field('deployable', 'url')
- %p
- Name your deployment
- = text_field(:deployment, :name)
- %span.name_available
- %p
- Choose a realm
- = select :deployment, :frontend_realm_id, @realms.map{|r| [r.name, r.id]}, :include_blank => true
- = submit_tag('Next')
+ #obj_actions.button-container
+ = link_to 'Cancel', pool_path(@pool), :class => 'button danger', :id => 'cancel_deployment_button'
+ .corner
+
+%section.content-section.deployment
+ %header
+ %h2
+ Deployment Details
+
+ .content
+ - form_for :deployment, {:url => new_deployment_path, :method => :get} do
+ = hidden_field :deployment, :pool_id
+ %p
+ What do you want to launch?
+ %p
+ Select the Deployable definition
+ = select_tag :suggested_deployable_id, options_for_select([['custom -- type bellow', 'custom']] + @suggested_deployables.map {|d| [d.name, d.id]}, params[:suggested_deployable_id])
+ %p
+ Or provide the URL of the Deployable definition
+ = text_field('deployable', 'url')
+ %p
+ Name your deployment
+ = text_field(:deployment, :name)
+ %span.name_available
+ %p
+ Choose a realm
+ = select :deployment, :frontend_realm_id, @realms.map{|r| [r.name, r.id]}, :include_blank => true
+ = submit_tag 'Next', :class => 'button'
:javascript
// FIXME: This has a theoretical race condition: if responses come back out of order, the value
diff --git a/src/app/views/deployments/_new.haml b/src/app/views/deployments/_new.haml
index 329af19..05ed857 100644
--- a/src/app/views/deployments/_new.haml
+++ b/src/app/views/deployments/_new.haml
@@ -1,10 +1,11 @@
= error_messages_for 'deployment'
%header.page-header
- %h1
+ %h1{:class => controller.controller_name}
Deployment
= @deployment.name
-%h2
- Launch Summary
+ #obj_actions.button-container
+ = link_to 'Cancel', pool_path(@pool), :class => 'button danger', :id => 'cancel_deployment_button'
+ .corner
#scoreboard
%dl.statistics
@@ -16,44 +17,52 @@
%dt= t("deployments.deployment")
%dd= @deployment.name
%li
- = link_to('view deployable definition', '#')
-
-%h2
- Deployable details
-
-%ul
- %li
- Name:
- = @deployment.deployable_xml.name
- %li
- Description:
- = @deployment.deployable_xml.description
- %li
-
-%h2
- Assemblies
-
-= filter_table([{:name => 'Assembly Name'},
- {:name => 'Hardware Profile'},
- {:name => 'Image ID'},
- {:name => 'Build ID'}],
- @deployment.deployable_xml.assemblies) do |assembly|
- %tr
- %td
- = assembly.name
- %td
- = assembly.hwp
- %td
- = assembly.image_id
- %td
- = assembly.image_build
-
-- form_for @deployment do
- = hidden_field :deployment, :name
- = hidden_field :deployment, :pool_id
- = hidden_field :deployment, :frontend_realm_id
- -# FIXME: Passing chunks of XML around in hidden form fields doesn't feel right
- = hidden_field :deployment, :deployable_xml
- = submit_tag 'Launch'
-
--# Quota checking to go here as well, once I understand how it works with new code
+ %dt deployable definition
+ %dd= link_to('view', '#')
+
+%section.content-section.deployable_details
+ %header
+ %h2
+ Deployable details
+
+ .content
+
+ %ul
+ %li
+ Name:
+ = @deployment.deployable_xml.name
+ %li
+ Description:
+ = @deployment.deployable_xml.description
+
+%section.content-section.deployable_details
+ %header
+ %h2
+ Assemblies
+
+ .content
+
+ = filter_table([{:name => 'Assembly Name'},
+ {:name => 'Hardware Profile'},
+ {:name => 'Image ID'},
+ {:name => 'Build ID'}],
+ @deployment.deployable_xml.assemblies) do |assembly|
+ %tr
+ %td
+ = assembly.name
+ %td
+ = assembly.hwp
+ %td
+ = assembly.image_id
+ %td
+ = assembly.image_build
+
+ - form_for @deployment do
+ = hidden_field :deployment, :name
+ = hidden_field :deployment, :pool_id
+ = hidden_field :deployment, :frontend_realm_id
+ -# FIXME: Passing chunks of XML around in hidden form fields doesn't feel right
+ = hidden_field :deployment, :deployable_xml
+ = submit_tag 'Launch', :class => 'button'
+
+ -# Quota checking to go here as well, once I understand how it works with new code
--
1.7.4.2
12 years, 11 months