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
--- | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: dns | |
labels: | |
name: dns | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount |
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
--- | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: certs | |
labels: | |
name: certs | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount |
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 -o errexit | |
set -o nounset | |
set -o pipefail | |
log() { | |
# shellcheck disable=SC1117 | |
echo -e "\033[0;33m$(date "+%H:%M:%S")\033[0;37m ==> $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
## replace Dockerfile.jetty in https://github.com/plantuml/plantuml-server | |
## this will produce smaller image ~ 150MB | |
FROM maven:3-jdk-8 AS builder | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends graphviz fonts-wqy-zenhei && \ | |
apt-get clean | |
COPY pom.xml /app/ |
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 jenkinsci/jnlp-slave | |
LABEL maintainer="Said Sef <[email protected]>" | |
USER root | |
RUN apt-get update && \ | |
apt-get -yq upgrade && \ | |
apt-get install -yq \ | |
apt-transport-https ca-certificates gnupg2 software-properties-common \ |
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
apiVersion: "v1" | |
kind: "Pod" | |
metadata: | |
name: "jenkins-slave" | |
labels: | |
name: "jenkins-slave" | |
spec: | |
containers: | |
- name: "jenkins-slave" | |
image: "saidsef/jnlp-slave-docker-ce" |
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
package co.uk.saidsef | |
import hudson.AbortException | |
class Version implements Serializable { | |
final def major | |
final def minor | |
final def patch |
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
# Qucik way to cleanup evicted pods across all namespaces | |
# Long term fix: https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/ | |
for NS in `kubectl get ns | grep -v NAME | awk '{ print $1 }'`; do | |
kubectl get all -n $NS | grep -i evicted | awk '{ print $1 }' | while read f; do kubectl delete -n $NS $f; done | |
done |
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
gradle_version=2.12 | |
wget -N https://services.gradle.org/distributions/gradle-${gradle_version}-all.zip | |
mkdir -p /opt/gradle | |
unzip gradle-${gradle_version}-all.zip | |
mv gradle-${gradle_version} /opt/gradle/ | |
ln -sfn gradle-${gradle_version} /opt/gradle/latest | |
chown -R ec2-user:ec2-user /opt/gradle |
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
[Unit] | |
# Location: /usr/lib/systemd/system : systemctl enable swarm | |
Description=swarm service manager | |
Documentation=https://plugins.jenkins.io/swarm | |
Wants=network-online.target | |
After=network-online.target | |
StartLimitIntervalSec=0 | |
[Service] | |
Type=simple |