eucalyptus 云平台搭建

1.1.    Eucalyptus 安装配置

1.1.1.   Eucalyptus安装先决条件

1.1.1.   配置服务器CPU VT选项

在EucalyptusCloud所需的物理服务器的选择上必须支持VT技术,在安装配置Eucalyptus之前,在Bios中开启该功能选项。

1.1.2.   配置Network Bridge

  安装bridge

yum install bridge-utils

  修改ifcfg-eth*配置文件

DEVICE=eth0

# change the hardware address to match the hardwareaddress your NIC uses

HWADDR=00:16:76:D6:C9:45

ONBOOT=yes

BRIDGE=br0

NM_CONTROLLED=no

  编辑ifcfg-br0配置文件

如果网络环境配置的为DHCP模式,则ifcfg-br0的配置文件如下:

DEVICE=br0

TYPE=Bridge

BOOTPROTO=dhcp

ONBOOT=yes

DELAY=0

 

如果网络环境配置为Static模式,则ifcfg-br0的配置文件如下:

DEVICE=br0

TYPE=Bridge

BOOTPROTO=static

IPADDR=<static_IP_address>

NETMASK=<netmask>

GATEWAY=<gateway>

ONBOOT=yes

  网络重启

service network restart

1.1.3.   配置NTP

  yum install ntp

  配置/etc/ntp.conf配置文件,添加如下内容

server 0.pool.ntp.org

server 1.pool.ntp.org

server 2.pool.ntp.org

  配置ntp为开机启动状态

chkconfig ntpd on

  启动ntp服务

service ntpd start

  同步ntp time

ntpdate -u 0.pool.ntp.org

  同步系统时间

hwclock --systohc

1.1.4.   配置Firewall

  #system-config-firewall-tui

  disable firewall

1.1.5.   配置SElinux

  vi/etc/selinux/config

设置SELINUX=enforcingSELINUX=permissive

  # setenforce 0

1.1.2.   安装Eucalyptus

1.1.2.1.   安装Eucalyptus yum资源包

  yum installhttp://downloads.eucalyptus.com/software/eucalyptus/3.2/centos/6/x86_64/eucalyptus-release-3.2.noarch.rpm

 

  yum installhttp://downloads.eucalyptus.com/software/euca2ools/2.1/centos/6/x86_64/euca2ools-release-2.1.noarch.rpm

 

  yum installhttp://downloads.eucalyptus.com/software/eucalyptus/3.2/centos/6/x86_64/epel-release-6.noarch.rpm

 

  yum installhttp://downloads.eucalyptus.com/software/eucalyptus/3.2/centos/6/x86_64/elrepo-release-6.noarch.rpm

 

1.1.2.2.   安装Eucalyptus NC节点

  #yum installeucalyptus-nc

  #ls -l /dev/kvm

  crw-rw-rw- 1 root kvm 10, 232 Nov 30 10:27/dev/kvm //输出结果

 

1.1.2.3.   安装Eucalyptus CLC、SC、CC、Walrus节点
 yum groupinstall eucalyptus-cloud-controller
yum install eucalyptus-cc eucalyptus-sc eucalyptus-walrus

1.1.3.   配置Eucalyptus组件

1.1.3.1.   配置CC及SC

在本次安装配置实例中,以网络模式STATIC为基础,所以CC的配置文件/etc/eucalyptus/eucalyptus.conf做如下修改,主要修改参数为:

 

CREATE_SC_LOOP_DEVICES(SC配置要求)
VNET_MODE
VNET_PRIVINTERFACE
VNET_BRIDGE
VNET_MACMAP
VNET_SUBNET
VNET_NETMASK
VNET_DNS
VNET_BROADCAST
VNET_ROUTER
VNET_DHCPDAEMON

 

###########################################################################
# GLOBAL CONFIGURATION
###########################################################################
 
# Where Eucalyptus is installed
EUCALYPTUS="/"
 
