Dashboard是OpenStack中提供的一个web前端控制台,以此来展示openstack的功能。Dashboard是一个基于Django Web Framework开发的标准的Python WSGI程序。Dashboard将页面上的所有元素模块化,网页中一些常见元素(如表单,表格,标签页)全部被封装成Python类,每个组件都有自己对应的一小块HTML模板,当渲染整个页面的时候,Dashboard先查找当前页面有多少组件,然后将各个组件分别进行渲染变成一段HTML片段,最后拼装成一个完整的HTML页面,返回给浏览器。
[root@master01 ~]# openstack flavor list +----+---------+-----+------+-----------+-------+-----------+ | ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public | +----+---------+-----+------+-----------+-------+-----------+ | 0 | m1.nano | 64 | 1 | 0 | 1 | True | +----+---------+-----+------+-----------+-------+-----------+
列出可用镜像:
1 2 3 4 5 6
[root@master01 ~]# openstack image list +--------------------------------------+--------+--------+ | ID | Name | Status | +--------------------------------------+--------+--------+ | d4e76622-3d1f-43c7-bf0f-5262cd8a3aec | cirros | active | +--------------------------------------+--------+--------+
列出可用网络:
1 2 3 4 5 6
[root@master01 ~]# openstack network list +--------------------------------------+----------+--------------------------------------+ | ID | Name | Subnets | +--------------------------------------+----------+--------------------------------------+ | 6d0657c7-2425-4583-bcc1-0051cee6a869 | provider | 6b17116f-a2b6-44b6-ad06-3d770b3ce187 | +--------------------------------------+----------+--------------------------------------+
列出可用的安全组:
1 2 3 4 5 6
openstack security group list +--------------------------------------+---------+------------------------+ | ID | Name | Description | +--------------------------------------+---------+------------------------+ | dd2b614c-3dad-48ed-958b-b155a3b38515 | default | Default security group | +--------------------------------------+---------+------------------------+
创建实例
1
openstack server create --flavor m1.nano --image cirros --nic net-id=6d0657c7-2425-4583-bcc1-0051cee6a869 --security-group default --key-name mykey test
查看实例的状态
1 2 3 4 5 6
[root@master01 ~]# openstack server list +--------------------------------------+------+--------+--------------------+--------+---------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+------+--------+--------------------+--------+---------+ | 36690634-53e4-45c4-bc8b-95068c3c203d | test | ACTIVE | provider=10.1.1.12 | cirros | m1.nano | +--------------------------------------+------+--------+--------------------+--------+---------+
Dashboard管理
问题描述:
云主机创建时报错:Host ‘node01.boysec.cn’ is not mapped to any cell