๐งฑ Jenkins (CLI + Pipeline)
-
jenkins-cli.jar -s http://localhost:8080 list-jobs -
build job-name -p PARAM=value -
groovy = println 'Hello from Groovy' -
pipeline { agent any; stages { stage('Build') { steps { sh 'make' } } } }
☁️ AWS CLI
-
aws configure -
aws s3 ls -
aws ec2 describe-instances -
aws s3 cp file.txt s3://bucket-name/ -
aws cloudformation deploy --template-file template.yml --stack-name mystack
☁️ Azure CLI
-
az login -
az group create --name myResourceGroup --location eastus -
az vm create --resource-group myResourceGroup --name myVM --image UbuntuLTS -
az vm start --name myVM --resource-group myResourceGroup
☁️ GCP CLI (gcloud)
-
gcloud init -
gcloud compute instances list -
gcloud app deploy -
gcloud container clusters get-credentials my-cluster --zone us-central1-a
๐ Terraform
-
terraform init -
terraform plan -
terraform apply -
terraform destroy -
terraform fmt -
terraform validate
⚙️ Ansible
-
ansible -m ping all -
ansible-playbook site.yml -
ansible-inventory --list -y -
ansible-vault encrypt secrets.yml
๐ณ Docker
-
docker build -t myimage . -
docker run -d -p 80:80 myimage -
docker ps -
docker exec -it <container_id> /bin/bash -
docker-compose up -
docker login -
docker logout
☸ Kubernetes (kubectl)
-
kubectl get pods -
kubectl logs pod-name -
kubectl describe pod pod-name -
kubectl apply -f deployment.yaml -
kubectl delete -f deployment.yaml -
kubectl scale deployment myapp --replicas=3 -
kubectl rollout undo deployment myapp
๐ Git
-
git init -
git clone repo-url -
git status -
git add . -
git commit -m "message" -
git push origin main -
git checkout -b new-branch -
git merge branch-name -
git rebase -i HEAD~3
๐ Vault (HashiCorp)
-
vault login -
vault kv put secret/mysecret password=123456 -
vault kv get secret/mysecret -
vault kv delete secret/mysecret
๐ Prometheus
-
Configuration file:
prometheus.yml -
Run server:
./prometheus --config.file=prometheus.yml
๐ Grafana (CLI)
-
grafana-cli plugins install grafana-piechart-panel -
systemctl restart grafana-server
๐งช Helm (Kubernetes Package Manager)
-
helm repo add bitnami https://charts.bitnami.com/bitnami -
helm install myrelease bitnami/nginx -
helm upgrade myrelease bitnami/nginx -
helm rollback myrelease 1 -
helm uninstall myrelease
๐ GitHub Actions
-
.github/workflows/main.ymlfor defining workflows -
Trigger manually via Actions UI or by
git push
Jenkins
-
jenkins-cli.jar -s http://localhost:8080 build job-name -p PARAM=value -
jenkins-cli.jar -s http://localhost:8080 get-job job-name > job.xml -
jenkins-cli.jar -s http://localhost:8080 create-job job-name < job.xml -
jenkins-cli.jar -s http://localhost:8080 disable-job job-name -
jenkins-cli.jar -s http://localhost:8080 enable-job job-name
AWS CLI
-
aws ec2 start-instances --instance-ids i-1234567890abcdef0 -
aws ec2 stop-instances --instance-ids i-1234567890abcdef0 -
aws s3 sync ./localdir s3://mybucket --delete -
aws iam list-users -
aws logs describe-log-groups -
aws lambda invoke --function-name my-function response.json
Azure CLI
-
az vm list --output table -
az group delete --name myResourceGroup -
az acr login --name myregistry -
az aks get-credentials --resource-group myResourceGroup --name myAKSCluster -
az storage account create --name mystorageaccount --resource-group myResourceGroup --location eastus
Google Cloud CLI (gcloud)
-
gcloud compute ssh my-vm-instance -
gcloud container clusters create my-cluster --zone us-central1-a -
gcloud app logs tail -s default -
gcloud functions deploy my-function --runtime python39 --trigger-http
Terraform
-
terraform workspace new dev -
terraform workspace select prod -
terraform state list -
terraform import aws_instance.my_instance i-1234567890abcdef0 -
terraform output -
terraform graph | dot -Tpng > graph.png
Ansible
-
ansible-playbook -i inventory.ini site.yml --check -
ansible all -m shell -a 'uptime' -
ansible-vault decrypt secrets.yml -
ansible-galaxy install geerlingguy.nginx -
ansible-playbook site.yml --tags "install"
Docker
-
docker images -
docker rm $(docker ps -aq)(remove all containers) -
docker rmi $(docker images -q)(remove all images) -
docker network ls -
docker volume ls -
docker logs -f container_id
Kubernetes (kubectl)
-
kubectl get svc -
kubectl get nodes -
kubectl exec -it pod-name -- /bin/bash -
kubectl port-forward svc/my-service 8080:80 -
kubectl top node -
kubectl get events --sort-by='.metadata.creationTimestamp'
Git
-
git fetch origin -
git diff -
git stash -
git stash pop -
git cherry-pick <commit> -
git log --oneline --graph --all
Helm
-
helm list -
helm repo update -
helm get values myrelease -
helm history myrelease -
helm test myrelease
Vault (HashiCorp)
-
vault status -
vault policy list -
vault token create -
vault kv list secret/ -
vault audit enable file file_path=/var/log/vault_audit.log
No comments:
Post a Comment