标签:云计算测试实验-openstack-icehouse-安装sahara
在两个节点都要配置
这就是所说的大数据集群。
--------------- controller ----------------------------
yum -y install openstack-sahara
service mysqld stop
(先将/etc/my.cnf中的innodb_file_per_table删除,再执行下一条命令,否则会报错。)
openstack-config --set /etc/my.cnf mysqld max_allowed_packet 256M
(在/etc/my.cnf中重新添加innodb_file_per_table配置,有助于提升MySQL数据库性能。)
service mysqld start
mysql -uroot -p000000
create database sahara;
GRANT ALL PRIVILEGES ON sahara.* TO ‘sahara‘@‘localhost‘ IDENTIFIED BY ‘000000‘;
GRANT ALL PRIVILEGES ON sahara.* TO ‘sahara‘@‘%‘ IDENTIFIED BY ‘000000‘;
exit
source admin-openrc.sh
keystone user-create --name sahara --pass 000000
keystone user-role-add --user sahara --tenant service --role admin
keystone service-create --name sahara --type data_processing --description "Sahara Data Processing"
keystone endpoint-create \
--service sahara \
--region regionOne \
--publicurl "http://controller:8386/v1.1/%(tenant_id)s" \
--adminurl "http://controller:8386/v1.1/%(tenant_id)s" \
--internalurl "http://controller:8386/v1.1/%(tenant_id)s"
openstack-config --set /etc/sahara/sahara.conf DEFAULT log_file sahara.log
openstack-config --set /etc/sahara/sahara.conf DEFAULT log_dir /var/log/
openstack-config --set /etc/sahara/sahara.conf DEFAULT os_auth_host controller
openstack-config --set /etc/sahara/sahara.conf DEFAULT os_auth_port 35357
openstack-config --set /etc/sahara/sahara.conf DEFAULT os_admin_tenant_name service
openstack-config --set /etc/sahara/sahara.conf DEFAULT os_admin_username sahara
openstack-config --set /etc/sahara/sahara.conf DEFAULT os_admin_password 000000
openstack-config --set /etc/sahara/sahara.conf DEFAULT use_neutron true
openstack-config --set /etc/sahara/sahara.conf DEFAULT os_auth_uri http://controller:5000
openstack-config --set /etc/sahara/sahara.conf DEFAULT use_floating_ips false
openstack-config --set /etc/sahara/sahara.conf database connection mysql://sahara:000000@controller/sahara
sahara-db-manage --config-file /etc/sahara/sahara.conf upgrade head
service openstack-sahara-api start
chkconfig openstack-sahara-api on
yum -y install python-django-sahara
vi /usr/share/openstack-dashboard/openstack_dashboard/settings.py
HORIZON_CONFIG = {
‘dashboards‘: (‘project‘, ‘admin‘, ‘settings‘, ‘sahara‘, ‘router‘,),
...
}
INSTALLED_APPS = [
...
‘horizon‘,
‘saharadashboard‘,
‘openstack_auth‘,
]
vi /etc/openstack-dashboard/local_settings
DEBUG = False
TEMPLATE_DEBUG = DEBUG
SAHARA_USE_NEUTRON = True
AUTO_ASSIGNMENT_ENABLED = False
SAHARA_URL = ‘http://controller:8386/v1.1‘
service httpd restart
service memcached restart
openstack-config --set /etc/neutron/metadata_agent.ini DEFAULT auth_url http://controller:5000/v2.0
openstack-config --set /etc/neutron/metadata_agent.ini DEFAULT auth_region regionOne
openstack-config --set /etc/neutron/metadata_agent.ini DEFAULT admin_tenant_name service
openstack-config --set /etc/neutron/metadata_agent.ini DEFAULT admin_user neutron
openstack-config --set /etc/neutron/metadata_agent.ini DEFAULT admin_password 000000
openstack-config --set /etc/neutron/metadata_agent.ini DEFAULT nova_metadata_ip controller
openstack-config --set /etc/neutron/metadata_agent.ini DEFAULT metadata_proxy_shared_secret METADATA_SECRET
service neutron-metadata-agent restart
--------------- compute ----------------------------
openstack-config --set /etc/nova/nova.conf DEFAULT enabled_apis ec2,osapi_compute,metadata
openstack-config --set /etc/nova/nova.conf DEFAULT metadata_workers 1
openstack-config --set /etc/nova/nova.conf DEFAULT metadata_listen controller
openstack-config --set /etc/nova/nova.conf DEFAULT metadata_port 8775
openstack-config --set /etc/nova/nova.conf libvirt inject_key True
service openstack-nova-compute restart
openstack-config --set /etc/neutron/metadata_agent.ini DEFAULT nova_metadata_port 8775
openstack-config --set /etc/neutron/metadata_agent.ini DEFAULT metadata_workers 1
service neutron-metadata-agent restart
--------------- controller &compute ----------------------------
openstack-config --set /etc/neutron/dhcp_agent.ini DEFAULT enable_isolated_metadata True
openstack-config --set /etc/neutron/dhcp_agent.ini DEFAULT enable_metadata_network True
service neutron-dhcp-agent restart
-------------- controller -------------------------------
glance image-create --name=vanilla-1.2.1-centos6.5 --disk-format=qcow2 --container-format=bare < sahara-icehouse-vanilla-1.2.1-centos-6.5.qcow2
ssh-keygen
cd /root/.ssh/
nova keypair-add --pub-key id_rsa.pub sahara-hadoop
nova keypair-list
yum install openssh-clients
ssh cloud-user@云主机IP
这个地方操作多在dashboard界面操作。图片过多,暂不展示,
但是,可以在web界面清晰看到。左边出现了sahara这个栏目。
本文出自 “茉莉爱学习” 博客,请务必保留此出处http://molilinzi.blog.51cto.com/8282931/1657734
记一次云计算测试实验-openstack-icehouse-安装sahara
标签:云计算测试实验-openstack-icehouse-安装sahara
原文地址:http://molilinzi.blog.51cto.com/8282931/1657734