-
Initialize Terraform
terraform init
-
Terraform plan
terraform plan
-
Terraform apply
terraform apply
-
Increase Terraform verbosity
export TF_LOG=debug
-
Build Docker image from Dockerfile with tag
docker build -t foo
-
Pull Docker image
docker pull nginx-stable
-
Push docker image
docker push nginx
-
Login to AWS ECR
$(aws ecr get-login)
-
Linux file permissions [https://www.pluralsight.com/blog/it-ops/linux-file-permissions]
-
Update Ubuntu's repositories
sudo apt-get update
-
Update a Ubuntu's security patches
sudo unattended-upgrades -d
-
comprehensive from beginner to advanced Git [https://git-scm.com/doc]
-
Fetch updates from origin
git fetch origin
-
Create a new branch locally
git checkout -b <my-branch-name>
-
Checkout an existing branch
git checkout <branch-name>
-
Push branch
git push <branch-name>
-
Reset branch with remote (Gitlab)
git rebase origin --hard
-
checking disk space on a server
df -h
[https://linux.die.net/man/1/df] -
checking server performance
htop
[https://linux.die.net/man/1/htop] -
List all TCP ports listening all interfaces (for example to see if Nginx is listening port 80)
ss -4 state listening
[https://linux.die.net/man/8/ss]
-
Use curl to see what HTTP code a web service is running
curl -I https://www.google.de
[https://linux.die.net/man/1/curl] -
A list of HTTP codes and the meaning [https://www.addedbytes.com/blog/http-status-codes]
- remove all files ending with .txt
rm *.txt
-
introduction to the SSH agent [https://developer.github.com/v3/guides/using-ssh-agent-forwarding/]
-
add your ssh key to the agent
ssh-add <private-key>
-
forward your ssh key
ssh -A user@server
-
securely copy a file from your desktop the server
scp test.txt ubuntu@<public_ip_address>:/tmp