1, 网络配置
每个节点 /etc/network/interfaces
auto eth0 iface eth0 inet static address 192.168.42.11 netmask 255.255.255.0 gateway 192.168.42.1
2, 添加stack用户
# groupadd stack # useradd -g stack -s /bin/bash -d /opt/stack -m stack # echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
3, setup ssh authorized_keys, 保证各节点之间ssh通信畅通
$ ssh-keygen $ echo "<public ssh_key of another nodes>" > ~/.ssh/authorized_keys
4, 下载devstack
$ git clone https://git.openstack.org/openstack-dev/devstack $ cd devstack
5, 安装controller:
编辑local.conf如下:
[[local|localrc]] HOST_IP=192.168.42.11 FLAT_INTERFACE=eth0 FIXED_RANGE=10.4.128.0/20 FIXED_NETWORK_SIZE=4096 FLOATING_RANGE=192.168.42.128/25 MULTI_HOST=1 LOGFILE=/opt/stack/logs/stack.sh.log ADMIN_PASSWORD=labstack DATABASE_PASSWORD=supersecret RABBIT_PASSWORD=supersecret SERVICE_PASSWORD=supersecret
执行stack.sh
$ ./stack.sh
添加文件local.sh, 每次执行完一个节点的stack.sh就执行local.sh一次:
for i in `seq 2 10`; do /usr/local/bin/nova-manage fixed reserve 10.4.128.$i; done
6, 按装compute节点:
编辑local.conf文件:
[[local|localrc]] HOST_IP=192.168.42.12 # change this per compute node FLAT_INTERFACE=eth0 FIXED_RANGE=10.4.128.0/20 FIXED_NETWORK_SIZE=4096 FLOATING_RANGE=192.168.42.128/25 MULTI_HOST=1 LOGFILE=/opt/stack/logs/stack.sh.log ADMIN_PASSWORD=labstack DATABASE_PASSWORD=supersecret RABBIT_PASSWORD=supersecret SERVICE_PASSWORD=supersecret DATABASE_TYPE=mysql SERVICE_HOST=192.168.42.11 MYSQL_HOST=$SERVICE_HOST RABBIT_HOST=$SERVICE_HOST GLANCE_HOSTPORT=$SERVICE_HOST:9292 ENABLED_SERVICES=n-cpu,n-net,n-api-meta,c-vol NOVA_VNC_ENABLED=True NOVNCPROXY_URL="http://$SERVICE_HOST:6080/vnc_auto.html" VNCSERVER_LISTEN=$HOST_IP VNCSERVER_PROXYCLIENT_ADDRESS=$VNCSERVER_LISTEN
执行stack.sh
$ ./stack.sh
7, 安装完毕
8, live-migration notification:
every compute node’s root user’s public RSA key must exist in every other compute node’s stack user’s authorized_keys file and every compute node’s public ECDSA key needs to be in every other compute node’s root user’s known_hosts file.
http://docs.openstack.org/developer/devstack/guides/multinode-lab.html#live-migration
参考:http://docs.openstack.org/developer/devstack/guides/multinode-lab.html