Skip to content

Instantly share code, notes, and snippets.

View mrhillsman's full-sized avatar
🎓
Learning

Melvin Hillsman mrhillsman

🎓
Learning
View GitHub Profile
kind: ConfigMap
apiVersion: v1
metadata:
name: echo-server
namespace: 3scale
selfLink: /api/v1/namespaces/3scale/configmaps/echo-server
uid: e6dd1ea5-4172-11ea-9132-0800273d8032
resourceVersion: '473690'
creationTimestamp: '2020-01-28T02:07:14Z'
data:
@mrhillsman
mrhillsman / reflect.py
Created January 27, 2020 23:12 — forked from 1kastner/reflect.py
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from http.server import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
# git clone both kubernetes and kind git repos before running these
cd $GOPATH/src/sigs.k8s.io/kind && go install .
kind build base-image --image kindest/base:latest --source $GOPATH/src/sigs.k8s.io/kind/images/base --loglevel debug
kind build node-image --type bazel --image kindest/node:latest --base-image kindest/base:latest --kube-root=$GOPATH/src/k8s.io/kubernetes/ --loglevel debug
# Needs these repos to be cloned:
- sigs.k8s.io/kind
- k8s.io/kubeadm
- k8s.io/kubernetes
- k8s.io/test-infra
# Install kubetest using :
"cd $GOPATH/src/k8s.io/test-infra/kubetest && go install ."
cd $GOPATH/src/k8s.io/kubernetes && kubetest \
#!/bin/bash
# mysql-db-clone.sh old-db dumpfile new-db
mysqldump $1 > $2
mysqladmin create $3
mysql $3 < $2
root@docker:~# cat projects.yaml | yq 'to_entries|.[]|[.key, .value.ptl.name, .value.ptl.email]'
[
"adjutant",
"Adrian Turjak",
"adriant@catalyst.net.nz"
]
[
"barbican",
"Ade Lee",
"alee@redhat.com"
# I deleted all partitions except root
# resizepart via parted
# reboot machine
# jump into tmux/session
# resize2fs /dev/sda1
# wait
@mrhillsman
mrhillsman / vxlan-mesh-create.sh
Last active June 6, 2018 13:54 — forked from cloudnull/vxlan-mesh-create.sh
Create a vxlan mesh on multiple hosts for multiple bridged interfaces to create isolated user networks. The primary use-case here is tenant Isolation with OpenStack Ironic.
#!/bin/bash
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@mrhillsman
mrhillsman / local.conf
Last active June 10, 2018 14:30
trying out some devstack stuff
[[local|localrc]]
disable_all_services
enable_plugin barbican https://git.openstack.org/openstack/barbican stable/queens
enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas stable/queens
enable_plugin octavia https://git.openstack.org/openstack/octavia stable/queens
enable_plugin octavia-dashboard https://git.openstack.org/openstack/octavia-dashboard stable/queens
LIBS_FROM_GIT+=python-octaviaclient
#KEYSTONE_TOKEN_FORMAT=fernet
@mrhillsman
mrhillsman / ansible-bootstrap-ubuntu-16.04.yml
Created April 18, 2018 05:18 — forked from gwillem/ansible-bootstrap-ubuntu-16.04.yml
Get Ansible to work on bare Ubuntu 16.04 without python 2.7
# Add this snippet to the top of your playbook.
# It will install python2 if missing (but checks first so no expensive repeated apt updates)
# gwillem@gmail.com
- hosts: all
gather_facts: False
tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)