易陆发现互联网技术论坛

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

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

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

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

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

x
文件配置

/ B) @) Z7 Q( X' ~! v6 \/ g#controller1下执行(作为管理节点)
1.  配置globals.yml文件,开启需要的文件, n6 K" A% B3 l5 D7 d. [
vim /etc/kolla/globals.yml
$ P0 R8 p( W9 E1 k: m( [# a
kolla_base_distro: "ubuntu"
# P5 d( b. s+ S" C- S) y4 X! K9 B9 Skolla_install_type: "source"5 b, r& i' I% d! w
openstack_release: "victoria"5 R: n# R, a0 t( W% w
openstack_tag: "victoria": n; P3 q2 v# H
node_custom_config: "/etc/kolla/config"
kolla_internal_vip_address: "192.168.10.83"
! l) P- ^, Q5 Ykolla_internal_fqdn: "cloud.baijingcloud.com"
$ [% }. ^0 g* @! N/ P0 n2 Udocker_registry: "xxx.baijingcloud.com:4000"( d; L+ h* b5 U* G
docker_namespace: "kolla"* X. h1 `, L5 ^5 T
network_interface: "ens33"3 _6 [3 P7 G  ]% V  t
neutron_external_interface: "ens34"
6 `: y' T& a, D) {3 T; Rneutron_plugin_agent: "openvswitch"5 ~7 X9 d5 b, U% |' P5 ?4 [
enable_cinder: "yes"  E/ [! Z+ }2 Z6 h6 F
enable_cinder_backup: "yes"
. s$ z* H: O6 Z! h! eenable_heat: "no"
3 S( N5 ~2 S" V- x0 cenable_neutron_dvr: "yes"
  _1 Y" g4 `5 N7 henable_neutron_agent_ha: "yes"1 B8 ?; P0 N0 ?) ?" c* j7 d0 A
glance_backend_ceph: "yes"
9 C8 f% H( @, L+ Gcinder_backend_ceph: "yes"
- j6 I! {$ h3 s+ ucinder_backup_driver: "ceph"
2 h2 o6 y) ]! X7 ?8 _& h$ r3 |- lnova_backend_ceph: "yes"
' r) _6 _( U+ Y1 I$ d& v# ~6 znova_compute_virt_type: "qemu"
& y/ f1 x& W, Z6 o, I+ v8 s4 qnova_console: "spice"

0 I9 {! R6 v  J2 @) p% `& Y# Glance
0 z. n. n+ _3 v& q! j8 mceph_glance_keyring: "ceph.client.glance.keyring"/ i, [  p& w% T- u3 J
ceph_glance_user: "glance"7 x& u% k: R& {6 _$ v, Y1 F
ceph_glance_pool_name: "images"
" t6 O& f8 f9 X+ u0 N# Cinder" S8 f1 f7 K) `* I) Y0 k/ s) C+ W
ceph_cinder_keyring: "ceph.client.cinder.keyring"
- ?) z5 f  _  k4 f# R: Y4 A2 Q* Dceph_cinder_user: "cinder"' Z9 n# @. F) z9 j* j# D% P
ceph_cinder_pool_name: "volumes". g1 G$ A  |6 a& X
ceph_cinder_backup_keyring: "ceph.client.cinder-backup.keyring"
. q! d' L" ~/ K: ]ceph_cinder_backup_user: "cinder-backup"  f. s6 j6 Y* G9 W7 u. x! P( E
ceph_cinder_backup_pool_name: "backups"* M1 x  J2 ^$ ?5 W3 D1 T, `  P+ [
# Nova
- _7 \& S. F% P0 q) u$ Iceph_nova_keyring: "{{ ceph_cinder_keyring }}"
( W% W- z  u2 `; w' u) |ceph_nova_user: "cinder"
* k. f( s) {" x! v1 l/ fceph_nova_pool_name: "vms"* V7 {& b$ w4 ~& r

" I8 P& I' p, }

/ t3 Z! m/ G4 ]' ]- q* p0 h5 [3 \5 d
2.  编辑主机配置文件+ b+ ?" c: B9 d
vim /root/multinode
2 J: o, `8 l- B+ Q6 |( ^
[control]c
ontroller1
controller2
controller3
, D( p" _: [4 B
[network]
controller1
controller2
controller3
# _& g1 {" m( u
[compute]
compute1
compute2

: T4 U9 U+ J  |" [7 w
[monitoring]
controller1
[storage]

7 V# h5 o" ]4 m
ceph1c
eph2
) q1 Y) _2 B' K& r( t7 q' A
ceph3

/ w: h4 K0 N* J& \& f2 j) K
[deployment]
$ w! u; S8 Q  Q2 q6 l1 L7 o: |& E
controller1
# |$ ~# l) g( U1 r" D4 H* A7 p/ d# o

; S' I  P$ F1 S
3.   生成随机密码
kolla-genpwd
/ |  C- @2 q! C
. k  y3 B9 f. g
4.   修改界面登陆密码为
2 B4 `, N/ O9 E
sed -i 's/^keystone_admin_password.*/keystone_admin_password:  MM@BBC223/' /etc/kolla/passwords.yml

% D' B6 F5 _, B3 S2 P" \
或者
vim /etc/kolla/passwords.yml
keystone_admin_password =  MM@BBC223

% t" e6 p4 G, S( i
' q4 I: s. s* B2 ~+ Z  b% f
5.  设置nova配置文件
[backcolor=rgb(245, 245, 245) !important][url=]https://common.cnblogs.com/images/copycode.gif[/url]9 G1 f5 e' M: @/ {6 ~5 W# E6 a! |( W
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]6 @4 M6 o. a6 S. @

6 E5 h$ T- V/ H! d& Y3 q* H% J0 Z* ?) |- R
6.  修改nova.conf
vim /etc/kolla/config/nova.conf
[backcolor=rgb(245, 245, 245) !important][url=]https://common.cnblogs.com/images/copycode.gif[/url]
( t! ?% r, b* I[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]
, ?0 u, d6 ^. i, k+ F' m, D

- f9 G4 T# R  X2 o6 d  v. i! ~; u1 R+ {. l6 W
7.   创建虚拟机界面禁止默认创建新卷.
mkdir /etc/kolla/config/horizon/vim /etc/kolla/config/horizon/custom_local_settingsLAUNCH_INSTANCE_DEFAULTS = {  'create_volume': False,}
1 u$ s& H# u7 T/ E$ ^8 Y6 y
  u, x0 r6 o" u# b9 [
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

8 F3 P% O+ a8 v/ Z  V' F' C) J7 z# I  ~8 b# x
9. ceph1上拷贝秘钥到controller1节点
scp /etc/ceph/ceph.client.glance.keyring controller1:/etc/kolla/config/glance/
0 i' a8 k* C) O; m5 [
. t" O( s2 B. x) c* a
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

( s3 d# p% M8 e& e' k
. G8 N) H8 R# u2 o/ {- h5 x
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/

- Q, b& e8 I* V) Q. v! N
4 ?7 b/ D7 l. |$ D" s/ W: C
12.  controller1上配置nova使用ceph
cp /etc/kolla/config/glance/ceph.conf /etc/kolla/config/nova

8 k2 c1 t1 k, f" X1 f5 Z6 n

6 D5 N4 \, t5 |4 E7 t% F# a13.  ceph1上拷贝秘钥到controller1节点
scp /etc/ceph/ceph.client.cinder.keyring controller1:/etc/kolla/config/nova/
5 [9 v( x- ?7 R! t. X* U$ c
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

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

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 21:21 , Processed in 0.043109 second(s), 25 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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