Deltacloud API client DSL
Documentation
rdoc.info/github/mifo/deltadsl/master/frames
Installation:
- No installation available yet ;-)
Prerequires:
Deltacloud API server and client gems installed:
$ gem install deltacloud-core deltacloud-client
Eventmachine (gem install eventmachine)
Thin (gem install thin)
Examples
Simple scenario:
@sample = Deltacloud::DSL::Task('launch some EC2 and RHEV-M instances') do
instances(:driver => :ec2, :username => '', :password => '') do
instance 'test-ec2-1' do
realm 'us-west-1'
image 'ami-12345'
profile 't1.micro'
end
instance 'test-ec2-2' do
realm 'us-west-1'
image 'ami-54321'
profile 't1.micro'
end
end
instances(:driver => :rhevm, :username => '', :password => '', :provider => '') do
instance 'test-rhev-1' do
image '12345-12345-12345-12345'
profile 'SERVER' do |p|
p.memory = 512
p.cpu = 4
end
end
end
on(:instance_started) do |i|
# i.pool_for_ssh ??
end
on(:running) do
ec2_instance('test-ec2-1') do |i|
# do something with this instance
end
rhevm_instance('test-rhev-1') do |i|
# Do someting ;-)
end
end
end
# Thing above is just an definition, so now let start it:
@sample.start!
# All instances will be started in parallel (using threads)
License
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership. The
ASF licenses this file to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing and limitations
under the License.