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: DaemonSet | |
metadata: | |
namespace: kube-system | |
name: set-pid-max | |
labels: | |
k8s-app: set-pid-max | |
spec: | |
selector: | |
matchLabels: |
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
[Unit] | |
Description=start and stop the minecraft-server | |
[Service] | |
WorkingDirectory=/minecraft |
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
#!/bin/bash | |
# install az cli | |
# rpm --import https://packages.microsoft.com/keys/microsoft.asc | |
# sh -c 'echo -e "[azure-cli] | |
# name=Azure CLI | |
# baseurl=https://packages.microsoft.com/yumrepos/azure-cli | |
# enabled=1 | |
# gpgcheck=1 | |
# gpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/azure-cli.repo' |
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
name: cust-App-NP-$(Date:yyyyMMdd).$(Rev:.r) | |
trigger: | |
batch: true | |
branches: | |
include: | |
- master | |
variables: | |
- group: cust_non_prod_shared_terraform_config |
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
#!/bin/bash | |
# NOTE: Be careful as this code in intended to delete ALL Resources in a subscription. Use at your own risk. | |
# https://stackoverflow.com/a/56139987 | |
# Set The correct Subscription | |
az account set -s "<Subscription_name / Id>" | |
# Get All resource groups and loop to delete them | |
for rg_name in `az group list -o tsv --query [*].name`; do | |
echo Deleting ${rg_name} |
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
# Azure Pipeline. | |
# optional | |
variables: | |
- group: some_resource_group | |
name: $(Date:yyyyMMdd).$(Rev:.r) | |
trigger: | |
batch: true | |
# choose which branches to build automatically |
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
if [ $(az ad sp list --display-name "${CLIENT_APP_NAME}-rbac" | jq '. | length') -gt 0 ] | |
then | |
echo "RBAC client app ${CLIENT_APP_NAME}-rbac already exists" | |
else | |
TENANT_ID=$(az account show --query tenantId --out tsv) | |
SUBSCRIPTION_ID=$(az account show --query id --out tsv) | |
sp_vars=$(az ad sp create-for-rbac -n "${CLIENT_APP_NAME}-rbac" --role contributor --scopes="/subscriptions/${SUBSCRIPTION_ID}" | jq '[.appId, .password]') | |
CLIENT_ID=$(echo $sp_vars | jq -r '.[0]') | |
CLIENT_SECRET=$(echo $sp_vars | jq -r '.[1]') |
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
locals { | |
autoscale_resource_id = "service/${aws_ecs_cluster.cluster.name}/${aws_ecs_service.service.name}" | |
} | |
resource "aws_ecr_repository" "app_ecr" { | |
name = "${var.api_name}-${var.environment}" | |
} | |
resource "aws_ecs_cluster" "cluster" { | |
depends_on = ["aws_ecs_task_definition.taskdef"] |
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
locals { | |
autoscale_resource_id = "service/${aws_ecs_cluster.cluster.name}/${aws_ecs_service.service.name}" | |
} | |
resource "aws_ecr_repository" "app_ecr" { | |
name = "${var.api_name}-${var.environment}" | |
} | |
resource "aws_ecs_cluster" "cluster" { | |
depends_on = ["aws_ecs_task_definition.taskdef"] |
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 "aws_lb" "app" { | |
name = "${var.api_name}-${var.environment}" | |
internal = false | |
security_groups = ["${var.lb_security_groups}"] | |
subnets = ["${var.public_subnets}"] | |
idle_timeout = "${var.idle_timeout}" | |
tags = "${var.tags}" | |
} | |
resource "aws_alb_target_group" "http" { |
NewerOlder