# This is the username that you would like eucalyptus to run as
EUCA_USER="eucalyptus"
 
# Extra options to pass to the eucalyptus-cloud process, such as log
# levels, heap size, or other JVM flags.
CLOUD_OPTS=""
 
###########################################################################
# STORAGE CONTROLLER (SC) CONFIGURATION
###########################################################################
 
# The number of loop devices to make available at SC startup time.
# The default is 256.  If you supply "max_loop" to the loop driver
# then this setting must be equal to that number.
CREATE_SC_LOOP_DEVICES=256
 
###########################################################################
# CLUSTER CONTROLLER (CC) / NODE CONTROLLER (NC) SHARED CONFIGURATION
###########################################################################
 
# The level of logging output.  Valid settings are, in descending order of
# verbosity: EXTREME, TRACE, DEBUG, INFO, WARN, ERROR, and FATAL.  The
# default is INFO.
#LOGLEVEL="INFO"
 
# The number of old log files to keep when rotating logs, in range [0-999].
# The default is 10. When set to 0, no rotation is performed and log size
# limit is (LOGMAXSIZE, below) is not enforced.
#LOGROLLNUMBER="10"
 
# The maximum size of the log file, in bytes. 100MB by default. For this
# size to be enforced, LOGROLLNUMBER, above, must be 1 or higher. If log
# rotation is performed by an outside tool, either set LOGROLLNUMBER to 0
# or set this limit to a large value.
#LOGMAXSIZE=104857600
 
# On a NC, this defines the TCP port on which the NC will listen.
# On a CC, this defines the TCP port on which the CC will contact NCs.
NC_PORT="8775"
 
###########################################################################
# CLUSTER CONTROLLER (CC) CONFIGURATION
###########################################################################
 
# The TCP port on which the CC will listen.
CC_PORT="8774"
CC_ARBITRATORS="10.10.200.199"
# The scheduling policy that the CC uses to choose the NC on which to
# run each new instance.  Valid settings include GREEDY and ROUNDROBIN.
# The default scheduling policy is ROUNDROBIN.
SCHEDPOLICY="ROUNDROBIN"
 
# A space-separated list of IP addresses for all the NCs that this CC
# should communicate with.  The ``euca_conf --register-nodes'' command
# manipulates this setting.
NODES="10.10.200.198"
 
# When multiple CCs reside in the same layer 2 broadcast domain, change
# this setting to "Y" to disable tunneling.  This setting has no effect
# in Static or System modes.
#DISABLE_TUNNELING="N"
 
# The location of the NC service.  The default is
# axis2/services/EucalyptusNC
NC_SERVICE="axis2/services/EucalyptusNC"
 
# Set this to make the CC cache images, kernels and ramdisks.  NCs must
# be able to reach the CC with the specified value.
#CC_IMAGE_PROXY="ip_of_cc"
 
# Set this to the location where the CC image proxy should store cached
# images.  The default is /var/lib/eucalyptus/dynserv/
#CC_IMAGE_PROXY_PATH="/var/lib/eucalyptus/dynserv/"
 
# Set this to the maximum size (in megabytes) of the CC image proxy cache.
# The default is 32768, or 32 gigabytes.
#CC_IMAGE_PROXY_CACHE_SIZE="32768"
 
###########################################################################
# NODE CONTROLLER (NC) CONFIGURATION
###########################################################################
 
# The hypervisor that the NC will interact with in order to manage
# virtual machines.  Supported values include "kvm" and "xen".
HYPERVISOR="kvm"
 
# The following three options determine whether KVM uses Virtio for
# specific types of I/O with instances.  These options only affect the
# KVM hypervisor.
 
# If "1", use Virtio for the root file system
USE_VIRTIO_ROOT="1"
 
# If "1", use Virtio for dynamic block volumes
USE_VIRTIO_DISK="1"
 
