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
import time | |
import math | |
import multiprocessing | |
from argparse import ArgumentParser | |
def generate_cpu_load(interval, utilization): | |
"Generate a utilization % for a duration of interval seconds" | |
start_time = time.time() | |
for i in range(0, int(interval)): | |
while time.time() - start_time < utilization / 100.0: |
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: '3' | |
services: | |
elasticsearch: | |
container_name: es01 | |
image: docker.elastic.co/elasticsearch/elasticsearch:8.10.2 | |
environment: ['ES_JAVA_OPTS=-Xms2g -Xmx2g','bootstrap.memory_lock=true','discovery.type=single-node','xpack.security.enabled=false', 'xpack.security.enrollment.enabled=false'] | |
ports: | |
- 9200:9200 | |
networks: |
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 | |
# Replace the values below for your deployment/cluster | |
KIBANA_ENDPOINT=https://lab.kb.us-east1.gcp.elastic-cloud.com:9243 | |
KIBANA_USER=octavio | |
KIBANA_PW=super_secret | |
echo "Collecting the list from online agents..." |
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 | |
SCRIPT_VERSION=v1.0.0 | |
: "${DATE_FORMAT:="%Y-%m-%d %H:%I:%S,%3N"}" | |
echo "[$(date +"$DATE_FORMAT")][INFO] VERSION: $SCRIPT_VERSION" | |
# This script performs taks according to a provided command. The supported command values are: | |
# - generate-certs - Will create temporary ZK stunnel certs if the existing ca-file is found to be expired | |
# - validate-zk - Will verify ZK quorum after certs have been re-generated and distributed to all directors |
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 | |
set -e | |
echo "==================================================================================================" | |
echo "NOTE: The script will set the Adminconsole to api-only mode (no indexer), so that" | |
echo " migrations are bypassed and Adminconsole can boot for environment salvage operations." | |
echo " Please run the same script with the cleanup option afterwards." | |
echo "" | |
echo "IMPORTANT: Until the cleanup script is run, adminconsole will not be able to index " | |
echo " changes in the admin cluster, breaking the Deployments dashboard and " |