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
opkg install luci-app-watchcat | |
/etc/uci-defaults/50-watchcat | |
uci set system.@watchcat[0].period=1h | |
/etc/init.d/watchcat enable |
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
uci set rainbow.wifi=led | |
uci set rainbow.@led[-1].color=blue | |
uci set rainbow.@led[-1].status=auto | |
uci set rainbow.pwr=led | |
uci set rainbow.@led[-1].color=red | |
uci set rainbow.@led[-1].status=auto | |
uci set rainbow.lan=led | |
uci set rainbow.@led[-1].color=green |
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
mkdir -p /data/temperature_sensors /www3/temperature_sensors | |
#The graphs can be accessed: http://192.168.1.1/myadmin/temperature_sensors | |
ln -s /www3/temperature_sensors /www3/myadmin/temperature_sensors | |
#Create RRDtool database to store the values every 10 minutes (600 seconds) for 10 years (525600 * 600 seconds) | |
rrdtool create /data/temperature_sensors/temperature_sensors.rrd --step 600 \ | |
DS:temp0:GAUGE:1000:-273:5000 DS:temp1:GAUGE:1000:-273:5000 RRA:AVERAGE:0.5:1:525600 \ | |
RRA:MIN:0.5:1:525600 RRA:MAX:0.5:1:525600 | |
#Add cron entry to put the temperatures into the database |
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 cacti mysql-server | |
# MySQL configuration | |
service mysqld start | |
chkconfig mysqld on | |
mysqladmin -u root password admin123 | |
mysql --password=admin123 --user=root << EOF | |
#Taken from /usr/bin/mysql_secure_installation |
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
#modify the script to work with othe VMs (not just KVM based) + small bugfix | |
wget https://git.openstack.org/cgit/openstack-infra/config/plain/modules/openstack_project/files/cacti/create_graphs.sh -O - | sed 's/All Hosts/Default Tree/;s/add_device.php --description/add_device.php --ping_method=icmp --description/;s/grep "Known"/grep -E "Known|Device IO"/;s@xvd\[a\-z\]\$@-E "\(sd\|xvd\)\[a-z\]\$"@' > /root/create_graphs.sh | |
chmod a+x /root/create_graphs.sh | |
wget https://git.openstack.org/cgit/openstack-infra/config/plain/modules/openstack_project/files/cacti/linux_host.xml -P /var/lib/cacti/ | |
/usr/bin/php -q /usr/share/cacti/cli/import_template.php --filename=/var/lib/cacti/linux_host.xml --with-template-rras | |
wget https://git.openstack.org/cgit/openstack-infra/config/plain/modules/openstack_project/files/cacti/net-snmp_devio.xml -P /usr/local/share/cacti/resource/snmp_queries/ |
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
# Deploy OVF from remote HTTP source | |
/vmfs/volumes/My_Datastore/vmware-ovftool/ovftool --diskMode=thin --datastore=My_Datastore --noSSLVerify --acceptAllEulas --skipManifestCheck "--net:Network 1=VMware Management Network" --prop:vami.ip0.VMware_vCenter_Server_Appliance=10.29.49.99 --prop:vami.netmask0.VMware_vCenter_Server_Appliance=255.255.255.128 --prop:vami.gateway.VMware_vCenter_Server_Appliance=10.29.49.1 --prop:vami.DNS.VMware_vCenter_Server_Appliance=10.1.1.44 --prop:vami.hostname=vcenter.example.com "ftp://ftp.example.com/software/vmware/VMware-vCenter-Server-Appliance-5.5.0.10000-1624811_OVF10.ova" "vi://root:mypassword@127.0.0.1" | |
echo "Accepting EULA ..." | |
/usr/sbin/vpxd_servicecfg eula accept | |
echo "Configuring Embedded DB ..." | |
/usr/sbin/vpxd_servicecfg db write embedded | |
echo "Configuring SSO..." | |
/usr/sbin/vpxd_servicecfg sso write embedded | |
echo "Starting VCSA ..." |
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
#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
#PostgreSQL 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 postgresql93-server repmgr | |
yum install -y --enablerepo=centos-base postgresql93-contrib | |
chkconfig postgresql-9.3 on | |
echo 'PATH=/usr/pgsql-9.3/bin:$PATH' >> /var/lib/pgsql/.bash_profile | |
scp -r cz01-psql01.example.com:/root/{.pgpass,.ssh} /root/ | |
cp -r /root/{.pgpass,.ssh} /var/lib/pgsql/ |
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
#PostgreSQL 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 postgresql93-server repmgr | |
yum install -y --enablerepo=centos-base postgresql93-contrib | |
service postgresql-9.3 initdb | |
chkconfig postgresql-9.3 on | |
sed -i.orig \ | |
-e "s/^#listen_addresses = 'localhost'/listen_addresses = '*'/" \ | |
-e "s/^#shared_preload_libraries = ''/shared_preload_libraries = 'repmgr_funcs'/" \ |
OlderNewer