Commit 8d4ec547 authored by Antoine Catton's avatar Antoine Catton Committed by Cédric de Saint Martin

Merging work from lamp-failover branch :

 * Cleaning up and fixing mysql recipe
 * Adding backup on mariadb recipe (in a different software type)
 * Adding backup recovering on mariadb
 * Removing generic recipes

Squashed commit of the following:

commit 7daea6f475669461095c9cfcd3ceb468663108b0
Merge: 23ec754 16e97301
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 27 16:30:40 2011 +0200

    Merge branch 'master' into lamp-failover

    Conflicts:
    	slapos/recipe/mysql/__init__.py
    	software/mariadb/instance.cfg
    	software/mariadb/software.cfg

commit 23ec754142936b2ba6ebfc41e7d6be4169f115a2
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 27 16:28:41 2011 +0200

    Remove inexistant import script from mariadb instance.cfg

commit 29c03b04f0c220258e834bafc9d8174340abc948
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 27 16:24:57 2011 +0200

    Remove useless generic recipes

commit f6fa78b55f787f530bb335b91936a20470510877
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 27 16:23:40 2011 +0200

    Add mariadb backup and recovering.

commit d32847c692b6e081b804e57af8810c18fdf41c07
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 27 16:13:16 2011 +0200

    MySQL fix: mysql wasn't accepting remote connections

commit 4b4a3c39a9f9715b0a4878cd6d582ba435638853
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 27 16:08:19 2011 +0200

    Mysql Recipe: return a meanful URI instead of several parameters

commit a2366cd5cb5c34677725227be3505096a26ebb98
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 27 16:06:16 2011 +0200

    Removing lamp.failover entry point

commit 1ff0f94d1d70f36381582096c352756228fffd0c
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 27 15:52:03 2011 +0200

    Pin on newer versions.

commit 65fbe3191060f2bb73449025736fda432cff86c9
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 27 14:20:57 2011 +0200

    Return a webdavs:// url instead of https:// using
    setConnectionUrl method.

commit 0229a2ee60490f7bd19df788b6a9fe2add50776a
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 27 14:18:55 2011 +0200

    Adding setConnectionUrl in librecipe to return url in parameter xml.

commit 6656c27d783035f0f74098a1c4a1c6b5a000e877
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 27 14:01:15 2011 +0200

    Adding right dependency to apache-php component

commit cc7cafea095693d47326c497b81ab74f86a2ac53
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 27 13:57:45 2011 +0200

    Remove "lampfailover" software release and recipe

commit 7692283be83a2b9efd9b956b88b0d1418ce9fd3f
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Sep 26 10:34:10 2011 +0200

    Fix mariadb backup.

    The file moving was not working if the dump.sql.gz was already
    here.

commit f859e455c6da2ebbcecf82556207f3c6d42a0108
Author: Antoine Catton <acatton@tiolive.com>
Date:   Thu Sep 22 16:15:28 2011 +0200

    Fix: adding duplicity to mariadb software.cfg

commit 98a1bfd57cac4b2de94001b0ccb4a0dede2c1b4a
Author: Antoine Catton <acatton@tiolive.com>
Date:   Thu Sep 22 16:13:23 2011 +0200

    Updating lampfailover to stunnel client requesting a mariadb

commit 695dc79eb77198cda44191bf05db30f44eb3b8b7
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Sep 21 18:07:21 2011 +0200

    Put the right md5sums, my mistake

commit 3a360e48105835602cf791d0a61cc7908aa0bb5d
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Sep 21 17:33:10 2011 +0200

    Use the right entry point for this software release

commit 6aebcb0f95199ab229cbf4fc3539903305e65018
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Sep 21 17:32:59 2011 +0200

    lampfailover recipe cleanup

commit 9ecc25566dc76385f9654daecdcd964c6002fa4a
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Sep 21 17:13:58 2011 +0200

    Remove useless SSL Certificate backup from lampfailover
    as well

commit 8dac32843ce8d85e9ed5f55bdc7ba95f4b35bf79
Merge: 74418d0 e3e07fc
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Sep 21 17:12:52 2011 +0200

    Merge branch 'mariadb-failover' into lamp-failover

commit e3e07fccc4d274511968cad2b247f6c19cec68b3
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Sep 21 17:11:20 2011 +0200

    Remove useless SSL certificates backup

