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 / openstack_QOS.md
Last active February 21, 2017 01:47
QOS of cpu/memory/network/disk

openstack QOS

fuel 9.0 openstack mitaka

  1. disk qos
  2. network qos
  3. cpu qos
  4. memory qos
  5. ...
@zhanghui9700
zhanghui9700 / nova-aggregates.md
Last active February 16, 2017 09:13
nova aggregates

region/availability_zone/aggregate/cell

  1. nova aggregates
@zhanghui9700
zhanghui9700 / heat.tutorial.md
Last active September 25, 2017 00:30
heat tutorial
@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
@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

openstack nova commands

nova boot

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

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.

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
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