- aws ec2 describe-instances | jq -cr ‘.Reservations[].Instances[0]|[.InstanceId,.InstanceType,.KeyName,.State,.Tags]’ # list instances
- aws ec2 describe-instance-status –instance-id <INST-ID> | jq ‘ .InstanceStatuses | .[].InstanceState.Name’ # show instance
- aws ec2 start-instances –instance-id <INST-ID> # start instance
LoadBalancers – AWS CLI
- aws elbv2 describe-load-balancers| jq -c ‘.LoadBalancers[]|[.LoadBalancerName,.LoadBalancerArn]’ # list arns
- aws elbv2 describe-listeners –load-balancer-arn <ARN> | jq -c ‘.|.Listeners[]|[.Protocol,.Port,.ListenerArn] # list listeners
- aws elbv2 describe-rules –listener-arn <ARN> | jq -c ‘.Rules[]|.Conditions,.Actions’ # list rules
Git clone – gitlab docker
HowTo: clone from a gitlab server running inside a docker container
- Ensure SSH pubkey is setup by following https://docs.gitlab.com/ee/ssh/
- Check source port for SSH here:
docker inspect gitlab | jq '.[0].NetworkSettings.Ports."22/tcp"'
- This .ssh/config worked for me
Host git
Hostname 127.0.0.1
User git
Identityfile ~/.ssh/id_ed25519
Port 922
- Then clone like this:
git clone git@git:root/my-awesome-project.git