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

Kolla-Ansible Install OpenStack Queens version

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-5-31 11:25:32 | 显示全部楼层 |阅读模式
useing kolla-ansible install queens openstack:3 Z, g# ^% I! R( S; W4 R6 \* P
" z; p0 n. U2 b$ h& z" [% a2 i6 a/ i# d
1) Turn off Selinux0 K' S: p/ G! j
vi /etc/sysconfig/selinux# Y  V# }# x* E5 j( a
SELINUX=disabled8 D, U% ~2 \6 H  Y0 |
Note that you can temporarily disable selinux in the way of setenforce 1. The above command will take effect after restarting, but if you want to restart the following operations, you can execute the command setenforce 1 to operate, but I have obsessive-compulsive disorder, so I restarted. .5 x+ u/ t9 e; V5 i  [
2) Close firewalld- x8 @* L4 y1 I$ z6 ]) ^. O
systemctl stop firewalld8 m& k* P9 ?: N! V6 p+ b8 X) ~
systemctl disable firewalld9 o. A* ]+ V) u0 E1 K7 S4 _# E
2. Install docker  T, Z  g$ T# ]# e
1) Add a Docker source
5 ~+ N; @0 |# O! K: xcd /etc/yum.repos.d/ 1 w4 {+ w* t; C
vi docker.repo0 t# g9 y9 E1 _2 o2 {# M3 O

& P" j2 L, w4 H( F( o4 E, z, |$ q[dockerrepo]
4 E+ j1 e4 ~" z: O; \1 u3 mname=Docker Repository! \  l" ^3 y( ~- e
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/& i) j$ O; L6 Q3 u% J& N
enabled=1
3 [: K, w' n0 M3 Lgpgcheck=1
" v4 t! c' z' i2 N- m) x7 Igpgkey=https://yum.dockerproject.org/gpg8 L( ?( d5 o9 u+ R: v( F+ v
2) Add epel source) M' v, k& F# N2 J3 w  J' B* J( A
- P; ]! a6 Z! `4 q6 B
vi epel.repo: e( F6 q& R' B  F% M1 J) Z
[epel]3 q& ?# F. x  G9 r, m5 Q" p3 v
name=Extra Packages for Enterprise Linux 7 - $basearch  t: b5 R0 m! Q4 L' h
baseurl=http://mirrors.aliyun.com/epel/7/$basearch
- u8 I  ^- L  m+ }; |2 ^        http://mirrors.aliyuncs.com/epel/7/$basearch" `8 X: f7 U* ~5 h  T/ f
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
. Q  {; d! C9 }  G' U! D$ X& O! jfailovermethod=priority# [  i5 Z1 c7 Z' d" Y6 q
enabled=1: R" D4 X/ A% m1 [) p* ?* r& k
gpgcheck=0
" g/ c" T# T7 H" @" lgpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
2 D4 }7 X( o! \9 B7 t5 z * T. V4 R: k9 r
3) Install Docker 1.12.69 u  \- e" R6 Z5 Y" @
yum install docker-engine-1.12.6 docker-engine-selinux-1.12.6 -y1& a/ `& J2 I' ?7 D9 {
4) Set up Docker3 P' C+ P) a. I  J/ `3 Y8 N- l
mkdir /etc/systemd/system/docker.service.d
2 t! I3 P$ d0 o4 |) _' ]vi /etc/systemd/system/docker.service.d/kolla.conf
6 f' n+ g1 I/ A$ \& w[Service]
7 a: e* h& q  Y  C5 x: w
$ V' ?5 C3 w* {2 Z0 l+ ]* B9 g7 `MountFlags=shared0 k! J- _2 E  }6 _( j7 G) h6 n2 C) y
5) Restart related services
+ G/ m& i9 S; ~! X6 R" ~systemctl daemon-reload
  f. \! o. N  Y4 L. B3 Q2 H! ^* Msystemctl enable docker
