This file contains hidden or 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 | |
# Count ACI containers | |
RESOURCE_GROUP="" | |
TOTAL_CONTAINERS=0 | |
CONTAINER_COUNT=0 | |
echo "\$CONTAINER_RESOURCEGROUP | \$CONTAINER_NAME | \$CONTAINER_COUNT" | |
while IFS=$'\t' read -r CONTAINER_NAME CONTAINER_RESOURCEGROUP ; do |
This file contains hidden or 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 | |
clusters=$(aws ecs list-clusters --query 'clusterArns' --output text) | |
total_tasks=0 | |
for cluster in $clusters; do | |
task_count=$(aws ecs list-tasks --cluster $cluster --query 'length(taskArns[])') | |
total_tasks=$((total_tasks + task_count)) | |
done | |
echo "Total ECS tasks in all clusters in the account, region: $total_tasks" |
This file contains hidden or 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "QualysCustomPolicyPermissions", | |
"Effect": "Allow", | |
"Action": [ | |
"states:DescribeStateMachine", | |
"elasticfilesystem:DescribeFileSystemPolicy", | |
"qldb:ListLedgers", |
This file contains hidden or 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "InventoryPermissions", | |
"Effect": "Allow", | |
"Action": [ | |
"eks:ListFargateProfiles", | |
"eks:DescribeFargateProfile" | |
], |
This file contains hidden or 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 | |
aws ecs list-clusters | jq --raw-output 'map(.[])| .[]' | while read -r CLUSTER; do | |
aws ecs list-tasks --cluster "$CLUSTER" --desired-status RUNNING --launch-type FARGATE --no-paginate | jq --raw-output 'map(.[])| .[]' | while read -r TASK; do | |
aws ecs describe-tasks --cluster "$CLUSTER" --tasks "$TASK" | jq ".tasks | .[] | .taskDefinitionArn" | awk -F "/" '{print $NF}' | tr -d '"' | while read -r RUNNINGTASKDEFINITION; do | |
echo "cluster, taskDefinitionArn, patchStatus" | |
echo -n "$CLUSTER, $RUNNINGTASKDEFINITION, " | |
# 'Checking for string "/tmp/CrowdStrike/rootfs/entrypoint-ecs.sh" in entrypoint' | |
if aws ecs describe-task-definition --task-definition "$RUNNINGTASKDEFINITION" | grep -q "/tmp/CrowdStrike/rootfs/entrypoint-ecs.sh" | |
then | |
echo patched |
This file contains hidden or 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 | |
# 'Checking for string "/tmp/CrowdStrike/rootfs/entrypoint-ecs.sh" in entrypoint' | |
echo "taskDefinitionArn, patchStatus" | |
aws ecs list-task-definitions | jq --raw-output 'map(.[])| .[]' | while read -r i; do | |
echo -n "$i, " | |
if aws ecs describe-task-definition --task-definition "$i" | grep -q "/tmp/CrowdStrike/rootfs/entrypoint-ecs.sh" | |
then | |
echo patched | |
else | |
echo not patched |
This file contains hidden or 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: app/v1 | |
kind: Deployment | |
metadata: | |
name: carts-db | |
labels: | |
app: carts-db | |
namespace: sock-shop | |
spec: | |
replicas: 1 | |
template: |
This file contains hidden or 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
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco install adobereader vlc git 7zip teamviewer mremoteng telegram whatsapp vmware-powercli-psmodule bosh-cli vmwarevsphereclient govc kubernetes-cli docker-compose docker-desktop vault kubernetes-helm vscode vscode-gitlens vscode-docker scode-gitignore vscode-icons vscode-ansible microsoft-windows-terminal terraform |
This file contains hidden or 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
nginx:1.15 | |
registry:2 | |
python:3.7-stretch | |
node:8.12-jessie |
This file contains hidden or 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 subscription-manager register | |
sudo subscription-manager attach | |
sudo subscription-manager refresh | |
sudo subscription-manager repos --enable=rhel-7-server-satellite-6.3-rpms --enable=rhel-server-rhscl-7-rpms --enable=rhel-7-server-rpms | |
sudo yum clean all | |
sudo yum repolist enabled | |
sudo yum update | |
sudo yum upgrade | |
sudo yum install satellite |
NewerOlder