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 ( | |
"os" | |
"strconv" | |
) | |
func main() { | |
tc := 1 | |
if temp := os.Getenv("THREADS"); temp != "" { | |
number, err := strconv.Atoi(temp) | |
if err != nil { |
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
resource "kubernetes_ingress" "node0_ingress" { | |
metadata { | |
name = local.node0 | |
namespace = local.namespace | |
annotations = { | |
"kubernetes.io/ingress.class" = "nginx" | |
"nginx.ingress.kubernetes.io/backend-protocol" = "HTTP" | |
"nginx.ingress.kubernetes.io/enable-cors" = "true" | |
} | |
} |
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
resource "kubectl_manifest" "node0_deployment" { | |
apply_only = true | |
wait_for_rollout = false | |
yaml_body = <<YAML | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: ${local.node0} | |
namespace: ${local.namespace} |
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: apps/v1 | |
kind: Deployment | |
metadata: | |
name: node0 | |
namespace: namespace | |
labels: | |
app: node0 | |
spec: | |
replicas: 3 | |
selector: |
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
sudo apt-get install lxde xorg lxdm --no-install-recommends |
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
# File: main.tf | |
locals { | |
# Static variables | |
domain = "domain.com" | |
name_list = [ | |
"name1", | |
"name2", | |
"name3" | |
] |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- Do not edit this file, it will be overwritten on install. | |
Copy the file to $HOME/.config/openbox/ instead. --> | |
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude"> | |
<resistance> | |
<strength>10</strength> | |
<screen_edge_strength>20</screen_edge_strength> | |
</resistance> | |
<focus> | |
<focusNew>yes</focusNew> |
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
terraform { | |
required_version = ">= 1.0.0" | |
required_providers { | |
aws = { | |
source = "hashicorp/aws" | |
version = "~> 3.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
get-ecr-image(){ | |
# Split URI in shell | |
splittedUri=(${1//./ }) | |
# Get needed positions (account & region) | |
ACCOUNT=${splittedUri[0]} # account | |
REGION=${splittedUri[3]} # region | |
# Get ECR password & Login in ECR | |
aws ecr get-login-password --region ${REGION} | docker login --username AWS --password-stdin "${ACCOUNT}.dkr.ecr.${REGION}.amazonaws.com" |
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
kubectl get configmap -o json -n namespace | jq '.items[] | [.metadata.namespace, .metadata.name, .data ]' |