Execute scripts with Hoop connections
Allows executing one-off scripts using the underlying Operating System tools.
Configuration
shellhoop admin create conn python3 -a <agent> -- python3
Connect It
Now itβs possible to execute python scripts straight from Hoop
shellhoop exec python3 -i 'import os; print(os.environ)'
shellhoop exec python3 <<EOF s3 = boto3.client('s3') response = s3.list_buckets() print('Existing buckets:') for bucket in response['Buckets']: print(f' {bucket["Name"]}') EOF
Execute scripts directly
shellhoop exec python3 -- /tmp/myscript.py
Interactive Session
shell$ hoop connect python3 connection: python3 | session: ac8afefe-3d7b-46b1-b905-ed0a65a4b8dc Python 3.8.10 (default, May 26 2023, 14:05:08) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>>