This file contains 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
#pgpool installation | |
yum localinstall -y http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-redhat93-9.3-1.noarch.rpm | |
yum install -y pgpool-II-93 postgresql93 | |
scp -r cz01-psql01.example.com:/root/{.ssh,.pgpass} /root/ | |
scp cz01-psql01.example.com:/root/.pgpass /root/ | |
cp /etc/pgpool-II-93/pcp.conf.sample /etc/pgpool-II-93/pcp.conf | |
echo "admin:`pg_md5 password123`" >> /etc/pgpool-II-93/pcp.conf |
This file contains 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
sed \ | |
-e "s/^wd_hostname =.*/wd_hostname = 'cz01-pgpool01.example.com'/" \ | |
-e "s/^heartbeat_destination0 =.*/heartbeat_destination0 = 'cz01-pgpool02.example.com'/" \ | |
-e "s/^#other_pgpool_hostname0 =.*/other_pgpool_hostname0 = 'cz01-pgpool02.example.com'/" \ | |
-i /etc/pgpool-II-93/pgpool.conf | |
service pgpool-II-93 start |
This file contains 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
sed \ | |
-e "s/^wd_hostname =.*/wd_hostname = 'cz01-pgpool02.example.com'/" \ | |
-e "s/^heartbeat_destination0 =.*/heartbeat_destination0 = 'cz01-pgpool01.example.com'/" \ | |
-e "s/^#other_pgpool_hostname0 =.*/other_pgpool_hostname0 = 'cz01-pgpool01.example.com'/" \ | |
-i /etc/pgpool-II-93/pgpool.conf | |
service pgpool-II-93 start |
This file contains 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
#Set hostname | |
hostnamectl set-hostname lb01-server.example.com | |
#Remove all network configuration | |
nmcli con del eno{1,2,3,4} | |
#Configure bonding | |
nmcli con add type bond con-name bond0 ifname bond0 mode active-backup | |
nmcli con add type bond-slave con-name eno1 ifname eno1 master bond0 | |
nmcli con add type bond-slave con-name eno2 ifname eno2 master bond0 |
This file contains 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
umount /home | |
sed -i '/\/home/d' /etc/fstab | |
lvremove -f /dev/mapper/rhel-home | |
lvextend --resizefs -l +100%FREE /dev/mapper/rhel-root | |
curl http://10.0.0.141:6809/fusion/rhel-server-7.0-x86_64-dvd.iso > /var/tmp/rhel-server-7.0-x86_64-dvd.iso | |
mkdir /mnt/iso | |
echo "/var/tmp/rhel-server-7.0-x86_64-dvd.iso /mnt/iso iso9660 loop,ro 0 0" >> /etc/fstab | |
mount /mnt/iso |
This file contains 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
yum install -y qemu-kvm virt-install "@Virtualization Platform" | |
tuned-adm profile virtual-host | |
systemctl enable libvirt-guests.service | |
service libvirtd start | |
virsh net-autostart --disable default | |
for VLAN in 1169 1170 1261; do | |
cat > /tmp/br$VLAN.xml << EOF | |
<network> |
This file contains 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
#(root / default) | |
tmsh modify sys global-settings mgmt-dhcp disabled | |
tmsh create sys management-ip 10.0.0.224/255.255.255.0 | |
tmsh create sys management-route default gateway 10.0.0.1 | |
#(or you can use "config" command - to speed it up) | |
#DNS | |
tmsh modify sys dns name-servers add { 10.0.0.141 10.0.0.142 } | |
tmsh modify sys dns search add { cloud.example.com } |
This file contains 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
tmsh create sys application service dns-ext-vip1_53 { \ | |
description "DNS VIP - External - NS1 53" \ | |
strict-updates disabled \ | |
tables add { \ | |
vs_pool__members { \ | |
column-names { addr port conn_limit } \ | |
rows { \ | |
{ row { 10.0.1.10 53 0 } } \ | |
{ row { 10.0.1.20 53 0 } } \ | |
} \ |
This file contains 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
tmsh create sys application service ds-vip_389 { \ | |
description "Directory Server VIP 389" \ | |
strict-updates disabled \ | |
lists add { irules__irules { } } \ | |
tables add { \ | |
vs_pool__pool_members { \ | |
column-names { addr port conn_limit } \ | |
rows { \ | |
{ row { 10.0.0.150 389 0 } } \ | |
{ row { 10.0.0.151 389 0 } } \ |
This file contains 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
tmsh create sys application service https-vip_443 { \ | |
description "HTTPS Server VIP 443" \ | |
strict-updates disabled \ | |
tables add { \ | |
pool__hosts { \ | |
column-names { name } \ | |
rows { { row { config.cloud.example.com } } } \ | |
} \ | |
pool__members { \ | |
column-names { addr port_secure connection_limit } \ |