Skip to content

Instantly share code, notes, and snippets.

@xlcommunity
xlcommunity / create-and-import-package.py
Created March 11, 2015 13:52
Example script to create a deployment package and publish it to XL Deploy
import os
import subprocess
import sys
import tempfile
import time
#################################################################################
#
# ---------------------------------------------------------------------------
# THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
@xlcommunity
xlcommunity / createDAR.py
Last active February 15, 2019 12:59
Building a package from properties files/dictionaries/command arguments
# 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 create a DAR from artifacts defined in properties. Optionally also deploy to an env
# 2014-05-28 - 1 - Tom Batchelor
# 2014-05-29 - 2 - Tom Batchelor - Update to support properties files, also some refactoring thing into functions
# 2014-06-05 - 3 - Tom Batchelor - Update to support getting CLASSLOADER_MODE, CLASSLOADER_POLICY, SHARED_LIBRARIES and TAGS from XL Deploy
# dictionaries. Also creates ATPCO properties file copy tasks. Added wait for deployment with full status
# output
@xlcommunity
xlcommunity / user_compliance.txt
Created March 11, 2015 14:06
License Compliance Checking
#!/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 / cleanRevisions.py
Last active August 29, 2015 14:16
Delete all application package revisions before a specified one
# 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 / compositeGroupDeployer.py
Last active August 29, 2015 14:16
Combining Parallel and Sequential deployments in a Composite Package
# 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 / compareAppAcrossEnvironments-0.9.cli
Created March 11, 2015 14:32
Compare current deployed application versions in a pipeline
#######################################################################
# 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 March 11, 2015 14:33
Compare current deployed application versions in a pipeline
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 August 29, 2015 14:16
High Availability Setup - XLD MySql (and clustering option)
<?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 / jackrabbit-repository_mySqlClusterNode1.xml
Last active August 29, 2015 14:16
High Availability Setup - XLD MySql (and clustering option)
<?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 / jackrabbit-repository_mySqlClusterNode2.xml
Last active August 29, 2015 14:16
High Availability Setup - XLD MySql (and clustering option)
<?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">
<!--