# If "1", use Virtio for the network card
USE_VIRTIO_NET="0"
 
# The amount of memory, in megabytes, that Eucalyptus is allowed to
# allocate to instances running on this system.  The default value of
# 0 allows Eucalyptus to use all available memory for instances.
#MAX_MEM="0"
 
# The number of virtual CPU cores that Eucalyptus is allowed to allocate
# to instances.  The default value of 0 allows Eucalyptus to use all
# CPU cores on the system.
#MAX_CORES="0"
 
# The amount of disk space, in megabytes, that the NC is allowed to use
# in its work directory ($INSTANCE_PATH/eucalyptus/work).  By default
# the NC chooses automatically.  Values below 10 are ignored.
#NC_WORK_SIZE=50000
 
# The amount of disk space, in megabytes, that the NC is allowed to use in
# its image cache directory ($INSTANCE_PATH/eucalyptus/cache).  By default
# the NC chooses automatically.  A value below 10 will disable caching.
#NC_CACHE_SIZE=50000
 
# The number of disk-intensive operations that the NC is allowed to
# perform at once.  A value of 1 serializes all disk-intensive operations.
# The default value is 4.
#CONCURRENT_DISK_OPS=4
 
# By default, a NC attempts to write the SSH public key associated to
# the instance's filesystem before the instance starts.  A value of 1
# disables this behavior.
#DISABLE_KEY_INJECTION="0"
 
# The number of loop devices to make available at NC startup time.
# The default is 256.  If you supply "max_loop" to the loop driver then
# this setting must be equal to that number.
#CREATE_NC_LOOP_DEVICES=256
 
# The directory where the NC will store instances' root filesystems,
# ephemeral storage, and cached copies of images.
INSTANCE_PATH="/var/lib/eucalyptus/instances"
 
# If euca-bundle-upload, euca-check-bucket, or euca-delete-bundle do
# not appear in the NC's search PATH then specify their locations here.
#NC_BUNDLE_UPLOAD_PATH="/usr/bin/euca-bundle-upload"
#NC_CHECK_BUCKET_PATH="/usr/bin/euca-check-bucket"
#NC_DELETE_BUNDLE_PATH="/usr/bin/euca-delete-bundle"
 
###########################################################################
# NETWORKING CONFIGURATION
#
# The set of networking settings that apply to a cloud varies based on
# its networking mode.  Each setting in this section lists the modes in
# which it applies.  Unless otherwise noted, all of these settings apply
# only to CCs.  All settings that lack default values must be specified
# in the networking modes that use them.
###########################################################################
 
# The networking mode in which to run.  The same mode must be specified
# on all CCs and NCs in the entire cloud.  Valid values include SYSTEM,
# STATIC, MANAGED, and MANAGED-NOVLAN.
VNET_MODE="STATIC"
 
# The name of the network interface that is on the same network as
# the NCs.  In Managed and Managed (No VLAN) modes this may need to be
# a bridge.  The default is "eth0".
# Networking modes: Static, Managed, Managed (No VLAN)
VNET_PRIVINTERFACE="em1"
 
# On a CC, this is the name of the network interface that is connected
# to the "public" network.  The default is "eth0".
# Networking modes: Managed, Managed (No VLAN)
#
# On an NC, this is the name of the network interface that is connected
# to the same network as the CC.  Depending on the hypervisor's
# configuration, this may be a bridge or a physical interface that is
# attached to the bridge.  The default is "eth0".
# Networking modes: Managed
# VNET_PUBINTERFACE="eth0"
 
# On an NC, this is the name of the bridge interface to which instances'
# network interfaces should attach.  A physical interface that can reach
# the CC must be attached to this bridge.
# Networking modes: System, Static, Managed (No VLAN)
VNET_BRIDGE="br0"
 
