运维开发网

OpenStack Pike Minimal安装:六、管理界面

运维开发网 https://www.qedev.com 2020-02-16 14:48 出处:网络 作者:一语成谶灬
Ⅰ、配置dashboard1.在controller上安装dashboard[root@controller~]#yuminstallopenstack-dashboard-y2.配置①修改local_settings文件[root@controller~]#vim/etc/openstack-dashboard/local_settingsOPENSTACK_HOST="controller"O

Ⅰ、配置dashboard

1.在controller上安装dashboard

[root@controller ~]# yum install openstack-dashboard -y

2.配置

①修改local_settings文件

[root@controller ~]# vim /etc/openstack-dashboard/local_settings
OPENSTACK_HOST = "controller"
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"

OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True

SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
CACHES = {
   'default': {
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION': 'controller:11211',
   }
}

OPENSTACK_API_VERSIONS = {
   "identity": 3,
   "image": 2,
   "volume": 2,
}

OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "Default"

ALLOWED_HOSTS = ['*']

OPENSTACK_NEUTRON_NETWORK = {
    'enable_router': False,
    'enable_quotas': False,
    'enable_ipv6': False,
    'enable_distributed_router': False,
    'enable_ha_router': False,
    'enable_fip_topology_check': False,
    'enable_lb': False,
    'enable_firewall': False,
    'enable_***': False,
}

TIME_ZONE = "UTC"

[root@controller ~]# cat /etc/httpd/conf.d/openstack-dashboard.conf
WSGIDaemonProcess dashboard
WSGIProcessGroup dashboard
WSGISocketPrefix run/wsgi
#添加这一行
WSGIApplicationGroup %{GLOBAL}

WSGIScriptAlias /dashboard /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
Alias /dashboard/static /usr/share/openstack-dashboard/static

<Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi>
  Options All
  AllowOverride All
  Require all granted
</Directory>

<Directory /usr/share/openstack-dashboard/static>
  Options All
  AllowOverride All
  Require all granted
</Directory>

3.重启httpd和mecached

[root@controller ~]# systemctl restart httpd.service memcached.service

4.查看页面

http://controller/dashboard

OpenStack Pike Minimal安装:六、管理界面

Ⅱ、创建一个实例

1.创建network

[root@controller ~]# . admin-openstack.sh

openstack network create --share --external \

--provider-physical-network provider \

--provider-network-type flat provider

OpenStack Pike Minimal安装:六、管理界面

2.创建subnet

openstack subnet create --network provider --allocation-pool \

start=192.168.0.101,end=192.168.0.150 --dns-nameserver 192.168.0.1 \

--gateway 192.168.0.1 --subnet-range 192.168.0.0/24 provider

OpenStack Pike Minimal安装:六、管理界面

3.创建flavor

openstack flavor create --id 0 --vcpus 1 --ram 64 --disk 1 m1.nano

OpenStack Pike Minimal安装:六、管理界面

4.创建keypair

[root@controller ~]# ssh-keygen -q -N ""
Enter file in which to save the key (/root/.ssh/id_rsa): 
[root@controller ~]# openstack keypair create --public-key ~/.ssh/id_rsa.pub mykey
[root@controller ~]# openstack keypair list

OpenStack Pike Minimal安装:六、管理界面

5.配置安全组

openstack security group rule create --proto icmp default

openstack security group rule create --proto tcp --dst-port 22 default

OpenStack Pike Minimal安装:六、管理界面

6.创建instance

①列出已配置的项目

openstack flavor list

openstack image list

openstack network list

openstack security group list

OpenStack Pike Minimal安装:六、管理界面

②创建test主机

nova boot --flavor m1.nano --image cirros --nic net-id=e8d43d9c-0098-450e-8cb3-c676951e3f94 --security-group default --key-name mykey test-instance

OpenStack Pike Minimal安装:六、管理界面

③查看实例状态

openstack server list

OpenStack Pike Minimal安装:六、管理界面

④获取URL

openstack console url show test-instance

OpenStack Pike Minimal安装:六、管理界面

OpenStack Pike Minimal安装:六、管理界面

0

精彩评论

暂无评论...
验证码 换一张
取 消