|
|
useing kolla-ansible install queens openstack:
6 T- }( w) ~8 X! u" S
/ W) V# Z l; ]. N1) Turn off Selinux
, L/ `7 v% c8 j3 b; zvi /etc/sysconfig/selinux
" o( ~5 T; Y2 O2 `" ]+ T0 g9 m& A& bSELINUX=disabled
0 H6 y+ e! _# O" s: n5 }% 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. .
6 a2 M6 T0 Z) d) _" b: u5 p2) Close firewalld
/ T3 G5 }0 V3 W" Lsystemctl stop firewalld$ O. [4 g$ n- e
systemctl disable firewalld
' @% \3 E$ \6 A$ E& N+ @, P0 L2. Install docker" g$ l' w' {1 G/ P
1) Add a Docker source
& }$ B# o) R! c$ Z2 j! f. o xcd /etc/yum.repos.d/
2 J- Z. ~% n- O- Svi docker.repo
/ W4 l0 k! L, z/ i' ? + |. ~3 c% B5 J
[dockerrepo]
4 b4 W- E+ @" x( f4 r9 ~% a+ A9 y) iname=Docker Repository( s) I3 J7 Q& f+ d- ]( Y8 N& L
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
( o: v/ I1 H7 p, M* lenabled=1
7 I) G+ G3 Z7 o. w: b& vgpgcheck=1
: V+ T# e8 a, Sgpgkey=https://yum.dockerproject.org/gpg
: F. V3 G$ L: J8 v! V. P$ X2) Add epel source. o2 O9 n* M' a& P+ a7 D' x
; o: \6 Q7 C1 T$ A5 G* }vi epel.repo4 A0 o7 Z! l# Z2 D; _9 ? T4 N0 }( w( |
[epel]* H9 h/ l g* p5 K; z
name=Extra Packages for Enterprise Linux 7 - $basearch/ A! r6 o" m. ]& h" _2 a' r& E
baseurl=http://mirrors.aliyun.com/epel/7/$basearch
7 c0 i+ p1 b, E+ j6 Z8 o; }8 | http://mirrors.aliyuncs.com/epel/7/$basearch
0 j) t# ]2 J8 H- z, s- J#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
$ Q' ]; u7 m) m5 O) wfailovermethod=priority5 }, B I! }" ~" n% |' F1 z( b
enabled=14 o. ]7 r6 L+ ?! H
gpgcheck=0
6 @ L& I9 r; ^5 [2 Ogpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7+ B0 ?3 U7 I4 T) y( r a
9 H$ K! y9 W. n' \3 H3) Install Docker 1.12.6( n9 g" O( ?& E; m
yum install docker-engine-1.12.6 docker-engine-selinux-1.12.6 -y1- z% g/ @5 S, A6 Q, @7 F! @
4) Set up Docker
1 s4 ]3 d" T' @9 G' N4 X9 O/ ]4 Amkdir /etc/systemd/system/docker.service.d O+ `& ?' b: k( w# r3 U% s
vi /etc/systemd/system/docker.service.d/kolla.conf
% U+ q. m% w+ \7 S[Service]$ j$ }9 Q0 t1 ^. I6 q0 s: t
6 _% m) e, k8 L
MountFlags=shared
! ~/ G# a ^& \# H* ]# V5) Restart related services
2 k( V7 k- G" q5 K$ gsystemctl daemon-reload
3 _7 e4 p$ y0 g1 J* ssystemctl enable docker+ i, b& |+ b' b' a2 C
systemctl restart docker
* S+ T5 _' z2 t# m2 B1 S6) Configure Alibaba Cloud's Docker Accelerator to speed up the pull registry image5 m4 L, p, ?9 F) o( f
mkdir -p /etc/docker. h& i! [. F1 y: [* ]3 i
: G5 A9 J% F. S0 btee /etc/docker/daemon.json <<-'EOF'
5 ~2 b+ v Q2 S& O# H# |' t{
+ T" z1 ] X9 ]6 x9 E9 u* T"registry-mirrors": ["https://a5aghnme.mirror.aliyuncs.com"]0 J1 w% x5 ^7 d4 p) q( D% w$ U
}0 ]3 U. A- H; C$ Z0 i0 V, ^6 F1 E
EOF
7 k. R0 }; Q5 J, Q: sRestart the service' H$ W: s+ w& }" q' K3 Y# \ B& e! H
systemctl daemon-reload && systemctl restart docker# \* n0 t, w2 X/ ?: ~
7) Set the proxy (if needed)
9 v6 ]0 I. c& ~/ `Create the configuration file /etc/systemd/system/docker.service.d/http-proxy.conf and add the following configuration:
) y2 j8 K' n/ `8 r[Service]
$ U/ g, H! y) D/ h" {Environment="HTTP_PROXY=http://ip:port/"9 w/ U. D3 s* n" T3 D8 |
Environment="HTTPS_PROXY=http://ip:port/"
5 v" g& o9 \1 J8 [Restart service
$ ]# _$ y( o) B) w/ c! }4 h % w2 g; X, @8 v9 m# p9 {
systemctl daemon-reload && systemctl restart docker; }. t% @% A/ l9 @# G+ S' u }/ n
3. Install kolla
# m( [7 e) J6 o$ C: `: ~) P1) Install pip
: H7 d$ r* e* c: C& \7 k" i* qyum install python-pip
) F7 u L1 F* I' Z7 @- P- L. `, I9 Xpip install -U pip -i https://pypi.tuna.tsinghua.edu.cn/simple
1 p/ c" o Q& c/ p1 F/ |2) Install the basic software
1 q8 y+ ` f% ^9 s* E$ eyum install python-devel libffi-devel gcc openssl-devel libselinux-python0 m* g& ?5 F6 [) d0 A, `
3) Install ansible* f. a; \+ {& P/ _$ p5 {4 ^: r
pip install -U ansible -i https://pypi.tuna.tsinghua.edu.cn/simple
: `' H2 |" ]4 @4) Install kolla-ansible
6 W, p( z! S& p H8 E6 Ipip install -U kolla-ansible -i https://pypi.tuna.tsinghua.edu.cn/simple
" e- g9 Q4 z4 b* N5) Copy related configuration files
; r- q3 ?2 G8 N+ Z i) X/ Tcp -r /usr/share/kolla-ansible/etc_examples/kolla /etc/
* T, r9 ?$ ^' h7 D! o- N; S4 Scp /usr/share/kolla-ansible/ansible/inventory/* /home/0 L {5 n; O; W" s( P9 O" |
6) Generate a password file
1 c# q6 `9 @8 g; P$ @kolla-genpwd
% F( P) q- H' H a7) Edit the /etc/kolla/passwords.yml file and configure the password for the keystone administrator user.
. p: I" `: R/ {" Z( Qkeystone_admin_password: admin
. B- |, _& V0 ^% AAt the same time, it is also the password used to log in to Dashboard, admin, you can modify it according to your needs.. c1 {; E8 w' a. Z0 u
8) Edit the /etc/kolla/globals.yml configuration file9 I$ C! Z( G* M( X
Kolla_internal_vip_address: "10.99.0.7" //Visit the address of the Dashboard
* M* c" O- x# T3 p0 \5 z0 y2 Qopenstack_release: "queens". b. S: G. Y+ G
Network_interface: "ens33" // is the name of the network card of 10.99.0.7
5 Z% I3 `0 L2 G+ _4 n% q% s. f Neutron_external_interface: "ens34" // is the name of the 192.168.0.7 NIC for the neutron network interface
8 Q t! R5 ]( Q7 z5 Kenable_haproxy: "no"5 T' P5 X1 G- L) d [
9) Pre-deployment check
4 G% w" t7 l: @) ANote 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! P4 A9 f6 p4 E* G: D' x
kolla-ansible prechecks -i /home/all-in-one: S) {* M' G/ D! M! V& J" n
10) Pull the image first
# {3 ^ O9 [" q4 }( l9 D# T3 dNote, 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.8 _7 E; ]- X7 H, n( j
First of all, you need to be online.
$ U G! B1 B; s0 @) v; zyum install git' O2 |4 u0 J: H- _5 m" z6 d: c! v/ [
git clone -b manyuser https://github.com/Ssrbackup/shadowsocksr.git: ^/ X( f! p6 i; J/ d" {
gedit /etc/shadowsocks.json1 r z2 I1 \+ x# G7 A6 \
// Then fill in the JSON configuration of your ssr8 ^' F9 m/ H( |1 J1 g/ {6 x% `
cd shadowsocksr/shadowsocks/
( ]- h5 k F8 M Python local.py -c/etc/shadowsocks.json -d start //Start ssr service
0 n5 T1 W! @0 ` - v# u6 }' G0 ]; [
//The following are some alternate commands:
7 i6 @: o1 z+ ]) z$ V% T Python local.py -c/etc/shadowsocks.json -d stop//end ssr service& X. ]* z" X5 b0 w" {
Python local.py -c/etc/shadowsocks.json -d restart //Start ssr service
# y7 U4 G0 X4 ?# A 6 l) o; X8 j; [$ |. z
Now, you need to set up proxychains to make your science online available in the terminal:
/ R8 I4 @/ f/ @* V) }0 h' ~5 Z. XCd / / back to the main directory% ~/ a$ Z- Z$ Z1 H) Q9 {
Yum -y install gcc automake autoconf libtool make //install the make environment
F; g+ f2 k/ L+ Y8 I/ v8 h- v Git clone https://github.com/rofl0r/proxychains-ng.git //Download proxychains4
; d5 @" ^+ h. N s" J" U& z8 t8 U) i 7 Q' z* ]( R1 B: Q
cd proxychains-ng
- n1 f4 T0 n1 `: b* ] ./configure //Production configuration file1 s2 E! c, f2 ^1 J3 T6 ]' d6 c
Make && sudo make install //compile and install
& T y: c" G+ \- t* A6 f0 D Cp ./src/proxychains.conf /etc/proxychains.conf //Export configuration file
, Y6 H' L2 G6 `. b2 h) n- [ Cd .. && rm -rf proxychains-ng //Clean up the installation package
; i9 }: f7 K9 h9 s a5 U. p Vim /etc/proxychains.conf //Edit configuration file# q' O! T" |: J; v A; W3 k
//The last line is changed to sock5 127.0.0.1:1080
1 @. W! n9 ?2 v ! ^, R1 A1 r" \2 J
3 ^+ _ w& J1 U1 ?" W5 ^ t& ~# u2 X
( ~3 o7 d5 A2 w
0 \2 l6 h8 y1 C# n0 b) XIn this way, when you execute the command later, add the proxychains4 to the front and go online.
# J/ ^% h! r4 `$ d+ E! O2 `kolla-ansible pull -i /home/all-in-one) k, c/ c; J, Q+ [8 W# k
//Or try science online' q+ ~; [, J( D9 ?8 O) Y
proxychains4 kolla-ansible pull -i /home/all-in-one
* b; M* G. T- g' ~. hThen 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.
% r! p$ W& b' {; z- eproxychains4 docker pull kolla/centos-source-fluentd:queens" F+ X# o3 k4 Q* m3 R- ?4 y
proxychains4 docker pull kolla/centos-source-prometheus-base:queens$ V( A; |2 O$ u: ]$ Z* X* \
proxychains4 docker pull kolla/centos-source-prometheus-haproxy-exporter:queens
: m- v7 v$ V7 d; d' O$ Uproxychains4 docker pull kolla/centos-source-haproxy:queens# e, l( h$ j5 \* x
proxychains4 docker pull kolla/centos-source-chrony:queens/ p9 d% `* J0 u: x# C- z
proxychains4 docker pull kolla/centos-source-openvswitch-vswitchd:queens
( Z1 |1 h J* {: T# [% V/ `proxychains4 docker pull kolla/centos-source-openvswitch-base:queens$ l. V; u6 I; K: W3 m8 b
proxychains4 docker pull kolla/centos-source-openvswitch-db-server:queens
' _2 l+ c0 X; Z7 Q8 Mproxychains4 docker pull kolla/centos-source-openstack-base:queens
5 ~. O! P! }' ~. B$ eproxychains4 docker pull kolla/centos-source-glance-base:queens
" c0 R3 I. v" @/ t/ Kproxychains4 docker pull kolla/centos-source-mariadb:queens
8 _# i; s0 L9 }+ V* T, xproxychains4 docker pull kolla/centos-source-memcached:queens - x9 `2 ~1 ~' b# N: R
proxychains4 docker pull kolla/centos-source-keystone-ssh:queens
0 n& |. Y9 s' y: u" bproxychains4 docker pull kolla/centos-source-keystone-base:queens
. v# a$ M2 J8 Sproxychains4 docker pull kolla/centos-source-kolla-toolbox:queens 2 g J! k5 D/ i- h
proxychains4 docker pull kolla/centos-source-heat-api:queens & h. b7 q+ x" w0 e6 o5 \
proxychains4 docker pull kolla/centos-source-heat-api-cfn:queens
6 @# u; z+ P3 O. d R; iproxychains4 docker pull kolla/centos-source-glance-api:queens
; y0 B4 T4 `. n, X0 P+ l/ ~+ s" Hproxychains4 docker pull kolla/centos-source-keystone-fernet:queens 7 M2 |% O0 P6 M( @# o C' ]2 _
proxychains4 docker pull kolla/centos-source-nova-libvirt:queens
" T' g6 A! V6 D0 Y! ^! h" ?- ^3 N7 hproxychains4 docker pull kolla/centos-source-neutron-lbaas-agent:queens
! v9 I, ]7 y T/ H6 Bproxychains4 docker pull kolla/centos-source-neutron-l3-agent:queens & Z* l- ]' s' m- F; g! G
proxychains4 docker pull kolla/centos-source-keepalived:queens
0 i2 K) ^: [8 p5 C1 Gproxychains4 docker pull kolla/centos-source-nova-compute:queens % a( X2 F4 m" |/ J9 K
proxychains4 docker pull kolla/centos-source-nova-spicehtml5proxy:queens " j6 {, Y u1 s+ a$ |! L- r
proxychains4 docker pull kolla/centos-source-nova-api:queens
# n. o. t0 q( D6 a0 ?! C7 Nproxychains4 docker pull kolla/centos-source-nova-novncproxy:queens
1 E! ]+ S8 q/ S6 Q& b; jproxychains4 docker pull kolla/centos-source-nova-ssh:queens
6 n' |! w E8 |- M" I5 [ V8 ?proxychains4 docker pull kolla/centos-source-nova-placement:queens / e+ i+ r" A. ?$ Y* m. ?
proxychains4 docker pull kolla/centos-source-nova-compute-ironic:queens
7 ]" C% X. w" f" @ o V2 S' Iproxychains4 docker pull kolla/centos-source-horizon:queens ! z* b4 a$ V& g2 }) c2 w
proxychains4 docker pull kolla/centos-binary-nova-conductor:queens " @+ X! P9 a* X
proxychains4 docker pull kolla/centos-binary-nova-consoleauth:queens ! d! x; e& \7 M7 W: M, ?& `
proxychains4 docker pull kolla/centos-binary-nova-serialproxy:queens
- w$ z* ^% a$ gproxychains4 docker pull kolla/centos-binary-nova-mksproxy:queens 6 B6 T" L0 ?6 o9 @1 ?8 d4 ?
proxychains4 docker pull kolla/centos-binary-nova-scheduler:queens
8 A8 I1 y! \2 R% ~2 tproxychains4 docker pull kolla/centos-binary-nova-base:queens
/ j5 V+ J3 ]. tproxychains4 docker pull kolla/centos-binary-neutron-server-opendaylight:queens 3 [" N$ o7 m/ }8 Z! O
proxychains4 docker pull kolla/centos-binary-neutron-server:queens ' J; V; Y9 t1 _. g. E/ o) o( }
proxychains4 docker pull kolla/centos-binary-neutron-metering-agent:queens
) v2 H6 w+ I+ G* p# b* xproxychains4 docker pull kolla/centos-binary-ce-neutron-metadata-agent :queens - T: w+ \; G; z/ e
proxychains4 docker pull kolla/centos-binary-neutron-sriov-agent:queens
. J# i- P; s n1 l8 t4 B* @# q& mproxychains4 docker pull kolla/centos-binary-ironic-neutron-agent:queens ! R: d" b: u4 e
proxychains4 docker pull kolla/centos-binary-neutron-bgp-dragent:queens
, s9 |' Z3 f! dproxychains4 docker pull kolla/centos-binary-neutron-sfc-agent:queens
# @3 }+ e( l, f9 a5 p7 fproxychains4 docker pull kolla/centos-binary-neutron-openvswitch-agent:queens ' W d6 c* ~% i, W+ a2 b
proxychains4 docker pull kolla/centos-binary-neutron-dhcp-agent:queens 8 @- D% z9 }0 z- r; b7 Z
proxychains4 docker pull kolla/centos-binary-keystone:queens
8 ~2 d+ G- w9 ]; Qproxychains4 docker pull kolla/centos-binary-neutron-linuxbridge-agent:queens
/ n: G. s: c. M( E% nproxychains4 docker pull kolla/centos-binary-fluentd:queens
) J- n8 T$ J. l+ O7 sproxychains4 docker pull kolla/centos-binary-prometheus-haproxy-exporter:queens
, g) [" w O1 q( }% gproxychains4 docker pull kolla/centos-binary-haproxy:queens
* F! f1 x9 h, O0 kproxychains4 docker pull kolla/centos-binary-chrony:queens3 I" z% C' o& G4 D& P* u
proxychains4 docker pull kolla/centos-binary-openvswitch-vswitchd:queens, ]$ Q( T4 K( j6 N0 p& `' Q( S
proxychains4 docker pull kolla/centos-binary-openvswitch-base:queens. ^5 {8 x3 u* x! y; a- g+ ?1 a
proxychains4 docker pull kolla/centos-binary-openvswitch-db-server:queens" t* ]2 C" N1 C; e6 J, `
proxychains4 docker pull kolla/centos-binary-openstack-base:queens! ]5 {9 c9 I3 j" L( y
proxychains4 docker pull kolla/centos-binary-glance-base:queens7 c/ Q% U' x6 ?
proxychains4 docker pull kolla/centos-binary-mariadb:queens
1 d; f! @5 a: Q* i9 [( Kproxychains4 docker pull kolla/centos-binary-memcached:queens 6 H2 L- n* P2 F
proxychains4 docker pull kolla/centos-binary-keystone-ssh:queens 7 }3 d# q4 K1 H) M
proxychains4 docker pull kolla/centos-binary-keystone-base:queens # X5 y W1 U4 S C$ N6 L' G
proxychains4 docker pull kolla/centos-binary-kolla-toolbox:queens
k# v9 M. O8 n$ w4 H3 j% Hproxychains4 docker pull kolla/centos-binary-heat-all:queens 9 F! _( t R) g g, Z
proxychains4 docker pull kolla/centos-binary-heat-api:queens " v" x4 b0 h; ?$ C9 L& z
proxychains4 docker pull kolla/centos-binary-heat-api-cfn:queens
. \/ ] t$ l0 c5 Pproxychains4 docker pull kolla/centos-binary-glance-api:queens
0 m4 ~' h/ g! o# V2 zproxychains4 docker pull kolla/centos-binary-fluentd:queens 9 {$ c" d4 h* o3 P, j
proxychains4 docker pull kolla/centos-binary-keystone-fernet:queens 5 i5 `! E0 U, q, _9 B
proxychains4 docker pull kolla/centos-binary-nova-libvirt:queens ) n2 U: o( _2 {) l+ y3 S6 j9 U
proxychains4 docker pull kolla/centos-binary-neutron-lbaas-agent:queens
% j% g- W6 a( h9 P- P3 T; Sproxychains4 docker pull kolla/centos-binary-neutron-l3-agent:queens
% H8 Y, e5 o; D+ ?proxychains4 docker pull kolla/centos-binary-keepalived:queens
1 d; h! u6 G/ r# q4 a, @0 Rproxychains4 docker pull kolla/centos-binary-nova-compute:queens + X; t r& g O: ]# O! M
proxychains4 docker pull kolla/centos-binary-nova-spicehtml5proxy:queens
; N& w, S l& z$ M, g& v+ Q; S+ |' ~proxychains4 docker pull kolla/centos-binary-nova-api:queens
* J7 d8 y, u/ ^proxychains4 docker pull kolla/centos-binary-nova-novncproxy:queens
2 @$ {0 |" M1 L1 d% rproxychains4 docker pull kolla/centos-binary-nova-ssh:queens
2 O b K6 ^1 I& Dproxychains4 docker pull kolla/centos-binary-nova-placement:queens " q% E P# p: w3 e
proxychains4 docker pull kolla/centos-binary-nova-compute-ironic:queens $ {& P+ }* H, s% ]
proxychains4 docker pull kolla/centos-binary-horizon:queens 4 T( \1 F0 _# u/ A& G4 r1 u
11) Install Docker python libraries, otherwise you will get an error
8 i7 M3 I4 w) j" ipip install -U docker -i https://pypi.tuna.tsinghua.edu.cn/simple
% S5 A( j4 z. N; u5 z$ P/ x4 @6 X. A8 a12) Deployment
4 c# c/ k0 [* @3 h( }' P7 Bkolla-ansible deploy -i /home/all-in-one+ t/ N& ~1 V: T+ ~9 r+ Y
Wait about 30 minutes and the deployment is complete.
% Q) i% _0 f$ w5 N) D13) Login dashboard http://10.99.0.7
8 w3 g: Y8 |6 A/ e14) Install the client- `8 B- n% w9 g6 ~5 a
pip install python-openstackclient python-glanceclient python-neutronclient -i https://pypi.tuna.tsinghua.edu.cn/simple: N" d% X4 i; z% G& j& }2 L
15) Perform post-deployment operations
d, N. ~( U9 I% {$ H% [kolla-ansible postdeploy -i /home/all-in-one+ T. o: t2 z$ W6 q, Z
|
|