# A map of MAC addresses to IP addresses that Eucalyptus should allocate
# to instances when running in Static mode.  Separate MAC addresses and
# IP addresses with '=' characters.  Separate pairs with spaces.
# Networking modes: Static
VNET_MACMAP="AA:DD:44:CE:FF:ED=10.10.200.235 AA:DD:45:CE:FF:ED=10.10.200.236  AA:DD:46:CE:FF:EE=10.10.200.237 AA:DD:47:CE:FF:ED=10.10.200.238"
 
# A space-separated list of individual and/or hyphenated ranges of public
# IP addresses to assign to instances.
# Networking modes: Managed, Managed (No VLAN)
#VNET_PUBLICIPS="your-free-public-ip-1 your-free-public-ip-2 ..."
 
# The address and network mask of the network the cloud should use for
# instances' private IP addresses.
# Networking modes: Static, Managed, Managed (No VLAN)
VNET_SUBNET="10.10.200.0"
VNET_NETMASK="255.255.255.0"
 
# The number of IP addresses to allocate to each security group.
# Specify a power of 2 between 16 and 2048.
# Networking modes: Managed, Managed (No VLAN)
#VNET_ADDRSPERNET="32"
 
# The address of the DNS server to supply to instances in DHCP responses.
# Networking modes: Static, Managed, Managed (No VLAN)
VNET_DNS="10.10.200.199"
 
# The network broadcast address and default gateway to supply to instances
# in DHCP responses.
# Networking modes: Static
VNET_BROADCAST="10.10.200.255"
VNET_ROUTER="10.10.200.254"
 
# Set this to the IP address that other CCs can use to reach this CC
# if layer 2 tunneling between CCs does not work.  It is not normally
# necessary to change this setting.
# Networking modes: Managed, Managed (No VLAN)
#VNET_LOCALIP="your-public-interface's-ip"
 
# The ISC DHCP server executable to use.  The default is
# "/usr/sbin/dhcpd3".
# Networking modes: Static, Managed, Managed (No VLAN)
VNET_DHCPDAEMON="/usr/sbin/dhcpd41"
 
# The user as which the DHCP daemon runs on your distribution.
# The default is "dhcpd".
# Networking modes: Static, Managed, Managed (No VLAN)
#VNET_DHCPUSER="dhcpd"
1.1.3.2.   配置NC

在NC节点上,对/etc/eucalyptus/eucalyptus.conf做如下修改,主要参数如下:

 

CREATE_NC_LOOP_DEVICES
VNET_MODE
VNET_PRIVINTERFACE
VNET_BRIDGE
VNET_DHCPDAEMON
 
###########################################################################
# GLOBAL CONFIGURATION
###########################################################################
 
# Where Eucalyptus is installed
EUCALYPTUS="/"
 
# This is the username that you would like eucalyptus to run as
EUCA_USER="eucalyptus"
 
# Extra options to pass to the eucalyptus-cloud process, such as log
# levels, heap size, or other JVM flags.
CLOUD_OPTS=""
 
###########################################################################
# STORAGE CONTROLLER (SC) CONFIGURATION
###########################################################################
 
# The number of loop devices to make available at SC startup time.
# The default is 256.  If you supply "max_loop" to the loop driver
# then this setting must be equal to that number.
#CREATE_SC_LOOP_DEVICES=256
 
###########################################################################
# CLUSTER CONTROLLER (CC) / NODE CONTROLLER (NC) SHARED CONFIGURATION
###########################################################################
 
# The level of logging output.  Valid settings are, in descending order of
# verbosity: EXTREME, TRACE, DEBUG, INFO, WARN, ERROR, and FATAL.  The
# default is INFO.
#LOGLEVEL="INFO"
 
# The number of old log files to keep when rotating logs, in range [0-999].
# The default is 10. When set to 0, no rotation is performed and log size
# limit is (LOGMAXSIZE, below) is not enforced.
#LOGROLLNUMBER="10"
 
