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
# Using Annotations for Ignoring Differences | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: my-deployment | |
annotations: | |
argocd.argoproj.io/compare-options: IgnoreExtraneous | |
spec: | |
replicas: 3 |
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
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
name: AWS ECR push | |
jobs: | |
deploy: |
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: argoproj.io/v1alpha1 | |
kind: Cluster | |
metadata: | |
name: my-cluster | |
namespace: argocd | |
spec: | |
server: https://my-cluster-api-server.example.com | |
config: | |
bearerToken: <token> | |
tlsClientConfig: |
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 | |
while true; do | |
clear | |
echo "System Resource Monitoring" | |
echo "--------------------------" | |
# Display CPU usage | |
echo "CPU Usage:" | |
top -n 1 -b | grep "Cpu" |
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 | |
## upgrade Jenkins steps | |
# Stop running Jenkins service | |
systemctl stop jenkins.service | |
# Take Jenkins instance Backup as a recovery option |
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 | |
if [ -z "$1" ]; then | |
echo "Error: Please provide a value." | |
exit 1 | |
fi | |
sed -i "s/OLD_VALUE.*/NEW_VALUE='$1'/" /path_the_files/file_name.yml | |
echo "NEW_VALUE updated to '$1' in file_name.yml file." |
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
servers_ips=`aws ec2 describe-instances --region us-east-1 --filters "Name=tag-value,Values=TAG_NAME" "Name=instance-state-name,Values=running" --query 'Reservations[].Instances[].[PrivateIpAddress]' --output text | xargs` | |
echo $cs_server | |
# Pass by IP's to tmux-cssh script | |
./tmux-cssh $cs_serve |
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 | |
# Set the path to the Laravel logs directory | |
LOG_DIR=/path/to/laravel/logs | |
# Set the number of days to keep log files | |
DAYS_TO_KEEP=7 | |
# Find all Laravel log files older than $DAYS_TO_KEEP days and delete them | |
find "$LOG_DIR" -name "*.log" -type f -mtime +$DAYS_TO_KEEP -exec rm {} \; |
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 | |
# Pass the package name | |
package=$1 | |
# Check if the package is installed on system () | |
if dpkg -s $package > /dev/null 2>&1; then | |
echo "$package is installed." | |
else | |
echo "$package is not installed." |
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 | |
# Set the server address and port number, Ex (Pass by Jenkins as a parameter’s) | |
server=$1 | |
port=$2 | |
# Check if the port is open | |
nc -v -z $server $port | |
if [ $? -eq 0 ]; then |
NewerOlder