Professional Documents
Culture Documents
===================================
keystone user-create --name admin --pass Comnet123
root@ubuntu:/etc/keystone# keystone user-create --name admin --pass Comnet123
+----------+----------------------------------+
| Property |
Value
|
+----------+----------------------------------+
| email |
|
| enabled |
True
|
|
id
| 091f7dd6fc904361a9d04cffb96d35e8 |
| name |
admin
|
+----------+----------------------------------+
Create an admin role
====================
keystone role-create --name=admin
root@ubuntu:/etc/keystone# keystone role-create --name=admin
+----------+----------------------------------+
| Property |
Value
|
+----------+----------------------------------+
|
id
| 51356d58d34045e1a7e8f98eeb56f3d0 |
| name |
admin
|
+----------+----------------------------------+
keystone user-role-add --user=admin --tenant=admin --role=admin
Define Services and API EndPoints
=================================
Create a service entry for keystone
keystone service-create --name=keystone --type=identity --description="Keystone
Identity Service"
root@ubuntu:/etc/keystone# keystone service-create --name=keystone --type=identi
ty --description="Keystone Identity Service"
+-------------+----------------------------------+
| Property |
Value
|
+-------------+----------------------------------+
| description |
Keystone Identity Service
|
|
id
| 5303399de9ca46919b5198e6d3190910 |
|
name
|
keystone
|
|
type
|
identity
|
+-------------+----------------------------------+
keystone endpoint-create --service-id=5303399de9ca46919b5198e6d3190910 --publicu
rl=http://ICNController:5000/v2.0 --internalurl=http://ICNController:5000/v2.0 -adminurl=http://ICNController:35357/v2.0
| adminurl | http://ICNController:35357/v2.0 |
|
id
| 36f29812ed4e474ea9b59cdcb05a69d8 |
| internalurl | http://ICNController:5000/v2.0 |
| publicurl | http://ICNController:5000/v2.0 |
|
region |
regionOne
|
| service_id | 5303399de9ca46919b5198e6d3190910 |
+-------------+----------------------------------+
Verify Keystone Installation
unset OS_SERVICE_TOKEN OS_SERVICE_ENDPOINT
keystone --os-username=admin --os-password=Comnet123 --os-auth-url=http://ICNCon
troller:35357/v2.0 token-get
keystone --os-username=admin --os-password=Comnet123 --os-tenant-name=admin --os
-auth-url=http://ICNController:35357/v2.0 token-get
Create a keystonerc file
root@Tellabs-KVM4:/etc/glance# cat /root/adminrc
export OS_USERNAME=admin
export OS_PASSWORD=Comnet123
export OS_TENANT_NAME=admin
export OS_AUTH_URL=http://ICNController:35357/v2.0
source adminrc
Execute the below commands
keystone token-get
keystone user-list
Configure Image services
==========================
apt-get install glance python-glanceclient
Add the belwo entry in /etc/glance/glance-registry.conf
sql_connection = mysql://glance:Comnet123@ICNController/glance
Remove the glance.sqlite from /var/lib/glance directory
mysql -u root -p
CREATE DATABASE glance;
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'Comnet12
3';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'Comnet123';
quit
glance-manage db_sync
keystone user-create --name glance --pass Comnet123
root@ubuntu:/var/lib/glance# keystone user-create --name glance --pass Comnet123
+----------+----------------------------------+
| Property |
Value
|
+----------+----------------------------------+
| email |
|
| enabled |
True
|
|
id
| ee4ed246f7f9459ebc1ba897d3841590 |
| name |
glance
|
+----------+----------------------------------+
keystone user-role-add --user=glance --tenant=service --role=admin
Change glance-api.conf and glance-registry.conf
glance-api.conf
[keystone_authtoken]
auth_host = 192.168.195.252
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = glance
admin_password = glance123
Change glance-api-paste.ini and glance-registry-paste.ini
[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
auth_host = 192.168.195.252
admin_tenant_name = service
admin_user = glance
admin_password = glance123
keystone service-create --name=glance --type=image --description="Glance Image S
ervice"
root@ubuntu:/etc/glance# keystone service-create --name=glance --type=image --de
scription="Glance Image Service"
+-------------+----------------------------------+
| Property |
Value
|
+-------------+----------------------------------+
| description |
Glance Image Service
|
|
id
| d5739d30245747568ee2e053bf065c1b |
|
name
|
glance
|
|
type
|
image
|
+-------------+----------------------------------+
keystone endpoint-create --service-id=d5739d30245747568ee2e053bf065c1b --publicu
rl=http://ICNController:9292 --internalurl=http://ICNController:9292 --adminurl=
http://ICNController:9292
root@ubuntu:/etc/glance# keystone endpoint-create --service-id=d5739d30245747568
ee2e053bf065c1b --publicurl=http://ICNController:9292 --internalurl=http://ICNCo
ntroller:9292 --adminurl=http://ICNController:9292
+-------------+----------------------------------+
| Property |
Value
|
+-------------+----------------------------------+
| adminurl |
http://ICNController:9292
|
|
id
| 69fb86b15ab745968124f5b7d2fee081 |
| internalurl |
http://ICNController:9292
|
| publicurl |
http://ICNController:9292
|
|
region |
regionOne
|
| service_id | d5739d30245747568ee2e053bf065c1b |
+-------------+----------------------------------+
Verify the Image service installation
=======================================
1) make the Image directory
mkdir /opt/images
wget http://cdn.download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64disk.img
2)Copy the images to /opt/images
3)glance image-create --name=CIRROS --disk-format=qcow2 --container-format=bare
--is-public=true < cirros-0.3.1-x86_64-disk.img
glance image-create --name=CIRROS --disk-format=qcow2 --container-format=bare -is-public=true < cirros-0.3.0-i386-disk.img
root@Tellabs-KVM4:/opt/images# glance image-create --name=CIRROS --disk-format=q
cow2 --container-format=bare --is-public=true < cirros-0.3.1-x86_64-disk.img
+------------------+--------------------------------------+
| Property
| Value
|
+------------------+--------------------------------------+
| checksum
| d972013792949d0d3ba628fbe8685bce
|
| container_format | bare
|
| created_at
| 2013-12-13T07:04:33
|
| deleted
| False
|
| deleted_at
| None
|
| disk_format
| qcow2
|
| id
| 9dfca3b7-37dd-4243-8cfa-d04bb91d5d7d |
| is_public
| True
|
| min_disk
| 0
|
| min_ram
| 0
|
| name
| CIRROS
|
| owner
| None
|
| protected
| False
|
| size
| 13147648
|
| status
| active
|
| updated_at
| 2013-12-13T07:04:53
|
+------------------+--------------------------------------+
root@Tellabs-KVM4:/opt/images# glance image-list
+--------------------------------------+--------+-------------+-----------------+----------+--------+
| ID
| Name | Disk Format | Container Format
| Size
| Status |
+--------------------------------------+--------+-------------+-----------------+----------+--------+
| 9dfca3b7-37dd-4243-8cfa-d04bb91d5d7d | CIRROS | qcow2
| bare
| 13147648 | active |
+--------------------------------------+--------+-------------+-----------------+----------+--------+
rl=http://192.168.195.252:8774/v2/%\(tenant_id\)s --internalurl=http://192.168.1
95.252:8774/v2/%\(tenant_id\)s --adminurl=http://192.168.195.252:8774/v2/%\(tena
nt_id\)s
root@Tellabs-KVM4:/etc/nova# keystone endpoint-create --service-id=7a2dbf536edb4
4ab9fd24c16a4c76f4c --publicurl=http://192.168.195.252:8774/v2/%\(tenant_id\)s -internalurl=http://192.168.195.252:8774/v2/%\(tenant_id\)s --adminurl=http://19
2.168.195.252:8774/v2/%\(tenant_id\)s
+-------------+----------------------------------------------+
| Property |
Value
|
+-------------+----------------------------------------------+
| adminurl | http://192.168.195.252:8774/v2/%(tenant_id)s |
|
id
|
4ca4e1cc82fc4428ba1c31de5b7bc786
|
| internalurl | http://192.168.195.252:8774/v2/%(tenant_id)s |
| publicurl | http://192.168.195.252:8774/v2/%(tenant_id)s |
|
region |
regionOne
|
| service_id |
7a2dbf536edb44ab9fd24c16a4c76f4c
|
+-------------+----------------------------------------------+
10)Enter the following for COmpute to Rabbit MQ
rpc_backend = nova.rpc.impl_kombu
rabbit_host = controller
11)Restart Compute Services
service nova-api restart
service nova-cert restart
service nova-consoleauth restart
service nova-scheduler restart
service nova-conductor restart
service nova-novncproxy restart
service
service
service
service
service
service
nova-api status
nova-cert status
nova-consoleauth status
nova-scheduler status
nova-conductor status
nova-novncproxy status
service
service
service
service
service
service
nova-api stop
nova-cert stop
nova-consoleauth stop
nova-scheduler stop
nova-conductor stop
nova-novncproxy stop
12) Verification
root@Tellabs-KVM4:/etc/nova# nova image-list
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_
register_static: assertion 'g_type_from_name (name) == 0' failed
import gobject._gobject
ERROR: Unauthorized (HTTP 401)
Error was thrwon
Made changes in api-paste.ini
To add
auth_port = 35357
auth_protocol = http
still the warning is there but
root@Tellabs-KVM4:/etc/nova# nova image-list
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_
register_static: assertion 'g_type_from_name (name) == 0' failed
import gobject._gobject
+--------------------------------------+--------+--------+--------+
| ID
| Name | Status | Server |
+--------------------------------------+--------+--------+--------+
| 9dfca3b7-37dd-4243-8cfa-d04bb91d5d7d | CIRROS | ACTIVE |
|
+--------------------------------------+--------+--------+--------+
root@Tellabs-KVM4:/etc/nova#
Installing Neutron
==================
1)Neutron Database
CREATE DATABASE neutron;
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'Comnet
123';
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'Comnet123';
service neutron-server stop
service neutron-dhcp-agent stop
service neutron-l3-agent stop
service neutron-metadata-agent stop
service neutron-plugin-openvswitch-agent stop
service neutron-server start
service neutron-metadata-agent start
service neutron-dhcp-agent start
service neutron-l3-agent start
service neutron-plugin-openvswitch-agent start
Installing Network support on Controller Node
1) Configure in neutron.conf
auth_strategy = keystone
rpc_backend = neutron.openstack.common.rpc.impl_kombu
2) Tell nova that neutron is going to give the network
network_api_class=nova.network.neutronv2.api.API
neutron_url=http://192.168.195.252:9696
neutron_auth_strategy=keystone
neutron_admin_tenant_name=service
neutron_admin_username=neutron
neutron_admin_password=neutron123
neutron_admin_auth_url=http://192.168.195.252:35357/v2.0
firewall_driver=nova.virt.firewall.NoopFirewallDriver
security_group_api=neutron
Installing Compute
2)Add in nova.conf
Add the following in [DEFAULT]
my_ip=192.168.195.251
vncserver_listen=0.0.0.0
vncserver_proxyclient_address=192.168.195.251
glance_host=192.168.195.252
3) Add the following in api-paste.ini
auth_host=192.168.195.252
auth_uri=http://192.168.195.252:5000
auth_port = 35357
auth_protocol = http
admin_tenant_name=service
admin_user=nova
admin_password=nova123
signing_dir = /tmp/keystone-signing-nova
4) Install networking support on Compute machine
a) entry in sysctl.conf
net.ipv4.conf.default.rp_filter=0
net.ipv4.conf.all.rp_filter=0
b)Install network plugin on Compute node
i) Add br-int
ovs-vsctl add-br br-int
ii) Enable below in neutron.conf
core_plugin = neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2
Configure in ovs_plugins.ini for VLAN
tenant_network_type = vlan
network_vlan_ranges = physnet1:1:4094
bridge_mappings = physnet1:br-ex
c)Add br-ex and port to it
ovs-vsctl add-br br-ex
ovs-vsctl add-port br-ex eth2
2.168.196.0/24
root@Tellabs-KVM4:/# neutron subnet-create --tenant-id 905b2388036e4c378d131e87f
8fd1d84 sharednet1 192.168.196.0/24
Created a new subnet:
+------------------+------------------------------------------------------+
| Field
| Value
|
+------------------+------------------------------------------------------+
| allocation_pools | {"start": "192.168.196.2", "end": "192.168.196.254"} |
| cidr
| 192.168.196.0/24
|
| dns_nameservers |
|
| enable_dhcp
| True
|
| gateway_ip
| 192.168.196.1
|
| host_routes
|
|
| id
| 28792151-a0dc-42e8-925b-09c1dc065270
|
| ip_version
| 4
|
| name
|
|
| network_id
| af3c2a4c-07ae-4da5-bc95-6b1fce2c428f
|
| tenant_id
| 905b2388036e4c378d131e87f8fd1d84
|
+------------------+------------------------------------------------------+
keystone tenant-create --name TenantA --description "TenantA"
root@Tellabs-KVM4:/# keystone tenant-create --name TenantA --description "Tenan
tA"
+-------------+----------------------------------+
| Property |
Value
|
+-------------+----------------------------------+
| description |
TenantA
|
| enabled |
True
|
|
id
| acf3fe27228e4cc7bc71471ef58cb09f |
|
name
|
TenantA
|
+-------------+----------------------------------+
keystone tenant-create --name TenantB --description "TenantB"
root@Tellabs-KVM4:/# keystone tenant-create --name TenantB --description "Tena
ntB"
+-------------+----------------------------------+
| Property |
Value
|
+-------------+----------------------------------+
| description |
TenantB
|
| enabled |
True
|
|
id
| 8cd625875cf14ab8abed8facb6c4e596 |
|
name
|
TenantB
|
+-------------+----------------------------------+
keystone tenant-create --name TenantC --description "TenantC"
root@Tellabs-KVM4:/# keystone tenant-create --name TenantC --description "Te
nantC"
+-------------+----------------------------------+
| Property |
Value
|
+-------------+----------------------------------+
| description |
TenantC
|
| enabled |
True
|
|
id
| 742d3295b90b417c8ee080f1df6c7c0f |
|
name
|
TenantC
|
+-------------+----------------------------------+
keystone user-create --tenant-id acf3fe27228e4cc7bc71471ef58cb09f --name=UserA
--pass=vlan
root@Tellabs-KVM4:/# keystone user-create --tenant-id acf3fe27228e4cc7bc71471e
f58cb09f --name=UserA --pass=vlan
+----------+----------------------------------+
| Property |
Value
|
+----------+----------------------------------+
| email |
|
| enabled |
True
|
|
id
| f228c392863e4dc697986605d511f682 |
| name |
UserA
|
| tenantId | acf3fe27228e4cc7bc71471ef58cb09f |
+----------+----------------------------------+
keystone user-role-add --user=UserA --tenant=TenantA --role=admin
keystone user-create --tenant-id
--pass=vlan
8cd625875cf14ab8abed8facb6c4e596 --name=UserB
/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py:185: SADeprecationWarning: P
ool.add_listener is deprecated. Use event.listen()
self.add_listener(l)
4)Configure logging in heat
verbose=True
log_dir=/var/log/heat
5)Create heat user
keystone user-create --name=heat --pass=heat123
keystone user-role-add --user=heat --tenant=service --role=admin
root@Tellabs-KVM4:/etc/heat# keystone user-create --name=heat --pass=heat123
+----------+----------------------------------+
| Property |
Value
|
+----------+----------------------------------+
| email |
|
| enabled |
True
|
|
id
| c40a1bd5f1e6434fa43a3fd51c6a719d |
| name |
heat
|
+----------+----------------------------------+
root@Tellabs-KVM4:/etc/heat# keystone user-role-add --user=heat --tenant=service
--role=admin
6)Edit api-paste.ini file
Add in filter:authtoken
auth_host = 192.168.195.252
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = heat
admin_password = heat123
7) Create service and endpoint for heat api
keystone service-create --name=heat --type=orchestration --description="Heat Orc
hestration API"
root@Tellabs-KVM4:/etc/heat# keystone service-create --name=heat --type=orchestr
ation --description="Heat Orchestration API"
+-------------+----------------------------------+
| Property |
Value
|
+-------------+----------------------------------+
| description |
Heat Orchestration API
|
|
id
| c7af52a71d9a4f5796e36127ea704b55 |
|
name
|
heat
|
|
type
|
orchestration
|
+-------------+----------------------------------+
keystone endpoint-create --service-id=c7af52a71d9a4f5796e36127ea704b55 --publicu
rl=http://192.168.195.252:8004/v1/\$(tenant_id)s --internalurl=http://192.168.1
95.252:8004/v1/\$(tenant_id)s --adminurl=http://192.168.195.252:8004/v1/\$(tenan
t_id)s
keystone endpoint-create --service-id c7af52a71d9a4f5796e36127ea704b55 --publicu
rl 'http://192.168.195.252:8004/v1/\$(tenant_id)s' --adminurl 'http://192.168.19
5.252:8004/v1/\$(tenant_id)s' --internalurl 'http://192.168.195.252:8004/v1/\$(t
enant_id)s'
keystone endpoint-create --service-id=c7af52a71d9a4f5796e36127ea704b55 --publi
curl=http://192.168.195.252:8004/v1/%\(tenant_id\)s --internalurl=http://192.1
68.195.252:8004/v1/%\(tenant_id\)s --adminurl=http://192.168.195.252:8004/v1/%
\(tenant_id\)s
root@Tellabs-KVM4:/etc/heat# keystone endpoint-create --service-id c7af52a71d9a4
openvswitch-datapath-dkms
root@Tellabs-KVM4:~/.ssh# nova boot --image CIRROS --flavor 1 --key_name vlan -nic net-id=af3c2a4c-07ae-4da5-bc95-6b1fce2c428f --security_group default Tenant
A_VM1
+--------------------------------------+--------------------------------------+
| Property
| Value
|
+--------------------------------------+--------------------------------------+
| status
| BUILD
|
| updated
| 2013-12-16T02:33:19Z
|
| OS-EXT-STS:task_state
| scheduling
|
| key_name
| vlan
|
| image
| CIRROS
|
| hostId
|
|
| OS-EXT-STS:vm_state
| building
|
| OS-SRV-USG:launched_at
| None
|
| flavor
| m1.tiny
|
| id
| 173dbbba-8e24-49d8-bada-6e8f00605c99 |
| security_groups
| [{u'name': u'default'}]
|
| OS-SRV-USG:terminated_at
| None
|
| user_id
| f228c392863e4dc697986605d511f682
|
| name
| TenantA_VM1
|
| adminPass
| 8tbKg5CNjiJZ
|
| tenant_id
| acf3fe27228e4cc7bc71471ef58cb09f
|
| created
| 2013-12-16T02:33:17Z
|
| OS-DCF:diskConfig
| MANUAL
|
| metadata
| {}
|
| os-extended-volumes:volumes_attached | []
|
| accessIPv4
|
|
| accessIPv6
|
|
| progress
| 0
|
| OS-EXT-STS:power_state
| 0
|
| OS-EXT-AZ:availability_zone
| nova
|
| config_drive
|
|
+--------------------------------------+--------------------------------------+
root@Tellabs-KVM4:~/.ssh# nova list
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_
register_static: assertion 'g_type_from_name (name) == 0' failed
import gobject._gobject
+--------------------------------------+-------------+--------+------------+------------+--------------------------+
| ID
| Name
| Status | Task State | Pow
er State | Networks
|
+--------------------------------------+-------------+--------+------------+------------+--------------------------+
| 173dbbba-8e24-49d8-bada-6e8f00605c99 | TenantA_VM1 | ACTIVE | None
| Run
ning
| sharednet1=192.168.196.2 |
+--------------------------------------+-------------+--------+------------+------------+--------------------------+
nova boot --image UBU --flavor 6 --key_name vlan --nic net-id=af3c2a4c-07ae-4da5
-bc95-6b1fce2c428f --security_group default TenantA_VM2
+---------------------------+--------------------------------------+
| Field
| Value
|
+---------------------------+--------------------------------------+
| admin_state_up
| True
|
| id
| 3c5c3a7d-3b5c-49e2-a252-4632e3774d6f |
| name
| ext_net
|
| provider:network_type
| vlan
|
| provider:physical_network | physnet1
|
| provider:segmentation_id | 1
|
| router:external
| True
|
| shared
| False
|
| status
| ACTIVE
|
| subnets
|
|
| tenant_id
| 1b813a5bedc54bbeab290a57bf2d0fc9
|
+---------------------------+--------------------------------------+
neutron subnet-create ext_net --allocation-pool start=192.168.196.4,end=192.168.
196.99 --gateway 192.168.196.1 192.168.196.0/24 --disable-dhcp
root@Tellabs-KVM4:~# neutron subnet-create ext_net --allocation-pool start=192.1
68.196.4,end=192.168.196.99 --gateway 192.168.196.1 192.168.196.0/24 --disable-d
hcp
Created a new subnet:
+------------------+-----------------------------------------------------+
| Field
| Value
|
+------------------+-----------------------------------------------------+
| allocation_pools | {"start": "192.168.196.4", "end": "192.168.196.99"} |
| cidr
| 192.168.196.0/24
|
| dns_nameservers |
|
| enable_dhcp
| False
|
| gateway_ip
| 192.168.196.1
|
| host_routes
|
|
| id
| de18ccf9-2777-4fa3-8bcb-ffd8567f2735
|
| ip_version
| 4
|
| name
|
|
| network_id
| 3c5c3a7d-3b5c-49e2-a252-4632e3774d6f
|
| tenant_id
| 1b813a5bedc54bbeab290a57bf2d0fc9
|
+------------------+-----------------------------------------------------+
root@Tellabs-KVM4:~# neutron router-gateway-set Router1 ext_net
Set gateway for router Router1
root@Tellabs-KVM4:~# nova boot --image UBU --flavor 6
TenantA_VM1
+-------------------------------------+--------------------------------------+
| Property
| Value
|
+--------------------------------------+--------------------------------------+
| OS-EXT-STS:task_state
| scheduling
|
| image
| UBU
|
| OS-EXT-STS:vm_state
| building
|
| OS-EXT-SRV-ATTR:instance_name
| instance-0000000e
|
| OS-SRV-USG:launched_at
| None
|
| flavor
| j1.tiny
|
| id
| f96617cc-5531-4fdb-983c-601b7dcdb219 |
| security_groups
| [{u'name': u'default'}]
|
| user_id
| f228c392863e4dc697986605d511f682
|
| 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-12-17T10:15:30Z
|
| hostId
|
|
| OS-EXT-SRV-ATTR:host
| None
|
| OS-SRV-USG:terminated_at
| None
|
| key_name
| None
|
| OS-EXT-SRV-ATTR:hypervisor_hostname | None
|
| name
| TenantA_VM1
|
| adminPass
| 65rFHJKRFJdH
|
| tenant_id
| acf3fe27228e4cc7bc71471ef58cb09f
|
| created
| 2013-12-17T10:15:29Z
|
| os-extended-volumes:volumes_attached | []
|
| metadata
| {}
|
+--------------------------------------+--------------------------------------+
Create another Net with UserB and TenantB(Previous UseA and TenantA)
root@Tellabs-KVM4:~# neutron net-create net2 --provider:network_type vlan --pro
vider:physical_network physnet1 --provider:segmentation_id 102
Created a new network:
+---------------------------+--------------------------------------+
| Field
| Value
|
+---------------------------+--------------------------------------+
| admin_state_up
| True
|
| id
| c9c31a9d-6be4-4a2c-813f-1d13d1a1cea6 |
| name
| net2
|
| provider:network_type
| vlan
|
| provider:physical_network | physnet1
|
| provider:segmentation_id | 102
|
| shared
| False
|
| status
| ACTIVE
|
| subnets
|
|
| tenant_id
| 8cd625875cf14ab8abed8facb6c4e596
|
+---------------------------+--------------------------------------+
root@Tellabs-KVM4:~# neutron subnet-create net2 10.1.0.0/24
Created a new subnet:
+------------------+--------------------------------------------+
| Field
| Value
|
+------------------+--------------------------------------------+
| allocation_pools | {"start": "10.1.0.2", "end": "10.1.0.254"} |
| cidr
| 10.1.0.0/24
|
| dns_nameservers |
|
| enable_dhcp
| True
|
| gateway_ip
| 10.1.0.1
|
| host_routes
|
|
| id
| 54da1699-2c54-467a-b07d-45e8d296573d
|
| ip_version
| 4
|
| name
|
|
| network_id
| c9c31a9d-6be4-4a2c-813f-1d13d1a1cea6
|
| tenant_id
| 8cd625875cf14ab8abed8facb6c4e596
|
+------------------+--------------------------------------------+
+------------------+--------------------------------------------+
| Field
| Value
|
+------------------+--------------------------------------------+
| allocation_pools | {"start": "10.0.0.2", "end": "10.0.0.254"} |
| cidr
| 10.0.0.0/24
|
| dns_nameservers |
|
| enable_dhcp
| True
|
| gateway_ip
| 10.0.0.1
|
| host_routes
|
|
| id
| 3aad3369-cead-4ab3-9632-988c43218bef
|
| ip_version
| 4
|
| name
|
|
| network_id
| 81963385-ee17-4cff-87c7-4dcc67e6c11a
|
| tenant_id
| acf3fe27228e4cc7bc71471ef58cb09f
|
+------------------+--------------------------------------------+
root@Tellabs-KVM4:~# neutron router-create Router1
Created a new router:
+-----------------------+-------------------------------------------------------------------------------------+
| Field
| Value
|
+-----------------------+-------------------------------------------------------------------------------------+
| admin_state_up
| True
|
| external_gateway_info |
|
| id
| 14f750c3-7d18-4bc1-a5ca-2f260a29ce2a
| name
| Router1
| router_rules
|
| {"action": "permit", "source": "any", "destination": "
| status
| ACTIVE
| tenant_id
| acf3fe27228e4cc7bc71471ef58cb09f
| shared
| False
|
| status
| ACTIVE
|
| subnets
|
|
| tenant_id
| acf3fe27228e4cc7bc71471ef58cb09f
|
+----------------+--------------------------------------+
neutron subnet-create net2 10.1.0.0/24
root@Tellabs-KVM4:~# neutron subnet-create net2 10.1.0.0/24
Created a new subnet:
+------------------+--------------------------------------------+
| Field
| Value
|
+------------------+--------------------------------------------+
| allocation_pools | {"start": "10.1.0.2", "end": "10.1.0.254"} |
| cidr
| 10.1.0.0/24
|
| dns_nameservers |
|
| enable_dhcp
| True
|
| gateway_ip
| 10.1.0.1
|
| host_routes
|
|
| id
| 6021cab3-2590-4742-881a-e9c92a38a595
|
| ip_version
| 4
|
| name
|
|
| network_id
| e25647d3-6364-4758-af39-da8662b777e2
|
| tenant_id
| acf3fe27228e4cc7bc71471ef58cb09f
|
+------------------+--------------------------------------------+
neutron router-create Router2
root@Tellabs-KVM4:~# neutron router-create Router2
Created a new router:
+-----------------------+-------------------------------------------------------------------------------------+
| Field
| Value
|
+-----------------------+-------------------------------------------------------------------------------------+
| admin_state_up
| True
|
| external_gateway_info |
|
| id
| f64b21b8-b214-41c2-9ea7-c9339c100dfc
|
| name
| Router2
|
| router_rules
| {"action": "permit", "source": "any", "destination": "
any", "id": 2, "nexthops": []} |
| status
| ACTIVE
|
| tenant_id
| acf3fe27228e4cc7bc71471ef58cb09f
|
+-----------------------+-------------------------------------------------------------------------------------+
router-interface-add Router2 6021cab3-2590-4742-881a-e9c92a38a595
root@Tellabs-KVM4:~# neutron router-interface-add Router2 6021cab3-2590-4742-881
a-e9c92a38a595
net-create private
subnet-create --name private private 10.0.0.0/24
router-create Router1
router-interface-add Router1 private
router-gateway-set Router1 public
source /root/demorc
neutron net-create private --provider:network_type vlan --provider:physical_netw
ork physnet1 --provider:segmentation_id 3
neutron subnet-create --name private private 10.0.0.0/24
source /root/adminrc
neutron net-create public --router:external=True
neutron router-create Router1
neutron router-interface-add Router1 private
neutron subnet-create --name public public 192.168.182.0/24 --disable-dhcp
neutron router-gateway-set Router1 public
glance image-create --name="Test" --disk-format=qcow2 --container-format=bare -is-public=true < precise.qcow2