# The maximum size of the log file, in bytes. 100MB by default. For this
# size to be enforced, LOGROLLNUMBER, above, must be 1 or higher. If log
# rotation is performed by an outside tool, either set LOGROLLNUMBER to 0
# or set this limit to a large value.
#LOGMAXSIZE=104857600
 
# On a NC, this defines the TCP port on which the NC will listen.
# On a CC, this defines the TCP port on which the CC will contact NCs.
NC_PORT="8775"
 
###########################################################################
# CLUSTER CONTROLLER (CC) CONFIGURATION
###########################################################################
 
# The TCP port on which the CC will listen.
CC_PORT="8774"
 
# The scheduling policy that the CC uses to choose the NC on which to
# run each new instance.  Valid settings include GREEDY and ROUNDROBIN.
# The default scheduling policy is ROUNDROBIN.
SCHEDPOLICY="ROUNDROBIN"
 
# A space-separated list of IP addresses for all the NCs that this CC
# should communicate with.  The ``euca_conf --register-nodes'' command
# manipulates this setting.
NODES=""
 
# When multiple CCs reside in the same layer 2 broadcast domain, change
# this setting to "Y" to disable tunneling.  This setting has no effect
# in Static or System modes.
#DISABLE_TUNNELING="N"
 
# The location of the NC service.  The default is
# axis2/services/EucalyptusNC
NC_SERVICE="axis2/services/EucalyptusNC"
 
# Set this to make the CC cache images, kernels and ramdisks.  NCs must
# be able to reach the CC with the specified value.
#CC_IMAGE_PROXY="ip_of_cc"
 
# Set this to the location where the CC image proxy should store cached
# images.  The default is /var/lib/eucalyptus/dynserv/
#CC_IMAGE_PROXY_PATH="/var/lib/eucalyptus/dynserv/"
 
# Set this to the maximum size (in megabytes) of the CC image proxy cache.
# The default is 32768, or 32 gigabytes.
#CC_IMAGE_PROXY_CACHE_SIZE="32768"
 
###########################################################################
# NODE CONTROLLER (NC) CONFIGURATION
###########################################################################
 
# The hypervisor that the NC will interact with in order to manage
# virtual machines.  Supported values include "kvm" and "xen".
HYPERVISOR="kvm"
 
# The following three options determine whether KVM uses Virtio for
# specific types of I/O with instances.  These options only affect the
# KVM hypervisor.
 
# If "1", use Virtio for the root file system
USE_VIRTIO_ROOT="1"
 
# If "1", use Virtio for dynamic block volumes
USE_VIRTIO_DISK="1"
 
# If "1", use Virtio for the network card
USE_VIRTIO_NET="0"
 
# The amount of memory, in megabytes, that Eucalyptus is allowed to
# allocate to instances running on this system.  The default value of
# 0 allows Eucalyptus to use all available memory for instances.
#MAX_MEM="0"
 
# The number of virtual CPU cores that Eucalyptus is allowed to allocate
# to instances.  The default value of 0 allows Eucalyptus to use all
# CPU cores on the system.
#MAX_CORES="0"
 
# The amount of disk space, in megabytes, that the NC is allowed to use
# in its work directory ($INSTANCE_PATH/eucalyptus/work).  By default
# the NC chooses automatically.  Values below 10 are ignored.
#NC_WORK_SIZE=50000
 
# The amount of disk space, in megabytes, that the NC is allowed to use in
# its image cache directory ($INSTANCE_PATH/eucalyptus/cache).  By default
# the NC chooses automatically.  A value below 10 will disable caching.
#NC_CACHE_SIZE=50000
 
# The number of disk-intensive operations that the NC is allowed to
# perform at once.  A value of 1 serializes all disk-intensive operations.
# The default value is 4.
#CONCURRENT_DISK_OPS=4
 
# By default, a NC attempts to write the SSH public key associated to
# the instance's filesystem before the instance starts.  A value of 1
# disables this behavior.
#DISABLE_KEY_INJECTION="0"
 
