From Fedora Project Wiki

No edit summary
No edit summary
Line 9: Line 9:
  $> cd ~/novacreds
  $> cd ~/novacreds
  $> . ./novarc  # note if the address of the host changes (like restarting a DHCP VM) you'll first need to edit this file
  $> . ./novarc  # note if the address of the host changes (like restarting a DHCP VM) you'll first need to edit this file
  $> euca-run-instances ami-tty --kernel aki-tty --ramdisk ari-tty -k nova_key
  $> euca-run-instances ami-tty --kernel aki-tty --ramdisk ari-tty -k nova_key -a $ACCESS_KEY -s $SECRET_KEY


|results=
|results=
Line 15: Line 15:
Verify that the instance has started.
Verify that the instance has started.


  $> euca-describe-instances  
  $> euca-describe-instances -a $ACCESS_KEY -s $SECRET_KEY
  RESERVATION r-d8wpvydq rbryant default
  RESERVATION r-d8wpvydq rbryant default
  INSTANCE i-00000001 ami-00000003 10.0.0.2 10.0.0.2 pending nova_key (rbryant, f16) 0 m1.small 2011-10-17T20:31:05Z nova aki-00000001 ari-00000002
  INSTANCE i-00000001 ami-00000003 10.0.0.2 10.0.0.2 pending nova_key (rbryant, f16) 0 m1.small 2011-10-17T20:31:05Z nova aki-00000001 ari-00000002
It may take a while to transition from the pending to the running state, as reported by euca-describe-instances


  $> sudo virsh list
  $> sudo virsh list
Line 25: Line 27:


Get console output and ensure instance is fully started
Get console output and ensure instance is fully started
  $> euca-get-console-output i-00000001
  $> euca-get-console-output i-00000001 -a $ACCESS_KEY -s $SECRET_KEY


Try SSH-ing into the instance:
Try SSH-ing into the instance:

Revision as of 10:00, 8 March 2012

Description

Launch an instance on OpenStack.

Setup

Optionally include information on preparing the test environment

  1. Follow QA:Testcase_download_and_register_tty_images_with_OpenStack

How to test

Launch an instance of one of the images downloaded and registered in the previous test case.

$> cd ~/novacreds
$> . ./novarc  # note if the address of the host changes (like restarting a DHCP VM) you'll first need to edit this file
$> euca-run-instances ami-tty --kernel aki-tty --ramdisk ari-tty -k nova_key -a $ACCESS_KEY -s $SECRET_KEY

Expected Results

Verify that the instance has started.

$> euca-describe-instances -a $ACCESS_KEY -s $SECRET_KEY
RESERVATION	r-d8wpvydq	rbryant	default
INSTANCE	i-00000001	ami-00000003	10.0.0.2	10.0.0.2	pending	nova_key (rbryant, f16)	0		m1.small	2011-10-17T20:31:05Z	nova	aki-00000001	ari-00000002

It may take a while to transition from the pending to the running state, as reported by euca-describe-instances

$> sudo virsh list
 Id Name                 State
----------------------------------
 1 instance-00000001    running

Get console output and ensure instance is fully started

$> euca-get-console-output i-00000001 -a $ACCESS_KEY -s $SECRET_KEY

Try SSH-ing into the instance:

$> cd ~/novacreds
$> ssh -i nova_key.priv -o UserKnownHostsFile=/dev/null root@10.0.0.2

Check for new errors in the logs:

$> grep -i error /var/log/nova/*.log

Notes:

  • We use /dev/null for known hosts because the fingerprints associated with these IPs will change when you start over with your testing; updating known hosts gets annoying
  • You've probably got a stale dnsmasq process around if you see:
dnsmasq: failed to create listening socket for 10.0.0.1: Address already in use