标签:star str add chown vol 配置nfs img 重启 openstac
参考Quick Start,推荐使用ubuntu16.04进行安装
deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse deb http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse ##测试版源 deb http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse # 源码 deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse ##测试版源 deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
执行命令更新源
$ sudo apt-get update
$ sudo useradd -s /bin/bash -d /opt/stack -m stack $ echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack $ sudo su - stack
同样需要在~/root下进行修改
$ mkdir .pip $ cat >.pip/pip.conf <<EOF [global] index-url = http://pypi.douban.com/simple/ trusted-host = pypi.douban.com EOF
$ git clone https://git.openstack.org/openstack-dev/devstack $ cd devstack $ git checkout -b stable/pike origin/stable/pike
[[local|localrc]] GIT_BASE=http://git.trystack.cn HORIZON_BRANCH=stable/pike KEYSTONE_BRANCH=stable/pike NOVA_BRANCH=stable/pike NEUTRON_BRANCH=stable/pike GLANCE_BRANCH=stable/pike CINDER_BRANCH=stable/pike ADMIN_PASSWORD=123 DATABASE_PASSWORD=123 RABBIT_PASSWORD=123 SERVICE_PASSWORD=123
使用公司的git源
[[local|localrc]] GIT_BASE=http://git.trystack.cn NOVA_REPO=X.X.X.X pike/nova NOVA_BRANCH=master HORIZON_BRANCH=stable/pike KEYSTONE_BRANCH=stable/pike NEUTRON_BRANCH=stable/pike GLANCE_BRANCH=stable/pike CINDER_BRANCH=stable/pike ADMIN_PASSWORD=123 DATABASE_PASSWORD=123 RABBIT_PASSWORD=123 SERVICE_PASSWORD=123
$ sudo pvcreate /dev/vdb $ sudo vgcreate stack-volumes-lvmdriver-1 /dev/vdb
$ ./stack.sh
不使用lvm后端,配置nfs
挂载目录 sudo mkdir /storage sudo mount /dev/sdb1 /storage sudo chown stack:stack /storage 修改/etc/fstab,添加 /dev/sdb1 /storage ext4 defaults 0 0 安装nfs-kernel-server: sudo apt install nfs-kernel-server 配置nfs,修改/etc/exports添加 /storage *(rw,sync,no_root_squash) 添加/etc/cinder/nfsshares,内容为 192.168.21.142:/storage 修改/etc/cinder/cinder.conf,添加nfs enabled_backends = nfs [nfs] nfs_shares_config = /etc/cinder/nfsshares volume_driver = cinder.volume.drivers.nfs.NfsDriver
$ sudo systemctl status "devstack@*"
重启nova-api服务
sudo systemctl restart devstack@n-api.service
$ sudo journalctl -f --unit devstack@n-api.service
$ sudo journalctl -f -u devstack@n-*
标签:star str add chown vol 配置nfs img 重启 openstac
原文地址:https://www.cnblogs.com/gushiren/p/9591752.html