diff options
-rwxr-xr-x | gen-data/dist/dist | 4 | ||||
-rw-r--r-- | gen-data/dist/dist.exclude | 1 | ||||
-rw-r--r-- | gen-data/dist/dist.list | 5 | ||||
-rwxr-xr-x | gen-data/prep | 5 | ||||
-rwxr-xr-x | gen-data/remote_generate | 14 |
5 files changed, 29 insertions, 0 deletions
diff --git a/gen-data/dist/dist b/gen-data/dist/dist new file mode 100755 index 0000000..c9aea1b --- /dev/null +++ b/gen-data/dist/dist @@ -0,0 +1,4 @@ +#!/bin/bash + +# !!!! creating tar-BOMB !!!! +tar -cf dist/dist.tar.gz -T dist/dist.list -X dist/dist.exclude diff --git a/gen-data/dist/dist.exclude b/gen-data/dist/dist.exclude new file mode 100644 index 0000000..484ab7e --- /dev/null +++ b/gen-data/dist/dist.exclude @@ -0,0 +1 @@ +results/* diff --git a/gen-data/dist/dist.list b/gen-data/dist/dist.list new file mode 100644 index 0000000..832aca4 --- /dev/null +++ b/gen-data/dist/dist.list @@ -0,0 +1,5 @@ +prep +generate +databases +tasks +results diff --git a/gen-data/prep b/gen-data/prep new file mode 100755 index 0000000..b5b19b5 --- /dev/null +++ b/gen-data/prep @@ -0,0 +1,5 @@ +#!/bin/bash + +yum install -y wget postgresql-server unzip +echo "LANG=en_US.UTF-8" > /etc/locale.conf +rm -rf /var/lib/pgsql/data diff --git a/gen-data/remote_generate b/gen-data/remote_generate new file mode 100755 index 0000000..a2ec172 --- /dev/null +++ b/gen-data/remote_generate @@ -0,0 +1,14 @@ +#!/bin/bash -x + +where="root@$1" + +./dist/dist +tar tf dist/dist.tar.gz + +ssh_opts="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" +ssh="ssh $ssh_opts" +scp="scp $ssh_opts" + +$scp dist/dist.tar.gz "$where:/root" + +$ssh "$where" "cd /root ; tar -xf dist.tar.gz ; ./prep && ./generate" |