# The number of loop devices to make available at NC startup time.
# The default is 256.  If you supply "max_loop" to the loop driver then
# this setting must be equal to that number.
CREATE_NC_LOOP_DEVICES=256
 
# The directory where the NC will store instances' root filesystems,
# ephemeral storage, and cached copies of images.
INSTANCE_PATH="/var/lib/eucalyptus/instances"
 
# If euca-bundle-upload, euca-check-bucket, or euca-delete-bundle do
# not appear in the NC's search PATH then specify their locations here.
#NC_BUNDLE_UPLOAD_PATH="/usr/bin/euca-bundle-upload"
#NC_CHECK_BUCKET_PATH="/usr/bin/euca-check-bucket"
#NC_DELETE_BUNDLE_PATH="/usr/bin/euca-delete-bundle"
 
###########################################################################
# NETWORKING CONFIGURATION
#
# The set of networking settings that apply to a cloud varies based on
# its networking mode.  Each setting in this section lists the modes in
# which it applies.  Unless otherwise noted, all of these settings apply
# only to CCs.  All settings that lack default values must be specified
# in the networking modes that use them.
###########################################################################
 
# The networking mode in which to run.  The same mode must be specified
# on all CCs and NCs in the entire cloud.  Valid values include SYSTEM,
# STATIC, MANAGED, and MANAGED-NOVLAN.
VNET_MODE="STATIC"
 
# The name of the network interface that is on the same network as
# the NCs.  In Managed and Managed (No VLAN) modes this may need to be
# a bridge.  The default is "eth0".
# Networking modes: Static, Managed, Managed (No VLAN)
VNET_PRIVINTERFACE="em1"
 
# On a CC, this is the name of the network interface that is connected
# to the "public" network.  The default is "eth0".
# Networking modes: Managed, Managed (No VLAN)
#
# On an NC, this is the name of the network interface that is connected
# to the same network as the CC.  Depending on the hypervisor's
# configuration, this may be a bridge or a physical interface that is
# attached to the bridge.  The default is "eth0".
# Networking modes: Managed
# VNET_PUBINTERFACE="eth0"
 
# On an NC, this is the name of the bridge interface to which instances'
# network interfaces should attach.  A physical interface that can reach
# the CC must be attached to this bridge.
# Networking modes: System, Static, Managed (No VLAN)
VNET_BRIDGE="br0"
 
# A map of MAC addresses to IP addresses that Eucalyptus should allocate
# to instances when running in Static mode.  Separate MAC addresses and
# IP addresses with '=' characters.  Separate pairs with spaces.
# Networking modes: Static
#VNET_MACMAP="AA:DD:11:CE:FF:ED=192.168.1.2 AA:DD:11:CE:FF:EE=192.168.1.3"
 
# A space-separated list of individual and/or hyphenated ranges of public
# IP addresses to assign to instances.
# Networking modes: Managed, Managed (No VLAN)
#VNET_PUBLICIPS="your-free-public-ip-1 your-free-public-ip-2 ..."
 
# The address and network mask of the network the cloud should use for
# instances' private IP addresses.
# Networking modes: Static, Managed, Managed (No VLAN)
#VNET_SUBNET="192.168.0.0"
#VNET_NETMASK="255.255.0.0"
 
# The number of IP addresses to allocate to each security group.
# Specify a power of 2 between 16 and 2048.
# Networking modes: Managed, Managed (No VLAN)
#VNET_ADDRSPERNET="32"
 
# The address of the DNS server to supply to instances in DHCP responses.
# Networking modes: Static, Managed, Managed (No VLAN)
#VNET_DNS="your-dns-server-ip"
 
# The network broadcast address and default gateway to supply to instances
# in DHCP responses.
# Networking modes: Static
#VNET_BROADCAST="192.168.1.255"
#VNET_ROUTER="192.168.1.1"
 
