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
# 'title' should be 50 characters or less, as a rule of thumb | |
# 'summary' will be used as the article summary on some pages instead of the article text | |
# 'published' is an epoch timestamp. you can convert your timestamps here: http://www.epochconverter.com/ | |
# 'type' can be one of ['post', 'guide', 'video'] and is used for routing articles to the correct pages | |
title: NetappNFSdriver in Folsom | |
author: http://github.com/kmadac | |
summary: Article about using and configuration of NetappNFSdriver in Cinder in OpenStack Folsom | |
published: 1361101244 | |
type: post |
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
quantum net-create public --router:external=True | |
quantum subnet-create public 192.168.122.0/24 --gateway 192.168.122.1 --allocation-pool start=192.168.122.170,end=192.168.122.180 --enable_dhcp False | |
quantum net-create private | |
quantum subnet-create net1 10.0.0.0/24 --dns_nameservers list=true 8.8.8.8 | |
quantum net-create private_storage | |
quantum subnet-create net1 10.1.0.0/24 | |
quantum router-create router1 | |
quantum router-interface-add router1 <subnet1-uuid> | |
quantum router-interface-add router1 <subnet2-uuid> | |
quantum router-gateway-set router1 <ext-net-id> |
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
quantum subnet-update subnet_id --dns_nameservers 8.8.8.8 8.8.4.4 |
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
Storage provider network will be on interface eth2. I need to put eth2 to ovs bridge. I called it br-stor | |
root@ostack-grizzly:/etc/network# sudo ovs-vsctl add-br br-stor | |
root@ostack-grizzly:/etc/network# sudo ovs-vsctl add-port br-stor eth2 | |
Storage bridge br-stor has to be mapped to physical network. I called it storage-net and network_vlan_ranges have to be set without defining vlans. Add following two lines into /etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini | |
network_vlan_ranges = storage-net | |
bridge_mappings = storage-net:br-stor |
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
.idea/* | |
*.pyc |
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
Script will create testing databases and creates backup of all databses which belongs to domain testdom123.sk. | |
Result of the script is file testdom123.sk.sql. | |
Restore can be done by applying the file back to mysql: | |
mysql -u root -plol < testdom123_sk.sql |
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
class Meter(object): | |
def __init__(self, name, parent=None): | |
self.name = name | |
self.parent = parent | |
def __str__(self): | |
return self.name | |
def __repr__(self): | |
return self.__str__() |
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
__author__ = 'kmadac' | |
import random | |
from bisect import bisect | |
people = 5 | |
max_changes_per_person_intime = 5 | |
# | |
#change_complete_time_days = ([(14, 3), (27, 5), (41, 3), (60, 1), (90, 1)]) | |
# real data from migration of real cluster |
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
\w{3}\s{1,2}\d{1,2} \d\d:\d\d:\d\d (\w)+ \[.+?\]: (\w+)@\[(.+)_\d+\]:IN:ssh2 shell:(SSH INPUT COMMAND is )*(.+) | |
### Examples of log file: | |
Jul 29 09:48:39 filer1 [rshd_0: debug]: user@[10.229.144.23_46673]:IN:ssh2 shell:SSH INPUT COMMAND is rdfile /etc/rc | |
Jul 29 10:14:23 filer2 [telnet_0: debug]: user@[10.229.144.23_47147]:IN:ssh2 shell:ping 10.10.10.10 | |
Jul 29 10:15:08 filer3 [filer3: rshd_0:debug]: user@[10.229.144.23_39181]:IN:ssh2 shell:SSH INPUT COMMAND is snapvault status | |
Jul 4 12:45:11 filer4 [filer4: rshd_0:debug]: user@[10.229.144.25_34672]:IN:ssh2 shell:SSH INPUT COMMAND is ifstat e4b | |
### Use in grep: | |
grep -P '\w{3}\s{1,2}\d{1,2} \d\d:\d\d:\d\d (\w)+ \[.+?\]: (\w+)@\[(.+)_\d+\]:IN:ssh2 shell:(SSH INPUT COMMAND is )*(.+)' auditlog |
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
from pony.orm import * | |
from datetime import date, datetime | |
db = Database('sqlite', ':memory:') | |
sql_debug(True) | |
class UhUser(db.Entity): | |
uname = PrimaryKey(unicode) | |
password_sha1 = Required(unicode) | |
email_contacts = Required(unicode) |
OlderNewer