- Place the script
resticbackup.cmd
intoC:\Windows
- Customize the script (S3 credentials, S3 endpoint, folders, ...)
- Create the file
C:\Windows\resticbackup.password
containing the restic repository password - Install the restic binary at
C:\Windows\restic.exe
- Create a task in Windows' task scheduler application that executes the
C:\Windows\resticbackup.cmd
script as an action on the desired schedule (e.g. nightly).
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 | |
# Required binaries: | |
# * k0s | |
# * kubectl | |
# * helm | |
# * cut | |
# * grep | |
# * ip | |
# * hostname |
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 -euo pipefail | |
username="${USER_NAME?No User-Name found!}" | |
password="${USER_PASSWORD?No Password found!}" | |
token_endpoint="${OIDC_TOKEN_ENDPOINT?No Oidc-Token-Endpoint!}" | |
client_id="${OIDC_CLIENT_ID?No Oidc-Client-Id!}" | |
client_secret="$(< "${OIDC_CLIENT_SECRET_FILE?No Oidc-Client-Secret-File!}")" |
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 -euo pipefail | |
namespace="${1?no namespace}" | |
source_pvc="${2?no source pvc}" | |
target_sc="${3?no target SC}" | |
tmp_pvc_name="${source_pvc}-tmp" |
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 -euo pipefail | |
fetch_hosts_as_rpz() { | |
local action="${1?no action!}" | |
local destination="${2?no destination!}" | |
shift 2 | |
if [ $# = 0 ] |
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 -euo pipefail | |
target_dir="${1?no target dir!}" | |
if [ -e "$target_dir" ] | |
then | |
echo "$target_dir already exists!" >&2 | |
exit 1 | |
fi |
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 | |
input="${1?no input}" | |
key_output="${2?no key output}" | |
crt_output="${3?no crt output}" | |
ca_output="${4?no ca output}" | |
openssl pkcs12 -legacy -in "$input" -out "${key_output}" -nocerts -nodes | |
openssl pkcs12 -legacy -in "$input" -out "${crt_output}" -clcerts -nokeys | |
openssl pkcs12 -legacy -in "$input" -out "${ca_output}" -cacerts -nokeys |
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
import org.hibernate.validator.internal.engine.DefaultClockProvider | |
import org.springframework.core.LocalVariableTableParameterNameDiscoverer | |
import org.springframework.core.PrioritizedParameterNameDiscoverer | |
import org.springframework.core.StandardReflectionParameterNameDiscoverer | |
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean | |
import java.lang.reflect.Constructor | |
import java.lang.reflect.Method | |
import javax.validation.ClockProvider | |
import javax.validation.Configuration | |
import javax.validation.ParameterNameProvider |
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
keycloak_to_pem() { | |
input="$(mktemp)" | |
echo "-----BEGIN $1-----" > "$input" | |
echo "$2" >> "$input" | |
echo "-----END $1-----" >> "$input" | |
output="$(mktemp)" | |
case "$1" in | |
"CERTIFICATE") | |
openssl x509 -inform PEM -in "$input" -out "$output" | |
;; |
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
services: | |
- name: postgres:12-alpine | |
alias: bootstrap-postgres | |
- name: redis:6 | |
alias: bootstrap-redis | |
variables: | |
POSTGRES_DB: bootstrap | |
POSTGRES_USER: bootstrap | |
POSTGRES_PASSWORD: '' |
NewerOlder