找回密码
 注册
查看: 2526|回复: 0

自动化kolla-ansible部署ubuntu20.04+openstack-victoria之文件配置

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-6-25 11:27:58 | 显示全部楼层 |阅读模式
文件配置

0 G; h4 A7 V/ x#controller1下执行(作为管理节点)
1.  配置globals.yml文件,开启需要的文件4 d. ]) t# A/ q$ ~/ y8 ^# Y" Q
vim /etc/kolla/globals.yml
# h' @/ t% a3 d9 |4 e: m& V* j/ f
kolla_base_distro: "ubuntu"
. |8 d4 M* L. T2 S+ F4 i' ekolla_install_type: "source", t+ u, j3 r) E3 m; f
openstack_release: "victoria"0 m& v& B% u9 Z* @2 U
openstack_tag: "victoria"; J9 o( n# H! x  {
node_custom_config: "/etc/kolla/config"
kolla_internal_vip_address: "192.168.10.83"
( Z, t' g( N! O6 b$ v) s8 S7 Ekolla_internal_fqdn: "cloud.baijingcloud.com"
, R/ B0 N. L0 Q6 w' e2 ?: P7 qdocker_registry: "xxx.baijingcloud.com:4000"
. w6 u" c; f/ M: W" i* J( L, c0 M) Rdocker_namespace: "kolla"" x3 }8 |3 K, K0 I7 k, r3 @6 w; M% `
network_interface: "ens33"
( F% N; B/ @: {& _( ?4 fneutron_external_interface: "ens34"
. E& f) ^$ l- D+ S" jneutron_plugin_agent: "openvswitch"8 u- {( x2 ~! C7 i6 ]
enable_cinder: "yes"
! `( [, n: |( genable_cinder_backup: "yes"6 w) n+ f( A* k
enable_heat: "no"
2 Z$ l+ I2 K  ?; ~- L2 Jenable_neutron_dvr: "yes"  g. E, \1 X9 V% h' j) w' Q  X
enable_neutron_agent_ha: "yes"6 E# D% F" V- {$ h
glance_backend_ceph: "yes"  q0 T1 Q' X# K" B) w# }
cinder_backend_ceph: "yes"% }& ~6 R7 m  ]2 W, U5 U
cinder_backup_driver: "ceph"
- k: B0 F) N% G0 a  x% unova_backend_ceph: "yes"
  M2 L* p1 Q7 Wnova_compute_virt_type: "qemu"
+ V) G. T% o% Rnova_console: "spice"
* L" V: w/ h3 W  U
# Glance
7 V1 v/ z0 R$ O0 X( d8 \- jceph_glance_keyring: "ceph.client.glance.keyring"
$ G3 g) Y. y8 o) }ceph_glance_user: "glance"6 _5 n$ ]5 S9 u' d( ?
ceph_glance_pool_name: "images"6 ^! w/ e  `# d! R, ]# k
# Cinder
: I8 }1 ]& }8 S2 \) k' xceph_cinder_keyring: "ceph.client.cinder.keyring"
7 a( z( a  J0 _ceph_cinder_user: "cinder"
9 c& Y2 a! w# U% s# b! H# n3 z9 J# oceph_cinder_pool_name: "volumes"
. B" Y4 p, E# U) ~  s) iceph_cinder_backup_keyring: "ceph.client.cinder-backup.keyring"( M0 w" M9 a: x+ ]# R# D; C) ]
ceph_cinder_backup_user: "cinder-backup": V: o, ~* C* \; V8 U0 p$ J
ceph_cinder_backup_pool_name: "backups"" O: _7 z+ ~( M* p0 K, [
# Nova
8 Z! U( o- W1 J7 V( W8 ?ceph_nova_keyring: "{{ ceph_cinder_keyring }}"
; {+ ]- Z! ~3 O# m) A, j4 rceph_nova_user: "cinder"
# k4 I* M6 D1 tceph_nova_pool_name: "vms"$ C9 l5 V1 H7 u* k0 Z6 [; j
" Z. [5 s% S% r( x" H) @, _8 e* Z

4 O6 H, u) o/ D. o% w" y
0 l6 i6 D0 N7 d
2.  编辑主机配置文件, x; D2 c  O" @& k) v
vim /root/multinode
$ ?# _* F# K+ k& c# M
[control]c
ontroller1
controller2
controller3

0 d# c% o% Z# E# E
[network]
controller1
controller2
controller3
, X% H4 f$ D) J$ K" w" I
[compute]
compute1
compute2
9 H* t& |# P, b( I& r8 A7 _
[monitoring]
controller1
[storage]
7 p" }" ]: w; a* j  q2 W
ceph1c
eph2

