Deploy senlin on VIO

来源:互联网 发布:卸载软件 mac 编辑:程序博客网 时间:2024/04/29 20:07
apt-get update
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted

deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted

deb http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe

deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse

deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/trusty-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse

deb http://extras.ubuntu.com/ubuntu trusty main

deb-src http://extras.ubuntu.com/ubuntu trusty main

apt-get update

apt-get install git
git clone http://git.openstack.org/openstack/senlin.git    git checkout origin/stable/mitaka


vim .bashrc
export LANG="en_US.UTF-8"
export LC_COLLATE="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LC_MESSAGES="en_US.UTF-8"
export LC_MONETARY="en_US.UTF-8"
export LC_NUMERIC="en_US.UTF-8"
export LC_TIME="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
source .bashrc


python setup.py install     senlin

ansible 保留keystone和senlin-api,执行ansible脚本注册keystone服务

ansible-playbook --private-key /home/viouser/.ssh/id_rsa -u viouser -i   /var/lib/vio/jarvis/6ad7bc43-2884-48b8-81a7-f6def21c9fbf/site-req-351e9ca3-5742-4589-ac3c-25c39398c207-hosts.ini/var/lib/vio/ansible/site.yml -vvvv

初始化senlin数据库,pip install oslo.db==4.7.0,ansible只保留senlin-api,执行ansible脚本

pip install oslo.service==1.7.0      mkdir /var/log/senlin
pip install oslo.middleware==3.8.0     开启senlin-api服务: senlin-api —config-file /etc/senlin/senlin.conf

pip install oslo.db==4.7.0
pip install oslo.middleware==3.8.0
pip install keystoneauth1==2.3.0
pip install os-client-config==1.14.0
pip install oslo.service==1.7.0

git clone http://git.openstack.org/openstack/python-senlinclient.git git checkout mitaka  python setup.py install

git clone http://git.openstack.org/openstack/python-openstacksdk.git  python setup.py install
pip install keystoneauth1==2.3.0      pip install os-client-config==1.14.0
开启senlin-engine服务

OK

export OS_AUTH_URL=http://10.154.9.2:5000/v3
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=vmware

keystone service-create --name=senlin --type cluster --description "Senlin Clustering Service V1"

keystone endpoint-create --region nova --service-id b7c26cd40fe342dbacc82f260756afb4 --publicurlhttp://10.154.9.2:8778 --adminurlhttp://10.154.9.2:8778 --internalurlhttp://10.154.9.2:8778 

keystone user-create --name senlin --pass bran123 --email senlin@localhost 

keystone user-role-add --user senlin --role service --tenant admin






openstack

OS_PASSWORD=vmware
OS_AUTH_URL=http://10.154.9.2:35357/v3
OS_USERNAME=admin
OS_TENANT_NAME=admin

openstack  --os-identity-api-version 3 service create --name senlin --description 'Senlin Clustering Service V1' -f value -cid clustering
123d18d7165b4d02a3d4585ad5cf6bf1

openstack --os-identity-api-version 3 endpoint create --region nova senlin internal http://10.154.9.2:8778
openstack --os-identity-api-version 3 endpoint create --region nova senlin public https://10.117.170.16:8778
openstack --os-identity-api-version 3 endpoint create --region nova senlin admin http://10.154.9.2:8778
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | ed520a5e668a4077a5ef98fc7b73735f |
| interface    | internal                         |
| region       | nova                             |
| region_id    | nova                             |
| service_id   | 123d18d7165b4d02a3d4585ad5cf6bf1 |
| service_name | senlin                           |
| service_type | clustering                       |
| url          |http://10.154.9.2:8778           |
+--------------+----------------------------------+

openstack --os-identity-api-version 3 user create --domain default --project service --password bran123 --email senlin@localhost senlin
+--------------------+----------------------------------+
| Field              | Value                            |
+--------------------+----------------------------------+
| default_project_id | a5a7c4a68cf140c38d723359ce99f9ce |
| domain_id          | default                          |
| email              | senlin@localhost                 |
| enabled            | True                             |
| id                 | 0ba1ec5b1a4b4044b55f8654eb3f147d |
| name               | senlin                           |
+--------------------+----------------------------------+

openstack --os-identity-api-version 3 role add  --project service --user senlin admin


openstack --os-identity-api-version 3 project create --domain default demo
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description |                                  |
| domain_id   | default                          |
| enabled     | True                             |
| id          | a54fac6e6e4d4c2f80f92543ebd88ebe |
| name        | demo                             |
+-------------+----------------------------------+

openstack --os-identity-api-version 3 role create service
+-------+----------------------------------+
| Field | Value                            |
+-------+----------------------------------+
| id    | 9b2141e579da4e2dbfb14b5e88a38971 |
| name  | service                          |
+-------+----------------------------------+

openstack --os-identity-api-version 3 role add  --project demo --user senlin service

安装完senlin再使用openstack命令
pip install oslo.config==1.9.3
pip install oslo.i18n==1.5.0
pip install oslo.utils==1.4.0
pip install oslo.serialization==1.4.0
pip install requests==2.7.0
pip install stevedore==1.3.0

export OS_AUTH_URL=http://10.154.9.2:5000/v3
export OS_USERNAME=admin
export OS_PASSWORD=vmware
export OS_REGION_NAME=nova
export OS_PROJECT_NAME=admin
export OS_PROJECT_DOMAIN_NAME=Default

export OS_USER_DOMAIN_NAME=Default

export NOVA_ENDPOINT_TYPE=internalURL

export OS_ENDPOINT_TYPE=internalUR

export CINDER_ENDPOINT_TYPE=internalURL



HttpException: Connection failure that may be retried

解决办法:/usr/local/lib/python2.7/dist-packages/keystoneclient/service_filter.py
将interface = INTERNAL


安装horizon



git clone  http://git.openstack.org/openstack/senlin-dashboard.git

git checkout origin/stable/mitaka


python setup.py install


cp _50_senlin.py.example /usr/share/openstack-dashboard/openstack_dashboard/enabled/_50_senlin.py

service apache2 restart

0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 拿到调档函后怎么办 成都怎么办5年居住证 换单位了住房公积金怎么办 单位不交住房公积金怎么办 居转户没有离职证明怎么办 外地户口审驾照怎么办 居住证被注销了怎么办 新到上海怎么办居住证 战网积分过期怎么办 代理一年无赢利怎么办 开庭后不判决怎么办 离婚判决书没了怎么办 去英国工作签证怎么办 在美国怎么办英国签证 换护照英国签证怎么办 英国签证前咳嗽怎么办 英国留学被退学怎么办 在澳洲怎么办韩国签证 美签迟到了怎么办 签证照片贴错怎么办 过隧道耳朵难受怎么办 跑货车没货源怎么办 改文职老职工怎么办 铁路办家属证怎么办? 辐射4电梯故障怎么办 车辆被恶意损坏怎么办 汽车划伤见底怎么办 汽车被刀片划伤怎么办 汽车被笔画了怎么办 车被划了一条线怎么办 微信附近人上门被骗怎么办 交通事故认定书不服怎么办 自动挡下坡刹车失灵怎么办 自动挡汽车刹车失灵怎么办 重车刹车失灵怎么办 12306买票待核验怎么办 单位分流不想去怎么办 公司降薪不同意怎么办 浙江违章扣分太多怎么办 船员进出青岛港怎么办 顶楼供暖不热怎么办