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
#!/bin/bash -eu | |
# | |
# Trigger a managed upgrade. | |
# | |
# Authors: | |
# edward.hope-morley@canonical.com | |
# | |
SERVICE=$1 | |
RELEASE=$2 | |
SERIES=${3:-'trusty'} |
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
#!/bin/bash -eu | |
# Author: | |
# Edward Hope-Morley <opentastic@gmail.com> | |
# | |
# Description: | |
# Fetches package source and applies all debian/patches to current git | |
# working tree (ideally a clean branch created from associated build tag ). | |
# | |
# Each patch will be committed once applied successfully. | |
# |
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
#!/bin/bash -eux | |
repos=( | |
charm-swift-storage | |
charm-swift-proxy | |
charm-rabbitmq-server | |
charm-percona-cluster | |
charm-openvswitch-odl | |
charm-openstack-dashboard | |
charm-odl-controller | |
charm-nova-compute |
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
#!/bin/bash -eu | |
# | |
# From https://gist.github.com/dosaboy/24274d8de9110c4cdba4 | |
# Fetch openstack charm patchset from review.openstack.org and store locally | |
# | |
(($#==3)) || { echo "USAGE: `basename $0` <repository-name> <gerrit-changeref> <patchset> [<ubuntu-series>]"; exit 1; } | |
REPO=$1 | |
CHANGEREF=$2 | |
PATCHSET=$3 | |
SERIES=${4:-jammy} |
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
#!/bin/bash -eu | |
# | |
# Build hardening.io test charm from layer | |
# | |
(($# > 0)) || { echo "USAGE: `basename $0` os|ssh|mysql|apache"; exit 1; } | |
set -x | |
mod=$1 | |
target=charms/hardening-$mod-tests-charm | |
layer=layers/hardening-$mod-tests | |
results=/tmp/charm_build_results |
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
#!/bin/bash -eux | |
PREFIX=10.6.0.0 | |
ROUTER= | |
NUMNETS=1 # number if networks/interfaces to add per unit | |
while (($#)); do | |
case "$1" in | |
-s|--service) | |
SERVICE="$2" | |
shift |
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
#!/bin/bash -eux | |
read -a instances<<<`nova list --all-tenants| grep -Ev "$\+\-\-+|\sID\s"| awk '{print $2}'| sed '/^$/d'` | |
echo ${#instances[@]} instances to be deleted | |
for vm in ${instances[@]}; do | |
echo "Deleting instance $vm" | |
#nova delete $vm && continue | |
read -p "Soft delete instance failed. Try hard delete? [Y,n] " answer | |
if [ -z "$answer" ] || [ ${answer,,} = "y" ]; then | |
#nova force-delete $vm | |
: |
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
#!/bin/bash -eux | |
# | |
# Get debian source for a package. | |
# | |
PKG=$1 # package name | |
UREL=$2 # ubuntu release name | |
VER=`rmadison $PKG| awk "\\$5==\"$UREL\" {print \\$3}"` | |
URL="https://launchpad.net/ubuntu/+archive/primary/+files/${PKG}_$VER.dsc" | |
dget $URL |
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
#!/usr/bin/env python2 | |
""" | |
Origin: https://gist.github.com/dosaboy/6cf5ef71f2cfe39ba60c08f7010d9d5c | |
Authors: | |
- edward.hope-morley@canonical.com | |
- opentastic@gmail.com | |
Description: | |
S3 API test tool. Can be used to test S3 api as provided by |
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
#!/bin/bash -eu | |
(($# >= 2)) || { echo "USAGE: `basename $0` <pkg_ver> <lp_bug> [<build_id>]"; exit 1; } | |
pkg_ver=$1 | |
lp_bug=$2 | |
build_id="${3:-0}" | |
echo ${pkg_ver}+hf${lp_bug}v`date +%Y%m%d`.$build_id |
OlderNewer