# Set this to the IP address that other CCs can use to reach this CC
# if layer 2 tunneling between CCs does not work.  It is not normally
# necessary to change this setting.
# Networking modes: Managed, Managed (No VLAN)
#VNET_LOCALIP="your-public-interface's-ip"
 
# The ISC DHCP server executable to use.  The default is
# "/usr/sbin/dhcpd3".
# Networking modes: Static, Managed, Managed (No VLAN)
VNET_DHCPDAEMON="/usr/sbin/dhcpd41"
 
# The user as which the DHCP daemon runs on your distribution.
# The default is "dhcpd".
# Networking modes: Static, Managed, Managed (No VLAN)
#VNET_DHCPUSER="dhcpd"

1.1.4.   启动EucalyptusCloud

1.1.4.1.   启动Eucalyptus CLC

  初始化CLC

/usr/sbin/euca_conf –initialize

  启动CLC

service eucalyptus-cloud start
1.1.4.2.   启动Walrus
service eucalyptus-cloud start
1.1.4.3.   启动SC
service eucalyptus-cloud start
1.1.4.4.   启动CC
service eucalyptus-cc start
1.1.4.5.   启动NC
service eucalyptus-nc start
1.1.4.6.   启动验证

此时,所有的Eucalyptus组件已启动。在启动时,特别是第一次启动时,这些服务执行了很多的初始化,可能需要等待几分钟,直到这些组件完全运行。要确定是否运行,快速的方法是在不同主机上运行netstat,来查看服务器端口是何时分配给进程的。特别是,CLC,Walrus,和Vmware Broker分配端口8773,CC监听端口8774,以及NC使用端口8775。

验证要是没有错误,说明所有的服务都开启了,预期结果包括:

  CLC监听端口8443和8773

  Walrus监听端口8773

  SC监听端口8773

  若仅使用订阅的Vmware Broker,监听端口8773

  CC监听端口8774

  NC监听端口8775

  日志文件写入:/var/log/eucalyptus/

1.1.5.   注册Eucalyptus组件

1.1.5.1.   注册Walrus

  在CLC服务器,输入下列指令:

/usr/sbin/euca_conf --register-walrus --partition walrus --host

<walrus_IP_address> --component <walrus_name>

Walrus组件的名称为walrus。跟CLC一样,组件的名称是特定组件的唯一名称:推荐的格式为:walrus-<hostname>。

例如:

#/usr/sbin/euca_conf –register-walrus–partition walrus-hgc –host 10.10.200.199 –component walrus-hgc

1.1.5.2.   注册CC

  在CLC上,输入下列指令:

/usr/sbin/euca_conf --register-cluster --partition <partition_name> \

 --host <CC_IP_address> --component <cc_name>

建议您设置partition名称为CC控制的可用空间的描述性名称。例如:cluster01.

component是唯一的名称。建议使用短名称的主机名或机器的IP地址,像cc-<hostname> 或 cc-<IP address>。

例如:

/usr/sbin/euca_conf –register-cluster–partition hgcluster01 –host 10.10.200.199 –component hgc-cc01

1.1.5.3.   注册SC

  在CLC上,输入指令:

/usr/sbin/euca_conf --register-sc --partition <partition_name> --host  <SC_IP_address> --component <SC_name>

在同一集群中,SC必须跟CC有相同的partition名称。像其他组件,component是特殊组件的唯一名称:建议使用格式为:sc-<hostname>

例如:

/usr/sbin/euca_conf –register-sc –partitionhgcluster01 –host 10.10.200.199 –component hgc-sc01

 

在注册SC后,通过euca-describe-services–E查看eucalyptus组件状态时,可以发现SC处于Broken状态。

SERVICE                storage             PARTI00          SC71             BROKEN             37                http://192.168.51.71:8773/services/Storage        arn:euca:eucalyptus:PARTI00:storage:SC71/

