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
oot@ip-10-73-19-131:/tmp/bosh/release/template/instance# /var/vcap/bosh/bin/gem install chef --version 0.9.12 | |
ERROR: Loading command: install (LoadError) | |
no such file to load -- zlib | |
ERROR: While executing gem ... (NameError) | |
uninitialized constant Gem::Commands::InstallCommand |
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
require 'rubygems' | |
require 'sinatra' | |
get '/' do | |
"Hello from Cloud Foundry" | |
end |
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 class captures the common interactions with AppCloud that can be shared by different | |
# clients. Clients that use this class are the vmc CLI and the integration test automation. | |
# TBD - ABS: This is currently a minimal extraction of methods to tease out | |
# the interactive aspects of the vmc CLI from the AppCloud API calls. | |
#----------------- | |
# Send resource fingerprints to the cloud controller | |
response = HTTPClient.post resources_uri, fingerprints.to_json, auth_hdr |
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
def format_price(amount, type, *rest) | |
case type | |
when 'flat' | |
return "$#{amount}/#{rest[0]}" | |
when 'metered' | |
raise "Not Implemented" | |
end | |
end |
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
# Provision database here if needed. | |
if framework_needs_db?(framework) | |
proceed = ask("This framework usually needs a database, would you like to provision it? [Yn]: ") | |
if proceed != 'n' && proceed != 'N' | |
app_add_service_helper(appname, 'database', '') | |
provisioned_db = true | |
end | |
end |
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
Dir.chdir(path) do | |
# Detect the appropriate framework. | |
framework = "http://b20nine.com/unknown" | |
mem = '256M' | |
unless ignore_framework | |
if File.exist?('config/environment.rb') | |
display "Rails application detected." | |
framework = "rails/1.0" | |
elsif Dir.glob('*.war').first | |
opt_war_file = Dir.glob('*.war').first |