Last active
December 29, 2022 22:13
-
-
Save dacbd/56341a855e1a45c37c732b76e9c706ee to your computer and use it in GitHub Desktop.
Debug CML oneliners
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
echo 'echo "$(curl https://github.com/'"$GITHUB_ACTOR"'.keys)" >> /home/ubuntu/.ssh/authorized_keys' | base64 -w 0 | |
# or | |
--cloud-startup-script=$(echo 'echo "$(curl https://github.com/'"$GITHUB_ACTOR"'.keys)" >> /home/ubuntu/.ssh/authorized_keys' | base64 -w 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
cat /var/log/syslog | awk 'match($0, /GCEMetadataScripts: startup-script:/){print substr($0,RSTART+36) }' | more | |
tail -n 10000 -f /var/log/syslog | awk 'match($0, /GCEMetadataScripts: startup-script:/){print substr($0,RSTART+36) }' | |
tail -n 10000 -f /var/log/syslog | awk 'match($0, /startup-script:/){print substr($0,RSTART+16) }' | |
# include times | |
tail -n 10000 -f /var/log/syslog | awk 'match($0, /GCEMetadataScripts: startup-script:/){print $0}' | |
# find cml aws instances: | |
aws ec2 describe-instances --filters Name=tag:Name,Values=cml-* --region us-west-2 | jq '.Reservations[].Instances[] | select(.State.Name == "running") | .InstanceId' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment