After Deprec

openstack_cloud_computing_cookbook

Issue link: https://read.uberflip.com/i/1334488

Contents of this Issue

Navigation

Page 48 of 317

Administering OpenStack Compute 38 When we want to launch an instance using our newly created keypair under euca2ools, we specify this with the -k option on the euca-run-instances command line, as follows: euca-run-instances ami-00000002 -k myKey -t m1.tiny When we want to use this new key under Nova Client, this looks as follows, using the nova boot command: nova boot myInstance --image 0e2f43a8-e614-48ff-92bd-be0c68da19f4 --flavor 2 --key_name myKey And when we want to SSH to this running instance, we specify the private key on the SSH command line with the -i option: ssh ubuntu@172.16.1.1 -i myKey.pem As with most things Unix, the values and files specified are case-sensitive. Listing and deleting keypairs using euca2ools To list and delete keypairs using euca2ools, carry out the set of commands in the following sections: List the keypairs To list the keypairs in our project, we simply run the euca-describe-keypairs command, as follows: euca-describe-keypairs This brings back a list of keypairs in our project, such as the following: KEYPAIR openstack bb:af:26:09:8a:c4:72:98:d9:1e:cd :e5:51:60:50:63 KEYPAIR myKey 3c:74:65:72:66:19:bd:a5:90:21:45:06:0e:4f:64:29 Delete the keypairs To delete a keypair from our project, we simply specify the name of the key as an option to the euca-delete-keypair tool. f To delete the myKey keypair, we do the following: euca-delete-keypair myKey f We can verify this by listing the keys available, thus: euca-describe-keypairs www.it-ebooks.info

Articles in this issue

Links on this page

Archives of this issue

view archives of After Deprec - openstack_cloud_computing_cookbook