Skip to content

Instantly share code, notes, and snippets.

View zhanghui9700's full-sized avatar
🎯
Focusing

pysharp zhanghui9700

🎯
Focusing
  • beijing
View GitHub Profile
@zhanghui9700
zhanghui9700 / ceilometer-entry-points.md
Created August 3, 2016 09:43
ceilometer-6.0.0.egg-info

ceilometer-6.0.0 entry points

[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

@zhanghui9700
zhanghui9700 / neutron-entry-points.md
Created August 3, 2016 10:28
neutron-8.1.1-entry-points.txt

neutron entry points

[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

1. ubuntu 1404

2. centos 71

cat ./install.sh

#!/bin/sh
set -eu

cat >> /tmp/apache.conf << EOF
root@node-3:~# cat /var/lib/neutron/lbaas/v2/c9646493-cc1e-4bfc-baba-1c235bbf3053/haproxy.conf
# Configuration for lb-80
global
daemon
user nobody
group haproxy
log /dev/log local0
log /dev/log local1 notice
stats socket /var/lib/neutron/lbaas/v2/c9646493-cc1e-4bfc-baba-1c235bbf3053/haproxy_stats.sock mode 0666 level user

Neutron LoadBalancer V2

1. create loadbalancer

1. create load balancer (name, subnet)
2. create listener
2. create listener
3. create pool
4. add member to pool
  1. create health monitor

mongodb datafiles

The .0, .1 files are datafiles. Each datafile is preallocated to a particular size. (This is done to prevent file system fragmentation, among other reasons.) The first filename for a database is .0, then .1, etc. .0 will be 64MB, .1 128MB, et cetera, up to 2GB. Once the files reach 2GB in size, each successive file is also 2GB. Information regarding datafiles can be found here:

http://www.mongodb.org/display/DOCS/Excessive+Disk+Space

The ".ns" files are namespace files. Each collection and index would count as a namespace. Each namespace is 628 bytes, the .ns file is 16MB by default.

>Thus if every collection had one index, we can create up to 12,000 collections. The --nssize parameter allows you to increase this limit.

cinder backup

root@node-2:~# cat /etc/cinder/cinder.conf | grep -v "^#|^$" | grep "backup"

backup_ceph_conf = /etc/ceph/ceph.conf
backup_ceph_user = backups
backup_ceph_chunk_size = 134217728
backup_ceph_pool = backups
backup_ceph_stripe_unit = 0
backup_ceph_stripe_count = 0

openstack nova commands

nova boot

@zhanghui9700
zhanghui9700 / openstackEvents.py
Created November 14, 2016 15:26 — forked from vagelim/openstackEvents.py
Event notification listener for OpenStack
########################################
# Required changes to nova.conf #
########################################
# notification_driver=nova.openstack.common.notifier.rpc_notifier
# notification_topics = notifications
# notify_on_state_change = vm_and_task_state
# instance_usage_audit_period = hour
# instance_usage_audit = True
# default_notification_level = INFO
# notify_api_faults = true
@zhanghui9700
zhanghui9700 / setup_selenium.sh
Created November 21, 2016 03:26 — forked from curtismcmullan/setup_selenium.sh
Setup Selenium Server on Ubuntu 14.04
#!/bin/bash
# Following the guide found at this page
# http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html
echo "\r\nUpdating system ...\r\n"
sudo apt-get update
# Create folder to place selenium in