[Rdo-list] RDO bookmarks - Feedback requested

Jan van Eldik Jan.van.Eldik at cern.ch
Thu Feb 26 14:15:11 UTC 2015


Hi,

>> If people agree taht this is a good idea, I would be happy to compile
>> the list of commands.
>
> That would be extremely helpful. Thanks.

Voila. A second pair of eyes to review would be good.

               cheers, Jan
-------------- next part --------------
glance image-create --name <name> \                      openstack image create <name> \
 --is-public True --disk-format qcow2 \                      --public --disk-format qcow2 \
 --container-format ovf \                                    --container-format ovf \
 --file <qcow2 image file> \                                 --file <qcow2 image file> \
 --property os_distro=[fedora|ubuntu|...]                    --property os_distro=[fedora|ubuntu|...] 

-----------------------

Creating a new key pair:
nova keypair-add mykey > mykey.pem	                  openstack keypair create mykey > mykey.pem
Uploading a pre-existing key:
nova keypair-add --pub-key mykey.pub mykey                openstack keypair create --public-key mykey.pub mykey
List available SSH keys:
nova keypair-list                                         openstack keypair list
Managing users and tenants
List tenants/users/roles:                                 List projects/users/roles:
keystone tenant-list / user-list / role-list              openstack {project,user,role} list
Add new user:
keystone user-create --name <user> \                      openstack user create <user-name> \
	--tenant-id <tenant ID> --pass <passwd>               --project <project> --password <user-password>
Grant role to user:
keystone user-role-add --user-id <user ID \               openstack role add --user <user> \
	--role-id <role ID> --tenant-id <tenant ID>           --project <project> <role>

-----------------------

Show available services:
nova-manage service list                                  (XXX to be deleted?) nova service-list
Show running instances:
nova list                                                 openstack server list
Start a new instance:
nova boot <instance name> \                               openstack server create <server-name> \
	--flavor <flavor type> \                              --flavor <flavor> \
	--image <image name/ID> \                             --image <image> \
	--key-name <ssh key>                                  --key-name <key-name>
List flavours:
nova flavor-list                                          openstack flavor list
Migrate an instance to a different host:
nova live-migration <instance id> <dest>                  openstack server migrate <server-name> --live <target>
Reboot instance:
nova reboot <instance name/ID>                            openstack server reboot <server-name> 
Destroy instance:
nova delete <instance name/ID>                            openstack server delete <server-name>

-----------------------

Managing volumes
Create bootable volume from an image:
cinder create --image-id <image ID> \                     openstack volume create <volume-name> \
--display-name <volume name> <size in GB>                     --image <image> --size <size in GB>
Create a snapshot:
cinder snapshot-create <volume ID>                        openstack snapshot create <volume> \
                                                              --name <snaphost-name>
List available volumes:
nova volume-list / cinder list                            openstack volume list
Booting an instance from a volume:
nova boot <instance name>                                 openstack server create <server-name> \
	--flavor <flavor_type> --key-name <ssh key> \         --flavor <flavor> --key-name <key-name> \
	--block_device_mapping \                              --image <image> \
		<dev_name>=<volume ID>:[snap]::0 <name>       --block-device-mapping <dev_name>=<volume ID>
Creating a new volume:
cinder create --display-name <name> <size in GB>          openstack volume create <name> --size <size in GB>
Attach a volume to an instance:
nova volume-attach <instance ID> \                        openstack server add volume <server-name> <volume-name>
<volume ID> <dev_name>


More information about the dev mailing list