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

openstack 单节点快速安装部署

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2017-9-21 13:35:51 | 显示全部楼层 |阅读模式
安装openstack
0 H6 n8 }+ N: fyum install -y centos-release-openstack-newton3 K9 E) r5 v/ s9 S$ |' w
yum update -y# @' l% y' I( K0 {7 {7 ~! W% x
yum install -y openstack-packstack  m, v# E$ B& p: X( {4 Z" z" D6 n2 i& j
packstack --gen-answer-file=answer.txt
, n8 e5 Y8 `' u& _+ r+ D# t #vim answer.txt        可以编辑配置文件(对云计算构架的项目选择修改密码)  也可以不修改
' ?# `2 J& }3 q0 F2 L& L5 e5 j        CONFIG_NTP_SERVERS=192.168.0.254  ! U5 V4 S0 }5 \
        CONFIG_KEYSTONE_ADMIN_PW=xxbandy   R( t, Z& H+ F6 |. M
; a' a: y* {1 c+ d- Z
packstack --answer-file=answer.txt$ ~8 N, R" c6 I, J& B2 X; E7 p
安装过程,有可能因为源的原因中断,你可以重复运行上一句。! g' F/ K3 L0 i8 I' _/ v
) c6 H& c5 j/ e( s! F3 C
[root@localhost runcore]# packstack --gen-answer-file=answer.txt - \1 @/ E. u6 N* v/ [
[root@localhost runcore]# packstack --answer-file=answer.txt/ i9 D5 Q/ D" R- A3 v0 Q) B
Welcome to the Packstack setup utility
* q" n! Y2 U7 S6 f# A
0 `$ J# Q4 G1 @; ?$ ?6 ]# \2 s. XThe installation log file is available at: /var/tmp/packstack/20161230-102423-2sGXEN/openstack-setup.log
) n$ h3 `2 X' @& W& h/ p
* b" w. r3 \5 uInstalling:
& p% q. c" F7 H% NClean Up                                             [ DONE ]
0 G- `+ o/ u( R  {& V7 H& pDiscovering ip protocol version                      [ DONE ]1 t8 K& W* U1 D1 C, X0 |* l/ J8 S% \
Setting up ssh keys                                  [ DONE ]
5 I" O4 x1 L& X, y9 w" o8 l) |Preparing servers                                    [ DONE ]  B# [" y% h  Y! Z; j
Pre installing Puppet and discovering hosts' details[ ERROR ], h3 F" V) w9 y5 e& v8 V0 O6 _- r
/ u' R5 p& e0 W% ?/ }4 Z; G2 h5 P) r
ERROR : Failed to run remote script, stdout: Loaded plugins: fastestmirror, langpacks& X) |/ Q5 r3 \* C; t4 t
Could not retrieve mirrorlist http://mirrorlist.centos.org/?re ... =os&infra=stock error was$ X" W4 `4 N' n( Y) d5 z7 v( G
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')
1 @0 x% P9 l$ M, G( i2 m1 S( E3 A  Z
stderr: Warning: Permanently added '192.168.0.163' (ECDSA) to the list of known hosts.
2 `1 ?$ D( ]& N' m2 A2 {' b. U+ trap t ERR0 G( r" u7 J; }
+ yum install -y puppet hiera openssh-clients tar nc rubygem-json' V+ S) Z8 U. i) r( z# q

4 R' S# A4 G( @( e& w! u4 s1 E2 M# _: N
! Z8 }; ]5 l$ q4 A! }" W One of the configured repositories failed (Unknown),
* T$ b$ o% h( s; B% R* k" U and yum doesn't have enough cached data to continue. At this point the only
, e- s  f0 G' U0 Y safe thing yum can do is fail. There are a few ways to work "fix" this:
) L5 x$ @- L6 k3 f
9 c) J8 ^# @/ N     1. Contact the upstream for the repository and get them to fix the problem.
3 L" T3 ~& |7 C2 b, z. j. G7 p. K# I3 U, ]7 O' E
     2. Reconfigure the baseurl/etc. for the repository, to point to a working
  I8 M5 }; x1 J7 H# T        upstream. This is most often useful if you are using a newer# n0 t# P7 X9 c; q8 N( M8 D
        distribution release than is supported by the repository (and the
, u8 {3 |# t4 m9 _# Z1 J& ?4 Q        packages for the previous distribution release still work).
' g& Z: U% r  q  t$ q( u- T% l/ d, B) _" Z/ R; B+ w9 S3 @' [, f1 Z
     3. Run the command with the repository temporarily disabled" G8 U/ T0 ~% e& J
            yum --disablerepo=<repoid> ...& z  V; `' {9 h+ J

3 B# q8 Y  ?8 S# u     4. Disable the repository permanently, so yum won't use it by default. Yum
' B- K3 S/ A+ \) B4 L1 u        will then just ignore the repository until you permanently enable it
. J" {/ g6 \  i* i& a, V  h        again or use --enablerepo for temporary usage:. h/ V; f! f; t( E) k
0 r7 T( \/ v: G. `9 R7 a/ u7 ~
            yum-config-manager --disable <repoid>8 Y' {; U% ~! U9 q: ?
        or
1 \. W7 H4 j, [8 V' J+ F            subscription-manager repos --disable=<repoid>- B0 ^) q' m, p. W0 ^' w, s4 Y1 ~
0 ^1 i0 ]& p7 [3 k
     5. Configure the failing repository to be skipped, if it is unavailable.& h* h1 x! v5 o
        Note that yum will try to contact the repo. when it runs most commands,/ x6 F3 ~& X0 }' ]! g9 Q; k; `
        so will have to try and fail each time (and thus. yum will be be much# d6 d$ v3 ^1 X0 V7 K  m! `1 k+ b$ H
        slower). If it is a very temporary problem though, this is often a nice& z" A2 S0 h7 z
        compromise:+ l& I3 {; b, A# W0 I

6 d, c: _( I4 c% b8 D+ A            yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true5 I9 p2 ]1 x- d7 W6 @
# _# t+ ]  v2 W/ c6 p4 e
Cannot find a valid baseurl for repo: base/7/x86_64
5 N/ _! p  v  G) ]3 J0 V++ t
8 k1 K. j; K% a0 c; O$ P9 H++ exit 1
7 g  x( K8 b1 y3 V4 F0 q1 i) s) P. ^8 J2 [7 _
Please check log file /var/tmp/packstack/20161230-102423-2sGXEN/openstack-setup.log for more information
9 H' |" C, W5 K; h, i; u4 tAdditional information:! @8 e1 S, L1 }' d' a% @
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.# X6 `' @$ P: r  e5 M; ?
######------------------------------------------------############----------------------------------------------0 P7 O' e1 {, b& h
##注释:使用应答文件安装,出现上述错误。先是修改了hostname和hosts文件,然后运行,还是错误。第二步按照错误的提示内容执行yum install -y puppet hiera openssh-clients tar nc rubygem-json。再运行应答文件即通过了!+ q" Q2 j5 E% M! r" f4 n# d( o

% s# j& ^! a3 e! |7 ]# t[root@localhost runcore]# vi /etc/hostname , g8 u% u  p7 e" Z$ h0 j% {
[root@localhost runcore]# vi /etc/hosts7 k9 V1 ?5 q* ]
[root@localhost runcore]# packstack --answer-file=answer.txt
; t. ?- |* _  U" T& k[root@localhost runcore]# yum install -y puppet hiera openssh-clients tar nc rubygem-json$ N% R3 V) k0 s& p" e
已加载插件:fastestmirror, langpacks# B7 V' @0 t  G! a2 M5 P$ C& o
base                                                                   | 3.6 kB  00:00:00     
' h7 M7 w: `$ m* gcentos-ceph-jewel                                                      | 2.9 kB  00:00:00     : |; B3 I0 w  E' t
centos-openstack-newton                                                | 2.9 kB  00:00:00     0 `9 ?2 w  L8 @0 c5 {* d
centos-qemu-ev                                                         | 2.9 kB  00:00:00     
. l4 E& ?# C2 [) ~/ s2 }extras                                                                 | 3.4 kB  00:00:00     
+ ?: N, D* U, O" r! |. Dupdates                                                                | 3.4 kB  00:00:00     + y4 y1 }7 {% e$ y
(1/7): centos-qemu-ev/7/x86_64/primary_db                              |  47 kB  00:00:01     + A1 X/ L- r( {( _' k! s  q+ i
(2/7): base/7/x86_64/group_gz                                          | 155 kB  00:00:01     
) j" M# \  D0 b7 w2 p(3/7): centos-ceph-jewel/7/x86_64/primary_db                           |  41 kB  00:00:02     
6 u( Y: @1 l' _" E. B$ Z: ?+ @(4/7): extras/7/x86_64/primary_db                                      | 183 kB  00:00:00     - l) [" T1 P0 f) h
(5/7): updates/7/x86_64/primary_db                                     | 1.2 MB  00:00:06     , w8 I9 X& _" G4 d
(6/7): centos-openstack-newton/x86_64/primary_db                       | 671 kB  00:00:27     
, [& l$ ^; U8 d8 c(7/7): base/7/x86_64/primary_db                                        | 5.6 MB  00:00:39     
4 i5 ~( `* f+ ?- C; ^' M, H6 \3 RLoading mirror speeds from cached hostfile& U/ l$ W( E3 Z* x+ e
* base: mirrors.yun-idc.com
) @7 n+ P7 C0 ~; i* B  | * extras: mirrors.yun-idc.com) Z+ F& y4 o% e0 x
* updates: mirrors.163.com
' F% p% ?) R5 S! E# e; k) \软件包 puppet-3.8.7-2.el7.noarch 已安装并且是最新版本
5 @) s4 j3 o3 E8 D0 g4 i软件包 1:hiera-1.3.4-5.el7.noarch 已安装并且是最新版本
1 M3 `( N: @: M+ R软件包 openssh-clients-6.6.1p1-31.el7.x86_64 已安装并且是最新版本
' B0 Y. H/ D: k$ E7 r  `软件包 2:tar-1.26-31.el7.x86_64 已安装并且是最新版本0 @' m4 f4 I, N* ]4 j
软件包 2:nmap-ncat-6.40-7.el7.x86_64 已安装并且是最新版本
" v4 ^: _( H& D9 b" s软件包 rubygem-json-1.7.7-29.el7.x86_64 已安装并且是最新版本
$ J' {6 J7 b, _5 n9 W" Z9 X# e" I无须任何处理
/ n8 W2 Y( b' l$ z) p[root@localhost runcore]# packstack --answer-file=answer.txt
3 F6 i- ~3 ^3 R, D7 f
" Y) O, E9 V9 Y/ G#查看账户密码
7 [9 y# P# n: K8 Z- T) gcat /etc/nagios/keystonerc_admin ' [( c- g& @( _. |; C
9 \3 a  R  G& i$ b

安装KVM
' r+ N4 |  u, m0 ]7 y  R2 n5 y#1安装kvm
/ l! \) T( j! C# m2 Myum -y install qemu-kvm libvirt virt-install bridge-utils3 @' x& X& q/ N' v, ~( D
#2查看是否安装* q8 s, U0 N1 o$ E, r+ Z; A
lsmod | grep kvm
1 @8 L8 \( @6 g- t9 g# K#3' N0 U3 K8 p( q* x1 F+ R
systemctl start libvirtd- m7 o8 {( j8 E$ y: C
systemctl enable libvirtd
' O" @: J/ F# _  t#
/ f3 Q; y. x* F$ p安装virt-manager% n" q$ J8 f$ k! G
yum install virt-manager


& C, p! u( x! R& c* t+ L3 E
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 02:21 , Processed in 0.018380 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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