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
service { | |
name "mysql" | |
type "DATABASE" | |
lifecycle{ | |
install "mysql_install.groovy" | |
start "mysql_start.groovy" |
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
def builder = new AntBuilder() | |
builder.sequential { | |
echo(message:"runMysqlDump: ${debugMsg}") | |
exec(executable:"${binFolder}/${execFile}", osfamily:"${osName}", output:"${dumpSqlFullPath}") { | |
arg(line:"${argsLine}") | |
} | |
zip(destFile:"${dumpZipFullPath}", basedir: "${dumpFolder}" ,includes:"${sqlFileName}", update:true ) | |
delete(file:"${dumpSqlFullPath}") | |
} |
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 environment variables | |
export PATH=$PATH:/usr/sbin:/sbin:/usr/bin || error_exit $? "Failed on: export PATH=$PATH:/usr/sbin:/sbin" | |
# Removing previous mysql installation if exists... | |
yum -y -q remove mysql mysql-server | |
# Removing old stuff (since in some cases, there are leftovers after uninstall) | |
rm -rf /usr/lib/mysql* || error_exit $? "Failed on: sudo rm -rf /usr/lib/mysql*" | |
rm -rf /var/lib/mysql* || error_exit $? "Failed on: sudo rm -rf /var/lib/mysql*" |
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
String serverBootResponse = | |
service.path("machine/createMachine") | |
.queryParam("name", serverName) | |
.queryParam("imageId", imageId) | |
.accept(MediaType.APPLICATION_XML) | |
.cookie(cookie) | |
.get(String.class); | |
final DocumentBuilder documentBuilder = createDocumentBuilder(); | |
final Document doc = |
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
String serverBootResponse = | |
service.path(this.pathPrefix + "servers") | |
.header("Content-Type", "application/json") | |
.header("X-Auth-Token", token) | |
.accept(MediaType.APPLICATION_XML) | |
.post(String.class, json); | |
final DocumentBuilder documentBuilder = createDocumentBuilder(); | |
final Document doc = | |
documentBuilder.parse(new InputSource(new StringReader(serverBootResponse))); |