安装openstack
5 V( G" }* M& n. G& T; F( x5 S1 ]. fyum install -y centos-release-openstack-newton
$ b2 I+ V5 |% P' j' c: Zyum update -y
, T5 }+ c) R/ z2 [yum install -y openstack-packstack# S6 L0 |7 o+ \ M; B$ Q& |
packstack --gen-answer-file=answer.txt. `4 e2 l# }/ L G7 w% D; z" G
#vim answer.txt 可以编辑配置文件(对云计算构架的项目选择修改密码) 也可以不修改
4 _5 U1 ]+ Q' y3 h* J& Z CONFIG_NTP_SERVERS=192.168.0.254 , ~& F$ Z( O, N2 o4 w+ m; M
CONFIG_KEYSTONE_ADMIN_PW=xxbandy
) q* }+ F* b4 W, w" K# S, ?0 [1 y0 [; z+ O. N" k. P g% v
packstack --answer-file=answer.txt
# d1 K9 j% T. ?8 r安装过程,有可能因为源的原因中断,你可以重复运行上一句。! K' F' q9 r, ^3 L3 ?2 d- B7 w3 f) F
! A a1 N2 p) I! i3 A$ L8 D
[root@localhost runcore]# packstack --gen-answer-file=answer.txt , U# c4 j" X/ ]5 ^
[root@localhost runcore]# packstack --answer-file=answer.txt
# F) c- K0 }* ^) b& OWelcome to the Packstack setup utility( J4 l1 c" w" V4 k- X. F3 l4 W1 L5 }
# v6 l* S' u9 j- r0 F: M. xThe installation log file is available at: /var/tmp/packstack/20161230-102423-2sGXEN/openstack-setup.log8 V5 Y( b8 }9 ]2 V$ O
0 ~' _6 v7 o- qInstalling:
" }% z5 {# o) x4 N5 f& D2 `Clean Up [ DONE ]2 j0 d* |0 g! t
Discovering ip protocol version [ DONE ]
2 I5 q, R; V, k P0 t0 b5 U! Q: XSetting up ssh keys [ DONE ], [) m9 i- n {5 _3 c$ p
Preparing servers [ DONE ]- @, X& w4 K$ g# i! _2 B( L; }
Pre installing Puppet and discovering hosts' details[ ERROR ]! W( W+ V- I) x5 X; l: {' U# f& W( ?
& V% \8 [& @/ M: [: x$ k& `
ERROR : Failed to run remote script, stdout: Loaded plugins: fastestmirror, langpacks
2 q, U2 \( ~& i' B3 TCould not retrieve mirrorlist http://mirrorlist.centos.org/?re ... =os&infra=stock error was
. ]; ~. L- [8 Z6 E; M9 h' b8 G7 b12: Timeout on http://mirrorlist.centos.org/?re ... os&infra=stock: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
3 {6 a: N& k% v P' q! O' S9 P
: u9 C# h, U( U6 Sstderr: Warning: Permanently added '192.168.0.163' (ECDSA) to the list of known hosts. m3 J) C+ V5 k
+ trap t ERR
' s, H: h) d. X5 x+ yum install -y puppet hiera openssh-clients tar nc rubygem-json
% Y$ `8 i* N- f7 L* h4 p7 z* |( }
$ S6 G1 n6 h G# S# F w' t& X# z& F
One of the configured repositories failed (Unknown),
9 C- k" K$ h' O4 H5 W9 h) c2 C and yum doesn't have enough cached data to continue. At this point the only. P; k {) J" N3 d
safe thing yum can do is fail. There are a few ways to work "fix" this:! F8 v2 _3 N, X. G x( x
4 s: n! N6 C6 ^3 M 1. Contact the upstream for the repository and get them to fix the problem.
0 m; M3 z; E, J0 K; l( T" `4 F3 [
. V O% O6 U n 2. Reconfigure the baseurl/etc. for the repository, to point to a working
6 t, U9 L) D) o4 ~4 F9 d/ g. p upstream. This is most often useful if you are using a newer1 |6 S+ V# i- N8 S4 \& n7 J( L5 z9 q
distribution release than is supported by the repository (and the% m8 w/ }6 V0 v4 c1 o( R! F
packages for the previous distribution release still work).$ u5 T( C& J' c' d0 v
: _# d" i! Z& T7 f, e4 Y# U5 m
3. Run the command with the repository temporarily disabled+ p3 _/ A$ j* T) O5 f3 K
yum --disablerepo=<repoid> ... d) a$ r: i3 M
& x, i V1 o/ k# ]$ \0 V
4. Disable the repository permanently, so yum won't use it by default. Yum- `- Q% h- b0 q0 R1 I5 @/ n
will then just ignore the repository until you permanently enable it
2 P9 ? n# @2 q3 P0 d5 ? again or use --enablerepo for temporary usage:4 C6 |1 v$ h! d. |
% T8 k3 u! R4 @
yum-config-manager --disable <repoid>1 A2 D8 ?( Y/ I+ l8 d; O: A+ t
or
, g% u% h+ ~ y subscription-manager repos --disable=<repoid>" D! s9 |4 \& S$ N3 I6 g0 y, ^
% i: m. z E. _% j
5. Configure the failing repository to be skipped, if it is unavailable.7 T5 X- M, N- j1 `
Note that yum will try to contact the repo. when it runs most commands,3 N C( k6 v3 ]# O5 `( e( z* \" {
so will have to try and fail each time (and thus. yum will be be much# i/ y" R" o# o/ ~
slower). If it is a very temporary problem though, this is often a nice% H) ? c$ q+ G$ A: {
compromise:# f& v4 O/ g2 A# B* o2 l: A
v3 `/ D$ c4 Q: E6 X. x
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true2 V3 @ T5 ?; g' Y& Z4 p
+ t: j0 s+ P" l# yCannot find a valid baseurl for repo: base/7/x86_64
! J* ~' ?0 {9 W: h++ t
+ ?3 ~4 o% F1 o( m++ exit 1( o7 y4 T" M7 z# Z- V5 X' i' ?
- e; r6 @$ v/ `
Please check log file /var/tmp/packstack/20161230-102423-2sGXEN/openstack-setup.log for more information
, o" T4 P# X, GAdditional information:
1 F5 z; X$ i# ~! l; ?, Y' q2 o * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.4 J$ L7 L" K& s. D1 f Z% C, z
######------------------------------------------------############----------------------------------------------
8 h& E2 ^7 R* x) J8 Q& Z* ? F; B##注释:使用应答文件安装,出现上述错误。先是修改了hostname和hosts文件,然后运行,还是错误。第二步按照错误的提示内容执行yum install -y puppet hiera openssh-clients tar nc rubygem-json。再运行应答文件即通过了!
0 S9 W# `3 ~, c& {4 o8 V: G
8 y9 D0 b4 ^: n6 W2 M[root@localhost runcore]# vi /etc/hostname 3 z8 g, W. z1 k# `$ L6 w. Q( h
[root@localhost runcore]# vi /etc/hosts
7 }) Y( i+ o6 G {7 w[root@localhost runcore]# packstack --answer-file=answer.txt
, H& D2 Y- M7 J/ h/ Z[root@localhost runcore]# yum install -y puppet hiera openssh-clients tar nc rubygem-json( a- Q+ G% U% k
已加载插件:fastestmirror, langpacks
4 {# q1 v# r6 B1 Jbase | 3.6 kB 00:00:00 2 z( D" p& n& ~ m% s1 @5 y1 b! _
centos-ceph-jewel | 2.9 kB 00:00:00 - m6 `5 m% U- O3 T; ` }; A
centos-openstack-newton | 2.9 kB 00:00:00 + k' S2 T' K) d
centos-qemu-ev | 2.9 kB 00:00:00
+ E8 x( |% L8 ]& R$ |# f! bextras | 3.4 kB 00:00:00 ' e+ v* o6 \9 N J
updates | 3.4 kB 00:00:00
1 \- u6 T% r, b! Q4 }, m(1/7): centos-qemu-ev/7/x86_64/primary_db | 47 kB 00:00:01 4 u1 D- y1 w! R9 G7 J8 p
(2/7): base/7/x86_64/group_gz | 155 kB 00:00:01 + @' i1 U% H9 ?% }2 v/ g
(3/7): centos-ceph-jewel/7/x86_64/primary_db | 41 kB 00:00:02
$ }* Q7 X& B5 C/ N; w(4/7): extras/7/x86_64/primary_db | 183 kB 00:00:00
# S& U3 [/ e- b; ~(5/7): updates/7/x86_64/primary_db | 1.2 MB 00:00:06
- ?( e' \. m4 P& K" }' b0 {(6/7): centos-openstack-newton/x86_64/primary_db | 671 kB 00:00:27
5 e0 `$ e& t: h$ n(7/7): base/7/x86_64/primary_db | 5.6 MB 00:00:39
! k( [9 i8 j# N' ~, [5 ]Loading mirror speeds from cached hostfile' }6 j, d1 K- V: h
* base: mirrors.yun-idc.com' W b# P. E4 Y
* extras: mirrors.yun-idc.com
! I6 n% A% p% j' q W) |1 L * updates: mirrors.163.com) R; b8 Q1 ~7 v3 u' h8 z" M
软件包 puppet-3.8.7-2.el7.noarch 已安装并且是最新版本; f# Z8 E8 C( W* M2 K1 F$ N
软件包 1:hiera-1.3.4-5.el7.noarch 已安装并且是最新版本2 m; U" ~6 j1 ]3 t* X/ @$ B) Q5 Q
软件包 openssh-clients-6.6.1p1-31.el7.x86_64 已安装并且是最新版本2 I- q2 a) Q( e/ ~4 d
软件包 2:tar-1.26-31.el7.x86_64 已安装并且是最新版本; R8 A8 C3 {+ s7 p. j
软件包 2:nmap-ncat-6.40-7.el7.x86_64 已安装并且是最新版本: F ^5 E% |/ @5 w; v* b8 _
软件包 rubygem-json-1.7.7-29.el7.x86_64 已安装并且是最新版本! F; V4 f {6 X7 \9 Y1 o
无须任何处理
, C" Y. x) R& w/ n[root@localhost runcore]# packstack --answer-file=answer.txt# _) C. N' O# n* K& N0 d4 I3 _) E& ^
: U+ W/ T9 Q9 H1 t& E#查看账户密码' c, `- w2 B2 [+ }; f6 y3 k
cat /etc/nagios/keystonerc_admin 0 z4 c. T# y5 O" l+ t. O6 g5 v- \% d
* @+ W$ @! G1 ]& c; u* d7 j( y, y
安装KVM
( l$ m$ p: @, L, x#1安装kvm
, N, F+ m0 I* k, c0 i5 D& zyum -y install qemu-kvm libvirt virt-install bridge-utils
5 P5 c( o5 C+ |- e; P4 f#2查看是否安装
& O" ?5 q9 N1 f4 F; \8 w* h1 ulsmod | grep kvm, y2 j! ^1 j5 N. ^, W7 k
#3! V; O6 |2 E0 Z( e
systemctl start libvirtd
, C! O$ _4 u0 U3 R i Hsystemctl enable libvirtd0 i8 h+ R1 j) g8 U' M2 Z0 x
#( [' w1 a3 N$ a5 T! K
安装virt-manager
- V" X( X9 Z9 Q) ?/ oyum install virt-manager ! |$ m8 [$ y r4 M+ |# s
|