- In
<filename>.tf
:
variable "users" {
default = [
{
name = "user1"
databases = ["db1","db2"]
password = "change_me"
privileges = ["CONNECT","CREATE","TEMPORARY"]
#!/usr/bin/env bash | |
RED=$'\e[0;31m' | |
R=${RED} | |
BLUE=$'\e[0;34m' | |
B=${BLUE} | |
GREEN=$'\e[0;32m' | |
G=${GREEN} | |
CYAN=$'\e[0;36m' | |
C=${CYAN} |
### START: initContainers | |
initContainers: | |
- name: init-steps | |
command: ["sleep", "14400"] | |
image: alpine:latest | |
imagePullPolicy: IfNotPresent | |
resources: | |
limits: | |
memory: "128Mi" | |
cpu: "500m" |
truststore_pass ?= password | |
java_path ?= /usr/bin/java | |
NODEINFO = $(shell basename additional-node-infos/*) | |
etc_hosts: | |
sed -i 's/.*127.0.0.1.*/127.0.0.1 localhost idman-host netmap-host notary-node/' /etc/hosts |
<filename>.tf
:variable "users" {
default = [
{
name = "user1"
databases = ["db1","db2"]
password = "change_me"
privileges = ["CONNECT","CREATE","TEMPORARY"]
cat << 'EOF' > ~/.bash_profile | |
if [ -z "$TMUX" ]; then | |
tmux attach -t default || tmux new -s default | |
fi | |
EOF |
#!/bin/bash | |
export TKN=$(curl -X POST 'http://localhost:8080/auth/realms/master/protocol/openid-connect/token' \ | |
-H "Content-Type: application/x-www-form-urlencoded" \ | |
-d "username=admin" \ | |
-d 'password=admin' \ | |
-d 'grant_type=password' \ | |
-d 'client_id=admin-cli' | jq -r '.access_token') | |
curl -X GET 'http://localhost:8080/auth/admin/realms' \ |
version: '3' | |
services: | |
webserver: | |
image: nginx:latest | |
command: [nginx-debug, '-g', 'daemon off;'] | |
ports: | |
- "8080:80/tcp" |
##-------------------------- | |
## Terraform: Functions ## | |
##-------------------------- | |
## Open terraform console | |
terraform console | |
####################### | |
## Numeric Functions ## | |
####################### |
: ' | |
thanks to https://packagecloud.io/ | |
You can find a list of supported OSes and distributions on our website: https://packagecloud.io/docs#os_distro_version | |
' | |
detect_os_deb () | |
{ | |
if [[ ( -z "${os}" ) && ( -z "${dist}" ) ]]; then | |
# some systems dont have lsb-release yet have the lsb_release binary and | |
# vice-versa |