commit 74418d061035fa971a85ba1ccf07100033c57672
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Sep 21 16:47:21 2011 +0200

    Recover format, runner and conditionalrunner recipes
    used in former mariadb failover, now named lampfailover.

    Data recover from 94d490bf17859901d8d744b8690af264f4f011eb

commit f8231a3a889bf609ebe63356937b6d5ac21a2475
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Sep 21 16:30:49 2011 +0200

    Add entry point for lamp.failover

commit 210d1153a989f3edec0eaab2efe05a024780702d
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Sep 21 16:29:51 2011 +0200

    Adding lampfailover recipe and software release

    Just a copy of mariadb recipe and software release from
    94d490bf17859901d8d744b8690af264f4f011eb commit.

commit f96fc3f64ae973a115d4d0111734c9a21845ee3c
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Sep 21 15:28:04 2011 +0200

    Back to the original mariadb software release and mysql recipe
    with mariadb-failover improvements kepts except the failover.

commit 94d490bf17859901d8d744b8690af264f4f011eb
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Sep 21 10:20:53 2011 +0200

    Revert to commmit 027183d9890c2b9d85363333a6362fd2ff8b9181

commit 2fae9cf4cb7ba255f5342d34a8ccf7a1daf695df
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Sep 21 09:56:18 2011 +0200

    Revert MySQL recipe to de0f3a95

commit 84ba123757ccd0fc1ed89395dc77d395018fdd07
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Sep 21 09:53:56 2011 +0200

    Rename mysql recipe in lamp-failover

commit 2b1aa06c47a7b012c564ab507c93a334cc49d27b
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Sep 21 09:51:17 2011 +0200

    Revert mariadb software release to
    399a0d40

commit a6475d6e991c58e77ca59f9f88c88a158b5be76f
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Sep 21 09:50:45 2011 +0200

    Rename mariadb software release to lamp-failover.

commit 027183d9890c2b9d85363333a6362fd2ff8b9181
Merge: bb5b78c de7cb090
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 20 18:04:28 2011 +0200

    Merge branch 'master' into mariadb-failover

commit bb5b78c3c8bdab99c98938d9735696d60bbe8209
Merge: ca2b0f7 7cc1f011
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 20 17:13:13 2011 +0200

    Merge branches 'master' and 'mariadb-failover' into mariadb-failover

commit ca2b0f77ae858d9151a18ea9f9f53bf4cd033695
Merge: ccd0c38 1e59da9
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 20 16:45:06 2011 +0200

    Merge branch 'mariadb-backup' into mariadb-failover

    Conflicts:
    	setup.py
    	slapos/recipe/mysql/__init__.py
    	software/mariadb/instance.cfg
    	software/mariadb/software.cfg

commit 1e59da9dd0b08a1dd764cc11f831ff860ff46a87
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 20 16:40:43 2011 +0200

    Fix md5sum of instance.cfg

commit 19515a4598f25b1643aaf41b310d061469db77f4
Merge: e754c1a 9000b20
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 20 16:39:40 2011 +0200

    Merge branch 'webdav' into mariadb-backup

commit e754c1a051ea5c93bc9dba05d700c95b721d2808
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 20 14:55:36 2011 +0200

    Minor: fix the url

commit 8ff5bcada5c6939972190af22ef57f9ed15d485a
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 20 14:50:12 2011 +0200

    Fix the url of instance.cfg of davstorage

commit 9000b20d35ab12b59233b1736de5416e915c6ff1
Merge: 576e95e0 a0ed7bea
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 20 14:46:38 2011 +0200

    Merge commit 'slapos-0.44' into webdav

    Conflicts:
    	slapos/recipe/davstorage/__init__.py
    	software/davstorage/software.cfg

commit b98a73dd15c0853f80792cc183b30282724b3503
Author: Antoine Catton <acatton@tiolive.com>
Date:   Thu Sep 8 17:57:58 2011 +0200

    Minor: mistake in the parameter order

commit c6d6e6a19cb252f196987d053bece2edbabe60f6
Merge: afdfa59 facf9df5
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Tue Sep 20 10:34:27 2011 +0200

    Merge branch 'master' into mariadb-backup

commit afdfa59bcfa2d7fcf179fbbc7c64aed9373e8a17
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Mon Sep 19 19:10:24 2011 +0200

    Pin versions.

