使用 Devstack 安装 Manila

安装

克隆 DevStack 仓库

使用以下命令克隆 DevStack 仓库至本地(最好直接在 master 分支下进行安装,这样能尽量避免由于其他版本暂未更新所遗留的 bug)

1
2
$ git clone https://git.openstack.org/openstack-dev/devstack
$ cd devstack

拷贝原始 local.conf

使用以下命令拷贝 DevStack 自带的 local.conf 到 devstack 目录下

1
$ cp samples/local.conf local.conf

配置 local.conf 文件

在正常安装 DevStack 的流程下(可参考 install-devstack),只需要在 local.conf 文件中多加两行配置即可使用 DevStack 安装 manila ,具体添加内容如下

1
2
3
4
#Enable manila
enable_plugin manila https://github.com/openstack/manila stable/rocky
#Enable manila-dashboard
enable_plugin manila-ui https://github.com/openstack/manila-ui stable/rocky

如果想从 Git 安装 python-manilaclient,可以在 local.conf 文件中配置 LIBS_FROM_GIT="python-manilaclient"

开发环境安装

运行下列命令进行 DevStack 安装,同时会安装 manila 组件

1
$ ./stack.sh

验证安装

  • 通过命令行验证

在命令行运行以下命令,应该会得到如下输出

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
  stack@u16:~$ source devstack/openrc admin admin
  WARNING: setting legacy OS_TENANT_NAME to support cli tools.
  stack@u16:~$ manila list
  +----+------+------+-------------+--------+-----------+-----------------+------+-------------------+
  | ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
  +----+------+------+-------------+--------+-----------+-----------------+------+-------------------+
  +----+------+------+-------------+--------+-----------+-----------------+------+-------------------+
  stack@u16:~$ manila service-list
  +----+------------------+------------------------+------+---------+-------+----------------------------+
  | Id | Binary           | Host                   | Zone | Status  | State | Updated_at                 |
  +----+------------------+------------------------+------+---------+-------+----------------------------+
  | 1  | manila-share     | u16@generic1      | nova | enabled | up    | 2018-10-08T02:11:02.000000 |
  | 2  | manila-scheduler | u16               | nova | enabled | up    | 2018-10-08T02:11:00.000000 |
  | 3  | manila-data      | u16               | nova | enabled | up    | 2018-10-08T02:10:58.000000 |
  | 4  | manila-share     | u16@cephfsnfs1    | nova | enabled | up    | 2018-10-08T02:10:56.000000 |
  | 5  | manila-share     | u16@cephfsnative1 | nova | enabled | up    | 2018-10-08T02:11:02.000000 |
  +----+------------------+------------------------+------+---------+-------+----------------------------+
  stack@u16:~$
  • 通过 Dashboard 验证

通过浏览器打开 Dashboard ,登录进去后应该会有 Share 一栏

manila

参考链接