Skip to content

Instantly share code, notes, and snippets.

View dduportal's full-sized avatar

Damien Duportal dduportal

View GitHub Profile
provider "aws" {
region = "eu-west-2"
version = "~> 2.0"
}
variable "base_domain" {
type = "string"
description = "Base domain used for this experimentation"
default = "damienduportal.org"
}
#cloud-config
package_update: true
manage-resolv-conf: true
resolv_conf:
nameservers:
- '9.9.9.9'
packages:
BATS_HELPERS_DIR ?= $(CURDIR)/helpers
export BATS_HELPERS_DIR
BATS_BIN ?= $(CURDIR)/bats/bin/bats
tests:
$(BATS_BIN) $(CURDIR)/example.bats
version: '3'
services:
reverse-proxy:
image: traefik:v2.0
command:
- --providers.docker
- --entryPoints.web.address=:80
- --entryPoints.websecure.address=:443
- --api.dashboard=true
version: '3'
services:
webapp:
image: containous/whoami
# Move this directive under the "deploy:" if you are deploying to swarm instead of standalone Docker Engine
labels:
# Traefik v1
- "traefik.frontend.rule=Host:whoami.localhost"
# Traefik v2
@dduportal
dduportal / .env
Last active February 3, 2021 15:05
# No double quotes around the rule!
SERVICES_JENKINS_DIR=./
TRAEFIK_ROUTER_RULE_FOR_JENKINS=Host(`localhost`) || Host(`127.0.0.1`) || Host(`172.17.0.1`)
EXTERNAL_HTTP_PORT=80
EXTERNAL_HTTPS_PORT=443
EXTERNAL_JNLP_PORT=50000
JENKINS_MAX_MEMORY=4096M
JENKINS_MAX_CPUS=1.8
JENKINS_INTERNAL_HTTP_PORT=8080
JENKINS_INTERNAL_JNLP_PORT=50000
#!/bin/bash
# This script updates all the installed plugins of a Jenkins docker container,
# restart the instance and outputs the resulting list of updated plugins (aka. "plugins.txt")
#
set -eu -o pipefail
JENKINS_URL=https://"${JENKINS_HOST}"
JENKINS_TEST_CREDZ="admin:${ADMIN_TOKEN}"
JENKINS_CONTAINER_NAME="${PROJECT_ID:-default}_jenkins_1"
<p>
Execute <a href="https://www.updatecli.io/updatecli" target="_blank">updatecli</a> on the repository.
<p>
The following arguments are available for this function:
<ul>
<li>String action: (Optional - Default: "diff") Updatecli action (e.g. subcommand) to execute.</li>
<li>String config: (Optional - Default: "./updatecli/updatecli.d") path to the file or directory with the updatecli configuration (flag "--config").</li>
<li>String values: (Optional - Default: "./updatecli/values.yaml") path to the file with the updatecli values (flag "--values").</li>
@dduportal
dduportal / README.md
Last active September 24, 2021 01:35
Kubernetes on Raspberry Pis

Kubernetes 1.13 on Raspberry Pis

This tutoriel is HEAVILY inspired by https://gist.github.com/alexellis/fdbc90de7691a1b9edb545c17da2d975, but adapted (docker/kubernetes versions + custom scripts + a hacky "background script" to tune the timeout of Kubeadm)

Requirements

  • Hypriot 1.9.x (1.10 not tested yet because rc)
  • Kernel >= 4.14.54
  • Raspberry Pis