Skip to content

Instantly share code, notes, and snippets.

@xlcommunity
xlcommunity / compositeGroupDeployer.py
Last active Aug 29, 2015
Combining Parallel and Sequential deployments in a Composite Package
View compositeGroupDeployer.py
# THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS
# FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS.
# XL Deploy CLI script to deploy a composite package in groups
# 2014-05-01 - Tom Batchelor
# 2014-06-05 - Tom Batchelor - Update to use Composites of Composites as the groups
# 2014-06-10 - Tom Batchelor - Minor refactoring and addition of documenation items, added exit code
# Version 3
#
@xlcommunity
xlcommunity / jackrabbit-repository_mySqlClusterNode1.xml
Last active Aug 29, 2015
High Availability Setup - XLD MySql (and clustering option)
View jackrabbit-repository_mySqlClusterNode1.xml
<?xml version="1.0"?>
<!--
THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS
FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS.
-->
<!DOCTYPE Repository
PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.0//EN"
"http://jackrabbit.apache.org/dtd/repository-2.0.dtd">
<!--
@xlcommunity
xlcommunity / cleanRevisions.py
Last active Aug 29, 2015
Delete all application package revisions before a specified one
View cleanRevisions.py
# THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS
# FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS.
# usage : provide Application Package ID as "Applications/MyApp/1.0.39" as the first parameter
# usage : bin/cli.sh -expose-proxies -username <user> -password <pass> -f cleanRevisions.py "Applications/MyApp/1.0.39"
import sys
yourDP = sys.argv[1]
for revision in proxies.getHistoryService().readRevisions(yourDP):
if revision.getRevisionName() == "current" :
@xlcommunity
xlcommunity / user_compliance.txt
Created Mar 11, 2015
License Compliance Checking
View user_compliance.txt
#!/bin/sh
cat audit.* | grep -e '^[0-9-]' | awk '{ month = substr($1,1,7); user = $4; if (index(users[month], user) == 0) users[month] = users[month] " " user; } END { for(u in users) { print u ":" users[u] } }'
@xlcommunity
xlcommunity / jackrabbit-repository_mySqlClusterNode2.xml
Last active Aug 29, 2015
High Availability Setup - XLD MySql (and clustering option)
View jackrabbit-repository_mySqlClusterNode2.xml
<?xml version="1.0"?>
<!--
THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS
FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS.
-->
<!DOCTYPE Repository
PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.0//EN"
"http://jackrabbit.apache.org/dtd/repository-2.0.dtd">
<!--
@xlcommunity
xlcommunity / create-and-import-package.py
Created Mar 11, 2015
Example script to create a deployment package and publish it to XL Deploy
View create-and-import-package.py
import os
import subprocess
import sys
import tempfile
import time
#################################################################################
#
# ---------------------------------------------------------------------------
# THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
@xlcommunity
xlcommunity / compareAppAcrossEnvironments-0.9.cli
Created Mar 11, 2015
Compare current deployed application versions in a pipeline
View compareAppAcrossEnvironments-0.9.cli
#######################################################################
# NOTICE: This script is provided as a sample only, with no warranty
# expressed or implied, and is not supported by XebiaLabs.
#######################################################################
from java.util import LinkedHashMap
def nameFromId(id):
return id[id.rfind('/')+1:]
def idPrefix(id):
@xlcommunity
xlcommunity / sample-result.csv
Created Mar 11, 2015
Compare current deployed application versions in a pipeline
View sample-result.csv
Application sampleApp
Environment Overview:
Environments/A/MyEnv2 version 1.0-20130302-220317
Environments/MyEnv version 1.0-20130302-220317
Comparison of deployables per environment:
Deployable Property MyEnv2 MyEnv
sample-command container Infrastructure/dummy-cifs-host Infrastructure/192.168.10.145
@xlcommunity
xlcommunity / jackrabbit-repository_mySqlNoCluster.xml
Last active Aug 29, 2015
High Availability Setup - XLD MySql (and clustering option)
View jackrabbit-repository_mySqlNoCluster.xml
<?xml version="1.0"?>
<!--
THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS
FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS.
-->
<!DOCTYPE Repository
PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.0//EN"
"http://jackrabbit.apache.org/dtd/repository-2.0.dtd">
<!--
@xlcommunity
xlcommunity / load-into-dict.cli
Last active Aug 29, 2015
Importing a properties file into a dictionary
View load-into-dict.cli
# THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS
# FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS.
from java.util import HashSet
from java.util import Properties
from java.io import FileReader
def loadProps(propertiesFile):
props = Properties()