您的位置:首页 > 其它

Deploy senlin on VIO

2016-05-20 17:41 351 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: