-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathopenstack-liberty-caidat.txt
980 lines (684 loc) · 23 KB
/
openstack-liberty-caidat.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
### Thiết lập cơ bản
### Enable the OpenStack repository
apt-get install software-properties-common -y
add-apt-repository cloud-archive:liberty -y
- Upgrade the packages on your host
apt-get -y update && apt-get -y dist-upgrade
- Install the OpenStack client
apt-get -y install python-openstackclient
- Reboot VM
init 6
### Install and configure the database server
- Install the packages:
apt-get -y install mariadb-server python-pymysql
- Nhập pass trong quá trình cài.
- Tạo file /etc/mysql/conf.d/mysqld_openstack.cnf với nội dung sau
[mysqld]
bind-address = 0.0.0.0
[mysqld]
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8
- Khởi động lại MySQL
service mysql restart
### Install the message queue service
- Install the package:
apt-get -y install rabbitmq-server
-Add the openstack user
rabbitmqctl add_user openstack Welcome123
- Permit configuration, write, and read access for the openstack user
rabbitmqctl set_permissions openstack ".*" ".*" ".*"
### Install Keysonte
- Use the database access client to connect to the database server as the root user
```sh
mysql -u root -pWelcome123
CREATE DATABASE keystone;
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'Welcome123';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'Welcome123';
exit;
```
- Disable the keystone service from starting automatically after installation
echo "manual" > /etc/init/keystone.override
- Run the following command to install the packages
apt-get -y install keystone apache2 libapache2-mod-wsgi memcached python-memcache
- Sao luu file cau hinh
cp /etc/keystone/keystone.conf /etc/keystone/keystone.conf.bak
- Edit the /etc/keystone/keystone.conf file and complete the following actions
```sh
[DEFAULT]
log_dir = /var/log/keystone
admin_token = Welcome123
public_bind_host = 10.10.10.120
admin_bind_host = 10.10.10.120
[assignment]
[auth]
[cache]
[catalog]
[cors]
[cors.subdomain]
[credential]
[database]
connection = mysql+pymysql://keystone:[email protected]/keystone
[domain_config]
[endpoint_filter]
[endpoint_policy]
[eventlet_server]
[eventlet_server_ssl]
[federation]
[fernet_tokens]
[identity]
[identity_mapping]
[kvs]
[ldap]
[matchmaker_redis]
[matchmaker_ring]
[memcache]
servers = localhost:11211
[oauth1]
[os_inherit]
[oslo_messaging_amqp]
[oslo_messaging_qpid]
[oslo_messaging_rabbit]
[oslo_middleware]
[oslo_policy]
[paste_deploy]
[policy]
[resource]
[revoke]
driver = sql
[role]
[saml]
[signing]
[ssl]
[token]
provider = uuid
driver = memcache
[tokenless_auth]
[trust]
[extra_headers]
Distribution = Ubuntu
```
- Populate the Identity service database
```sh
su -s /bin/sh -c "keystone-manage db_sync" keystone
```
#### Configure the Apache HTTP server
- Edit the /etc/apache2/apache2.conf file and configure the ServerName option to reference the 10.10.10.120 node:
echo "ServerName 10.10.10.120" >> /etc/apache2/apache2.conf
- Create the /etc/apache2/sites-available/wsgi-keystone.conf file with the following content
```sh
Listen 5000
Listen 35357
<VirtualHost *:5000>
WSGIDaemonProcess keystone-public processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
WSGIProcessGroup keystone-public
WSGIScriptAlias / /usr/bin/keystone-wsgi-public
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
<IfVersion >= 2.4>
ErrorLogFormat "%{cu}t %M"
</IfVersion>
ErrorLog /var/log/apache2/keystone.log
CustomLog /var/log/apache2/keystone_access.log combined
<Directory /usr/bin>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
</VirtualHost>
<VirtualHost *:35357>
WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
WSGIProcessGroup keystone-admin
WSGIScriptAlias / /usr/bin/keystone-wsgi-admin
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
<IfVersion >= 2.4>
ErrorLogFormat "%{cu}t %M"
</IfVersion>
ErrorLog /var/log/apache2/keystone.log
CustomLog /var/log/apache2/keystone_access.log combined
<Directory /usr/bin>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
</VirtualHost>
```
- Enable the Identity service virtual hosts
ln -s /etc/apache2/sites-available/wsgi-keystone.conf /etc/apache2/sites-enabled
- Restart the Apache HTTP server
service apache2 restart
- Because this configuration uses an SQL database server, you can remove the SQLite database file:
rm -f /var/lib/keystone/keystone.db
- Configure the authentication token, endpoint URL, Identity API version
export OS_TOKEN=Welcome123
export OS_URL=http://10.10.10.120:35357/v3
export OS_IDENTITY_API_VERSION=3
openstack service create --name keystone --description "OpenStack Identity" identity
openstack endpoint create --region RegionOne identity public http://10.10.10.120:5000/v2.0
openstack endpoint create --region RegionOne identity internal http://10.10.10.120:5000/v2.0
openstack endpoint create --region RegionOne identity admin http://10.10.10.120:35357/v2.0
openstack project create --domain default --description "Admin Project" admin
openstack user create --domain default --password Welcome123 admin
openstack role create admin
openstack role add --project admin --user admin admin
openstack project create --domain default --description "Service Project" service
openstack project create --domain default --description "Demo Project" demo
openstack user create --domain default --password Welcome123 demo
openstack role create user
openstack role add --project demo --user demo user
unset OS_TOKEN OS_URL
- Create a file named creds and add the following lines
export OS_PROJECT_DOMAIN_ID=default
export OS_USER_DOMAIN_ID=default
export OS_PROJECT_NAME=admin
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=Welcome123
export OS_AUTH_URL=http://10.10.10.120:35357/v3
export OS_IDENTITY_API_VERSION=3
#### Cài đặt GLANCE
- Create the database, complete these steps
mysql -u root -pWelcome123
CREATE DATABASE glance;
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'Welcome123';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'Welcome123';
quit;
- To create the service credentials, complete these steps
openstack user create --domain default --password Welcome123 glance
openstack role add --project service --user glance admin
openstack service create --name glance --description "OpenStack Image service" image
openstack endpoint create --region RegionOne image public http://10.10.10.120:9292
openstack endpoint create --region RegionOne image internal http://10.10.10.120:9292
openstack endpoint create --region RegionOne image admin http://10.10.10.120:9292
- Install the packages GLANCE
apt-get -y install glance python-glanceclient
- Edit the /etc/glance/glance-api.conf file and complete the following actions
cp /etc/glance/glance-api.conf /etc/glance/glance-api.conf.bak
cat /etc/glance/glance-api.conf.bak | grep -v ^$ | grep -v ^# > /etc/glance/glance-api.conf
- Sửa /etc/glance/glance-api.conf với nội dung sau
```sh
[DEFAULT]
notification_driver = noop
verbose = True
[database]
connection = mysql+pymysql://glance:[email protected]/glance
backend = sqlalchemy
[glance_store]
default_store = file
filesystem_store_datadir = /var/lib/glance/images/
[image_format]
[keystone_authtoken]
auth_uri = http://10.10.10.120:5000
auth_url = http://10.10.10.120:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = glance
password = Welcome123
[matchmaker_redis]
[matchmaker_ring]
[oslo_concurrency]
[oslo_messaging_amqp]
[oslo_messaging_qpid]
[oslo_messaging_rabbit]
[oslo_policy]
[paste_deploy]
flavor = keystone
[store_type_location_strategy]
[task]
[taskflow_executor]
```
- Edit the /etc/glance/glance-registry.conf file and complete the following actions
cp /etc/glance/glance-registry.conf /etc/glance/glance-registry.conf.bak
cat /etc/glance/glance-registry.conf.bak | grep -v ^$ | grep -v ^# > /etc/glance/glance-registry.conf
- Sửa /etc/glance/glance-registry.conf với nội dung sau
```sh
[DEFAULT]
notification_driver = noop
verbose = True
[database]
connection = mysql+pymysql://glance:[email protected]/glance
backend = sqlalchemy
[glance_store]
[keystone_authtoken]
auth_uri = http://10.10.10.120:5000
auth_url = http://10.10.10.120:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = glance
password = Welcome123
[matchmaker_redis]
[matchmaker_ring]
[oslo_messaging_amqp]
[oslo_messaging_qpid]
[oslo_messaging_rabbit]
[oslo_policy]
[paste_deploy]
flavor = keystone
```
- Populate the Image service database
su -s /bin/sh -c "glance-manage db_sync" glance
- Restart the Image service services
service glance-registry restart
service glance-api restart
- remove the SQLite database file
rm -f /var/lib/glance/glance.sqlite
echo "export OS_IMAGE_API_VERSION=2" | tee -a admin.sh
source admin.sh
- Download the source image
wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
- Upload the image to the Image service
glance image-create --name "cirros" \
--file cirros-0.3.4-x86_64-disk.img \
--disk-format qcow2 --container-format bare \
--visibility public --progress
- Confirm upload of the image and validate attributes
glance image-list
#### Cài đặt NOVA
#### Cài đặt NOVA trên CONTROLLER
##### Prerequisites
- To create the database, complete these steps
mysql -u root -pWelcome123
CREATE DATABASE nova;
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'Welcome123';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'Welcome123';
exit
source admin.sh
- To create the service credentials, complete these steps
openstack user create --domain default --password Welcome123 nova
openstack role add --project service --user nova admin
openstack service create --name nova --description "OpenStack Compute" compute
openstack endpoint create --region RegionOne compute public http://10.10.10.120:8774/v2/%\(tenant_id\)s
openstack endpoint create --region RegionOne compute internal http://10.10.10.120:8774/v2/%\(tenant_id\)s
openstack endpoint create --region RegionOne compute admin http://10.10.10.120:8774/v2/%\(tenant_id\)s
#### Install and configure components Nova
- Install the packages
apt-get -y install nova-api nova-cert nova-conductor nova-consoleauth nova-novncproxy nova-scheduler python-novaclient
- Edit the /etc/nova/nova.conf file and complete the following actions:
cp /etc/nova/nova.conf /etc/nova/nova.conf.bak
cat /etc/nova/nova.conf.bak | grep -v ^# | grep -v ^$
########################################
[DEFAULT]
rpc_backend = rabbit
auth_strategy = keystone
dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
logdir=/var/log/nova
state_path=/var/lib/nova
lock_path=/var/lock/nova
force_dhcp_release=True
libvirt_use_virtio_for_bridges=True
ec2_private_dns_show_ip=True
api_paste_config=/etc/nova/api-paste.ini
enabled_apis=ec2,osapi_compute,metadata
my_ip = 10.10.10.120
network_api_class = nova.network.neutronv2.api.API
security_group_api = neutron
linuxnet_interface_driver = nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver
firewall_driver = nova.virt.firewall.NoopFirewallDriver
enabled_apis=osapi_compute,metadata
verbose = True
[database]
connection = mysql+pymysql://nova:[email protected]/nova
[oslo_messaging_rabbit]
rabbit_host = 10.10.10.120
rabbit_userid = openstack
rabbit_password = Welcome123
[keystone_authtoken]
auth_uri = http://10.10.10.120:5000
auth_url = http://10.10.10.120:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = nova
password = Welcome123
[vnc]
vncserver_listen = $my_ip
vncserver_proxyclient_address = $my_ip
[glance]
host = 10.10.10.120
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
########################################
- Populate the Compute database
su -s /bin/sh -c "nova-manage db sync" nova
- Restart the 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
- remove the SQLite database file
rm -f /var/lib/nova/nova.sqlite
#### Cài đặt trên NOVA trên COMPUTE NODE
- Thiết lập IP
- Thiết lập hostname
### Enable the OpenStack repository
apt-get install software-properties-common -y
add-apt-repository cloud-archive:liberty -y
- Upgrade the packages on your host
apt-get -y update && apt-get -y dist-upgrade
- Install the OpenStack client
apt-get -y install python-openstackclient
- Install the packages
apt-get -y install nova-compute sysfsutils
- Sao lưu file config
cp /etc/nova/nova.conf /etc/nova/nova.conf.bak
- Edit the /etc/nova/nova.conf file and complete the following actions
##############################
[DEFAULT]
dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
logdir=/var/log/nova
state_path=/var/lib/nova
lock_path=/var/lock/nova
force_dhcp_release=True
libvirt_use_virtio_for_bridges=True
verbose=True
ec2_private_dns_show_ip=True
api_paste_config=/etc/nova/api-paste.ini
enabled_apis=ec2,osapi_compute,metadata
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 10.10.10.121
network_api_class = nova.network.neutronv2.api.API
security_group_api = neutron
linuxnet_interface_driver = nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver
firewall_driver = nova.virt.firewall.NoopFirewallDriver
verbose = True
[oslo_messaging_rabbit]
rabbit_host = 10.10.10.120
rabbit_userid = openstack
rabbit_password = Welcome123
[keystone_authtoken]
auth_uri = http://10.10.10.120:5000
auth_url = http://10.10.10.120:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = nova
password = Welcome123
[vnc]
enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = $my_ip
novncproxy_base_url = http://172.16.69.120:6080/vnc_auto.html
[glance]
host = 10.10.10.120
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
##############################
- Restart the Compute service:
service nova-compute restart
- remove the SQLite database file
rm -f /var/lib/nova/nova.sqlite
- Verify operation NOVA, đứng trên node Controller thực hiện lệnh dưới.
nova service-list
##### NEUTRON ####
### NEUTRON Install and configure controller node
#### Prerequisites
- To create the database, complete these steps:
mysql -u root -pWelcome123
CREATE DATABASE neutron;
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'Welcome123';
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'Welcome123';
exit;
source admin.sh
- Create the neutron user
openstack user create --domain default --password Welcome123 neutron
openstack role add --project service --user neutron admin
openstack service create --name neutron --description "OpenStack Networking" network
openstack endpoint create --region RegionOne network public http://10.10.10.120:9696
openstack endpoint create --region RegionOne network internal http://10.10.10.120:9696
openstack endpoint create --region RegionOne network admin http://10.10.10.120:9696
- Install and configure the Networking components on the controller node (cài theo option2)
apt-get -y install neutron-server neutron-plugin-ml2 \
neutron-plugin-linuxbridge-agent neutron-l3-agent neutron-dhcp-agent \
neutron-metadata-agent python-neutronclient
- Sao lưu file cấu hình
cp /etc/neutron/neutron.conf /etc/neutron/neutron.conf.bak
cat /etc/neutron/neutron.conf.bak | grep -v ^# | grep -v ^$ > /etc/neutron/neutron.conf
- Nội dung file neutron như sau:
[DEFAULT]
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = True
rpc_backend = rabbit
auth_strategy = keystone
notify_nova_on_port_status_changes = True
notify_nova_on_port_data_changes = True
nova_url = http://10.10.10.120:8774/v2
verbose = True
[matchmaker_redis]
[matchmaker_ring]
[quotas]
[agent]
root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
[keystone_authtoken]
auth_uri = http://10.10.10.120:5000
auth_url = http://10.10.10.120:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = neutron
password = Welcome123
[database]
connection = mysql+pymysql://neutron:[email protected]/neutron
[nova]
auth_url = http://10.10.10.120:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
region_name = RegionOne
project_name = service
username = nova
password = Welcome123
[oslo_concurrency]
lock_path = $state_path/lock
[oslo_policy]
[oslo_messaging_amqp]
[oslo_messaging_qpid]
[oslo_messaging_rabbit]
rabbit_host = 10.10.10.120
rabbit_userid = openstack
rabbit_password = Welcome123
[qos]
### Configure the Modular Layer 2 (ML2) plug-in
cp /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugins/ml2/ml2_conf.ini.bak
- Sửa file /etc/neutron/plugins/ml2/ml2_conf.ini với nội dung sau
#######################################
[ml2]
tenant_network_types = vxlan
type_drivers = flat,vlan,vxlan
mechanism_drivers = linuxbridge,l2population
extension_drivers = port_security
[ml2_type_flat]
flat_networks = public
[ml2_type_vlan]
[ml2_type_gre]
[ml2_type_vxlan]
vni_ranges = 1:1000
[ml2_type_geneve]
[securitygroup]
enable_ipset = True
#######################################
#### Configure the Linux bridge agent
cp /etc/neutron/plugins/ml2/linuxbridge_agent.ini /etc/neutron/plugins/ml2/linuxbridge_agent.ini.bak
- nội dung file /etc/neutron/plugins/ml2/linuxbridge_agent.ini
#######################################
[linux_bridge]
physical_interface_mappings = public:eth1
[vxlan]
enable_vxlan = True
local_ip = 10.10.10.120
l2_population = True
[agent]
prevent_arp_spoofing = True
[securitygroup]
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
#######################################
### Configure the layer-3 agent
cp /etc/neutron/l3_agent.ini /etc/neutron/l3_agent.ini.bak
- Nội dung file /etc/neutron/l3_agent.ini
#######################################
[DEFAULT]
interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
external_network_bridge =
verbose = True
[AGENT]
#######################################
#### Configure the DHCP agent
cp /etc/neutron/dhcp_agent.ini /etc/neutron/dhcp_agent.ini.bak
- Nội dung file /etc/neutron/dhcp_agent.ini
#######################################
[DEFAULT]
interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = True
verbose = True
dnsmasq_config_file = /etc/neutron/dnsmasq-neutron.conf
[AGENT]
#######################################
- Tao file /etc/neutron/dnsmasq-neutron.conf voi noi dung sau
echo "dhcp-option-force=26,1450" > /etc/neutron/dnsmasq-neutron.conf
### Configure the metadata agent
cp /etc/neutron/metadata_agent.ini /etc/neutron/metadata_agent.ini.bak
- Sua file /etc/neutron/metadata_agent.ini voi noi dung
#######################################
[DEFAULT]
auth_uri = http://10.10.10.120:5000
auth_url = http://10.10.10.120:35357
auth_region = RegionOne
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = neutron
password = Welcome123
nova_metadata_ip = 10.10.10.120
metadata_proxy_shared_secret = Welcome123
verbose = True
#######################################
- Thêm vào file /etc/nova/nova.conf trên node Controller đoạn dưới cùng dưới
[neutron]
url = http://10.10.10.120:9696
auth_url = http://10.10.10.120:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
region_name = RegionOne
project_name = service
username = neutron
password = Welcome123
service_metadata_proxy = True
metadata_proxy_shared_secret = Welcome123
### Populate the database:
su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
- Restart the Compute API service:
service nova-api restart
- Restart the Networking services
service neutron-server restart
service neutron-plugin-linuxbridge-agent restart
service neutron-dhcp-agent restart
service neutron-metadata-agent restart
- restart the layer-3 service
service neutron-l3-agent restart
- remove the SQLite database file:
rm -f /var/lib/neutron/neutron.sqlite
#### NEUTRON Install and configure compute node
- Install the components
apt-get -y install neutron-plugin-linuxbridge-agent
- Sao luu file /etc/neutron/neutron.conf
cp /etc/neutron/neutron.conf /etc/neutron/neutron.conf.bak
- Sửa file /etc/neutron/neutron.conf co noi dung sau
#######################################
[DEFAULT]
core_plugin = ml2
rpc_backend = rabbit
auth_strategy = keystone
verbose = True
[matchmaker_redis]
[matchmaker_ring]
[quotas]
[agent]
root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
[keystone_authtoken]
auth_uri = http://10.10.10.120:5000
auth_url = http://10.10.10.120:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = neutron
password = Welcome123
[database]
connection = sqlite:////var/lib/neutron/neutron.sqlite
[nova]
[oslo_concurrency]
lock_path = $state_path/lock
[oslo_policy]
[oslo_messaging_amqp]
[oslo_messaging_qpid]
[oslo_messaging_rabbit]
rabbit_host = 10.10.10.120
rabbit_userid = openstack
rabbit_password = Welcome123
[qos]
#######################################
### Configure the Linux bridge agent
cp /etc/neutron/plugins/ml2/linuxbridge_agent.ini /etc/neutron/plugins/ml2/linuxbridge_agent.ini.bak
- Edit the /etc/neutron/plugins/ml2/linuxbridge_agent.ini
#######################################
[linux_bridge]
physical_interface_mappings = public:eth1
[vxlan]
enable_vxlan = True
local_ip = 10.10.10.121
l2_population = True
[agent]
prevent_arp_spoofing = True
[securitygroup]
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
#######################################
- Them vao duoi cung file /etc/nova/nova.conf tren node Compute
#######################################
[neutron]
url = http://10.10.10.120:9696
auth_url = http://10.10.10.120:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
region_name = RegionOne
project_name = service
username = neutron
password = Welcome123
######################################
- Restart the Compute service:
service nova-compute restart
- Restart the Linux bridge agent:
service neutron-plugin-linuxbridge-agent restart
#### Cai dat dashboad tren CONTROLLER ####
- To install the dashboard components
apt-get -y install openstack-dashboard
apt-get -y remove --auto-remove openstack-dashboard-ubuntu-theme