Skip to content

Instantly share code, notes, and snippets.

View toabctl's full-sized avatar

Thomas Bechtold toabctl

  • Canonical
  • Berlin/Germany
View GitHub Profile
heat_template_version: 2016-10-14
description: >
Template for deploying Ardana in a multinode setup
parameters:
key_name:
type: string
label: Key Name
description: Name of key-pair to be used for compute instance
#!/bin/bash
set -e
# Author: Thomas Bechtold <[email protected]>
# License: Apache-2.0
# List of project for running the doc generation
@toabctl
toabctl / github-compare
Created January 4, 2019 06:03
Get changes for a github project
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2016 SUSE Linux GmbH
# Author: Thomas Bechtold <[email protected]>
from __future__ import print_function
import argparse
#!/usr/bin/python
#
# Create insert statements and do rollbacks to a database (bsc#1120593)
# TODO:
# - Create the database 'testdb'
# - Grant user access with something like: GRANT ALL PRIVILEGES ON testdb.* TO 'keystone'@'%';
#
# Author: Thomas Bechtold <[email protected]>
#
@toabctl
toabctl / heat-template.yml
Created March 19, 2019 12:16
OpenStack Heat template example
heat_template_version: 2016-10-14
description: >
Template for deploying Ardana in a multinode setup
parameters:
key_name:
type: string
label: Key Name
description: Name of key-pair to be used for compute instance
@toabctl
toabctl / teuthology-stats.py
Created January 24, 2020 07:32
Get number of Ceph teuthology test cases over time
#/usr/bin/python3
"""
Get statistics out of teuthology
This needs a ceph repo git checkout.
Author: Thomas Bechtold <[email protected]>
License: Apache-2.0
"""
@toabctl
toabctl / os-server-running.py
Created April 2, 2020 18:38
Running OpenStack servers
#!/usr/bin/python3
import argparse
import datetime
import sys
import openstack
def _parser():
parser = argparse.ArgumentParser(
$ cat aws-images.sh
#!/bin/bash
OUTFILE=out.txt
AWS_REGIONS=(ap-east-1 ap-northeast-1 ap-northeast-2 ap-northeast-3 ap-south-1 ap-southeast-1 ap-southeast-2 af-south-1 ca-central-1 cn-north-1 cn-northwest-1 eu-central-1 eu-north-1 eu-west-1 eu-west-2 eu-west-3 eu-south-1 sa-east-1 me-south-1 us-east-1 us-east-2 us-gov-west-1 us-gov-east-1 us-west-1 us-west-2)
for region in ${AWS_REGIONS[@]}; do
export AWS_DEFAULT_REGION=$region
echo "Getting images for region $region ..."
aws ec2 describe-images --owner 099720109477 --query 'Images[?Name!=`null`]|[? (starts_with(Name, `ubuntu/images/`) == `true`) || (starts_with(Name, `ubuntu-minimal/images/`) == `true`) || (starts_with(Name, `ubuntu-eks/`) == `true`)]|[? (contains(Name, `precise`) == `false`) && (contains(Name, `quantal`) == `false`) && (contains(Name, `raring`) == `false`) && (contains(Name, `saucy`) == `false`) && (contains(Name, `trusty`) == `false`) && (contains(Name, `utopic`) == `false`) && (contains(Name, `vivid`) == `false`) && (contain
@toabctl
toabctl / jenkins-jobs-delete
Created September 22, 2021 07:46
Delete jenkins jobs with python-jenkins
#!/usr/bin/python3
import argparse
import configparser
import re
import jenkins
def _config(args):
@toabctl
toabctl / aws-marketplace.py
Created February 22, 2022 12:18
AWS marketplace interactions
#!/usr/bin/python3
# Author: Thomas Bechtold <[email protected]>
import click
import boto3
import json
import prettytable