[ Pobierz całość w formacie PDF ]
Configuration Reference
The following table shows all options for the config drive.
Table 2.3. Description of configuration options for configdrive
Configuration option=Default value Description
config_drive_cdrom=False (BoolOpt) Attaches the Config Drive image as a
CD drive instead of a disk drive
config_drive_format=iso9660 (StrOpt) Config drive format. One of iso9660
(default) or vfat
config_drive_inject_password=False (BoolOpt) Sets the admin password in the config
drive image
config_drive_skip_versions=1.0 2007-01-19 (StrOpt) List of metadata versions to skip placing
2007-03-01 2007-08-29 2007-10-10 2007-12-15 into the config drive
2008-02-01 2008-09-01
config_drive_tempdir=None (StrOpt) Where to put temporary files associated
with config drive creation
force_config_drive=None (StrOpt) Set to force injection to take place on a
config drive (if set, valid options are: always)
mkisofs_cmd=genisoimage (StrOpt) Name and optionally path of the tool used
for ISO image creation
2.12. Create and manage networks
Before you run commands, set the following environment variables:
export OS_USERNAME=admin
export OS_PASSWORD=password
export OS_TENANT_NAME=admin
export OS_AUTH_URL=http://localhost:5000/v2.0
2.12.1. Create networks
1. List the extensions of the system:
$ neutron ext-list -c alias -c name
66
Configuration Reference
+-----------------+--------------------------+
| alias | name |
+-----------------+--------------------------+
| agent_scheduler | Agent Schedulers |
| binding | Port Binding |
| quotas | Quota management support |
| agent | agent |
| provider | Provider Network |
| router | Neutron L3 Router |
| lbaas | LoadBalancing service |
| extraroute | Neutron Extra Route |
+-----------------+--------------------------+
2. Create a network:
$ neutron net-create net1
Created a new network:
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | 2d627131-c841-4e3a-ace6-f2dd75773b6d |
| name | net1 |
| provider:network_type | vlan |
| provider:physical_network | physnet1 |
| provider:segmentation_id | 1001 |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 3671f46ec35e4bbca6ef92ab7975e463 |
+---------------------------+--------------------------------------+
Note
Some fields of the created network are invisible to non-admin users.
3. Create a network with specified provider network type:
$ neutron net-create net2 --provider:network-type local
67
Red Hat Enterprise Linux OpenStack Platform 4 End User Guide
Created a new network:
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | 524e26ea-fad4-4bb0-b504-1ad0dc770e7a |
| name | net2 |
| provider:network_type | local |
| provider:physical_network | |
| provider:segmentation_id | |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 3671f46ec35e4bbca6ef92ab7975e463 |
+---------------------------+--------------------------------------+
As shown previously, the unknown option --provider:network-type is used to create a local
provider network.
2.12.2. Create subnets
Create a subnet:
$ neutron subnet-create net1 192.168.2.0/24 --name subnet1
Created a new subnet:
+------------------+--------------------------------------------------+
| Field | Value |
+------------------+--------------------------------------------------+
| allocation_pools | {"start": "192.168.2.2", "end": "192.168.2.254"} |
| cidr | 192.168.2.0/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 192.168.2.1 |
| host_routes | |
| id | 15a09f6c-87a5-4d14-b2cf-03d97cd4b456 |
| ip_version | 4 |
| name | subnet1 |
| network_id | 2d627131-c841-4e3a-ace6-f2dd75773b6d |
| tenant_id | 3671f46ec35e4bbca6ef92ab7975e463 |
+------------------+--------------------------------------------------+
In the previous command, net1 is the network name, 192.168.2.0/24 is the subnet's CIDR. They
are positional arguments. --name subnet1 is an unknown option, which specifies the subnet's name.
2.12.3. Create ports
1. Create a port with specified IP address:
$ neutron port-create net1 --fixed-ip ip_address=192.168.2.40
68
Configuration Reference
Created a new port:
+----------------------+--------------------------------------------------
-----------------------------------+
| Field | Value
|
+----------------------+--------------------------------------------------
-----------------------------------+
| admin_state_up | True
|
| binding:capabilities | {"port_filter": false}
|
| binding:vif_type | ovs
|
| device_id |
|
| device_owner |
|
| fixed_ips | {"subnet_id": "15a09f6c-87a5-4d14-b2cf-
03d97cd4b456", "ip_address": "192.168.2.40"} |
| id | f7a08fe4-e79e-4b67-bbb8-a5002455a493
|
| mac_address | fa:16:3e:97:e0:fc
|
| name |
|
| network_id | 2d627131-c841-4e3a-ace6-f2dd75773b6d
|
| status | DOWN
|
| tenant_id | 3671f46ec35e4bbca6ef92ab7975e463
|
[ Pobierz całość w formacie PDF ]