码迷,mamicode.com
首页 > 其他好文 > 详细

手动安装OpenStack-Murano和Murano-dashboard

时间:2015-08-25 12:06:14      阅读:257      评论:0      收藏:0      [点我收藏+]

标签:openstack   murano   

一、 环境准备

搭建Murano和Murano-dashboard是在Red Hat Enterprise Linux Server release 7.1 (Maipo)上搭建的,之前这个环境已经搭建了Openstack的环境,因此一些系统的工具包也安装过了,例如:gcc,python-pip,mysql。


二、在Devstack上配置安装Murano

1.首先需要下载dev的包,可以直接从github上clone

git clone https://github.com/openstack-dev/devstack.git

2.接着下载Murano需要的文件,https://github.com/openstack/murano/tree/master/contrib/devstack处下载extras.dlib中的文件,并将相应的文件放到devstack相应的目录下:

cp lib/murano ${DEVSTACK_DIR}/lib
cp lib/murano-dashboard {DEVSTACK_DIR}/lib
cp extras.d/70-murano.sh {DEVSTACK_DIR}/extras.d

3.最重要的就是编写localrc文件,这里给出一个示例,可以根据需要自行修改:

DATABASE_PASSWORD=123456
    RABBIT_PASSWORD=123456
    SERVICE_TOKEN=123456
    SERVICE_PASSWORD=123456
    ADMIN_PASSWORD=123456
    disable_service n-net
    enable_service q-svc
    enable_service q-agt
    enable_service q-dhcp
    enable_service q-l3
    enable_service q-meta
    enable_service q-lbaas
    enable_service q-vpn

    DEST=/home/OpenStack/workspace

    DATA_DIR=$DEST/data
    SERVICE_DIR=$DEST

    LOGDIR=/home/OpenStack/workspace/logs
    LOGFILE=$LOGDIR/stack.sh.log
    VERBOSE=True
    LOG_COLOR=True
    SCREEN_LOGDIR=$LOGDIR/screens

    Q_PLUGIN=ml2
    ENABLE_TENANT_VLANS=True

LOGDAYS=1

    #RECLONE=True
    #OFFLINE=True

GIT_BASE="http://github.com"
IMAGE_URLS=http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img

    # Enable Heat
    enable_service heat h-api h-api-cfn h-api-cw h-eng

    # Enable Murano
    enable_service murano murano-api murano-engine


4.修改完localrc文件我们执行./stack.sh即可进行一键部署带有Murano的Devstack。


三、手动安装Murano

现在来尝试在上文中提到的环境中手动搭建Murano,之前的OpenStack已经部署上去了,所以我们不需要在devstack的环境中进行部署了。

1.首先安装murano-client,在shell中执行命令:

pip install python-muranoclient


2.安装murano APIEngine

下载Murano代码:

git clone git://git.openstack.org/openstack/murano


3.配置Muranolocalrc文件,这里同样给出一个示例:

[DEFAULT]
debug = true
verbose = true
rabbit_host = %RABBITMQ_SERVER_IP%
rabbit_userid = %RABBITMQ_USER%
rabbit_password = %RABBITMQ_PASSWORD%
rabbit_virtual_host = %RABBITMQ_SERVER_VIRTUAL_HOST%
notification_driver = messagingv2

...

[database]
backend = sqlalchemy
connection = sqlite:///murano.sqlite

...

[keystone]
auth_url = 'http://%OPENSTACK_HOST_IP%:5000/v2.0'

...

[keystone_authtoken]
auth_uri = 'http://%OPENSTACK_HOST_IP%:5000/v2.0'
auth_host = '%OPENSTACK_HOST_IP%'
auth_port = 5000
auth_protocol = http
admin_tenant_name = %OPENSTACK_ADMIN_TENANT%
admin_user = %OPENSTACK_ADMIN_USER%
admin_password = %OPENSTACK_ADMIN_PASSWORD%

...

[murano]
url = http://%YOUR_HOST_IP%:8082

[rabbitmq]
host = %RABBITMQ_SERVER_IP%
login = %RABBITMQ_USER%
password = %RABBITMQ_PASSWORD%
virtual_host = %RABBITMQ_SERVER_VIRTUAL_HOST%


4.Murano创建endpoint

keystone endpoint-create [--region <endpoint-region>] --service-id
                           <service-id> [--publicurl <public-url>]
                          [--adminurl <admin-url>]
                          [--internalurl <internal-url>]


5.安装API

install murano-api --config-file ./etc/murano/murano.conf

6.安装engine

install murano-engine –config-file ./etc/murano/murano.conf

7.然后可以一下murano的命令观察murano是否安装成功。


四、安装murano-dashboard

1.下载murano-dashboard和horizon的代码

git clone git://git.openstack.org/openstack/murano-dashboard
git clone git://git.openstack.org/openstack/horizon


2.复制muranoplugin文件到horizon文件夹中

cp  ../murano-dashboard/muranodashboard/local/_50_murano.py openstack_dashboard/local/enabled/

3.准备配置文件,可以直接将example文件中的配置拿过来使用:

cp  openstack_dashboard/local/local_settings.py.example openstack_dashboard/local/local_settings.py

4.正常启动django服务

python  manage.py  runserver  <IP:PORT>


5.在浏览器中输入<IP:PORT>,登录进去就可以在页面左侧看到Murano的项目了。







版权声明:本文为博主原创文章,未经博主允许不得转载。

手动安装OpenStack-Murano和Murano-dashboard

标签:openstack   murano   

原文地址:http://blog.csdn.net/lanceyang1992/article/details/47973665

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!