xen-drbd

annotate od.py @ 23:6e01df357a6a

automatic hostname in topology
author igor
date Tue Feb 19 12:53:45 2008 +0200 (2008-02-19)
parents 2ecda36e8d0d
children 5e499179b5ed
rev   line source
eb@7 1
eb@7 2 node1='debian'
eb@7 3 node2='mirror'
igor@23 4 #i_am=node1
igor@23 5
igor@23 6 from socket import gethostname; i_am=gethostname()
igor@23 7 if i_am != node1 and i_am != node2:
igor@23 8 raise ValueError, "My hostname (%s) should be equal to node1 (%s) or node2 (%s)" % (i_am, node1, node2)
eb@7 9
eb@7 10 ip_address = {
igor@8 11 node1: '10.0.5.220',
igor@8 12 node2: '10.0.5.221',
eb@7 13 }
eb@7 14
eb@7 15 node1_ip=ip_address[node1]
eb@7 16 node2_ip=ip_address[node2]
eb@7 17
igor@8 18 domains=[ 'gw', 'igw', 'dns', 'vpn', 'apt', 'pgw', 'ldap', 'mail', 'uucp', 'samba', ]
eb@7 19
eb@7 20 domain_home = {
igor@8 21 node1 : ['dns', 'gw', 'igw', 'pgw', 'ldap', 'mail', 'vpn', 'uucp', 'apt'],
igor@8 22 node2 : ['samba'],
igor@8 23 }
eb@7 24
igor@18 25 kernel = "/boot/vmlinuz-2.6.18-5-xen-686"
igor@18 26 ramdisk = "/boot/initrd.img-2.6.18-5-xen-686"
eb@7 27
eb@7 28 mem_table={
igor@8 29 'dns' :64,
igor@8 30 'gw' :64,
igor@8 31 'igw' :128,
igor@8 32 'pgw' :64,
igor@8 33 'ldap' :64,
igor@8 34 'mail' :256,
igor@8 35 'samba' :512,
igor@8 36 'vpn' :192,
igor@8 37 'uucp' :128,
igor@8 38 'apt' :128,
eb@7 39 }
eb@7 40
eb@7 41 vcpus_table={
igor@8 42 'dns' :1,
igor@8 43 'gw' :1,
igor@8 44 'igw' :1,
igor@8 45 'pgw' :1,
igor@8 46 'ldap' :1,
igor@8 47 'mail' :4,
igor@8 48 'samba' :4,
igor@8 49 'vpn' :4,
igor@8 50 'uucp' :4,
igor@8 51 'apt' :2,
eb@7 52 }
eb@7 53
eb@7 54 lvm_vg_name="TURBO"
igor@9 55 lvm_pv_names="/dev/md2"
igor@9 56 lvm_lv_drbd_meta_name="meta"
igor@9 57 lvm_lv_drbd_meta_size="5G"
igor@9 58 mkfs_options="-m1"
igor@9 59
eb@7 60 disk_table={
igor@8 61 'gw' : ['drbd1:gw:2G'],
igor@8 62 'igw' : ['drbd2:igw:2G'],
igor@8 63 'dns' : ['drbd3:dns:2G'],
igor@8 64 'vpn' : ['drbd4:vpn:2G'],
igor@8 65 'apt' : ['drbd5:apt:10G'],
igor@8 66 'pgw' : ['drbd6:pgw:2G'],
igor@8 67 'ldap' : ['drbd7:ldap:2G'],
igor@8 68 'mail' : ['drbd8:mail:2G','drbd9:maildir:100G'],
igor@8 69 'uucp' : ['drbd11:uucp:3G'],
igor@8 70 'samba' : [
igor@8 71 'drbd12:samba:3G',
igor@8 72 'drbd13:samba-home:100G',
igor@8 73 'drbd14:samba-nbumail:100G',
igor@8 74 'drbd17:samba-profiles:100G'
igor@8 75 ],
eb@7 76 }
eb@7 77
eb@7 78 bridges=['tagged0', 'xenbr1', 'xenbr256', 'xenbr257', 'xenbr3', 'xenbr4', 'xenbr501']
eb@7 79 vlans= ['tagged', 1, 256, 257, 3, 4, 501 ]
eb@7 80 management_vlan=1
eb@7 81 trunk='eth0'
eb@7 82 management_ip=ip_address[i_am]
igor@8 83 management_gw='10.0.5.253'
igor@22 84 management_netmask='255.255.255.0'
eb@7 85
eb@7 86 vbridges_table={
igor@8 87 'dns' : ['xenbr3'],
igor@8 88 'gw' : ['xenbr501', 'xenbr256', 'xenbr257'],
igor@8 89 'igw' : ['tagged0','xenbr3'],
igor@8 90 'pgw' : ['xenbr3','xenbr501'],
igor@8 91 'ldap' : ['xenbr3'],
igor@8 92 'mail' : ['xenbr3'],
igor@8 93 'samba' : ['tagged0', 'xenbr3'],
igor@8 94 'vpn' : ['xenbr3'],
igor@8 95 'apt' : ['xenbr3'],
igor@8 96 'uucp' : ['xenbr3'],
eb@7 97 }
eb@7 98
eb@7 99 # FOR INSTALLATION ONLY
eb@7 100
igor@8 101 ip_network="10.4.3"
igor@8 102 ip_netmask="255.255.255.224"
igor@8 103 domain_name="od.eb.co.ua"
igor@8 104 ip_nameserver="10.4.3.4"
igor@9 105 ip_gateway="10.4.3.6"
eb@7 106
igor@8 107 ip_address_table={
igor@8 108 "dns" :"10.4.3.4",
igor@8 109 "gw" :"10.4.3.254",
igor@8 110 "igw" :"10.4.3.3",
igor@8 111 "pgw" :"10.4.3.6",
igor@8 112 "ldap" :"10.4.3.11",
igor@8 113 "mail" :"10.4.3.9",
igor@8 114 "samba" :"10.4.3.1",
igor@8 115 "vpn" :"10.4.3.5",
igor@8 116 "apt" :"10.4.3.7",
igor@8 117 "uucp" :"10.4.3.16",
igor@8 118 "jabber":"10.4.3.12",
eb@7 119
igor@8 120 }
eb@7 121
igor@8 122 debian_release="lenny"
igor@17 123 debian_mirror="http://apt.eb.co.ua:9999/debian"
igor@8 124 apt_get_install="less tcpdump dnsutils vim ntp screen snmpd libc6-xen openssh-server"
igor@8 125
igor@8 126