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
FROM mcr.microsoft.com/windows/servercore:ltsc2019 | |
# everything will be installed inside this directory inside the container | |
WORKDIR "C:/ProgramData" | |
# install chocolately package manager | |
RUN @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" -Y | |
RUN choco install openjdk8 -Y | |
RUN refreshenv |
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
FROM mcr.microsoft.com/windows/servercore:ltsc2019 | |
# install needed fonts for googlechrome to run properly | |
ADD files/fonts.tar /Fonts/ | |
WORKDIR /Fonts/ | |
RUN @powershell -NoProfile -ExecutionPolicy Bypass -Command ".\Add-Font.ps1 Fonts" | |
WORKDIR "C:/ProgramData" | |
# enable Web-WebSockets |
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 | |
# Author: Trinh Nguyen (Jin) | |
# 12 Dec 2020 | |
from queue import Queue | |
SAFE_RANGE = 23 | |
AXIS_LEN = 1000 |
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
FROM python:3.7-stretch | |
LABEL maintainer="Trinh Nguyen <[email protected]>" | |
WORKDIR /keycloak_flask | |
COPY . /keycloak_flask | |
ENV FLASK_APP=keycloak_flask.user | |
ENV FLASK_DEBUG=1 |
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
FROM python:3.7-stretch | |
LABEL maintainer="Trinh Nguyen <[email protected]>" | |
WORKDIR /keycloak_flask | |
COPY . /keycloak_flask | |
ENV FLASK_APP=apps.keycloak_flask.user | |
ENV KEYCLOAK_FLASK_SETTINGS=local_settings.py |
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
#! /bin/bash | |
# Run this script inside a bastion instance | |
# $1: kong address and administration port, e.g., kong.dangtrinh.com:8001 | |
KONG_URL=$1 | |
# get all hosts of the services | |
latest_hosts=( $(curl ${KONG_URL}/services | jq -r '.["data"][] | .host') ) | |
# list all upstream names | |
all_upstreams=( $(curl ${KONG_URL}/upstreams | jq -r '.["data"][] | .name') ) |
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
#!/bin/bash | |
# service_text_file is the path to a text file that contains a list of service names, each service name is on each line | |
cluster=$1 | |
service_text_file=$2 | |
desired_count=$3 | |
while IFS= read -r line | |
do | |
echo "$line" |
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
#! /bin/bash | |
SSH_KEY=$1 | |
BASTION_IP=$2 | |
USERNAME=$3 | |
PROXY_PORT=`comm -23 <(seq 13000 13999 | sort) <(netstat -tan | awk '{print $4}' | cut -d':' -f2 | sort -u) | shuf | head -n 1` | |
ssh -i "$SSH_KEY" -CND "${PROXY_PORT}" -q "${USERNAME}@${BASTION_IP}" & | |
echo "socks5://localhost:$PROXY_PORT" |
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 bash | |
set -e | |
source $SNAP/actions/common/utils.sh | |
KUBECTL="$SNAP/kubectl --kubeconfig=${SNAP_DATA}/credentials/client.config" | |
if $KUBECTL get ns metallb-system >/dev/null 2>&1 | |
then |
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 bash | |
set -e | |
source $SNAP/actions/common/utils.sh | |
echo "Disabling MetalLB" | |
KUBECTL="$SNAP/kubectl --kubeconfig=${SNAP_DATA}/credentials/client.config" |
NewerOlder