" e- R* H5 T  w' X3 V! N: |systemctl restart docker* q' p6 D# R0 U5 F: _
6) Configure Alibaba Cloud's Docker Accelerator to speed up the pull registry image
. Y# Z5 @. a+ T2 [# z7 J5 N4 g5 lmkdir -p /etc/docker8 o5 W/ b0 L) s8 X. t4 c# `' {$ y9 `
; z: {+ x' z. O$ Y) A/ q1 f
tee /etc/docker/daemon.json <<-'EOF'
! N: P4 p; l6 o6 L% z2 \5 k{( F  e7 X* \* g! o' Q3 s3 [
"registry-mirrors": ["https://a5aghnme.mirror.aliyuncs.com"]
3 R/ }0 H1 M* q! L* J}
# A0 [8 i. z# W- GEOF
9 T" X+ H7 j9 i8 M  p. |Restart the service, }0 z; Y* [% L! G3 o
systemctl daemon-reload && systemctl restart docker/ {% Z0 z. O! S, E/ k
7) Set the proxy (if needed)
8 E0 j5 R( }( j4 t. Z4 Y, G0 [Create the configuration file /etc/systemd/system/docker.service.d/http-proxy.conf and add the following configuration:
$ e4 O( a, n& ~* D; _' Y+ |" `[Service]
& E! @4 _: M4 @7 e/ g2 a, TEnvironment="HTTP_PROXY=http://ip:port/"8 ^" L! n4 G8 f
Environment="HTTPS_PROXY=http://ip:port/". J; {* y( N8 D1 B% o6 D
Restart service
/ u$ S. M/ D% w3 S$ Z
& U( A# B+ `' |6 l/ _4 `6 f0 \) [2 M9 `systemctl daemon-reload && systemctl restart docker
2 ~7 Q5 C. P7 m, O% a% c4 ~6 E6 ?3. Install kolla
! M4 t! a8 I, |( g! ~1) Install pip& L+ j- _3 ]9 q; F6 B: e; \" s
yum install python-pip
3 x3 L, n8 L$ H" c- g6 P0 Npip install -U pip -i https://pypi.tuna.tsinghua.edu.cn/simple
) s2 B4 {6 k, \% g* Y: ]: ^2) Install the basic software) G9 k" ?# ?, {8 K
yum install python-devel libffi-devel gcc openssl-devel libselinux-python
4 J7 ^4 \* f: |& b$ M3) Install ansible6 J3 d# K: p+ }9 D" }
pip install -U ansible -i https://pypi.tuna.tsinghua.edu.cn/simple
6 ]7 {& E. n$ T/ p& F$ A- q- _4) Install kolla-ansible% ~9 \7 M+ B- I! R2 J8 ?
pip install -U kolla-ansible -i https://pypi.tuna.tsinghua.edu.cn/simple
0 Q) e* Y+ N- V. p$ \$ h7 A5) Copy related configuration files  L1 j3 T% f. r2 Z9 A4 C, s
cp -r /usr/share/kolla-ansible/etc_examples/kolla /etc/
# U- Z. n, c* N5 K$ Ecp /usr/share/kolla-ansible/ansible/inventory/* /home/
7 Z7 a3 g4 H* X6 [6) Generate a password file
- G+ b: c$ G" L: n4 p9 B& Tkolla-genpwd
8 h% d3 M, W' G. P+ j# W! |7) Edit the /etc/kolla/passwords.yml file and configure the password for the keystone administrator user.
5 P& c# F" @) P" Bkeystone_admin_password: admin4 @: L( j5 E8 a# S" F, M7 V
At the same time, it is also the password used to log in to Dashboard, admin, you can modify it according to your needs.
+ S) }) ^# \% N, }* ~8) Edit the /etc/kolla/globals.yml configuration file
8 `/ K7 F# M( T1 G' }Kolla_internal_vip_address: "10.99.0.7" //Visit the address of the Dashboard% w/ Y7 V+ {% ]
openstack_release: "queens"
! r  J  G1 e) m# N7 ` Network_interface: "ens33" // is the name of the network card of 10.99.0.7# w" \9 R* Z8 y. ^8 F
Neutron_external_interface: "ens34" // is the name of the 192.168.0.7 NIC for the neutron network interface5 u' W. `4 \8 r# [
enable_haproxy: "no"
! h: K1 ~( M+ F- Z$ M3 C( ^9 g8 e4 I9) Pre-deployment check, q; G0 b5 u6 J; H( R) r7 ]
Note that pre-deployment checks should add 10.99.0.7 localhost DNS to the /etc/hosts file. This is very important! Very important! No absolute mistakes!$ E  w4 l; Y1 i2 x) ^6 ~
kolla-ansible prechecks -i /home/all-in-one
' I, G% _7 s* \, C! Z  k, B/ `; ?10) Pull the image first5 U! @, E4 G: ~5 r
Note, here, in fact, in fact, the pull mirror is still relatively slow, so sometimes, you have to go online scientifically, but when you go online, sometimes it will lead to failure. I will talk specifically about how to get started faster.5 j5 m9 O) m* n
First of all, you need to be online.- O, j; u. T' d7 w6 ^2 I7 J! I9 U2 r
yum install git
2 _; @# @( m, j' tgit clone -b manyuser https://github.com/Ssrbackup/shadowsocksr.git
. d- Y5 P$ H/ Jgedit /etc/shadowsocks.json* d* `1 D1 c8 T. W: \$ R0 x
// Then fill in the JSON configuration of your ssr
# R+ c+ N+ U9 ^/ X/ Tcd shadowsocksr/shadowsocks/+ V7 N# [2 d+ m" a# u
Python local.py -c/etc/shadowsocks.json -d start //Start ssr service
& o4 g- w+ r% p1 k8 d2 g, A: D+ {
0 y. o5 V/ r; X0 A' y, k //The following are some alternate commands:
* f# i/ g- @6 {5 t2 v0 V Python local.py -c/etc/shadowsocks.json -d stop//end ssr service/ y) Q- C7 U+ k, v
Python local.py -c/etc/shadowsocks.json -d restart //Start ssr service
9 V  {4 H. p8 g9 x8 G% d7 Y0 j8 g- d* d3 s
, C1 B& S2 M. `/ d) G  Q! {. ?8 eNow, you need to set up proxychains to make your science online available in the terminal:- V% t  T& Q( P! s  F" n  i) G0 @% v
Cd / / back to the main directory* y( E9 w# L1 s* d# X0 \5 V& |
Yum -y install gcc automake autoconf libtool make //install the make environment. ^' m3 f( y! B3 _- S. a: D
Git clone https://github.com/rofl0r/proxychains-ng.git //Download proxychains4
: N0 Q4 b- j- v# |7 k
) y  f0 r- R" E3 i9 B( ^- C# ncd proxychains-ng& l: ~' B: o, F% G+ H5 O
./configure //Production configuration file
/ J$ v1 F, r$ Z# v, M% U4 A Make && sudo make install //compile and install
" @+ w9 a) Y$ H: M7 W- x Cp ./src/proxychains.conf /etc/proxychains.conf //Export configuration file9 A: ^- K1 L/ n9 L
Cd .. && rm -rf proxychains-ng //Clean up the installation package
* p5 b+ E- T- U, k Vim /etc/proxychains.conf //Edit configuration file$ b9 t$ f5 E8 p  I- n
//The last line is changed to sock5 127.0.0.1:10809 ^0 _& k0 e, m5 d
6 t( F# ]2 p: \2 L1 ?& `/ R
% a" X$ g  T! V& K  x* ]$ v
! Q! ~* ]- V3 B7 R0 @

) ?. S  R, s" o, F" g( E" e9 M2 RIn this way, when you execute the command later, add the proxychains4 to the front and go online.0 p. Q/ N, w9 O, P$ P  Z, T
kolla-ansible pull -i /home/all-in-one+ z! [- v) n6 }8 z
//Or try science online- ?8 Z1 o7 \* H* y
proxychains4 kolla-ansible pull -i /home/all-in-one" A9 ]2 j/ l8 Z( q
Then if you still can't, you can try to manually pull down the image you need from the mirror site, and then execute the above command to reduce the number of images that he pulls.
% Y$ a0 h7 G: J" Wproxychains4 docker pull kolla/centos-source-fluentd:queens
% n* H9 |  w5 R3 Kproxychains4 docker pull kolla/centos-source-prometheus-base:queens
$ m" @: K: ]! u1 N+ K1 V' Sproxychains4 docker pull kolla/centos-source-prometheus-haproxy-exporter:queens
. ?7 u  l; ]5 Tproxychains4 docker pull kolla/centos-source-haproxy:queens3 i4 r4 d3 s; Q" Z  X+ s6 U- p
proxychains4 docker pull kolla/centos-source-chrony:queens
0 v1 B7 M& A. O/ C, ?4 ]) y2 yproxychains4 docker pull kolla/centos-source-openvswitch-vswitchd:queens
0 \2 U" a% z" i2 J# ~/ z" [proxychains4 docker pull kolla/centos-source-openvswitch-base:queens
$ ~. D* `% }& o: I8 b9 U0 J& K  pproxychains4 docker pull kolla/centos-source-openvswitch-db-server:queens
. ]- @' @& i+ ^. nproxychains4 docker pull kolla/centos-source-openstack-base:queens
, S5 W8 g$ P# Y7 H5 E' e9 c5 pproxychains4 docker pull kolla/centos-source-glance-base:queens0 w0 C1 y. W" E/ b
proxychains4 docker pull kolla/centos-source-mariadb:queens  
1 S9 m1 W& T3 P- k5 Nproxychains4 docker pull kolla/centos-source-memcached:queens  3 h, c: j' Q/ {2 Z0 u
proxychains4 docker pull kolla/centos-source-keystone-ssh:queens  
7 H, {6 b: r4 nproxychains4 docker pull kolla/centos-source-keystone-base:queens  
. Y$ V9 }0 Z& x  A% qproxychains4 docker pull kolla/centos-source-kolla-toolbox:queens  ) X& C4 a9 j- y: k$ ^9 X
proxychains4 docker pull kolla/centos-source-heat-api:queens  8 |/ v7 Q: \) U
proxychains4 docker pull kolla/centos-source-heat-api-cfn:queens  
- W/ G5 d$ m6 \- y9 M' l6 `& Qproxychains4 docker pull kolla/centos-source-glance-api:queens  
+ o0 V. K3 E# X& V$ Q4 fproxychains4 docker pull kolla/centos-source-keystone-fernet:queens  
$ }6 j- ]- |5 dproxychains4 docker pull kolla/centos-source-nova-libvirt:queens  
" `# y6 d* o) r, H' }proxychains4 docker pull kolla/centos-source-neutron-lbaas-agent:queens  
. Y( L8 i. D+ c9 [) R$ S9 g$ f3 bproxychains4 docker pull kolla/centos-source-neutron-l3-agent:queens  : H$ Q; _. f2 B8 `
proxychains4 docker pull kolla/centos-source-keepalived:queens% W: i0 W+ |  S
proxychains4 docker pull kolla/centos-source-nova-compute:queens  
: c, p! H, j( @8 M4 D2 Yproxychains4 docker pull kolla/centos-source-nova-spicehtml5proxy:queens  9 s4 x6 K& y5 Q1 q% ^$ {
proxychains4 docker pull kolla/centos-source-nova-api:queens  
& `  w) n) _: h# ~( j/ b( T+ \proxychains4 docker pull kolla/centos-source-nova-novncproxy:queens  
- l' y: K: `5 Z7 n+ M  X- Fproxychains4 docker pull kolla/centos-source-nova-ssh:queens  
9 q* ]- T+ O9 qproxychains4 docker pull kolla/centos-source-nova-placement:queens  
5 e5 z# O: C& [, o+ C7 g& ?; N, O5 Kproxychains4 docker pull kolla/centos-source-nova-compute-ironic:queens  $ Z# U# X0 ^, E$ a- o* N
proxychains4 docker pull kolla/centos-source-horizon:queens . j% P( x6 r6 R2 ]6 I& w1 v
proxychains4 docker pull kolla/centos-binary-nova-conductor:queens 2 M! ]  H3 S9 O; L- G2 g: l
proxychains4 docker pull kolla/centos-binary-nova-consoleauth:queens
& {# ~4 {) I9 Sproxychains4 docker pull kolla/centos-binary-nova-serialproxy:queens * s3 A, k8 T4 E! r3 A1 N+ N' p
proxychains4 docker pull kolla/centos-binary-nova-mksproxy:queens
# ^! w" e) F' M3 n3 _) Oproxychains4 docker pull kolla/centos-binary-nova-scheduler:queens 1 P+ g8 W+ ~8 J/ ]" T
proxychains4 docker pull kolla/centos-binary-nova-base:queens 3 e7 q4 y" q( O$ s3 o
proxychains4 docker pull kolla/centos-binary-neutron-server-opendaylight:queens
1 w- @% I. h+ {/ j& Y* {proxychains4 docker pull kolla/centos-binary-neutron-server:queens
6 r* H& t( N' q( ?2 a6 Kproxychains4 docker pull kolla/centos-binary-neutron-metering-agent:queens! O6 d6 L( |8 F! x
proxychains4 docker pull kolla/centos-binary-ce-neutron-metadata-agent :queens ) F  B, E( N5 S& Q
proxychains4 docker pull kolla/centos-binary-neutron-sriov-agent:queens
6 c, n7 A. F/ y) D" V4 _2 nproxychains4 docker pull kolla/centos-binary-ironic-neutron-agent:queens * _4 M" H. \) y& _/ W
proxychains4 docker pull kolla/centos-binary-neutron-bgp-dragent:queens " B! Z- }$ C3 E  J% I
proxychains4 docker pull kolla/centos-binary-neutron-sfc-agent:queens # k# x9 Y6 D# s2 d3 _) v" U
proxychains4 docker pull kolla/centos-binary-neutron-openvswitch-agent:queens , e1 n; T& m2 \/ K* A  U0 e: r2 R
proxychains4 docker pull kolla/centos-binary-neutron-dhcp-agent:queens 2 I) X9 k+ C, S! \
proxychains4 docker pull kolla/centos-binary-keystone:queens 5 o! r( z+ j" A) _( A
proxychains4 docker pull kolla/centos-binary-neutron-linuxbridge-agent:queens
/ n! k' ~4 N1 L& j% O9 ?# Sproxychains4 docker pull kolla/centos-binary-fluentd:queens+ G8 B& }- F7 o+ V9 o' I
proxychains4 docker pull kolla/centos-binary-prometheus-haproxy-exporter:queens0 N+ D8 X  v  K( B! X4 p' Q6 M3 Z
proxychains4 docker pull kolla/centos-binary-haproxy:queens* {' K, k3 Z: y: |) y
proxychains4 docker pull kolla/centos-binary-chrony:queens
! r7 L2 B4 s4 D( _6 B: g7 J6 eproxychains4 docker pull kolla/centos-binary-openvswitch-vswitchd:queens; @: c( [% ^; h
proxychains4 docker pull kolla/centos-binary-openvswitch-base:queens; v# `$ O1 c, Z" m. H0 i7 {
proxychains4 docker pull kolla/centos-binary-openvswitch-db-server:queens* j+ ^5 f8 R: W: C! d8 M/ t
proxychains4 docker pull kolla/centos-binary-openstack-base:queens
# F" `# A5 K/ \% k, tproxychains4 docker pull kolla/centos-binary-glance-base:queens
6 U1 R* P& Y- R' B# Yproxychains4 docker pull kolla/centos-binary-mariadb:queens  
( D: W/ r8 F0 \- xproxychains4 docker pull kolla/centos-binary-memcached:queens  ! e; f+ L( R, u; a; @" |
proxychains4 docker pull kolla/centos-binary-keystone-ssh:queens  
; l  k! B/ t4 gproxychains4 docker pull kolla/centos-binary-keystone-base:queens  
& b8 |6 Z9 l$ x! l( F& V. rproxychains4 docker pull kolla/centos-binary-kolla-toolbox:queens  
1 Z0 D2 ?! Y6 G" c2 z$ {$ B+ Jproxychains4 docker pull kolla/centos-binary-heat-all:queens    A( W7 x4 s. Y7 {( e) O: o
proxychains4 docker pull kolla/centos-binary-heat-api:queens  
. B7 W; `- i6 H8 }proxychains4 docker pull kolla/centos-binary-heat-api-cfn:queens    w" M( H" j9 X. s0 |
proxychains4 docker pull kolla/centos-binary-glance-api:queens  1 z* v8 V6 ~6 [9 O
proxychains4 docker pull kolla/centos-binary-fluentd:queens  
9 m1 d6 U# d8 i# g, Vproxychains4 docker pull kolla/centos-binary-keystone-fernet:queens  + }$ B( o# T2 q0 q
proxychains4 docker pull kolla/centos-binary-nova-libvirt:queens  
* S3 h1 M. |! P- }* Rproxychains4 docker pull kolla/centos-binary-neutron-lbaas-agent:queens  # O1 {( U( O; I" x5 z4 ]
proxychains4 docker pull kolla/centos-binary-neutron-l3-agent:queens  
' ?6 q8 H/ ~" N* J! F- k0 {4 l, aproxychains4 docker pull kolla/centos-binary-keepalived:queens5 b% j8 }: h" h6 u+ m1 u
proxychains4 docker pull kolla/centos-binary-nova-compute:queens  
* {  y; D9 o- E* x/ w1 y9 qproxychains4 docker pull kolla/centos-binary-nova-spicehtml5proxy:queens  ' N+ ~" q! G7 C1 z+ u  C
proxychains4 docker pull kolla/centos-binary-nova-api:queens  7 p2 y2 y# x' G4 c9 W, b  Z0 W
proxychains4 docker pull kolla/centos-binary-nova-novncproxy:queens  $ P- W- ^9 [- [9 ]7 h1 i
proxychains4 docker pull kolla/centos-binary-nova-ssh:queens  
4 o$ P( }4 z' kproxychains4 docker pull kolla/centos-binary-nova-placement:queens  2 R/ D8 p# w: G6 G
proxychains4 docker pull kolla/centos-binary-nova-compute-ironic:queens  & U! y- E+ X# s1 |  J
proxychains4 docker pull kolla/centos-binary-horizon:queens
, L5 M& u& }7 R4 C' }% ]11) Install Docker python libraries, otherwise you will get an error4 }1 q' w5 y. O: P' h9 P
pip install -U docker -i https://pypi.tuna.tsinghua.edu.cn/simple( D& F7 q: t# O2 h" j
12) Deployment# [" l1 A8 y6 t
kolla-ansible deploy -i /home/all-in-one
1 b) X+ b2 Q. F( uWait about 30 minutes and the deployment is complete.
( O' A6 W0 Y+ }0 c0 l! j# ]13) Login dashboard http://10.99.0.7
$ D% J2 Y! D, ^8 C14) Install the client$ X5 x7 O6 ?& l+ q* v; l! s
pip install python-openstackclient python-glanceclient python-neutronclient -i https://pypi.tuna.tsinghua.edu.cn/simple1 B1 i5 s  B2 i* z, N, X
15) Perform post-deployment operations0 m0 G# m: ?" |4 {1 Y* J
kolla-ansible postdeploy -i /home/all-in-one" ^: ~$ A/ l, C8 v  X' t+ ~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 00:58 , Processed in 0.022682 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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