SERVICEEVENT    6c1f7a0a-21c9-496c-bb79-23ddd5749222         arn:euca:eucalyptus:PARTI00:storage:SC71/

SERVICEEVENT    6c1f7a0a-21c9-496c-bb79-23ddd5749222         ERROR

SERVICEEVENT    6c1f7a0a-21c9-496c-bb79-23ddd5749222         Sun Nov 18 22:11:13 PST2012SERVICEEVENT               6c1f7a0a-21c9-496c-bb79-23ddd5749222         SC blockstorageamanger not configured.Found empty or unset manager(unset). Legal values are: das,overlay

在本次测试中使用的为iscsi存储以及本地存储,所以配置方法如下:

  euca-modify-property -phgcluster01.storage.blockstoragemanager=overlay

  euca-describe-properties | grepblockstorage可以查看此时sc的状态的overlay

1.1.5.4.   注册NC

  在集群控制器(CC)上,使用以下命令和每个NC服务器的IP地址注册所有的NC:

/usr/sbin/euca_conf --register-nodes "<node0_IP_address> ...  <nodeN_IP_address>"

例如:

/usr/sbin/euca_conf –register-nodes “10.10.200.198”

1.1.5.5.   配置Arbitrators

Eucalyptus对Arbitrator做定期的ICMP echo测试,这个测试接近终端用户访问系统的能力。若Eucalyptus决定了它不能到达与注册的Arbitrator相关联的主机,在该主机上操作的所有Eucalyptus服务,试图将故障转移到备用主机上运行这些服务。

关于HA:在HA里,在主CLC和备用CLC和Walrus中,注册每个Arbitrator服务。若使用Managed和Managed(No VLAN)模式,用户可以在主CC和备用CC上注册Arbitrator服务。

建议给每个Eucalyptus组件注册多个Arbitrator,这将允许正常的停机和维护。在CLC和Walrus上,Arbitrator的数量是没有限制的,用户可以在CC上注册三个。

在每个安装了云控制器(CLC或Walrus)的主机上注册Arbitrator服务。Arbitrator是主机的组成部分:Arbitrator在一台主机上注册时,它所有的云组件都注册到该主机上。一个单独的Arbitrator要注册每个网络实体,这些网络实体需要被主机监控。

下面注册Arbitrator:

1.登录主云控制器(CLC)。

2.输入下列指令来注册Arbitrator:

/usr/sbin/euca_conf --register-arbitrator --partition <ID>--component <ID> --host <target_host>

条件:

•      <ID>是全局唯一的ID,用来识别Arbitrator,注意,必须使用相同的<ID>作为partition 和component的ID值。

•      <target_host>是IP或运行Eucalyptus组件的主机名,将运行Arbitrator。

例如:

euca_conf --register-arbitrator --partition EXAMPLE_ARB --component EXAMPLE_ARB

 --host 192.168.1.10

   3. 在Secondary云控制器(CLC)和Walrus服务器上重复此操作。

4.为每个Arbitrator定义网关:

/usr/sbin/euca-modify-property -p <ID>.arbitrator.gatewayhost=<gateway>

条件:

•      <ID> 是注册的Arbitrator全局唯一的ID。

•      <gateway>是外部主机名或IP地址,用来近视连接到终端用户。

例如:

euca-modify-property -p EXAMPLE_ARB.arbitrator.gatewayhost=192.168.1.1

5.每个注册的Arbitrator重复此操作。

6.在每个集群控制器(CC)上注册,登录到主CC,打开文件:/etc/eucalyptus/eucalyptus.conf。

7.提供Arbitrators列表(最多三个),作为CC_ARBITRATORS属性值,例如:

CC_ARBITRATORS="192.168.48.11 192.168.48.12"

8.保存文件,重启CC:

service eucalyptus-cc restart

9.在备用集群控制器(CC)上重复操作。

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值