- role defaults
- inventory file or script group vars
- inventory group_vars/all
- playbook group_vars/all
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 bash | |
# Usage | |
# | |
# Start: ./kubernetes-dashboard-dev.sh k8s-dashboard-start | |
# Stop: ./kubernetes-dashboard-dev.sh k8s-dashboard-stop | |
# | |
K8S_DASHBOARD_PORT=30000 |
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
#!/bin/sh | |
if [ -z "$1" ] ; then userid=$(whoami); else userid=$1; fi | |
sudo tee /etc/sudoers.d/${userid} > /dev/null <<EOF | |
${userid} ALL=(root) NOPASSWD:ALL | |
EOF |
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 bash | |
shopt -s extglob | |
set -o errtrace | |
#set -o errexit | |
set +o noclobber | |
# Defaults {{{ | |
ASSUMEYES=0 | |
NOOP= |
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 bash | |
shopt -s extglob | |
set -o errtrace | |
#set -o errexit | |
set +o noclobber | |
# DEFAULTS | |
NOOP= | |
FORCE=0 |
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 jinja2 | |
import json | |
import logging | |
import os | |
import requests | |
import tempfile | |
import pykube.config | |
import pykube.http |
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
from kubernetes import client, config | |
# specify context in the next method call if desired | |
config.load_kube_config() | |
v1 = client.CoreV1Api() | |
def get_public_ip(addresses): | |
public_ip = [a.address for a in addresses if a.type == 'ExternalIP'] | |
if len(public_ip) != 1: |
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
from kubernetes import client, config | |
from datetime import datetime | |
def extract_days(pod_timestamp): | |
delta = datetime.now().replace(tzinfo=None) - pod_timestamp.replace(tzinfo=None) | |
return delta.days | |
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
version: "2.1" | |
services: | |
settings-tp: | |
image: hyperledger/sawtooth-settings-tp:1.0 | |
container_name: sawtooth-settings-tp-default | |
depends_on: | |
- validator | |
entrypoint: settings-tp -vv -C tcp://validator:4004 |
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 | |
kind: Template | |
metadata: | |
name: sawtooth | |
annotations: | |
app: sawtooth | |
description: Everything you need for sawtooth | |
message: "A sawtooth server has been deployed." | |
parameters: | |
- name: IMAGE_NAMESPACE |