Cheatography
https://cheatography.com
Legend | Local command | | Remote command |
Cluster ManagementListing machines | fleetctl list-machines | Submit new unit file | fleetctl submit myapp@.service | List submitted unit files | fleetctl list-unit-files | List units and their status | fleetctl list-units | Start/stop units | fleetctl start myapp@1 fleetctl stop myapp@1 | Removing unit files | fleetctl unload myapp@1 fleetctl destroy myapp@ 1.service fleetctl destroy myapp@.service | Opening a remote shell (*) | fleetctl ssh myapp@1 | Inspecting the logs (*) | fleetctl journal --lines=100 myapp@1 | Log monitoring (*) | fleetctl journal -f myapp@1 |
Each command must specify an etcd endpoint (--endpoint=http://1.2.3.4:4001 ). This can be the IP address of any machine in the cluster.
(*) A running SSH agent is required for these commands.
| | Unit ManagementStop unit | sudo systemctl restart myapp@ 1 | Start unit | sudo systemctl start myapp@ 1 | Stop unit | sudo systemctl stop myapp@ 1 | View unit status | sudo systemctl status myapp@ 1 | List active units | sudo systemctl |
Container ManagementList running containers | docker ps | List all containers | docker ps -a | List images | docker images | Start/stop a container | docker start CONTAINER_ID docker stop CONTAINER_ID | Create and run a container | docker run -e FOO=bar IMAGE_ID | Delete a container | docker rm CONTAINER_ID | Delete an image | docker rmi IMAGE_ID |
| | Log ManagementInspect unit logs | journalctl -u myapp@1 | Filter out older log entries | journalctl --since=2015-07-03 11:33:22" | Filter out newer log entries | journalctl --until=2015-07-03 11:33:22" |
Instance ManagementList instances | aws ec2 describe-instances | Stop an instance (*) | aws ec2 stop-instances --instance-ids ID | Start an instance | aws ec2 start-instances --instance-ids ID | Reboot an instance | aws ec2 reboot-instances --instance-ids ID | Terminate an instance (**) | aws ec2 terminate-instances --instance-ids ID |
The AWS client supports fine-grained output formatting. Use the table format ( --output table ) and a query string:
--query 'Reservations[].Instances[].[Tags[?Key==`Name`] | [0].Value, InstanceId, State.Name, Placement.AvailabilityZone]
(*) Data on ephemeral storage (e.g. containers and images) will be lost!
(**) Data on block- (the root file system) and ephemeral storage will be lost!
|
Help Us Go Positive!
We offset our carbon usage with Ecologi. Click the link below to help us!
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment