xen-drbd
view examples/network1 @ 61:e005bb283f54
minor fixes for usage with xen 3.4 (HVM)
author | igor@book.xt.vpn |
---|---|
date | Thu Jun 25 15:22:25 2009 +0300 (2009-06-25) |
parents | |
children |
line source
2 node1='lab8'
3 node2='linux10'
5 from socket import gethostname; i_am=gethostname()
6 if i_am != node1 and i_am != node2:
7 raise ValueError, "My hostname (%s) should be equal to node1 (%s) or node2 (%s)" % (i_am, node1, node2)
9 ip_address = {
10 node1: '192.168.15.8',
11 node2: '192.168.15.10',
12 }
14 node1_ip=ip_address[node1]
15 node2_ip=ip_address[node2]
17 domains= [ 'gw1', 'gw2', 'dns', 'mail', 'ts' ]
18 domain_types= [ 'linux', 'linux', 'linux', 'linux', 'linux' ]
20 domain_home= {
21 node1 : ['gw1', 'gw2', 'dns'],
22 node2 : ['mail', 'ts'],
23 }
25 kernel = "/boot/vmlinuz-2.6.18-6-xen-686"
26 ramdisk = "/boot/initrd.img-2.6.18-6-xen-686"
28 mem_table={
29 'gw1' :256,
30 'gw2' :256,
31 'dns' :256,
32 'mail' :256,
33 'ts' :256,
34 }
36 vcpus_table={
37 'gw1' :1,
38 'gw2' :1,
39 'dns' :1,
40 'mail' :1,
41 'ts' :1,
42 }
44 lvm_pv_names="/dev/null"
45 lvm_vg_name="VG0"
46 lvm_lv_drbd_meta_size="2G"
47 lvm_lv_drbd_meta_name="meta"
49 disk_table={
50 'gw1' : ['drbd1:gw1:2G'],
51 'gw2' : ['drbd2:gw2:2G'],
52 'dns' : ['drbd3:dns:2G'],
53 'mail' : ['drbd4:mail:2G'],
54 'ts' : ['drbd5:ts:5G'],
55 }
57 bridges=['tagged0', 'br100', 'br1', 'br2', 'br3' ]
58 vlans= ['tagged', 100, 141, 142, 143 ]
59 management_interface='br100'
60 trunk='eth0'
61 management_ip=ip_address[i_am]
62 management_gw='192.168.15.254'
63 management_netmask='255.255.255.0'
65 vbridges_table={
66 'gw1' : ['br2','br3'],
67 'gw2' : ['br2','br1'],
68 'dns' : ['br2'],
69 'mail' : ['br2'],
70 'ts' : ['br1'],
71 }
73 # FOR INSTALLATION ONLY
75 ip_network="192.168.142"
76 ip_netmask="255.255.255.0"
77 domain_name="net4.unix.nt"
78 ip_nameserver="192.168.142.2"
79 ip_gateway="192.168.142.1"
81 ip_address_table={
82 'gw1' : '192.168.142.1',
83 'gw2' : '192.168.142.4',
84 'dns' : '192.168.142.2',
85 'mail' : '192.168.142.3',
86 'ts' : '192.168.141.2',
87 }
89 debian_release="sid"
90 debian_mirror="http://10.0.35.1:9999/debian"
91 apt_get_install="less tcpdump libc6-xen openssh host"
93 apt_get_install_table={
94 "dns" :"bind9 bind9utils",
95 "mail" :"sendmail sensible-mda",
96 "ts" :"xfce4 gdm vnc4server",
97 }
99 mkfs_options=""