commit 8338f226b3e7de16e990d34ea2c5cb0037089bdc
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Sep 19 18:54:04 2011 +0200

    Linking python with made in slapos libxml

commit 492add6218d90427ad16f47064cd7de9f3a441ce
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Sep 19 18:47:55 2011 +0200

    Add software.cfg url of davstorage

commit fc897da0ec2c18212e3838fa6775e43a1133088b
Merge: e55a243 9be05e37
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Sep 19 18:27:00 2011 +0200

    Merge branch 'master' into mariadb-backup

    Conflicts:
    	slapos/recipe/mysql/__init__.py
    	software/davstorage/software.cfg

commit e55a243673fdd5bccb281b070f0e97832bba696d
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Sep 19 14:41:57 2011 +0200

    Minor: removed unused variable "returncode"

commit 5a863d2e034782e2f58bbab01a0eb57d581a0b30
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Sep 19 14:40:00 2011 +0200

    Use subprocess.check_call instead of checking return code of
    subprocess.call()

commit 91fc5e8d4893eec41cc651ef2510c4feaab85eee
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Sep 19 14:33:24 2011 +0200

    Minor: removing useless commented code in davstorage software.cfg

commit 753fc3084429aefe9381f2e0f438c4303cadf6e4
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Sep 19 14:27:48 2011 +0200

    Minor: removing rebootstrap of the software release

    Another new python for mariadb is useless.

commit 62b3d3959834921005e7b23f1588644448e6d4d5
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Sep 19 14:23:52 2011 +0200

    Partially revert 3728936e6a1b2728bcdefc70298bb4adb69a777e in order to
    clean the git history.

commit 05a458a71311298b2620cebb3122e6a8fe54c622
Merge: 87f61f7 a33be315
Author: Łukasz Nowak <luke@nexedi.com>
Date:   Mon Sep 19 13:35:17 2011 +0200

    Merge branch 'master' into mariadb-backup

commit 87f61f793058b9a2e5584b31691c47bc720bcca8
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Sep 19 13:28:33 2011 +0200

    Minor: removing trailing spaces

commit 7bf410ecb9e3f1966c579a327ed4d5df80193046
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Sep 19 13:08:53 2011 +0200

    Minor: Adding import-script.sh I forgot to commit

commit 7435626070c300c4e4e579c632ccf4700dc7aab8
Merge: 0510486 13d6e1d3
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Sep 19 11:55:33 2011 +0200

    Merge branch 'master' into mariadb-backup

    Conflicts:
    	slapos/recipe/mysql/__init__.py

commit ccd0c3813c74806c55329f8387e955bbaf51005c
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Sep 12 16:32:03 2011 +0200

    Adding backup restoration to mariadb software release

commit 24740e670cc4e7ab4ec43c4a029b064ec49dcb2c
Author: Antoine Catton <acatton@tiolive.com>
Date:   Thu Sep 8 17:57:58 2011 +0200

    Minor: mistake in the parameter order

commit 05104863cd426d4977ceaed6d2509764dd46b4bd
Merge: 1b43ef4 4299234e
Author: Antoine Catton <acatton@tiolive.com>
Date:   Thu Sep 8 17:24:44 2011 +0200

    Merge branch 'master' into mariadb-backup

commit fdbe06fd2dbe910932a3ee533b9f18572d7e25fb
Merge: 9f61de0 4299234e
Author: Antoine Catton <acatton@tiolive.com>
Date:   Thu Sep 8 17:16:59 2011 +0200

    Merge branch 'master' into mariadb-failover

commit 1b43ef420bc23be6cec791b690ad38b1468cbcc2
Author: Antoine Catton <acatton@tiolive.com>
Date:   Thu Sep 8 15:56:35 2011 +0200

    Trim the branch to just add davstorage backup

commit 9f61de06d0da2c42281703409b55e94005125d3c
Author: Antoine Catton <acatton@tiolive.com>
Date:   Thu Sep 8 15:37:43 2011 +0200

    Switch MySQL Backup to duplicity with webdav remote server

commit 2fa9ae925a4629424bd728ec059ea59e9c2a63be
Author: Antoine Catton <acatton@tiolive.com>
Date:   Thu Sep 8 15:34:40 2011 +0200

    Minor: fix the buildout of duplicity to work

commit 51e512e5ecfc9e23823e8ba02f168eb34ac7fca4
Author: Antoine Catton <acatton@tiolive.com>
Date:   Thu Sep 8 14:11:07 2011 +0200

    Adding duplicity software release

