Skip to content

Instantly share code, notes, and snippets.

Avatar

Nicolas Cohen ncknt

View GitHub Profile
View java-spin-mtls.yml
# TLS only
# server:
# ssl:
# enabled: true
# # Identity of the server
# key-store: /path/to/server/java/server.p12"
# key-store-type: "PKCS12"
# key-alias: server
# key-store-password: <keystorepassword>
View generate-certs.sh
#!/bin/bash -xe
CA_PASSWORD="asdf1234"
SERVER_PASSWORD="qwer1234"
CLIENT_PASSWORD="zxcv1234"
# Don't change me actually
DEFAULT_TRUSTSTORE_PASSWORD="changeit"
TRUSTSTORE_PASSWORD="poiu1234"
USERS=("user1" "user2" "user3")
CLIENT_SERIAL=01
View download-bom.sh
#!/bin/bash
# This script download a version of Armory's BOM to a local directory
# Usage: download.sh <version name> <destination path>
# Prerequisites:
# - aws cli: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html
# - access to public s3 installed (no need for credentials)
# - write access to the destination path
# Change that
View start-clouddriver-sql.sh
#!/bin/bash
# This script spins up a new "spin-clouddriver-sql" deployment as a copy of the current "spin-clouddriver"
# with SQL caching agent enabled. Labels are modified such that pods won't be accessible from other services.
# You'll need Spinnaker running in the namespace, kubectl, and jq installed locally.
NAMESPACE=myspinnakernamespace
CONTEXT=kubeconfigcontext
SQL_CONFIG_SECRET=spin-clouddriver-sql-secret
SQL_DEPLOY_NAME=spin-clouddriver-sql
View Clean up old Spinnaker secrets
#!/bin/bash
set -f
CONTEXT=$1
NAMESPACE=$2
contains() {
local e match="$1"
shift
for e; do [[ "$e" == "$match" ]] && return 0; done
return 1