[ Pobierz całość w formacie PDF ]

| True |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0
| True |
| 84 | m1.micro | 128 | 0 | 0 | | 1 | 1.0
| True |
+----+-----------+-----------+------+-----------+----+-------+------------
-+-----------+
Note the ID of the flavor that you want to use for your instance.
3. List the available images:
$ nova image-list
+--------------------------------------+-------------------------------+--
------+------+
| ID | Name |
Status |Server|
+--------------------------------------+-------------------------------+--
------+------+
| 397e713c-b95b-4186-ad46-6126863ea0a9 |cirros-0.3.1-x86_64-uec |
ACTIVE | |
| df430cc2-3406-4061-b635-a51c16e488ac |cirros-0.3.1-x86_64-uec-kernel |
ACTIVE | |
| 3cf852bd-2332-48f4-9ae4-7d926d50945e |cirros-0.3.1-x86_64-uec-ramdisk|
ACTIVE | |
+--------------------------------------+-------------------------------+--
------+------+
You can also filter the image list by using grep to find a specific image, like this:
$ nova image-list | grep 'kernel'
| df430cc2-3406-4061-b635-a51c16e488ac | cirros-0.3.1-x86_64-uec-kernel |
ACTIVE | |
Note the ID of the image that you want to boot your instance from.
4. List the available security groups:
41
Red Hat Enterprise Linux OpenStack Platform 4 End User Guide
Note
If you are an admin user, specify the --all-tenants parameter to list groups for all
tenants.
$ nova secgroup-list --all-tenants
+----+---------+-------------+----------------------------------+
| Id | Name | Description | Tenant_ID |
+----+---------+-------------+----------------------------------+
| 2 | default | default | 66265572db174a7aa66eba661f58eb9e |
| 1 | default | default | b70d90d65e464582b6b2161cf3603ced |
+----+---------+-------------+----------------------------------+
If you have not created any security groups, you can assign the instance to only the default
security group.
You can also list rules for a specified security group:
$ nova secgroup-list-rules default
This example modifies the default security group to allow HTTP traffic on the instance by permitting
TCP traffic on Port 80.
5. List the available keypairs.
$ nova keypair-list
Note the name of the keypair that you use for SSH access.
2.7.2. Launch an instance from an image
1. Now you have all parameters required to launch an instance, run the following command and
specify the server name, flavor ID, and image ID. Optionally, you can provide a key name for
access control and security group for security. You can also include metadata key and value pairs.
For example you can add a description for your server by providing the --meta
description="My Server" parameter.
You can pass user data in a local file at instance launch by using the flag --user-data USER-
DATA-FILE parameter.
$ nova boot --flavor FLAVOR_ID --image IMAGE_ID --key_name KEY_NAME \ --
user-data mydata.file --security_group SEC_GROUP NAME_FOR_INSTANCE \ --
meta KEY=VALUE --meta KEY=VALUE
Depending on the parameters that you provide, the command returns a list of server properties.
A status of BUILD indicates that the instance has started, but is not yet online.
A status of ACTIVE indicates that the instance is active.
42
OpenStack command-line clients
+-------------------------------------+-----------------------------------
---+
| Property | Value
|
+-------------------------------------+-----------------------------------
---+
| OS-EXT-STS:task_state | scheduling
|
| image | cirros-0.3.1-x86_64-uec
|
| OS-EXT-STS:vm_state | building
|
| OS-EXT-SRV-ATTR:instance_name | instance-00000002
|
| flavor | m1.small
|
| id | b3cdc6c0-85a7-4904-ae85-
71918f734048 |
| security_groups | [{u'name': u'default'}]
|
| user_id | 376744b5910b4b4da7d8e6cb483b06a8
|
| OS-DCF:diskConfig | MANUAL
|
| accessIPv4 |
|
| accessIPv6 |
|
| progress | 0
|
| OS-EXT-STS:power_state | 0
|
| OS-EXT-AZ:availability_zone | nova
|
| config_drive |
|
| status | BUILD
|
| updated | 2013-07-16T16:25:34Z
|
| hostId |
|
| OS-EXT-SRV-ATTR:host | None
|
| key_name | None
|
| OS-EXT-SRV-ATTR:hypervisor_hostname | None
|
| name | myCirrosServer
|
| adminPass | tVs5pL8HcPGw
|
| tenant_id | 66265572db174a7aa66eba661f58eb9e
|
| created | 2013-07-16T16:25:34Z
|
| metadata | {}
|
+-------------------------------------+-----------------------------------
---
43
Red Hat Enterprise Linux OpenStack Platform 4 End User Guide
Copy the server ID value from the id field in the output. You use this ID to get details for or delete
your server.
Copy the administrative password value from the adminPass field. You use this value to log into
your server.
2. Check if the instance is online:
$ nova list
The list shows the ID, name, status, and private (and if assigned, public) IP addresses for all
instances in the project that you belong to:
+--------------------------------------+----------------------+--------+--
----------+-------------+------------------+
| ID | Name | Status |
Task State | Power State | Networks |
+--------------------------------------+----------------------+--------+--
----------+-------------+------------------+
| 84c6e57d-a6b1-44b6-81eb-fcb36afd31b5 | myCirrosServer | ACTIVE | [ Pobierz całość w formacie PDF ]
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • freetocraft.keep.pl