易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 2529|回复: 0
收起左侧

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

[复制链接]
发表于 2021-6-25 11:27:58 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
文件配置

" {8 V3 w1 j/ d  x2 L# Q#controller1下执行(作为管理节点)
1.  配置globals.yml文件,开启需要的文件
. u4 b1 W9 J; K4 W2 avim /etc/kolla/globals.yml
& E  k$ ?6 h* s% `* t6 k
kolla_base_distro: "ubuntu"5 K/ V1 Y- v( @8 U
kolla_install_type: "source"
2 m7 B- H' U+ s; q# r# zopenstack_release: "victoria"
' y& s/ L* B/ uopenstack_tag: "victoria"- S& W* m4 T6 B# c. M5 C
node_custom_config: "/etc/kolla/config"
kolla_internal_vip_address: "192.168.10.83"4 g* d2 g) a3 |  v3 L
kolla_internal_fqdn: "cloud.baijingcloud.com"
# N8 P1 w4 w2 ?; ]docker_registry: "xxx.baijingcloud.com:4000"
+ u. t" u* Z0 z1 ?' G7 D6 rdocker_namespace: "kolla"
, A9 R, H' }' R. y4 r, pnetwork_interface: "ens33"
7 Y* g# _/ k2 a3 r7 R; ?0 Z7 uneutron_external_interface: "ens34"
1 Y/ J7 F' f7 y, bneutron_plugin_agent: "openvswitch"
( z) c. C0 j- V% |5 M2 cenable_cinder: "yes"
2 O1 W1 ]" i2 C& g3 c4 R9 ^+ Venable_cinder_backup: "yes"
. Z. H/ E0 d# Z# penable_heat: "no"
4 m& F& c# v; R. M$ |+ Eenable_neutron_dvr: "yes"( R+ Y7 W$ J' c& j4 ?
enable_neutron_agent_ha: "yes"0 e( W# \6 ^6 [- i! h6 ~" J
glance_backend_ceph: "yes"  i  s7 a  P: E8 n2 a& t
cinder_backend_ceph: "yes"
* ^, E# T4 c& g* b; c* {9 Jcinder_backup_driver: "ceph"- }$ D- ?2 H5 C' X  P. E( x7 S2 l) Z/ b
nova_backend_ceph: "yes"
  d& N: e, j) ynova_compute_virt_type: "qemu"
# v1 g  _" I' x  t" _nova_console: "spice"
  ^: {2 ~% a3 K$ ^, s
# Glance' h7 J( ]1 a" W+ S
ceph_glance_keyring: "ceph.client.glance.keyring"0 Q- ~5 d1 l, S6 c  E/ B# ]8 O3 E
ceph_glance_user: "glance"- E3 {" ^$ p0 u: p
ceph_glance_pool_name: "images"
& l! x4 x. o- \9 l" B6 z# Cinder
& ^' \+ F% w* Z* g1 e  cceph_cinder_keyring: "ceph.client.cinder.keyring"
5 A- ^) @, Z$ b; j0 q2 eceph_cinder_user: "cinder"
5 I3 a" k% }4 D! Q$ D1 Lceph_cinder_pool_name: "volumes"
; B. \7 G5 _9 Y6 a  q. I6 Bceph_cinder_backup_keyring: "ceph.client.cinder-backup.keyring"! v6 u( A0 I' S- h( u% }2 q- P4 D
ceph_cinder_backup_user: "cinder-backup"% ]# ^' p' f& h, J0 f. v6 b
ceph_cinder_backup_pool_name: "backups"( B6 S; I$ t; I" d' t$ k
# Nova. }. v& x$ Q0 g: \% g: @
ceph_nova_keyring: "{{ ceph_cinder_keyring }}"
' {! o* b" L& T4 Nceph_nova_user: "cinder"
% r4 G, e7 o+ Q- Nceph_nova_pool_name: "vms"6 L5 P6 f2 Q& A

% A7 n  E( J7 F/ n4 t" [( [9 H
( M- ?5 l7 Q" {+ T- U- r9 X
- z* L# P. ?  U9 G' V# J
2.  编辑主机配置文件1 R6 L: `" R: U0 w
vim /root/multinode

