lib/forj/process/ForjProcess.rb in forj-1.0.6 vs lib/forj/process/ForjProcess.rb in forj-1.0.7
- old
+ new
@@ -108,19 +108,21 @@
def active_server?(o_server, o_address, private_key_file,
keypair_coherent, s_status
)
if o_server[:attrs][:status] == :active
+ image = server_get_image o_server
+
s_msg = <<-END
Your forj Maestro server is up and running and is publically accessible
through IP '%s'.
You can connect to '%s' with:
-ssh ubuntu@%s -o StrictHostKeyChecking=no -i %s
+ssh %s@%s -o StrictHostKeyChecking=no -i %s
END
s_msg = format(s_msg, o_address[:public_ip], o_server[:name],
- o_address[:public_ip], private_key_file
+ image[:ssh_user], o_address[:public_ip], private_key_file
)
unless keypair_coherent
s_msg += "\n" + ANSI.bold(
'Unfortunatelly'
@@ -281,22 +283,22 @@
else
o_address = o_addresses[0]
end
end
- image = data_objects[:image, :ObjectData]
+ image = data_objects(:image, :ObjectData)
s_msg = <<-END
Public IP for server '%s' is assigned.
Now, as soon as the server respond to the ssh port,
you will be able to get a tail of the build with:
while [ 1 = 1 ]
do
ssh %s@%s -o StrictHostKeyChecking=no -i %s tail -f /var/log/cloud-init.log
sleep 5
done
END
- s_msg = format(s_msg, o_server[:name], image[:user],
+ s_msg = format(s_msg, o_server[:name], image[:ssh_user],
o_address[:public_ip], boot_options[:keys]
)
unless boot_options[:coherent]
s_msg += ANSI.bold("\nUnfortunatelly") + " your current keypair' \
' is not usable to connect to your server.\nYou need to fix' \
@@ -492,9 +494,10 @@
hpcloud_priv
end
def load_h_meta(hParams, hpcloud_priv)
h_meta = {
+ 'flavor_name' => hParams[:bp_flavor],
'cdksite' => config.get(:server_name),
'cdkdomain' => hParams[:domain_name],
'eroip' => '127.0.0.1',
'erosite' => config.get(:server_name),
'erodomain' => hParams[:domain_name],