openstack手动玩转

本文涉及的产品
对象存储 OSS,20GB 3个月
对象存储 OSS,恶意文件检测 1000次 1年
对象存储 OSS,内容安全 1000次 1年
简介: openstack or all most cloud env Network desgine  is so much master! openstack env arch-->Network 主要有2种,openstack networking(neutron),legacy 具体网络规划...

<一,preface Important Project Network>

openstack or all most cloud env Network desgine  is so much master!

openstack env arch-->Network 主要有2种,openstack networking(neutron),legacy

具体网络规划之前写了简单笔记,只是我去那次 没保存,我也就懒得再写了!我这人就这熊样,你懂的!

想真正玩转openStack,需加强熟悉其组件,组件较多(约10个左右),其功能之强大窥此也可见一斑,,所以ruiy在玩转openstack唱响的口号是,想玩转openstack,先从玩转其组件部署开始,熟不知,百尺高楼跟(根)地基!不然你永远是擦皮鞋的,一般生态论中答案只有2个,玩转;玩不转,答案咫尺天涯,待你书写 !!!

<二,实战之ONE identity sevice>

Ruiy 提醒,在决战前先要把基本功做到位,icehource-repo;

1,identity server install;

创建admin账号;

创建角色,租户

链接admin<user,role,tenant >

链接 _member_ role admin <user,tenant>

create normal user;

link the demo user,_member_ role,and demo tenant;

Create a service tenant

define service and API endpoints;

keystone service-create. Describes the service

keystone endpointe-create.Associate API endpoints with the service

 1,Create a service entry for the identity service:

2,specify an API endpoint for the identity service,provide url for public API,internal API,and admin API;

 

其中得注意下identity 常用的2个端口分别是35357,5000,上面我的测试环境有个事错的;

3,verify the identity service installtion

已定义的identity service variables

unset OS_SERVICE_TOKEN OS_SERVICE_ENDPOINT

web-base 验证 identity service

cmd验证

set variables

<三,install and configure the openstack >

(block storage) cinder python-cinderclient create and manage volumes;

compute nova python-novaclient create manage images,instances,and flavors;

database service trove python-troveclient create and manage databases;

identity keystone python-keystoneclient create manage users,tenants,roles,endpoints,and credentials;

image service glance python-glanceclient create and manage images;

networking neutron python-neutronclient configure network for guest server,this client was previosly claaed quantum;

object storage swift python-swiftclient gather statistics,list items,update metadata,and upload,download,and delete files stored by the object storage service,gain access to an object storage installation for ad hoc processing;

orchestration heat python-heatclient launch stacks from templates,view details of running stacks including events and resources,and update and delete stacks;

telemetry ceilometer python-ceilometerclient  create and collect measurements across openstack;

使用identity 列表用户 出现问题,待解决

 

 1,install the openstack command-line clients

prerequisite software

python,setuptools pip;

python-pip.noarch : A tool for installing and managing Python packages
python-setuptools.noarch : Easily build and distribute Python packages

yum -y install python-pip python python-setuptools;

https://pypi.python.org/pypi/setuptools

 wget https://bootstrap.pypa.io/ez_setup.py -O - | python
https://pypi.python.org/pypi/python-novaclient/

install the clients;
2,install the clients;
ceilometer -->Telemetry API
cinder --> block storage API and extensions
glance --> image service API
heat -->orchestration API
keystone -->identity service API and extensions
neutron -->etworking API
nova -->computer API and extensions
swift -->object stoage API
trove -->database service API
具体落实openstack 组件,使用pip工具

pip install python-PROJECTclient

yum -y install python-PROJECTclient;

基于python package install tool 升级及移除卸载安装包组件命令

pip install --upgrade python-PROJECTclient;

pip uninstall python-PROJECTclient;

3,set environment variables using the openstack RC file;

export OS_USERNAME=admin
export OS_PASSWORD=321
export OS_TENANT_NAME=admin
export OS_AUTH_URL=http://master.puppet.cc:35357/v2.0
expect(sshPasswdless noActive);

小插曲,修改数据库表,修复之前创建enpoint端口问题;

覆盖环境变量

keystone --os-password override EnvironmentVariable service-list;

 

<四,install/configure the image service>

image service enables users to discover,register,and retrieve virtual machine images;

image service offer a reset API that enables you to query virtual machine image metadata and retrieve an actual image;

you can store virtual machine images made available through the image service in a variety of locations from simple file systems to object-storage systems like openstack object storage;

for simplicity,configures the image service are stored a directory on the same system that hosts,directory /var/lib/glance/images;

 image service components:

glance-api:accept image API calls for image discovery,retrieval,and storage;

glance-registry:Stores,pocesses,and retrieves metadata about images,Metadata includes items such as size and type;

INSTALL the image service;

yum -y install openstack-glance python-glanceclient;

image service acts as a registry fo virtual disk images,users can add new image or take a snapshot of an image from an existing server for immediate storage;

类似identity service相关配置信息也是存储在mysql库中的;

配置image service 数据库存储;

 configure the image service to use the message broker(Ruiy test environment use qpid):

use the password you created to log in as root and create a glance database  user:

创造数据表为image service

create a glance user that the image service can to authenticate with the identity service,choose a password and specify an email address for the glance,use the service tenant and give the admin role;

configure the image service to use the identity ervice for authentication;

register the image service with the identity service so that other openstack services can locate it,register the service and create the endpoint;

start the glance-api and glance-registry service and configure them start when the system boots

现在我们简单验证下image service;

CirrOS is a small test image

http://download.cirros-cloud.net/

 

相关实践学习
借助OSS搭建在线教育视频课程分享网站
本教程介绍如何基于云服务器ECS和对象存储OSS,搭建一个在线教育视频课程分享网站。
目录
相关文章
|
存储 API 虚拟化
|
6月前
|
存储 API Swift
一文秒懂什么是OpenStack?
一文秒懂什么是OpenStack?
205 0
|
Ubuntu 关系型数据库 MySQL
openstack4j
Identity // V2 authentication OSClientV2 os = OSFactory.builderV2() .endpoint("http://127.
1025 0