Cheatography
https://cheatography.com
Legend
|
Local command |
|
Remote command |
Cluster Management
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 |
|
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 (*) |
|
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 Management
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 |
|
Container Management
List running containers |
|
List all containers |
|
List 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 |
|
|
|
Log Management
Inspect unit logs |
|
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 Management
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
|
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!
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment