cat ./install.sh
#!/bin/sh
set -eu
cat >> /tmp/apache.conf << EOF
[console_scripts]
neutron-bgp-dragent = neutron.cmd.eventlet.agents.bgp_dragent:main
neutron-db-manage = neutron.db.migration.cli:main
neutron-debug = neutron.debug.shell:main
neutron-dhcp-agent = neutron.cmd.eventlet.agents.dhcp:main
neutron-ipset-cleanup = neutron.cmd.ipset_cleanup:main
neutron-keepalived-state-change = neutron.cmd.keepalived_state_change:main
neutron-l3-agent = neutron.cmd.eventlet.agents.l3:main
[ceilometer.builder.poll.central]
hardware.snmp = ceilometer.hardware.pollsters.generic:GenericHardwareDeclarativePollster
[ceilometer.compute.virt]
hyperv = ceilometer.compute.virt.hyperv.inspector:HyperVInspector
libvirt = ceilometer.compute.virt.libvirt.inspector:LibvirtInspector
vsphere = ceilometer.compute.virt.vmware.inspector:VsphereInspector
xenapi = ceilometer.compute.virt.xenapi.inspector:XenapiInspector
通常云,特别是公有云在计费方面有三个层次:
计量 (Metering): 收集资源的使用数据,其数据信息主要包括:使用对象(what), 使用者(who), 使用时间(when)和 用量(how much)。
计费 (Rating):将资源使用数据按照商务规则转化为可计费项目并计算费用
结算 (Billing):收钱开票
Ceilometer 的目标是 计量 Metering 方面,为上层的计费、结算或者监控应用提供统一的资源使用数据收集功能。
"To provide an infrastructure to collect any information needed within all OpenStack projects so that rating engines could use this single point to transform events into bill items, which we tagged “metering“."
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[local|localrc]] | |
MYSQL_PASSWORD=password | |
RABBIT_PASSWORD=password | |
SERVICE_TOKEN=password | |
ADMIN_PASSWORD=password | |
SERVICE_PASSWORD=password | |
SWIFT_HASH=password | |
LOGFILE=/opt/stack/logs/stack.sh.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; allow nova login | |
usermod -s /bin/bash nova | |
su - nova | |
; ssh key | |
ssh-keygen | |
; scp key to compute host | |
scp /var/lib/nova/.ssh/id_rsa.pub root@ComputeHost:/var/lib/nova/.ssh/authorized_keys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl test for openstack api | |
; change token when you run the command. | |
; glance | |
; glance image-list | |
curl -i -X GET -H 'X-Auth-Token: XXXXXXXXXXXXX-TODO' -H 'Content-Type: application/json' -H 'User-Agent: python-glanceclient' http://192.168.14.80:9292/v1/images/detail?sort_key=nam e&sort_dir=asc&limit=20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
关于lvremove删除openstack cinder volume所对应的逻辑卷的方法 | |
按照我的理解,openstack里的cinder volume创建、管理磁盘实际是用tgtadm管理的来自网络中的lvm磁盘。 | |
有时cinder volume一直处于creating状态或者deleting状态,下层磁盘用不了也删不掉,占了很大的磁盘空间。既然它是用lvm管理的所以可以用lvm相关的工具来删除它。 | |
先找到要删除的volume的lvm路径lvdisplay,我的是:/dev/cinder-vol/volume-725230c0-558a-422a-b9aa-5f309ed42798 | |
直接lvremove /dev/cinder-vol/volume-725230c0-558a-422a-b9aa-5f309ed42798 |