configure {
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
kubectl apply -f flink-configuration-configmap.yaml | |
kubectl apply -f jobmanager-svc.yaml | |
kubectl apply -f jobmanager-session-deployment.yaml -f task-manager-session-deployment.yaml |
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 python | |
# -*- coding: utf-8 -*- | |
# vim:fenc=utf-8 | |
# To fix this issue in terraform: | |
# Failed to unlock state: failed to retrieve lock info: unexpected end of JSON input | |
# Python does what Terraform cannot do! | |
"""Delete terraform lock | |
Usage: | |
terralock.py --list --table TABLE_NAME |
The complexity you might consider dictates the style of your environments as you see the examples 'good' 'better' and 'best' below. The best is not always better if it's a waste of time after all.
- Do use hosts: limiters to the least destructive inclusion group for added safety whenever possible.
- Do use extended block notation if you need additional levels of control around playbook / role execution.
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
awk 'function hextodec(str,ret,n,i,k,c){ | |
ret = 0 | |
n = length(str) | |
for (i = 1; i <= n; i++) { | |
c = tolower(substr(str, i, 1)) | |
k = index("123456789abcdef", c) | |
ret = ret * 16 + k | |
} | |
return ret | |
} |
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
# 1) Deploy the pod | |
# | |
# kubectl create -f busybox-non-root.yaml | |
# | |
# 2) Access the shell | |
# | |
# kubectl exec -ti busybox-1000 -- sh | |
# | |
# 3) from the shell run: | |
# |
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
class JenkinsBuilder(object): | |
""" | |
helper class for triggering jenkins jobs with the proper parameters | |
""" | |
def __init__(self, logger, baseurl, user, user_token, job, job_token): | |
self.logger = logger | |
self.baseurl = baseurl | |
self.user = user |
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
#The version that modifies in-place (very much like Ned Batchelders solution): | |
# https://stackoverflow.com/questions/3405715/elegant-way-to-remove-fields-from-nested-dictionaries | |
from collections import MutableMapping | |
from contextlib import suppress | |
def delete_keys_from_dict(dictionary, keys): | |
for key in keys: | |
with suppress(KeyError): | |
del dictionary[key] |
NewerOlder