This file contains hidden or 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
import socket | |
for i in range(100): | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1) | |
try: | |
s.bind(('0.0.0.0', 65000)) | |
except: | |
print "Binding problem" | |
s.close() |
This file contains hidden or 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 python | |
"""A simple python script template. | |
""" | |
from __future__ import print_function | |
import os | |
import sys | |
import argparse |
This file contains hidden or 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
# Copyright 2011, Dell | |
# | |
# 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 | |
# distributed under the License is distributed on an "AS IS" BASIS, |
This file contains hidden or 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
# import the necessary packages | |
import argparse | |
import datetime | |
import time | |
# construct the argument parser and parse the arguments | |
ap = argparse.ArgumentParser() | |
ap.add_argument("-n", "--number", type=int, help="number of participants") |
This file contains hidden or 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
#cloud-config | |
# | |
# Use to spawn an instance and install devstack | |
# openstack server create --flavor m1.large --image opensuse150 --key-name mykey --security-group default --security-group "ping/ssh" --user-data cloud-config --nic net-id=cb4f16fb-248e-4095-b359-691f07d307fc leap15-devstack | |
groups: | |
- stack | |
users: | |
- default |
This file contains hidden or 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
#cloud-config | |
# | |
# Use to spawn an instance and install devstack | |
# openstack server create --flavor m1.large --image opensuse150 --key-name mykey --security-group default --security-group "ping/ssh" --user-data cloud-config --nic net-id=cb4f16fb-248e-4095-b359-691f07d307fc leap15-devstack | |
groups: | |
- stack | |
users: | |
- default |
This file contains hidden or 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
# this config file contains all config fields with comments | |
kind: Config | |
apiVersion: kind.sigs.k8s.io/v1alpha2 | |
# 1 control plane node and 3 workers | |
nodes: | |
# the control plane node config | |
- role: control-plane | |
# patch the generated kubeadm config with some extra settings | |
kubeadmConfigPatches: | |
- | |
This file contains hidden or 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
# Create a docker container with privileges | |
docker run --privileged -i -t ubuntu | |
# Inside the container create an overlay and moun the /sys/class/dmi/id folder | |
mkdir -p /tmp/overlay && \ | |
> mount -t tmpfs tmpfs /tmp/overlay && \ | |
> mkdir -p /tmp/overlay/{upper,work} && \ | |
> mount -t overlay overlay -o lowerdir=/sys/class/dmi/id,upperdir=/tmp/overlay/upper,workdir=/tmp/overlay/work /sys/class/dmi/id | |
# Check that the overlay is mounted | |
root@ba04ffbf6b53:/# mount | |
overlay on / type overlay (rw,relatime,lowerdir=/home/aojeagarcia/docker/overlay2/l/CJ5RY5KARMA2TGYBAZXKZ2UATK:/home/aojeagarcia/docker/overlay2/l/IH76YKNGVA4ANHOR2BJREE6YO4:/home/aojeagarcia/docker/overlay2/l/XHSQFRMONPMIOATXRYRMERF4RX:/home/aojeagarcia/docker/overlay2/l/NXCCDT6GQF62DMTR2AVCOIGT52:/home/aojeagarcia/docker/overlay2/l/BG34R5QJL3GEGBP24JDPITUB6H,upperdir=/home/aojeagarcia/docker/overlay2/fb3e50a942f1a3bc47f4ff9808b21a23af5cd7971f8a5e257441ddfa4b6e644d/diff,workdir=/home/aojeagarcia/docker/overlay2/fb3e50a942f1a3bc47f4ff9808b21a23af5cd7971f8a |
This file contains hidden or 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
--- | |
apiVersion: v1 | |
data: | |
Corefile: | | |
.:53 { | |
log | |
errors | |
health | |
kubernetes cluster.local in-addr.arpa ip6.arpa { | |
pods insecure |
This file contains hidden or 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
apiVersion: v1 | |
data: | |
config: |- | |
nonMasqueradeCIDRs: | |
- 10.244.0.0/16 | |
masqLinkLocal: true | |
resyncInterval: 10s | |
kind: ConfigMap | |
metadata: | |
labels: |