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
class elasticsearch-river-mongodb ($version = '1.6.8') { | |
exec {'elasticsearch-mapper-attachment': | |
require => Package['elasticsearch'], | |
command => '/usr/share/elasticsearch/bin/plugin -install elasticsearch/elasticsearch-mapper-attachments/1.7.0', | |
creates => '/usr/share/elasticsearch/plugins/mapper-attachments/elasticsearch-mapper-attachments-1.7.0.jar', | |
} | |
exec {'elasticsearch-river-mongodb': | |
require => Exec['elasticsearch-mapper-attachment'], |
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
#!/bin/sh | |
# You can optionally connect to the VM with | |
# virt-viewer -c qemu:///system Debian7 | |
export OS=Debian7 | |
virt-install \ | |
--connect qemu:///system \ | |
--name ${OS} \ | |
--ram 1024 \ | |
--vcpus 1 \ |
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
#!/bin/sh | |
export OS=Debian7 | |
virt-install \ | |
--connect qemu:///system \ | |
--name ${OS} \ | |
--ram 512 \ | |
--vcpus 1 \ | |
--file ${OS}.img \ |
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
# create a temporary inventory file | |
echo "vagrant ansible_ssh_host=localhost ansible_ssh_user=vagrant ansible_ssh_port=2222" > hosts | |
# run a root shell in the vagrant env | |
ansible \ | |
--inventory hosts \ | |
--private-key=/opt/vagrant/embedded/gems/gems/vagrant-1.2.7/keys/vagrant \ | |
--sudo \ | |
--args "id" vagrant |
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
#!/bin/sh | |
# to be run as postgres user | |
# a database should be restored as posgres user with | |
# dropdb popcon | |
# createdb --encoding=UNICODE --owner=popcon popcon | |
# psql popcon < popcon.psql | |
set -e | |
do_bkp() { | |
/usr/bin/pg_dump -U postgres --column-inserts --file=/var/backups/postgres/$i.psql $i |
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
#!/bin/sh | |
su -l postgres -c /usr/local/sbin/backup_postgres | |
# a nice comment |
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
#!/bin/sh | |
[ -d /var/backups/vhosts ] || mkdir /var/backups/vhosts | |
VHOST_DIR=/srv/www/ | |
cd $VHOST_DIR | |
for VHOST in *; do | |
if [ "$VHOST" != "basebox.libera.cc" ]; then | |
tar cpzf /var/backups/vhosts/$VHOST.tar.gz $VHOST |
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
class amanda { | |
package { "amanda-client": | |
ensure => installed, | |
before => File['/etc/amandahosts'], | |
} | |
file { "/etc/amandahosts": | |
ensure => file, | |
owner => "backup", | |
group => "backup", |
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
# disable secure boot in the bios, in menu security | |
# downlad and unzip refind-bin-0.7.8.zip | |
# install refind, assuming your ESP partition is /dev/sda1 and mounted in /boot/efi | |
cd refind-bin-0.7.8 | |
./install.sh | |
# type y and go ahead | |
# at that time your boot entry should look like that |
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
#!/bin/bash | |
# | |
# ========================================================================= | |
# Copyright 2014 Rado Buransky, Dominion Marine Media | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
OlderNewer