|
文件配置
# Q) u9 ?5 s; H6 Q2 X* {! l#controller1下执行(作为管理节点)
1. 配置globals.yml文件,开启需要的文件
1 j& K6 V2 ]8 n7 p3 Q! M: Gvim /etc/kolla/globals.yml
- g, j1 b. w9 x( d0 P2 ^7 \, @! _kolla_base_distro: "ubuntu"
: o% J7 J& N) s; u/ Ykolla_install_type: "source"0 H) Q8 z: b2 G8 ^, }2 ~4 ?
openstack_release: "victoria"3 S! N V" y5 \2 x( r3 z( ~3 l
openstack_tag: "victoria"
. ]% P5 o, u7 ^; Lnode_custom_config: "/etc/kolla/config"
kolla_internal_vip_address: "192.168.10.83"0 ?) |4 D6 z2 y9 h& c, g: ]) x' Q
kolla_internal_fqdn: "cloud.baijingcloud.com"
4 z! u- w% ^1 j4 Qdocker_registry: "xxx.baijingcloud.com:4000"
& S# V" `4 B3 T$ j+ E; Tdocker_namespace: "kolla"9 [: f ]6 O( ]! R4 m: ?8 {: o' v
network_interface: "ens33"
8 ^' ]9 p5 b1 [$ s1 o* rneutron_external_interface: "ens34"2 j# _; H6 X* ]9 {! @
neutron_plugin_agent: "openvswitch"
& r7 A; E) C0 G2 ?+ y- }enable_cinder: "yes"
% s) n& p0 X% b4 X+ K6 menable_cinder_backup: "yes"/ m0 ? j" M I8 j& N
enable_heat: "no"
& Q8 Q. W# ]: b @( Cenable_neutron_dvr: "yes"- F1 ?4 _7 U$ N+ [9 W8 }
enable_neutron_agent_ha: "yes" @* T& Y- {$ p4 `; \ N' r8 O
glance_backend_ceph: "yes", W" ^# n1 U5 ]/ L8 R; H
cinder_backend_ceph: "yes"
! z' i$ m0 Y+ t1 [3 e" {$ Mcinder_backup_driver: "ceph"
' F* l& L" J0 t7 Gnova_backend_ceph: "yes"2 n7 y& J. l( n) r: v
nova_compute_virt_type: "qemu"
+ c, Z/ {! U' Lnova_console: "spice"
- P2 L5 w; ]6 ~" f) C; l" R5 B# Glance p) `- j3 [! O, g f% H W; ^
ceph_glance_keyring: "ceph.client.glance.keyring"
+ Q2 f9 X# X9 V4 ~ceph_glance_user: "glance"
) w7 U- W0 ]0 j% ^! Cceph_glance_pool_name: "images"! E. x- f) M9 F! i2 h7 E t
# Cinder0 P' _: d& T0 K X9 w
ceph_cinder_keyring: "ceph.client.cinder.keyring"
9 B0 J4 s. G g% U% r& fceph_cinder_user: "cinder"7 y1 F8 i6 P0 T. D9 j
ceph_cinder_pool_name: "volumes"
8 V" F2 j( [. G2 ]0 P+ j- gceph_cinder_backup_keyring: "ceph.client.cinder-backup.keyring"
% k0 |8 g. y y5 }ceph_cinder_backup_user: "cinder-backup"& V% H: J8 y. ^) Z7 {8 V
ceph_cinder_backup_pool_name: "backups"0 p( y/ ]6 {( H" e( \
# Nova5 Z- L2 _* Y( O( m0 l0 }
ceph_nova_keyring: "{{ ceph_cinder_keyring }}"
6 V0 J7 Z1 j1 Gceph_nova_user: "cinder"; g7 ?; `& [2 C E! h7 ?
ceph_nova_pool_name: "vms"
1 N, F& X5 m6 X
* e+ z, g: O7 Q$ ]0 i# ~6 I
+ H! X* z0 q ?4 Z1 `
! A4 Q8 s3 i* \2. 编辑主机配置文件
5 u, ~6 O+ l |# d7 j3 ivim /root/multinode ' j( G2 }* r1 a) ]
[control]c ontroller1 controller2 controller3
) ^" _' V8 M- B0 l
[network] controller1 controller2 controller3
3 ~' |2 r& O# Z# J
[compute] compute1 compute2
# ~! R! ]- I. \5 H6 l
[monitoring] controller1 [storage]
. E; X7 T. ^8 m/ |0 f! U+ Y1 f
ceph1c eph2
N6 ?$ p3 o+ y' R* B
ceph3 3 f9 Q0 m! z8 A) W
[deployment]
8 o; ]7 ^7 r/ w6 |% K. u, ^
controller1
8 m% {- u, X) |2 P u2 A+ M6 T& Y7 H" n! m# b3 N4 Y$ i& L# h
3. 生成随机密码 kolla-genpwd 3 m& l6 O" q0 f, @6 x
# L2 B3 {% s6 p6 ~* E4. 修改界面登陆密码为
: f# A0 l4 `! \: G+ h6 h) x
sed -i 's/^keystone_admin_password.*/keystone_admin_password: MM@BBC223/' /etc/kolla/passwords.yml
& {* A* j( ]) M% k或者 vim /etc/kolla/passwords.yml keystone_admin_password = MM@BBC223
* h- n- ^6 C7 Q l0 F _
! A1 K. _* @4 i6 T! r: u H" n5. 设置nova配置文件 . A1 F6 L. X& F9 a( b6 w& J8 i
6 \/ v& e6 N! R# O/ R9 ?6. 修改nova.conf vim /etc/kolla/config/nova.conf [backcolor=rgb(245, 245, 245) !important][url=]https://common.cnblogs.com/images/copycode.gif[/url]- E* @, i X4 a) Y5 J' `5 ^
[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] w) k; c1 H7 c! c; B
! C. \* [6 n8 E+ J9 |* H
3 B( x5 }. |! {! m1 ]4 G7 L$ o7. 创建虚拟机界面禁止默认创建新卷. mkdir /etc/kolla/config/horizon/vim /etc/kolla/config/horizon/custom_local_settingsLAUNCH_INSTANCE_DEFAULTS = { 'create_volume': False,} 2 V; {- w% t" H' }! T, W9 d. v {
}- a! ~& N6 q2 t% \1 f8. 配置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 . _7 K! k* L8 U( C
n, W0 ~) s( k+ V* A$ l
9. ceph1上拷贝秘钥到controller1节点 scp /etc/ceph/ceph.client.glance.keyring controller1:/etc/kolla/config/glance/
4 M/ y0 t3 W$ F# t3 C: @8 J
3 B9 ^/ `( C8 g4 q10. 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
b7 {, P W' L" `1 M8 N4 B9 u- h
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/ * z( S& B! n* c! k. q! @1 b
: ^1 N. Z$ q. }1 e( c& o' N% Z3 L
12. controller1上配置nova使用ceph cp /etc/kolla/config/glance/ceph.conf /etc/kolla/config/nova
2 `. ~5 G9 C* j9 D
. |! b& b; |% Z' k13. ceph1上拷贝秘钥到controller1节点
scp /etc/ceph/ceph.client.cinder.keyring controller1:/etc/kolla/config/nova/ ' e/ j1 C$ s. |/ v
|