安装openstack) E9 }- L5 P0 Y$ _+ A
yum install -y centos-release-openstack-newton, ^6 E6 [% Y# p4 ?+ S3 f, }' l# L
yum update -y
3 p3 t+ r* J, c9 ]yum install -y openstack-packstack) T) c1 o; e7 c1 G5 k7 a: ^
packstack --gen-answer-file=answer.txt9 u; L2 K% K5 w0 s& m g w/ J9 q
#vim answer.txt 可以编辑配置文件(对云计算构架的项目选择修改密码) 也可以不修改
) j' A: m/ s9 p/ Z CONFIG_NTP_SERVERS=192.168.0.254
0 Y% h1 s q& t' D, H1 d CONFIG_KEYSTONE_ADMIN_PW=xxbandy ) l3 r% i7 Z3 y$ m6 d' Z, V
' [: t& s- d/ @* q: E6 N1 {packstack --answer-file=answer.txt: r. j4 a" E! N4 q5 T: ]5 x
安装过程,有可能因为源的原因中断,你可以重复运行上一句。0 u2 p, H7 t: D! a# y6 _- l9 U- _
% g4 C; w G6 }/ l[root@localhost runcore]# packstack --gen-answer-file=answer.txt
. f+ [4 B' e% W) ?[root@localhost runcore]# packstack --answer-file=answer.txt
b3 r7 Q- x( H; f+ Z: G" [Welcome to the Packstack setup utility
/ M; h" e; S7 h" h
. b5 }& V& n) g5 E) g/ U1 @The installation log file is available at: /var/tmp/packstack/20161230-102423-2sGXEN/openstack-setup.log& g; S3 J' Y; u6 |% h& S0 F* Z/ ?
8 `6 a$ H! U9 T L" J6 l. \9 s
Installing:
8 `4 A8 ^3 Y, w! Y8 c9 tClean Up [ DONE ]( W2 [. K. D. }# M( o$ r- E
Discovering ip protocol version [ DONE ]6 W( T2 e0 }6 N* Y: O
Setting up ssh keys [ DONE ]
8 n: p$ I" o7 q4 ^( c uPreparing servers [ DONE ]
, @' E# v) x, Y' ~) JPre installing Puppet and discovering hosts' details[ ERROR ]
- \. y3 Q" V" k, K& M9 Y9 O/ \1 y4 T* b. A4 E) [6 e5 V4 ^8 S# I9 x
ERROR : Failed to run remote script, stdout: Loaded plugins: fastestmirror, langpacks
8 S0 O) P6 u7 `" E$ _1 vCould not retrieve mirrorlist http://mirrorlist.centos.org/?re ... =os&infra=stock error was y6 g1 t; |7 y* j( H" }
12: Timeout on http://mirrorlist.centos.org/?re ... os&infra=stock: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')) Y6 R8 Y7 E( r! e
3 [) U# l( S- A- Y
stderr: Warning: Permanently added '192.168.0.163' (ECDSA) to the list of known hosts.
& @4 h4 ^9 m+ r P+ trap t ERR
8 C. k# e. L" Q5 P" w" R z+ yum install -y puppet hiera openssh-clients tar nc rubygem-json }; w( N/ A% p9 t& _1 L
% y" S- h% F& c6 a
' @' z8 s! z2 U4 T One of the configured repositories failed (Unknown),) R2 q3 h' a; n" h2 z
and yum doesn't have enough cached data to continue. At this point the only
- e1 J8 C* ^0 I3 k safe thing yum can do is fail. There are a few ways to work "fix" this:
5 v/ v$ o2 e2 U- {, o0 D Z5 [
8 |2 B: O# s; I+ E" H6 u 1. Contact the upstream for the repository and get them to fix the problem.
! |9 a' e" b5 {1 p0 J! K) f8 f
* y2 ^$ n$ A, H+ R% M5 Q0 c 2. Reconfigure the baseurl/etc. for the repository, to point to a working% J! ^5 D1 m4 |0 z
upstream. This is most often useful if you are using a newer+ P* A% K. J2 o) _ U) l# E, v8 {
distribution release than is supported by the repository (and the
6 M' D& g7 h. |3 X! p packages for the previous distribution release still work).
# D* t1 } E V$ z6 i3 \; Q
' _. Z: Y, a: s: o9 J/ Y2 f2 r 3. Run the command with the repository temporarily disabled, p0 ~' N @+ P& t
yum --disablerepo=<repoid> ...
4 }9 d, h! v2 {$ G- _ u1 u
8 `- w; |7 w( g- H 4. Disable the repository permanently, so yum won't use it by default. Yum
2 L6 {/ q4 u3 C' `* l! y will then just ignore the repository until you permanently enable it
0 P% ^7 p( V% x- N5 `+ @ again or use --enablerepo for temporary usage:- @# Q9 ?& r% b) ]/ w$ A( S- j
% h. s+ Y) ~, e
yum-config-manager --disable <repoid>
* @9 x2 h4 l# R5 R or
8 x/ B$ D. m2 ]* ^, A/ O+ L subscription-manager repos --disable=<repoid>
4 K: _. \# ~( D4 |, q1 S% F$ x
& k" l2 {; M7 t% k 5. Configure the failing repository to be skipped, if it is unavailable.
5 t2 k- N! `& w' {4 f Note that yum will try to contact the repo. when it runs most commands,( k, U1 A2 r% {% l ?
so will have to try and fail each time (and thus. yum will be be much
; W9 C0 }' t' j0 u4 v slower). If it is a very temporary problem though, this is often a nice; @1 A5 m3 P/ n( {2 `: k" f1 I
compromise:; y3 m9 u% ?0 O, D, ]
# A) m) ?# }* E% J0 X8 [* F yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
! P" F0 M7 z7 t; O c4 z( b
3 ? Y5 q3 Y3 A' D4 k& oCannot find a valid baseurl for repo: base/7/x86_64
' s1 y$ k8 g( n6 H- _/ v++ t3 Q& h% u6 [+ }1 }" ?- k
++ exit 1
: Z# o: A' a4 \. ~
1 F( ], B0 X5 G- I& S1 bPlease check log file /var/tmp/packstack/20161230-102423-2sGXEN/openstack-setup.log for more information
; X9 b5 y0 Y. |9 Q9 V: o7 YAdditional information:2 p/ v% P5 }( \: H6 A) K
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
) t! w% K3 F1 }; Q######------------------------------------------------############----------------------------------------------$ z5 Y% e& U9 F! D. X
##注释:使用应答文件安装,出现上述错误。先是修改了hostname和hosts文件,然后运行,还是错误。第二步按照错误的提示内容执行yum install -y puppet hiera openssh-clients tar nc rubygem-json。再运行应答文件即通过了!
0 p, ]" `. K5 Z* L; w+ W+ D2 h- g8 z, E) B4 U( J4 m; B& M/ F$ d7 Y# {
[root@localhost runcore]# vi /etc/hostname
p1 V2 f% ?8 J: l" `% k$ h6 D: R n[root@localhost runcore]# vi /etc/hosts
6 z; t. ~$ K$ T2 k1 _1 y" ]) _; H[root@localhost runcore]# packstack --answer-file=answer.txt7 Q* J6 X9 Y9 I
[root@localhost runcore]# yum install -y puppet hiera openssh-clients tar nc rubygem-json: Y, g8 {# S* r8 p0 c) T& b0 K
已加载插件:fastestmirror, langpacks! @$ s4 z) Y( h! G$ s. [/ g# T2 E
base | 3.6 kB 00:00:00 4 F& w3 v6 D3 Q; f6 k' M. V w
centos-ceph-jewel | 2.9 kB 00:00:00 0 x5 w* c q. Y$ g* B0 T
centos-openstack-newton | 2.9 kB 00:00:00
5 n# \/ ]4 @( K# _& M- Ocentos-qemu-ev | 2.9 kB 00:00:00
# E! t, J3 q; c6 P0 S& oextras | 3.4 kB 00:00:00
- \7 R# g: M3 yupdates | 3.4 kB 00:00:00 9 {! n, s7 E& [, l& I O/ @# N4 Q
(1/7): centos-qemu-ev/7/x86_64/primary_db | 47 kB 00:00:01 : s$ V% R+ ]3 T5 t
(2/7): base/7/x86_64/group_gz | 155 kB 00:00:01 * Q5 U( @- d l5 V' |
(3/7): centos-ceph-jewel/7/x86_64/primary_db | 41 kB 00:00:02
7 J8 U+ _7 s" i4 b; k(4/7): extras/7/x86_64/primary_db | 183 kB 00:00:00 3 H3 @! }1 ^' A) ~6 s4 h c; y
(5/7): updates/7/x86_64/primary_db | 1.2 MB 00:00:06
9 T# n4 Y" D( i(6/7): centos-openstack-newton/x86_64/primary_db | 671 kB 00:00:27 8 B+ A. [6 _: N8 `% V, ?* y
(7/7): base/7/x86_64/primary_db | 5.6 MB 00:00:39
$ w% c7 ?8 V2 s: yLoading mirror speeds from cached hostfile6 x* i d3 b h0 C' \, v- J" R
* base: mirrors.yun-idc.com$ l* ^( O1 O, ^/ ^
* extras: mirrors.yun-idc.com
P- q R7 ]# F9 k: l/ T$ Q * updates: mirrors.163.com
; S3 I% o2 @8 @( M. w软件包 puppet-3.8.7-2.el7.noarch 已安装并且是最新版本
5 f; n% A0 d# }! h7 P7 o2 \软件包 1:hiera-1.3.4-5.el7.noarch 已安装并且是最新版本# K6 ?, q6 M/ c1 u. j5 D
软件包 openssh-clients-6.6.1p1-31.el7.x86_64 已安装并且是最新版本! x) l) z3 g; l
软件包 2:tar-1.26-31.el7.x86_64 已安装并且是最新版本
7 Q z8 T7 g$ E; N: f) G软件包 2:nmap-ncat-6.40-7.el7.x86_64 已安装并且是最新版本
# g$ S) ~$ |0 T- A* N软件包 rubygem-json-1.7.7-29.el7.x86_64 已安装并且是最新版本$ x, P. m; z2 b7 R
无须任何处理
" a7 o* V4 }- \2 v2 v[root@localhost runcore]# packstack --answer-file=answer.txt
. ?; y) Z3 }2 c0 y; ^
, T5 E6 P, _; I#查看账户密码
% o, Q0 \- X$ ~3 o# J! f- }! Ucat /etc/nagios/keystonerc_admin D4 w) V4 _) u8 F/ x/ U9 ~4 Q; b* ]% k
7 C5 O, x# T4 a, ?! h0 ~ {安装KVM
5 @6 b1 H( J! {#1安装kvm* t0 ?5 n/ k1 P3 s& R" f" [8 w V6 k
yum -y install qemu-kvm libvirt virt-install bridge-utils
/ W) o& S' O2 Q+ d$ E) v& U; k#2查看是否安装
5 _ ~ J, q8 d4 s" ?lsmod | grep kvm
2 u3 I3 A, v: X( M8 Y" s#3
S2 A; I! U7 |4 m+ Xsystemctl start libvirtd2 d0 N) P/ f7 Q! F: Y' v3 x
systemctl enable libvirtd3 K! T+ O5 `3 k" F# ^
#
\: ~5 G# z% o1 a, W# i7 O/ l安装virt-manager
* {) z* C: g0 e% X X: i& {yum install virt-manager 0 Q. l; Q0 K8 ], y1 H( h/ G; O
|