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

Kolla-Ansible Install OpenStack Queens version

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-5-31 11:25:32 | 显示全部楼层 |阅读模式
useing kolla-ansible install queens openstack:- b% g  f: f0 |( m; R
3 @# Z  I" U$ j4 A
1) Turn off Selinux9 r% |/ r6 A4 ^
vi /etc/sysconfig/selinux0 M2 V! u& }% }5 K: Q4 _2 O9 `/ ?
SELINUX=disabled
. h. V( l; v" [4 h5 M1 t: ONote 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. .
  o  O, _' r0 r- G* }+ ^( v2) Close firewalld
4 z+ p& L- @5 c4 j3 asystemctl stop firewalld
+ l' ]+ Z* V' F8 Q% j, ?systemctl disable firewalld/ }4 v* ^' ^6 M. r! a1 ~; }. {
2. Install docker
6 E0 x% Q: I0 c' m5 q1) Add a Docker source
9 x. P# f+ v; D# I6 T* i# f* |cd /etc/yum.repos.d/ ! d# Q; h/ L: {5 a- [2 i
vi docker.repo
: Q1 `' n7 A1 l' [0 c( P% z ) l1 ^  G6 C8 T4 x7 J& d2 w( }
[dockerrepo]. R! z, U/ n5 K. L! B2 g+ b
name=Docker Repository
) c" u/ e* t5 Zbaseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
' O  `% q/ R/ Y( w# ?0 penabled=1
6 |% b' j9 B7 a0 Q- h0 Egpgcheck=11 u' h9 w9 g3 T( Q4 L
gpgkey=https://yum.dockerproject.org/gpg
: m! K- s- T- K, e1 ?2) Add epel source# T8 v, q1 Q* \3 Q! `( c  \
% W, L7 j# r& g- E; O& e) M/ W
vi epel.repo
) C9 ?8 f) W2 w( B% h[epel]3 i  d$ [; g8 E
name=Extra Packages for Enterprise Linux 7 - $basearch# Y; {5 I; \# }' K- R! c& n- Q
baseurl=http://mirrors.aliyun.com/epel/7/$basearch
* r0 @9 P+ [) b: f0 w5 |        http://mirrors.aliyuncs.com/epel/7/$basearch
5 t* g2 R- Z2 T; w#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch+ O% \9 M# W; }- g- v5 H
failovermethod=priority; r( k. E" z& r
enabled=1
6 {) A% E0 u/ n) G. k0 a% Fgpgcheck=05 F- I5 D- J, m) D6 U* P
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
! v  h4 F. p) m, b0 Q
7 [: r+ l% I5 `1 [& Z% c# A! {. P3) Install Docker 1.12.6
* v9 s% ^6 o7 Q0 y6 @" {$ ]& eyum install docker-engine-1.12.6 docker-engine-selinux-1.12.6 -y19 @: c# h7 R: {' W5 [
4) Set up Docker4 ]+ }8 v! f7 D; c( D
mkdir /etc/systemd/system/docker.service.d
: ^/ U! J3 x( v. Z2 ^vi /etc/systemd/system/docker.service.d/kolla.conf
+ z4 J' A1 f! c5 k0 Z) n- q# q[Service]9 \* F+ L4 X' f8 C: ~( F
$ G# x' c+ M1 P: u7 T
MountFlags=shared
5 v/ s. A) `' O. L# w5) Restart related services
# u+ E) n1 v9 Q5 Bsystemctl daemon-reload5 x$ _" Z& j0 y+ _  P% v2 G' u0 n9 w
systemctl enable docker# U7 M2 n8 p1 P: d
systemctl restart docker
0 E0 z* D; q# v- M# ?" ]6) Configure Alibaba Cloud's Docker Accelerator to speed up the pull registry image: G0 e& y) j( r3 O( D
mkdir -p /etc/docker) M0 i/ x& a, {8 Q+ ?

/ Y; t, H; U3 ^. A& C8 n3 wtee /etc/docker/daemon.json <<-'EOF'
( ]; T* D! o3 d' i5 |" _{
% h& \  _6 {3 _( V"registry-mirrors": ["https://a5aghnme.mirror.aliyuncs.com"]2 @6 h0 f2 [/ X; i: o; k
}
3 F. ~' h9 L& o; t2 fEOF7 F: Q; }1 |" t) a+ U# l* V' r% Y
Restart the service
8 c8 x( L2 G5 y: n! Wsystemctl daemon-reload && systemctl restart docker" z, `4 f5 b' x
7) Set the proxy (if needed)
- B& O2 _4 \" R8 rCreate the configuration file /etc/systemd/system/docker.service.d/http-proxy.conf and add the following configuration:
# u' m% @5 ]2 k# C[Service] % m; k8 i0 n) Q5 F3 b7 ?' }/ z
Environment="HTTP_PROXY=http://ip:port/"
1 ~8 T4 {( i$ U& sEnvironment="HTTPS_PROXY=http://ip:port/"
9 R/ r  y, H, K0 ^( p+ U' {; |0 sRestart service3 s" d# ]; n/ W. ~" l8 o5 D
; T( P2 h. x( @4 ^3 c$ Z- K
systemctl daemon-reload && systemctl restart docker( J5 k) C2 ^: ?$ j
3. Install kolla7 x* d' d% v! d$ i
1) Install pip
8 M7 @5 t* ^+ `/ x1 ], o7 D( Myum install python-pip$ o( s7 X7 C8 B% H8 x: k
pip install -U pip -i https://pypi.tuna.tsinghua.edu.cn/simple
, M% U7 P, Y, W5 A2) Install the basic software
3 z/ l' ]5 m3 J/ X0 e* U0 ^yum install python-devel libffi-devel gcc openssl-devel libselinux-python& \( V  A' u) F) Z
3) Install ansible
9 Z; M' Q  S- d% G6 B% q& L) V8 Epip install -U ansible -i https://pypi.tuna.tsinghua.edu.cn/simple) o0 X1 ~+ |/ P! f$ @. t
4) Install kolla-ansible
4 H, B9 x. v0 Xpip install -U kolla-ansible -i https://pypi.tuna.tsinghua.edu.cn/simple
0 o/ T0 c1 d2 X/ R7 o5 J5) Copy related configuration files
( J+ p2 m0 B3 K& Qcp -r /usr/share/kolla-ansible/etc_examples/kolla /etc/
+ O+ t9 L% \: G* C, D1 b9 V0 Zcp /usr/share/kolla-ansible/ansible/inventory/* /home/
2 r% M# N( h( a/ ]* {6) Generate a password file" v3 X0 M+ y) O
kolla-genpwd
, Q& n  v/ q# y7 u7) Edit the /etc/kolla/passwords.yml file and configure the password for the keystone administrator user.8 {2 y4 P- \0 i' w. ~2 v2 H1 [8 I
keystone_admin_password: admin) T( i% }- Q. X, {9 R$ s: I5 ?* s# u
At the same time, it is also the password used to log in to Dashboard, admin, you can modify it according to your needs.' \1 {8 A0 w/ x) h
8) Edit the /etc/kolla/globals.yml configuration file
" c/ E1 \1 p8 y$ e6 kKolla_internal_vip_address: "10.99.0.7" //Visit the address of the Dashboard
' c0 P4 J" q# l% E' m4 ~/ lopenstack_release: "queens"- h' ~1 f8 Y3 v# a
Network_interface: "ens33" // is the name of the network card of 10.99.0.71 _: k0 L# a! g* T  o) X, }: L
Neutron_external_interface: "ens34" // is the name of the 192.168.0.7 NIC for the neutron network interface3 D3 o( S; y) t
enable_haproxy: "no"
* m6 D4 G, S* M" X4 s1 O- i9) Pre-deployment check
' ?* x! r8 H4 R9 x# \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!+ `; q4 |0 T& |5 S5 N  Y& R
kolla-ansible prechecks -i /home/all-in-one
7 q: O2 Z- F6 q10) Pull the image first
7 N: g' s- n: R+ F1 eNote, 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.9 w9 V& t% E+ a! M, F1 M. T6 `
First of all, you need to be online." E1 a$ }1 |' O  m
yum install git9 ^" R9 a' H: z: i/ V" U
git clone -b manyuser https://github.com/Ssrbackup/shadowsocksr.git$ b0 ?0 \8 v7 N
gedit /etc/shadowsocks.json
8 e; a5 n5 b% f6 B: Y# s // Then fill in the JSON configuration of your ssr
1 s; B; u8 i6 w8 ~; |9 rcd shadowsocksr/shadowsocks/
8 @" V* _% e/ ~' s5 z0 @ Python local.py -c/etc/shadowsocks.json -d start //Start ssr service( y. Q1 O% b2 H1 v% y, `

( R( F8 ^& F) U0 z( S% a5 Y //The following are some alternate commands:
) f" y3 \  O  `8 O Python local.py -c/etc/shadowsocks.json -d stop//end ssr service
$ s4 P. {! |* Y' ^% Z) ^: u; T2 X7 z Python local.py -c/etc/shadowsocks.json -d restart //Start ssr service
9 X1 u5 i7 ?0 R: n* N" T/ X 8 e- }, Y# p! Y2 p$ X
Now, you need to set up proxychains to make your science online available in the terminal:
- G5 v4 N& B9 b8 e) uCd / / back to the main directory
; ?% N  Z* K9 C  J  o/ { Yum -y install gcc automake autoconf libtool make //install the make environment; j6 i% x! h9 Q; a( T7 K* f: O: ~  i
Git clone https://github.com/rofl0r/proxychains-ng.git //Download proxychains4, L! A- |$ J; Y
5 L, i+ i5 o# o+ Z/ ]5 X
cd proxychains-ng
( s5 E' b+ }8 b ./configure //Production configuration file% q1 g+ Q* m2 M' {2 q6 n2 z
Make && sudo make install //compile and install4 ]; D- m- d" a$ l  y
Cp ./src/proxychains.conf /etc/proxychains.conf //Export configuration file8 R; R  R8 B! o3 W# c  a0 U
Cd .. && rm -rf proxychains-ng //Clean up the installation package  C( t3 C' A, d9 Y. U
Vim /etc/proxychains.conf //Edit configuration file, @6 J0 ]& y- z' X) z; H
//The last line is changed to sock5 127.0.0.1:1080
6 [9 l6 H! U: l' L& v) g( M# u, o
( E" D; t$ c1 e0 f7 _ % m% f$ b- B/ F: r4 I% k  f
0 s8 @; [' t/ h1 n
, Y8 l8 }, t2 B7 |) c# o
In this way, when you execute the command later, add the proxychains4 to the front and go online.
' Y8 X0 A) k* {kolla-ansible pull -i /home/all-in-one% h2 S  O+ z5 L, I4 S
//Or try science online6 L4 z2 L4 j3 x7 Z2 C/ O% p( o
proxychains4 kolla-ansible pull -i /home/all-in-one
& m) Q5 [' J+ N* q# A. OThen 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.: y8 {$ L: W2 h0 N" O8 q9 ]
proxychains4 docker pull kolla/centos-source-fluentd:queens2 j3 q7 R7 t6 U' `" `1 k- B
proxychains4 docker pull kolla/centos-source-prometheus-base:queens
' k. [. ~9 M/ ?' Mproxychains4 docker pull kolla/centos-source-prometheus-haproxy-exporter:queens
% B3 I! l3 D4 Q2 p2 A( L# j+ l9 Oproxychains4 docker pull kolla/centos-source-haproxy:queens8 x" ~5 }$ l7 G8 i7 b( @( n
proxychains4 docker pull kolla/centos-source-chrony:queens# o' k0 }( J1 M, c+ i- O2 e1 j
proxychains4 docker pull kolla/centos-source-openvswitch-vswitchd:queens; Y7 t6 c; E* v; `5 ^
proxychains4 docker pull kolla/centos-source-openvswitch-base:queens/ {: C- U' Q  I" s& d+ U& i+ o
proxychains4 docker pull kolla/centos-source-openvswitch-db-server:queens
; R, d2 ?) h8 N* K  D' I' sproxychains4 docker pull kolla/centos-source-openstack-base:queens
- ]5 U; e6 S1 \7 d+ @9 i2 wproxychains4 docker pull kolla/centos-source-glance-base:queens
0 p; M6 m+ A9 a/ a2 ~proxychains4 docker pull kolla/centos-source-mariadb:queens  
3 M3 p! f& B% \8 Y& ^/ nproxychains4 docker pull kolla/centos-source-memcached:queens    A0 \2 h* C" k( \* ^0 v
proxychains4 docker pull kolla/centos-source-keystone-ssh:queens  8 G' d8 c2 q3 \" C" [+ _
proxychains4 docker pull kolla/centos-source-keystone-base:queens  
7 k1 }0 V3 G" |9 p" ]; i! v- Kproxychains4 docker pull kolla/centos-source-kolla-toolbox:queens  + D9 Z% X- t3 M* M  `; E
proxychains4 docker pull kolla/centos-source-heat-api:queens  
' \$ B' g3 A' r8 G3 |; G2 q# Nproxychains4 docker pull kolla/centos-source-heat-api-cfn:queens  - R; O7 o6 b7 b& Y
proxychains4 docker pull kolla/centos-source-glance-api:queens  
& u; ?3 L- S) }7 ^; Kproxychains4 docker pull kolla/centos-source-keystone-fernet:queens  
4 Y4 p4 I0 n% N, s0 {proxychains4 docker pull kolla/centos-source-nova-libvirt:queens  
1 ]6 H% t2 }. j; b( s) `proxychains4 docker pull kolla/centos-source-neutron-lbaas-agent:queens  
, u( s. b; {2 W3 ?' Iproxychains4 docker pull kolla/centos-source-neutron-l3-agent:queens  
/ w# ?  m1 _- x: ~( C; l0 J. Iproxychains4 docker pull kolla/centos-source-keepalived:queens
2 x. N7 R2 @0 {3 T- zproxychains4 docker pull kolla/centos-source-nova-compute:queens  4 S; A& O% ^% k1 g% w
proxychains4 docker pull kolla/centos-source-nova-spicehtml5proxy:queens  
: f! r- d8 `1 z8 X, e7 {+ Mproxychains4 docker pull kolla/centos-source-nova-api:queens  1 ~/ ?7 ?5 [1 H4 t" J
proxychains4 docker pull kolla/centos-source-nova-novncproxy:queens  $ i7 m  u0 K* E
proxychains4 docker pull kolla/centos-source-nova-ssh:queens  ) |- j3 d  ^/ K, v  ^* g
proxychains4 docker pull kolla/centos-source-nova-placement:queens  
) u1 @) K3 E0 _" Q% i* iproxychains4 docker pull kolla/centos-source-nova-compute-ironic:queens  
/ S; s$ [: O: {1 \proxychains4 docker pull kolla/centos-source-horizon:queens
) P4 R2 u& d, p1 o% yproxychains4 docker pull kolla/centos-binary-nova-conductor:queens 6 q# n9 |5 m" [8 v, e
proxychains4 docker pull kolla/centos-binary-nova-consoleauth:queens
  F$ l' s7 H% y5 J4 aproxychains4 docker pull kolla/centos-binary-nova-serialproxy:queens 7 h/ c0 J3 {: N# N
proxychains4 docker pull kolla/centos-binary-nova-mksproxy:queens
6 Z  J) w2 p; v; F" y8 y8 _proxychains4 docker pull kolla/centos-binary-nova-scheduler:queens
7 x# O6 K5 F4 M9 Gproxychains4 docker pull kolla/centos-binary-nova-base:queens ' R; M9 p5 X4 ^: Q/ [$ Y7 {7 e
proxychains4 docker pull kolla/centos-binary-neutron-server-opendaylight:queens ' j( G' {  d9 Q. E. w( M
proxychains4 docker pull kolla/centos-binary-neutron-server:queens 3 J* a2 _% D% {) ^
proxychains4 docker pull kolla/centos-binary-neutron-metering-agent:queens# e8 m# H8 h( p/ t
proxychains4 docker pull kolla/centos-binary-ce-neutron-metadata-agent :queens
( P6 P$ ~/ h1 \- p5 r& ?2 ^$ q" ?proxychains4 docker pull kolla/centos-binary-neutron-sriov-agent:queens
7 g) _7 `0 _6 N* `proxychains4 docker pull kolla/centos-binary-ironic-neutron-agent:queens 5 L5 Q+ T* i, g9 K0 }
proxychains4 docker pull kolla/centos-binary-neutron-bgp-dragent:queens 2 X$ I6 Y( ?( J4 J
proxychains4 docker pull kolla/centos-binary-neutron-sfc-agent:queens
# h% y! M, A! D0 e6 lproxychains4 docker pull kolla/centos-binary-neutron-openvswitch-agent:queens
7 E4 Z1 M: W- x; d# C, ~; g2 m1 u9 _2 b7 Nproxychains4 docker pull kolla/centos-binary-neutron-dhcp-agent:queens 4 X: A8 z8 }+ P% o# {# h
proxychains4 docker pull kolla/centos-binary-keystone:queens 4 D) m' F7 ~6 h( z6 }
proxychains4 docker pull kolla/centos-binary-neutron-linuxbridge-agent:queens
8 F# E' H3 L+ V/ @proxychains4 docker pull kolla/centos-binary-fluentd:queens. F2 b, W0 r1 X$ H) w6 s5 f
proxychains4 docker pull kolla/centos-binary-prometheus-haproxy-exporter:queens
/ i4 |. `. b1 H0 B- wproxychains4 docker pull kolla/centos-binary-haproxy:queens
3 B. s5 \8 Y+ E$ jproxychains4 docker pull kolla/centos-binary-chrony:queens6 b. j( s  c4 s
proxychains4 docker pull kolla/centos-binary-openvswitch-vswitchd:queens; O+ A  n3 v; `' H" T
proxychains4 docker pull kolla/centos-binary-openvswitch-base:queens
- `# P+ k- V& tproxychains4 docker pull kolla/centos-binary-openvswitch-db-server:queens
7 k; n! Y0 B6 j8 @1 Nproxychains4 docker pull kolla/centos-binary-openstack-base:queens0 {6 Y% G% w0 J) Y% a3 Q. |' z
proxychains4 docker pull kolla/centos-binary-glance-base:queens
# L. W- u& m- H3 C1 O3 d- O! uproxychains4 docker pull kolla/centos-binary-mariadb:queens  4 c( |. D" O- L& H; y+ ]5 w4 F
proxychains4 docker pull kolla/centos-binary-memcached:queens  1 v, F. \# A! Z% q  h
proxychains4 docker pull kolla/centos-binary-keystone-ssh:queens  
; \* G! w6 E/ p$ h) B& Kproxychains4 docker pull kolla/centos-binary-keystone-base:queens  3 F9 F  \' L7 K$ W. ^6 e7 b4 \
proxychains4 docker pull kolla/centos-binary-kolla-toolbox:queens  
7 v9 L9 j9 d: @. Jproxychains4 docker pull kolla/centos-binary-heat-all:queens  % q! w# `5 |; A6 r3 x
proxychains4 docker pull kolla/centos-binary-heat-api:queens  + q$ r% E9 r. N3 |: Q
proxychains4 docker pull kolla/centos-binary-heat-api-cfn:queens  + Y" @1 i8 o5 W/ B
proxychains4 docker pull kolla/centos-binary-glance-api:queens  
. i1 M& Q  X, y* rproxychains4 docker pull kolla/centos-binary-fluentd:queens  7 K+ H+ u1 Q$ k2 e* q8 a, ]5 z
proxychains4 docker pull kolla/centos-binary-keystone-fernet:queens  / x; |1 w+ K; a: g
proxychains4 docker pull kolla/centos-binary-nova-libvirt:queens  % q0 w: z% Z3 B
proxychains4 docker pull kolla/centos-binary-neutron-lbaas-agent:queens  
. P1 O/ K, t# |- D; J7 ?1 W, Q8 tproxychains4 docker pull kolla/centos-binary-neutron-l3-agent:queens  
; j6 W5 X: a% ^# ]. I% P* B9 zproxychains4 docker pull kolla/centos-binary-keepalived:queens
0 \% E  G0 T5 G; h  lproxychains4 docker pull kolla/centos-binary-nova-compute:queens  
, w, l8 R% L9 F4 Pproxychains4 docker pull kolla/centos-binary-nova-spicehtml5proxy:queens  6 t+ B: f5 ]  \% I+ V
proxychains4 docker pull kolla/centos-binary-nova-api:queens  : I7 @3 w9 I: H5 d  u* R
proxychains4 docker pull kolla/centos-binary-nova-novncproxy:queens  0 X- {3 P' M) b# T9 ?! W* Z
proxychains4 docker pull kolla/centos-binary-nova-ssh:queens  * G7 D4 j3 a( y1 R
proxychains4 docker pull kolla/centos-binary-nova-placement:queens  
" S1 w& Q4 u+ j8 `- Rproxychains4 docker pull kolla/centos-binary-nova-compute-ironic:queens  ! z: r; d! E, P0 C2 i
proxychains4 docker pull kolla/centos-binary-horizon:queens 2 c! h$ ~- q) }# V0 s9 p- @
11) Install Docker python libraries, otherwise you will get an error8 X7 O0 j- P/ G7 T6 P
pip install -U docker -i https://pypi.tuna.tsinghua.edu.cn/simple1 t5 ~2 E& m# a8 J- d5 F
12) Deployment, w8 R; M4 q# M" Z+ V8 y
kolla-ansible deploy -i /home/all-in-one9 U/ r- l9 B9 b6 n
Wait about 30 minutes and the deployment is complete.9 \  m) k$ H7 c( E
13) Login dashboard http://10.99.0.7
; Q$ S( S  n: H14) Install the client6 B- N0 u2 u. f5 V0 e% q
pip install python-openstackclient python-glanceclient python-neutronclient -i https://pypi.tuna.tsinghua.edu.cn/simple' B7 \0 I: @, ~. g' R; V: {
15) Perform post-deployment operations8 Y* _# F) Y9 }0 L% T& k. m
kolla-ansible postdeploy -i /home/all-in-one$ m4 D- w0 a( `1 g; e" @" t$ p
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 00:01 , Processed in 0.033086 second(s), 24 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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