commit 576e95e0
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Sep 6 09:32:05 2011 +0200

    Add versions line to davstorage software release

commit 094abfd41ba87f340c52dfd540f09b8f5b2fbb2c
Merge: f59c5c5 150c49e
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Sep 5 14:04:03 2011 +0200

    Merge branch 'webdav' into mariadb-failover

commit 150c49e3cd12e3b8f935c864ccc292c082049289
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Sep 5 13:15:40 2011 +0200

    Working webdav storage

commit 159054aec04f13ed0e5687a8466bd4803a8c1350
Author: Antoine Catton <acatton@tiolive.com>
Date:   Fri Sep 2 17:25:08 2011 +0200

    Link with the right dbm

commit 7bd8c5ad00c53a7830dd45093656907978d26c21
Author: Antoine Catton <acatton@tiolive.com>
Date:   Thu Sep 1 09:35:31 2011 +0200

    Enable dav-fs module on apache compilation

commit e1a4051a
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Sep 5 13:15:40 2011 +0200

    Working webdav storage

commit 20769516
Author: Antoine Catton <acatton@tiolive.com>
Date:   Fri Sep 2 17:25:08 2011 +0200

    Link with the right dbm

commit 7d959f9b
Author: Antoine Catton <acatton@tiolive.com>
Date:   Thu Sep 1 09:35:31 2011 +0200

    Enable dav-fs module on apache compilation

commit 0c699697
Author: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date:   Wed Aug 31 08:04:24 2011 +0200

    version up : apache httpd 2.2.20 including a fix for CVE-2011-3192.

commit cedcfb49
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Aug 31 17:40:35 2011 +0200

    Adding webdav option on apache compilation

commit f59c5c549360ac8d5e16b3c510305502a41880f6
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Aug 31 15:13:11 2011 +0200

    Adding pull_backup_server on mariadb

commit 3728936e6a1b2728bcdefc70298bb4adb69a777e
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Aug 31 15:12:35 2011 +0200

    Switch mariadb to dropbear

commit dbe4efeda490d8f201d39ba1d1f2cac2e69c38f3
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Aug 31 15:03:09 2011 +0200

    Linking dropbear with slapos zlib

commit f6c9b477a9ba4fd67ccc0b19e2a1a8adfa767b11
Merge: bb80ae9 1a85f89
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Aug 30 14:05:24 2011 +0200

    Merging from pull-backup-server branch

commit bb80ae9bd341cfdf2663f7cff85b2a2cffc2cb32
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Aug 30 13:58:41 2011 +0200

    Switch from OpenSSH client to Dropbear client

commit d0cf9dfc9f34f7ab3bc747018bcb47f10afa8170
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Aug 30 13:57:21 2011 +0200

    Minor: Dropbear buildout fine tuning

commit 5f50ae5c79cce438ee0eabbede9590c797156dad
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Aug 30 09:08:41 2011 +0200

    Add ipv6 patch for dropbear

    Took here :
    <https://lists.openwrt.org/pipermail/openwrt-devel/2009-May/004299.html>

commit 80a2e24a8c6c54bd04d22b1b96710faa1c354bc2
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Aug 29 17:54:36 2011 +0200

    Updating the pull_backup_server buildout

commit 8736902307cde71ae6f95e257b3e89fef7d721db
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Aug 29 17:51:19 2011 +0200

    Replacing openssh buildout by dropbear one.

    Adding my own dropbear patch which was submitted to
    dropbear developpers.

commit 1a85f89df53a6c770371935f24448d5c12c1f75c
Author: Antoine Catton <acatton@tiolive.com>
Date:   Thu Aug 25 11:54:11 2011 +0200

    Minor: use internal writeFile function instead open(..., 'w')

commit cc1be9293072f9b95772dcc666cbbc2bf77b6bf2
Author: Antoine Catton <acatton@tiolive.com>
Date:   Thu Aug 25 09:40:57 2011 +0200

    Adding rdiff_backup installation and configuration

commit 38882163cb12d965ba0f1e3c87de9775ffe11ed0
Author: Antoine Catton <acatton@tiolive.com>
Date:   Wed Aug 24 09:48:07 2011 +0200

    Minor: adding ssh compression

