Full-stack developer working with technologies like Azure, Kafka, Docker, Kubernetes, and AWS. Keep in mind that this is a basic guide, and you might need to refer to official documentation and resources for more in-depth understanding.
Azure
Azure CLI:
# Login to Azure
az login
# List available subscriptions
az account list --output table
# Set default subscription
az account set --subscription <subscription_id>
# Create a resource group
az group create --name <resource_group_name> --location <region>
Azure App Service:
# Create a web app
az webapp create --resource-group <resource_group_name> --plan <app_service_plan_name> --name <app_name> --runtime <runtime>
# Deploy to Azure App Service
az webapp deployment source config --name <app_name> --resource-group <resource_group_name> --repo-url <repo_url> --branch <branch_name>
Kafka
Kafka Commands:
# Start Zookeeper
bin/zookeeper-server-start.sh config/zookeeper.properties
# Start Kafka broker
bin/kafka-server-start.sh config/server.properties
# Create a topic
bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic <topic_name>
# Produce a message
bin/kafka-console-producer.sh --bootstrap-server localhost:9092 --topic <topic_name>
# Consume messages
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic <topic_name> --from-beginning
Docker
Docker Basics:
# Build a Docker image
docker build -t <image_name> .
# Run a Docker container
docker run -p <host_port>:<container_port> <image_name>
# List running containers
docker ps
# Stop a running container
docker stop <container_id>
# Remove a container
docker rm <container_id>
# Remove an image
docker rmi <image_name>
Kubernetes
Kubernetes Basics:
# Create a deployment
kubectl create deployment <deployment_name> --image=<image_name>
# Expose a deployment as a service
kubectl expose deployment <deployment_name> --port <service_port>
# Scale a deployment
kubectl scale deployment <deployment_name> --replicas=<num_replicas>
# Get pod information
kubectl get pods
# Get service information
kubectl get services
AWS
AWS CLI:
# Configure AWS CLI
aws configure
# List AWS regions
aws ec2 describe-regions --output table
# Create an EC2 instance
aws ec2 run-instances --image-id <ami_id> --instance-type <instance_type> --key-name <key_pair_name> --region <region>
# List S3 buckets
aws s3 ls
AWS Lambda:
# Create a Lambda function
aws lambda create-function --function-name <function_name> --runtime <runtime> --role <role_arn> --handler <handler> --code S3Bucket=<bucket>,S3Key=<key>
# Invoke a Lambda function
aws lambda invoke --function-name <function_name> --payload '{"key1":"value1", "key2":"value2"}' <output_file>
These commands cover some basic operations with each technology. Remember to replace placeholders like <...>
with your actual values. For more detailed and specific information, refer to the official documentation for each technology and service.
Top comments (0)