forked from aeolusproject/aeolus-configure
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of git://git.fedorahosted.org/git/aeolus/configure
- Loading branch information
Showing
14 changed files
with
110 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
#!/usr/bin/ruby | ||
# setup repositories, download/install aeolus, run interactive config, bring up wui | ||
# must be run as the super user | ||
# TODO other distro support | ||
|
||
require 'optparse' | ||
|
||
Signal.trap("INT") do | ||
puts "" | ||
exit 1 | ||
end | ||
|
||
colors = {:reset => "\e[0m", | ||
:bold => "\e[1m", | ||
:black => "\e[30m", | ||
:red => "\e[31m", | ||
:blue => "\e[34m", | ||
:green => "\e[32m"} | ||
|
||
puts "#{colors[:bold]}To The Cloud!....#{colors[:reset]}" | ||
|
||
options = {:deploy => false, | ||
:migrate => false, | ||
:scale => false} | ||
|
||
optparse = OptionParser.new do |opts| | ||
opts.banner = "#{colors[:bold]}Usage: cloud.rb [options]" | ||
opts.on("-d", "--deploy", "Deploy new instances to the cloud") { options[:deploy] = true } | ||
opts.on("-m", "--migrate", "Migrate existing instances from one cloud provider to another") { options[:migrate] = true } | ||
opts.on("-s", "--scale", "Scale existing instances accross cloud providers") { options[:scale] = true } | ||
opts.on("-h", "--help", 'Display this message' ) { puts opts ; exit 0 } | ||
end | ||
|
||
optparse.parse! | ||
|
||
options[:deploy] = true unless options.values.include? true | ||
|
||
#################### | ||
puts "#{colors[:blue]}setting up repositories..." | ||
|
||
FEDORA="14" | ||
|
||
REPOS={:testing => "http://repos.fedorapeople.org/repos/aeolus/conductor/testing/fedora-$releasever/$basearch/", | ||
:expiremental => "http://yum.morsi.org/aeolus/", | ||
:deltacloud => "http://devel.mifo.sk/deltacloud/current/$basearch"} | ||
|
||
File.open("/etc/yum.repos.d/aeolus.repo", "w"){ |f| | ||
REPOS.each { |n,r| | ||
repo = "[aeolus_#{n}]\n" + | ||
"name=aeolus_#{n}\n" + | ||
"baseurl=#{r}\n" + | ||
"enabled=1\n" + | ||
"skip_if_unavailable=1\n" + | ||
"gpgcheck=0\n" | ||
f.write repo | ||
puts "Created aeolus_#{n}" | ||
} | ||
} | ||
|
||
puts "#{colors[:green]}Done\n\n" | ||
|
||
##################### | ||
puts "#{colors[:blue]}installing packages............" | ||
|
||
IO.popen("yum install deltacloud-core-all aeolus-all -y") do |p| | ||
while l = p.gets do | ||
puts l | ||
end | ||
end | ||
|
||
puts "#{colors[:green]}Done\n\n" | ||
|
||
##################### | ||
puts "#{colors[:blue]}launching configure............" | ||
|
||
# just fork/exec here to handle stdin | ||
fork{ | ||
exec "/usr/sbin/aeolus-configure -i #{options.collect { |o| "--#{o}" }.join(" ")}" | ||
} | ||
Process.wait | ||
|
||
puts "#{colors[:green]}Done\n\n" | ||
|
||
# TODO open up web browser to conductor | ||
|
||
puts "#{colors[:reset]}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,11 @@ | |
class aeolus::profiles::vsphere { | ||
aeolus::create_bucket{"aeolus":} | ||
|
||
file {"/etc/imagefactory/vsphere.json": | ||
content => template("aeolus/vsphere.json"), | ||
mode => 755, | ||
require => Package['aeolus-conductor-daemons'] } | ||
|
||
aeolus::conductor::site_admin{"admin": | ||
email => '[email protected]', | ||
password => "password", | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters