|
|
Local command
|
|
|
Remote command
|
|
Listing 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 |
--endpoint=http://1.2.3.4:4001). This can be the IP address of any machine in the cluster.|
Stop 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 |
|
List 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 |
|
Inspect 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" |
|
List 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 |
--output table) and a query string:--query 'Reservations[].Instances[].[Tags[?Key==`Name`] | [0].Value, InstanceId, State.Name, Placement.AvailabilityZone]No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.