|
文件配置
3 e) C" }( k% h6 V( w6 u#controller1下执行(作为管理节点)
1. 配置globals.yml文件,开启需要的文件
9 t! a6 Y, s, p1 U5 i" [vim /etc/kolla/globals.yml ) O$ h: @% P+ |" l% T! B3 s2 D
kolla_base_distro: "ubuntu"
/ I) t0 i3 x# x# y+ h6 ckolla_install_type: "source"& i) ?% T- ~* M2 Z' Z
openstack_release: "victoria"1 l- F$ s8 E; h" U9 Z
openstack_tag: "victoria"
+ O6 C, R8 x2 f4 dnode_custom_config: "/etc/kolla/config" kolla_internal_vip_address: "192.168.10.83"2 J" e8 ^, p/ D4 a
kolla_internal_fqdn: "cloud.baijingcloud.com"
7 I# _; _6 o$ p- s( V+ l4 odocker_registry: "xxx.baijingcloud.com:4000"
8 w) Z# ^, @' zdocker_namespace: "kolla"% Q& l) x! u6 x0 S9 j6 R) H4 U1 I" H1 E
network_interface: "ens33"
0 y2 C. r3 m# G3 Q. V: zneutron_external_interface: "ens34"& D( S4 k6 p/ r$ D8 W% p$ J; `
neutron_plugin_agent: "openvswitch"
, ~7 D& J. y/ F$ R! k5 b3 Renable_cinder: "yes"4 H8 f; }7 m: h4 j3 s) w
enable_cinder_backup: "yes"+ Y) q% }% I1 C0 W
enable_heat: "no"
' m; \4 \& C/ s* ]9 J. P# ienable_neutron_dvr: "yes" u, V" d. B- o2 ^, D
enable_neutron_agent_ha: "yes"7 b* J" [' T- ]
glance_backend_ceph: "yes"
/ U* I% {( o* X6 M( c( Wcinder_backend_ceph: "yes"3 O& e# n* O2 V; b5 R# M
cinder_backup_driver: "ceph"% v( D% }$ K4 A% R6 R
nova_backend_ceph: "yes"
! s2 p: }/ |3 Fnova_compute_virt_type: "qemu"1 o; z, N. j w* ~" J
nova_console: "spice"
$ \- [8 H6 ~4 C# Glance. ?) U' g, @3 s+ e9 d: g
ceph_glance_keyring: "ceph.client.glance.keyring"* @, J# E! a \& o/ a0 K: y
ceph_glance_user: "glance"
8 M G: ?+ h" s9 _ceph_glance_pool_name: "images". i7 p `& w+ K) \/ a& A1 W
# Cinder
& v P9 v' s+ I# m+ S, J+ U- M; ?ceph_cinder_keyring: "ceph.client.cinder.keyring". z+ k; s4 b/ l, B U3 z$ R3 E
ceph_cinder_user: "cinder"
" R1 P7 W, u) w, b. i2 \8 w. w, ~ceph_cinder_pool_name: "volumes"( m1 J# Y! ]( H. N$ I
ceph_cinder_backup_keyring: "ceph.client.cinder-backup.keyring"/ m; s( t; }1 c
ceph_cinder_backup_user: "cinder-backup"9 s) F: |: c1 Y( L* R3 T
ceph_cinder_backup_pool_name: "backups"
, x0 m9 E, G' M# E5 z' e7 l# Nova
4 Y, c+ H* y, y6 Zceph_nova_keyring: "{{ ceph_cinder_keyring }}"
- e- w' J& T# y3 z: k* }ceph_nova_user: "cinder"5 \) B: U9 v6 Q/ K* h0 ?- |( S2 _" ^
ceph_nova_pool_name: "vms"
. ^" J4 _6 I4 j! Z' d3 K
! K1 U+ V! ~' d0 s
5 }; {' o! A4 D7 T y# u
* X: Q0 C! M9 }7 L$ K4 z' S2. 编辑主机配置文件/ U) |5 p: @ }* ?/ h
vim /root/multinode + t1 I$ x* Y: `4 j
[control]c ontroller1 controller2 controller3 % D; `9 e, h& ]3 R6 a, q
[network] controller1 controller2 controller3 1 i0 I6 F0 @5 ]+ T- W/ v7 F
[compute] compute1 compute2 8 {0 B) H2 f* X @$ i$ l- a
[monitoring] controller1 [storage]
; O8 \ Z. _' S& O
ceph1c eph2
- F8 m4 J1 X b+ b# e+ m- G- W
ceph3
6 b( e& y& a) Y0 f# S+ n5 ]
[deployment] 9 I/ J1 y: a/ L0 ~7 D) k2 r! I9 {3 {
controller1
" ~; l$ F7 \7 W
j/ O4 v8 I& e; v0 q0 \1 w* f
3. 生成随机密码 kolla-genpwd
; k% U# b! B+ T. a( {2 Q1 {0 n$ X' X. G3 W: i3 l2 g/ f
4. 修改界面登陆密码为
/ |. T) \" I+ [ {& C1 T/ n4 M
sed -i 's/^keystone_admin_password.*/keystone_admin_password: MM@BBC223/' /etc/kolla/passwords.yml
$ X0 y6 n3 D) s6 c' C) l4 w或者 vim /etc/kolla/passwords.yml keystone_admin_password = MM@BBC223
$ F9 ], I) k1 {- V& ], O2 k8 @8 K) O& T- I) [! Y+ c- N' |
5. 设置nova配置文件 ' r+ P: Z5 ?; Q# @) T. h+ W
/ N) D& A/ t$ a8 b S6. 修改nova.conf vim /etc/kolla/config/nova.conf [backcolor=rgb(245, 245, 245) !important][url=]https://common.cnblogs.com/images/copycode.gif[/url]; n% G- K, v% |! G. |
[DEFAULT]service_down_time = 120cpu_allocation_ratio = 4.0 disk_allocation_ratio=1.0ram_allocation_ratio = 1.0 reserved_host_disk_mb = 4096 reserved_host_memory_mb = 4096 allow_resize_to_same_host = True remove_unused_base_images = Falseimage_cache_manager_interval = 0resume_guests_state_on_host_boot = True[backcolor=rgb(245, 245, 245) !important][url=]https://common.cnblogs.com/images/copycode.gif[/url]
5 s, N, |. I8 l7 \, U% R9 Z8 i$ @ 0 W4 ]' H& [5 M' T" |6 [, N6 o
4 s) C7 g3 T: {. d0 w+ l
7. 创建虚拟机界面禁止默认创建新卷. mkdir /etc/kolla/config/horizon/vim /etc/kolla/config/horizon/custom_local_settingsLAUNCH_INSTANCE_DEFAULTS = { 'create_volume': False,}
! i5 c: b) i8 C. V% E% B' F1 H# N5 J- _- A' E { o
8. 配置glance使用ceph #fsid= 使用ceph -s 在ceph1上查看 (#欢迎加QQ群:1026880196 进行交流学习) mkdir /etc/kolla/config/glancecat <<EOF>>/etc/kolla/config/glance/ceph.conf[global]fsid =c461b736-4dba-4aa5-b21b-31782dd42b16mon initial members = ceph1,ceph2,ceph3mon_host = 192.168.10.90,192.168.10.91,192.168.10.92 auth_cluster_required = cephx auth_service_required = cephx auth_client_required = cephx EOF / @" v, ~; D% a( U
& a# n+ ^' ~ c3 E$ o: q) j: \1 g* D9. ceph1上拷贝秘钥到controller1节点 scp /etc/ceph/ceph.client.glance.keyring controller1:/etc/kolla/config/glance/ 0 M: A. [+ G: A
0 a0 }2 T' \( i+ p( \10. controller1上配置cinder使用ceph mkdir /etc/kolla/config/cindermkdir /etc/kolla/config/cinder/cinder-volumemkdir /etc/kolla/config/cinder/cinder-backupcp /etc/kolla/config/glance/ceph.conf /etc/kolla/config/cinder
" o3 t9 R( _* h# o. _, z" E6 s- G! S6 ^& Y' g- ~2 l
11. ceph1节点拷贝秘钥到controller1节点 scp /etc/ceph/ceph.client.cinder.keyring controller1:/etc/kolla/config/cinder/cinder-volume/scp /etc/ceph/ceph.client.cinder.keyring controller1:/etc/kolla/config/cinder/cinder-backup/scp /etc/ceph/ceph.client.cinder-backup.keyring controller1:/etc/kolla/config/cinder/cinder-backup/
6 v* U _9 r' L/ Y$ |# t L
# k1 b! E' d9 z# U! _ b12. controller1上配置nova使用ceph
cp /etc/kolla/config/glance/ceph.conf /etc/kolla/config/nova
- c3 E/ Y0 U8 O$ I) E0 E9 T) Y1 o9 u" t
13. ceph1上拷贝秘钥到controller1节点 scp /etc/ceph/ceph.client.cinder.keyring controller1:/etc/kolla/config/nova/ 6 K6 m0 V! k/ @* n4 j
|