- K/ W. x, V% E8 n- s& o( N; U$ p4 v[control]c
ontroller1
controller2
controller3

7 y9 s" n- v$ C) R! X; [- F
[network]
controller1
controller2
controller3
% q/ R6 n3 D# B: G) V2 ]- p& Z
[compute]
compute1
compute2
0 G: {8 f& T' x) J; J
[monitoring]
controller1
[storage]
* e3 w. q/ r+ c. z9 j  ]0 B- G
ceph1c
eph2

% ~  S) x& l/ n: b
ceph3
: H! m  m) ?+ j. s% y: M4 u
[deployment]

! Q$ ^, V( j+ U* O% R1 m% M. T
controller1
# d$ y8 `& |% V+ Y8 N: C2 H; r' F

1 }2 W7 C. T" m' Y
3.   生成随机密码
kolla-genpwd
2 }1 F: M  k) h) N8 p; J, R$ l* f
0 I5 u' E+ s- H# o
4.   修改界面登陆密码为

  L0 ^! ?' S% }+ H1 J" A# Z4 U
sed -i 's/^keystone_admin_password.*/keystone_admin_password:  MM@BBC223/' /etc/kolla/passwords.yml

, P& L" G/ b* H3 z, V
或者
vim /etc/kolla/passwords.yml
keystone_admin_password =  MM@BBC223
. v1 k; k  k6 c
+ {5 U0 G" E7 p$ s; I- T7 D4 _
5.  设置nova配置文件
[backcolor=rgb(245, 245, 245) !important][url=]https://common.cnblogs.com/images/copycode.gif[/url]3 r4 `' g& }* l( I. }- L5 D# I4 ^
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]% [! j) Y# B7 d) x9 v5 v9 a
. L8 F* }+ q; Y/ A

& b; V4 `% n: L
6.  修改nova.conf
vim /etc/kolla/config/nova.conf
[backcolor=rgb(245, 245, 245) !important][url=]https://common.cnblogs.com/images/copycode.gif[/url]
( ?; T4 a/ f8 P. \  k[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]: m  t7 L. v: @0 G, X
! y# u2 h* K7 A$ f) o

9 _. Y, J8 J8 t
7.   创建虚拟机界面禁止默认创建新卷.
mkdir /etc/kolla/config/horizon/vim /etc/kolla/config/horizon/custom_local_settingsLAUNCH_INSTANCE_DEFAULTS = {  'create_volume': False,}

2 ^* Q& B  Y5 D+ _! _3 w0 r2 |% H+ V* H* v; N* z! W
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
/ F; O7 j: H+ ~

. _( O4 q. H3 T6 c5 m2 ]$ ?7 w
9. ceph1上拷贝秘钥到controller1节点
scp /etc/ceph/ceph.client.glance.keyring controller1:/etc/kolla/config/glance/

7 m9 L, W& z' C' O- E' C" P( M+ |8 D& q1 c& d3 i7 j
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

  r, k9 q! i+ f! I/ R! c( S! |/ `' T" H' o, I9 ?: k
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/

$ S7 H% D+ d) o0 }6 S% ?! l2 L

* P4 d7 P) O0 y2 l12.  controller1上配置nova使用ceph
cp /etc/kolla/config/glance/ceph.conf /etc/kolla/config/nova
9 L! b& |, H" G7 {. ^- U1 T- x$ p" y8 w

7 N, M3 l0 y$ g13.  ceph1上拷贝秘钥到controller1节点
scp /etc/ceph/ceph.client.cinder.keyring controller1:/etc/kolla/config/nova/

: q  u2 C! M' M5 w+ L5 ^
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 点击这里给我发消息

GMT+8, 2026-4-8 15:24 , Processed in 0.041277 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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