9 ?, b/ Z+ ^# e" ^  F
ceph3

) ]. g8 l- }; L" f8 K3 r
[deployment]

% m! Q) H- T6 x9 t! N  U
controller1
7 w2 M  Y( z/ n, j
, y+ y; [0 q8 q6 B6 _6 u" M
3.   生成随机密码
kolla-genpwd

' A8 U0 V$ |; ?# H* g+ @* K# E/ U4 i; y
4.   修改界面登陆密码为
8 _1 @4 j) ^4 {5 A1 ]
sed -i 's/^keystone_admin_password.*/keystone_admin_password:  MM@BBC223/' /etc/kolla/passwords.yml

% E' _3 D2 x" ^/ f% _7 `' A
或者
vim /etc/kolla/passwords.yml
keystone_admin_password =  MM@BBC223

% v- i) G$ _$ a/ G0 A6 J) o5 a
1 _" P, E& o3 z, o9 d
5.  设置nova配置文件
[backcolor=rgb(245, 245, 245) !important][url=]https://common.cnblogs.com/images/copycode.gif[/url]5 f: Z1 @5 f( F! s( m; A. }
sudo mkdir /etc/kolla/configsudo mkdir /etc/kolla/config/novavim /etc/kolla/config/nova/nova-compute.conf[libvirt]inject_password=truevirt_type = qemucpu_mode = none[backcolor=rgb(245, 245, 245) !important][url=]https://common.cnblogs.com/images/copycode.gif[/url]
3 S/ J/ d0 U. h- [: l
8 N2 F- Y$ s0 l+ M1 e+ N5 M
* a+ ?, E( d: J% K
6.  修改nova.conf
vim /etc/kolla/config/nova.conf
[backcolor=rgb(245, 245, 245) !important][url=]https://common.cnblogs.com/images/copycode.gif[/url]
. T7 j8 p8 l4 Q2 b[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]2 Z7 S# o0 l0 M4 Y
$ ^( K- l6 T, P6 B" K" m# f
, K1 K& Y* d8 |/ C
7.   创建虚拟机界面禁止默认创建新卷.
mkdir /etc/kolla/config/horizon/vim /etc/kolla/config/horizon/custom_local_settingsLAUNCH_INSTANCE_DEFAULTS = {  'create_volume': False,}

" z( C1 S6 v, Z2 U" ^  M' _% T! @8 Y1 l) \% c
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

- W  f* ?* t7 R5 f/ A+ |( c4 e6 @% F- K7 F2 @+ L" y
9. ceph1上拷贝秘钥到controller1节点
scp /etc/ceph/ceph.client.glance.keyring controller1:/etc/kolla/config/glance/

2 n* v6 _, ]- o
& r7 u+ e' W2 m8 ~: V6 W# Y5 D, i- F3 T
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
3 m+ o& e6 s# c% _4 u

' L& X2 ^. G+ Y
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/

3 t' |1 a+ ]" l# V$ ^; P

- G+ Z/ w7 K( S% p) M12.  controller1上配置nova使用ceph
cp /etc/kolla/config/glance/ceph.conf /etc/kolla/config/nova
$ C' t  U+ j; u

" m( I5 E' d; m/ O13.  ceph1上拷贝秘钥到controller1节点
scp /etc/ceph/ceph.client.cinder.keyring controller1:/etc/kolla/config/nova/
6 D& ?; w/ s* a! Q; r& K
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 02:23 , Processed in 0.019072 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表