commit eb5bff2affcc6a4b6e5d332a2c59c9663839c6a0
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Aug 23 17:35:57 2011 +0200

    Minor: fix adding ssh_config template

commit 07fcca2381cb9167779aa18434b0d8e1514d6403
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Aug 23 17:32:24 2011 +0200

    Minor: fix of error due to ssh_conf to self.ssh_conf renaming

commit c3f7c4944e960b463166e000422888bec13556a0
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Aug 23 16:47:32 2011 +0200

    Adding ssh_config file generation

commit 4c6ebe52eab924eca18df4950a2bce6f10513971
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Aug 23 16:43:52 2011 +0200

    Minor: adding consistency to known_hosts file creation

commit c814412504d1b9682c180e40507a861ec125ebb9
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Aug 23 16:40:50 2011 +0200

    Minor: put the parameter dict reading at the begining

commit 956db5d669d25bfbb0f0675a1d06d1c05a4056ad
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Aug 23 16:39:09 2011 +0200

    Minor: save sshd_conf options

commit 2535efd9dc003474b31480b529a1ecf2b057e2c0
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Aug 23 15:11:15 2011 +0200

    Minor: adding template for known_hosts file

commit 02f865391d3a95cbe87f7461696dec339ffe32e2
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Aug 23 12:58:55 2011 +0200

    Add known_hosts file generation

commit 411052f4452c273674a6e3d5497807e6f6041948
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Aug 23 12:57:40 2011 +0200

    Minor: strip the ssh key value.

commit 669996d528a3177a601b60ad0767b8e5c6791455
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Aug 23 12:56:35 2011 +0200

    Minor: dirty fix to avoid "unused option" message

commit 8dda614bcb389ae57398c020eafcdabf77354281
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Aug 23 12:55:08 2011 +0200

    Minor: save cron.d path

commit ca95838a0512a9065fa08f51152791ca918fadb0
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Aug 23 11:18:55 2011 +0200

    Minor: code condensation

commit 1e251053ab1a3eb7acd2bf5af42c075f56a1fbdb
Author: Antoine Catton <acatton@tiolive.com>
Date:   Tue Aug 23 10:38:46 2011 +0200

    Pull Backup Server recipe first draft

commit 9bf0841e55078e5f5d4ea822f05cbb0b2840f6d2
Author: Antoine Catton <acatton@tiolive.com>
Date:   Mon Aug 22 13:18:08 2011 +0200

    Minor: code cleaning on mysql recipe

commit 91a5ec43e7835acc283a88733b0edcc146013b5b
Author: Antoine Catton <acatton@tiolive.com>
Date:   Fri Aug 19 15:47:01 2011 +0200

    Minor: adding sshd_binary option to mariadb

commit ba53f1ed65021273f0c5797830ec164963391249
Author: Antoine Catton <acatton@tiolive.com>
Date:   Fri Aug 19 15:12:44 2011 +0200

    Adding openssh part to mariadb software release

commit 4fa4540c300e62322ff0eddd0609a02ad5d20f26
Author: Antoine Catton <acatton@tiolive.com>
Date:   Fri Aug 19 15:11:47 2011 +0200

    Adding openssh part

commit 15c4b3203aabefde58dcfcf43fafb3174290a671
Author: Antoine Catton <acatton@tiolive.com>
Date:   Fri Aug 19 13:25:42 2011 +0200

    Minor: clean up white spaces in mysql recipe
