OpenStack

Openstack安装记录

点点圈 提交于 2019-12-22 14:01:55
安装环境 ubuntu12.04 LTS 虚拟机 安装openstack:Havana apt-get install -y mysql-server python-mysqldb #设置root密码 ​``` ## Keystone ### 配置 keystone 数据表 MySQL创建数据表 赋权 ​```bash mysql> create database keystone; grant all privileges on keystone .* to 'root'@'loaclhost' identified by '123456'; 验证安装、初始化数据库 keystone-manage db_sync 创建keystone用户绑定角色 keystone tenant-create --name=admin keystone user-create --name=admin --pass='123456' keystone role-create --name=admin keystone user-role-add --user admin --role admin --tenant admin ​ ​定义 keystone Service 和 API endpoint keystone service-create --name keystone --type

openstack之服务启动_技巧

為{幸葍}努か 提交于 2019-12-21 23:27:11
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 如果用做好的安装包安装Openstack,启动服务一定会想到用service nova-${api,network,compute}之类的,但是如果单纯从lanuchpad,github上下载源码安装呢,就没办法。不过对照分析还是可以得出很多小技巧。 就拿nova-api这个模块来举例: (1)cat /etc/init.d/nova-api 这个就是service nova-api ${restart,start,stop}要用的脚本,关键代码如下: /sbin/start-stop-daemon --start -b -c nova:nobody --make-pidfile --pidfile /var/run/nova/nova-api.pid --exec /usr/bin/nova-api -- --flagfile=/etc/nova/nova.conf --log-file=/var/log/nova/nova-api.log 其实就是用start-stop-daemon去调用 /usr/bin/nova-api 然后给一定的参数。 (2)查看/usr/bin/nova-api #!/usr/bin/python # EASY-INSTALL-SCRIPT: 'nova==2012.2',

openstack Hello World

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-21 10:47:50
问题 I would like to write a program on an open-stack cloud. When I search for resources, all I find are installation and Admin manuals. I have a cloud installed, now how do I run a program on it? An example of using the message queue or the blob-store would be nice. Does anyone know of a good programming tutorial for this? 回答1: You need to be more clear when you say 'write a program on an Openstack cloud'. a. If you mean that you want to write recipes to control and play with your VMs in an

issues working with python generators and openstack swift client

旧时模样 提交于 2019-12-21 07:13:10
问题 I'm having a problem with Python generators while working with the Openstack Swift client library. The problem at hand is that I am trying to retrieve a large string of data from a specific url (about 7MB), chunk the string into smaller bits, and send a generator class back, with each iteration holding a chunked bit of the string. in the test suite, this is just a string that's sent to a monkeypatched class of the swift client for processing. The code in the monkeypatched class looks like

elasticsearch+logstash+kibana部署

白昼怎懂夜的黑 提交于 2019-12-21 03:57:38
这篇博客讲的是elasticsearch+logstash+kibana部署的方法。 内容大纲: 1、elasticsearch+logstash+kibana部署 2、收集Tomcat日志 3、收集tcp日志 一、elasticsearch+logstash+kibana部署 1、elasticsearch部署 由于条件有限,这三个组件都装在同一台机器上面。 系统版本: elasticsearch-6.7.0、logstash-6.7.0、kibana-6.7.0-linux-x86_64 [root@openstack ~]# cd /usr/local/elasticsearch-6.7.0/ [root@openstack elasticsearch-6.7.0]# ls bin config lib LICENSE.txt logs modules NOTICE.txt plugins README.textile [root@openstack elasticsearch-6.7.0]# vim config/elasticsearch.yml [root@openstack elasticsearch-6.7.0]# grep '^[a-z]' config/elasticsearch.yml cluster.name: my-application node

Wilma pep proxy and keystone - valid access token not found

孤者浪人 提交于 2019-12-20 04:55:37
问题 I have wilma redirecting valid requests to orion but no messages are reaching it as i always get "Access Token not found" from wilma. The account entered in wilma config file is the admin account of keystone. From openStack API docs i request tokens using below request. curl -i \ > -H "Content-Type: application/json" \ > -d ' > { "auth": { > "identity": { > "methods": ["password"], > "password": { > "user": { > "name": "userAdmin", > "domain": { "id": "default" }, > "password": "pw" > } > } >

How to set a docker container's iP?

冷暖自知 提交于 2019-12-20 03:21:32
问题 Can somebody tell me how to set a container's ip to a specific one ? I dont want to set the bridge to set of ips. All the results i get in net is to set range of ips to the docker bridge. 回答1: You can use an existing IP of the host like so: docker run -p 127.0.0.1:80:80 image etc. 来源: https://stackoverflow.com/questions/22641828/how-to-set-a-docker-containers-ip

How to set a docker container's iP?

99封情书 提交于 2019-12-20 03:21:30
问题 Can somebody tell me how to set a container's ip to a specific one ? I dont want to set the bridge to set of ips. All the results i get in net is to set range of ips to the docker bridge. 回答1: You can use an existing IP of the host like so: docker run -p 127.0.0.1:80:80 image etc. 来源: https://stackoverflow.com/questions/22641828/how-to-set-a-docker-containers-ip

keystone

空扰寡人 提交于 2019-12-19 05:43:02
第一篇 keystone— 身份认证服务 一、Keystone介绍: keystone 是OpenStack的组件之一,用于为OpenStack家族中的其它组件成员提供统一的认证服务,包括身份验证、令牌的发放和校验、服务列表、用户权限的定义等等。云环境中所有的服务之间的授权和认证都需要经过 keystone. 因此 keystone 是云平台中第一个即需要安装的服务。 作为 OpenStack 的基础支持服务,Keystone 做下面这几件事情: 管理用户及其权限 维护 OpenStack Services 的 Endpoint Authentication(认证)和 Authorization(鉴权) 学习 Keystone,得理解下面这些概念: User User 指代任何使用 OpenStack 的实体,可以是真正的用户,其他系统或者服务。 当 User 请求访问 OpenStack 时,Keystone 会对其进行验证。Horizon 在 Identity->Users 管理 User 除了 admin 和 demo,OpenStack 也为 nova、cinder、glance、neutron 服务创建了相应的 User。 admin 也可以管理这些 User。 Credentials Credentials 是 User 用来证明自己身份的信息,可以是: 1. 用户名

ESXI虚拟化

只谈情不闲聊 提交于 2019-12-19 05:29:37
1. 安装ESXI 创建虚拟机 F2设置好ip地址 浏览器访问IP 设置shell连接 2. 将kvm虚拟机迁移到esxi上 kvm宿主机: qemu-img convert -f qcow2 oldimage.qcow2 -O vmdk newimage.vmdk #可能不需要 vmkfstools -i oldimage.vmdk newimage.vmdk -d thin 3. 将ESXI虚拟机迁移到kvm上 将虚拟机导出ova文件 virt-v2v -i ova centos-dev-test01-v2v.ova -o local -os /opt/test -of qcow2 4. 使用脚本自动化部署openstack M版 部署openstack 克隆一台openstack模板机: all-in-one环境 4G内存,开启虚拟化,挂载centos7.6的光盘 虚拟机开机之后,修改ip地址为10.0.0.11 上传脚本openstack-mitaka-autoinstall.sh到/root目录 上传镜像:cirros-0.3.4-x86_64-disk.img到/root目录 上传配置文件:local_settings到/root目录 上传openstack_rpm.tar.gz到/root下, tar xf openstack_rpm.tar.gz -C /opt/