parent 2d836f2e
......@@ -3,6 +3,8 @@ parts = apache-php
extends =
../apache/buildout.cfg
../mariadb/buildout.cfg
../libtool/buildout.cfg
[apache-php]
# Note: Shall react on each build of apache and reinstall itself
......
......@@ -44,6 +44,7 @@ class Recipe(BaseSlapRecipe):
return arg
def _install(self):
self.software_type = self.parameter_dict['slap_software_type']
self.path_list = []
self.requirements, self.ws = self.egg.working_set()
......@@ -63,13 +64,12 @@ class Recipe(BaseSlapRecipe):
ca_conf['certificate_authority_path'])
self.linkBinary()
self.setConnectionDict(dict(
stunnel_ip = stunnel_conf['public_ip'],
stunnel_port = stunnel_conf['public_port'],
mysql_database = mysql_conf['mysql_database'],
mysql_user = mysql_conf['mysql_user'],
mysql_password = mysql_conf['mysql_password'],
))
self.setConnectionUrl(scheme='mysqls',
host=stunnel_conf['public_ip'],
port=stunnel_conf['public_port'],
auth=(mysql_conf['mysql_user'],
mysql_conf['mysql_password']),
path=mysql_conf['mysql_database'])
return self.path_list
def linkBinary(self):
......@@ -220,6 +220,7 @@ class Recipe(BaseSlapRecipe):
stunnel_conf_path = self.createConfigurationFile("stunnel.conf",
self.substituteTemplate(template_filename,
stunnel_conf))
self.path_list.append(stunnel_conf_path)
wrapper = zc.buildout.easy_install.scripts([('stunnel',
'slapos.recipe.librecipe.execute', 'execute_wait')], self.ws,
sys.executable, self.wrapper_directory, arguments=[
......@@ -318,5 +319,35 @@ class Recipe(BaseSlapRecipe):
)
self.path_list.append(mysql_backup_cron)
mysql_conf.update(backup_directory=backup_directory)
# Remote backup
if self.software_type in ['Backuped', 'Recover']:
remote_url = self.parameter_dict['remote_backup']
remote_backup_bin = zc.buildout.easy_install.scripts([('remote_backup',
'slapos.recipe.librecipe.execute', 'execute')], self.ws,
sys.executable, self.bin_directory, arguments=[
self.options['duplicity_binary'], '--no-encryption',
backup_directory, remote_url]
)[0]
self.path_list.append(remote_backup_bin)
remote_backup_cron = os.path.join(self.cron_d, 'remote_backup')
self.path_list.append(remote_backup_cron)
with open(remote_backup_cron, 'w') as file_:
file_.write('1 0 * * * %s' % self.parseCmdArgument(
remote_backup_bin))
if self.software_type == 'Recover':
zc.buildout.easy_install.scripts([('import_backup',
__name__+'.recover', 'import_remote_dump')], self.ws,
sys.executable, self.wrapper_directory, arguments={
'lock_file': os.path.join(self.work_directory,
'import_done'),
'database': mysql_conf['mysql_database'],
'mysql_binary': self.options['mysql_binary'],
'mysql_socket': mysql_conf['socket'],
'duplicity_binary': self.options['duplicity_binary'],
'remote_backup': remote_url,
'local_directory': backup_directory,
'dump_name': dump_filename,
'zcat_binary': self.options['zcat_binary'],
})
# The return could be more explicit database, user ...
return mysql_conf
import sys
import os
import time
import subprocess
def import_remote_dump(kwargs):
# Get data from kwargs
lock_file = kwargs['lock_file']
database = kwargs['database']
mysql_binary = kwargs['mysql_binary']
mysql_socket = kwargs['mysql_socket']
duplicity_binary = kwargs['duplicity_binary']
remote_backup = kwargs['remote_backup']
local_directory = kwargs['local_directory']
dump_name = kwargs['dump_name']
zcat_binary = kwargs['zcat_binary']
# The script start really here
if os.path.exists(lock_file):
sys.exit(127)
while subprocess.call([mysql_binary, '--socket=%s' % mysql_socket,
'-u', 'root', '-e', 'use %s;' % database]) != 0:
time.sleep(10)
subprocess.check_call([duplicity_binary, 'restore', '--no-encryption',
remote_backup, local_directory])
zcat = subprocess.Popen([zcat_binary, os.path.join(local_directory,
dump_name)],
stdout=subprocess.PIPE)
mysql = subprocess.Popen([mysql_binary, '--socket=%s' % mysql_socket,
'-D', database, '-u', 'root'],
stdin=zcat.stdout)
zcat.stdout.close()
sys.exit(mysql.poll())
......@@ -18,3 +18,5 @@ openssl_binary = ${openssl:location}/bin/openssl
stunnel_binary = ${stunnel:location}/bin/stunnel
gzip_binary = ${gzip:location}/bin/gzip
duplicity_binary = ${buildout:bin-directory}/duplicity
gzip_binary = ${gzip:location}/bin/gzip
zcat_binary = ${gzip:location}/bin/zcat
......@@ -70,7 +70,7 @@ eggs =
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = 3cb8c08a90d4c379e1efdd5ef4ef030a
md5sum = 426f3cf33899a1f78de8b6ff35917852
output = ${buildout:directory}/template.cfg
mode = 0644
dollar = $
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment