https://blog.prodevopsguy.xyz/the-ultimate-devops-bootcamp-2024-pack-by-prodevopsguy
⚠️ Note: Anyone Interested, can open the Blog 🌐 , share it to your friends and colleagues.
🔵 𝗙𝗼𝗹𝗹𝗼𝘄 @prodevopsguy 𝗳𝗼𝗿 𝗺𝗼𝗿𝗲 𝘀𝘂𝗰𝗵 𝗰𝗼𝗻𝘁𝗲𝗻𝘁 𝗮𝗿𝗼𝘂𝗻𝗱 𝗰𝗹𝗼𝘂𝗱 & 𝗗𝗲𝘃𝗢𝗽𝘀!!!
Please open Telegram to view this post
VIEW IN TELEGRAM
1709611305572.gif
8.2 MB
Please open Telegram to view this post
VIEW IN TELEGRAM
Follow
Please open Telegram to view this post
VIEW IN TELEGRAM
- Optimizes the overall size of the Docker image
- Removes the burden of creating multiple Dockerfiles for different stages
- Easy to debug a particular build stage
- Able to use the previous stage as a new stage in the new environment
- Ability to use the cached image to make the overall process quicker
- Reduces the risk of vulnerabilities found as the image size becomes smaller with multi-stage builds
Please open Telegram to view this post
VIEW IN TELEGRAM
1708757232781.gif
285.8 KB
The below illustration shows some common container commands and their syntax 👇
1.
docker run -it --name nginx nginx
2.
docker start nginx
3.
docker restart nginx
4.
docker pause nginx
5.
docker unpause nginx
6.
docker stop nginx
7.
docker kill nginx
8.
docker ps
9.
docker exec -it nginx /bin/bash
10.
docker attach nginx
11.
docker logs nginx
12.
docker rename old-name new-name
13.
docker inspect nginx
14.
docker cp nginx:/container-path/file.txt /local-path
15.
docker rm nginx
These container commands are essential for managing containerized applications, whether for development, testing, or production deployment, as they enable efficient control and manipulation of container instances.
Please open Telegram to view this post
VIEW IN TELEGRAM
From 'It works on my machine!' to 'It works on my container!' but hey at least it works!
✔️ 𝗙𝗼𝗹𝗹𝗼𝘄 @prodevopsguy 𝗳𝗼𝗿 𝗺𝗼𝗿𝗲 𝘀𝘂𝗰𝗵 𝗰𝗼𝗻𝘁𝗲𝗻𝘁 𝗮𝗿𝗼𝘂𝗻𝗱 𝗰𝗹𝗼𝘂𝗱 & 𝗗𝗲𝘃𝗢𝗽𝘀!!!
Please open Telegram to view this post
VIEW IN TELEGRAM
𝐁𝐢𝐠 𝐨𝐧 𝐝𝐞𝐯𝐞𝐥𝐨𝐩𝐦𝐞𝐧𝐭?
𝐍𝐚𝐯𝐢𝐠𝐚𝐭𝐢𝐧𝐠 𝐜𝐨𝐦𝐩𝐥𝐢𝐚𝐧𝐜𝐞 𝐜𝐡𝐚𝐥𝐥𝐞𝐧𝐠𝐞𝐬?
𝐇𝐢𝐭 𝐚 𝐬𝐲𝐬𝐭𝐞𝐦 𝐟𝐚𝐢𝐥𝐮𝐫𝐞?
𝐇𝐢𝐝𝐝𝐞𝐧 𝐭𝐫𝐞𝐚𝐬𝐮𝐫𝐞𝐬 𝐚𝐡𝐞𝐚𝐝 - 𝐜𝐨𝐬𝐭 𝐬𝐚𝐯𝐢𝐧𝐠𝐬!
𝐀𝐧𝐨𝐦𝐚𝐥𝐢𝐞𝐬?
Approaching the finish line, security risks arise, yet DevSecOps mitigates them, instilling confidence. Ultimately, complete awareness of potential threats.
Please open Telegram to view this post
VIEW IN TELEGRAM
Docker Swarm and Kubernetes are popular container orchestration tools that efficiently manage, scale and deploy containers. Each has its strengths and weaknesses, and understanding these can help you choose the right tool for your specific needs. Differences and scenarios where one might be preferred over the other
Please open Telegram to view this post
VIEW IN TELEGRAM
1.
ansible-playbook: Executes Ansible playbooks.ex: ansible-playbook -i <inventory_file> <playbook.yml>
2.
ansible: Runs ad-hoc commands or tasks.ex: ansible all -m copy -a "src=/path/to/local/file dest=/path/to/remote/file"
ansible all -m yum -a "name=httpd state=latest"
3.
ansible-galaxy: Manages Ansible roles.ex: ansible-galaxy install <role_name>
4.
ansible-vault: Manages encrypted data within Ansible.ex: ansible-vault encrypt <file>
5.
ansible-galaxy init role_name: Initializes a new Ansible role scaffold.ex: ansible-galaxy init <role_name>
6.
ansible-inventory: Shows Ansible's inventory.ex: ansible-inventory --list -i /path/to/inventory/hosts
7.
ansible-config: Manages Ansible configuration.ex: ansible-config list, ansible-config view
8.
ansible-pull: Pulls playbooks from a version control system and executes them locally.ex: ansible-pull -U <repository_url> <playbook.yml>
9.
ansible-playbook --syntax-check: Checks playbook syntax without executing.ex: ansible-playbook --syntax-check <playbook.yml>
10.
ansible-playbook --list-hosts: Lists hosts defined in a playbook.ex: ansible-playbook --list-hosts playbook.yml
11.
ansible-playbook --tags: Runs specific tagged tasks within a playbook.ex: ansible-playbook --tags=tag1,tag2 playbook.yml
12.
ansible-playbook --limit: Limits playbook execution to specific hosts or groups.ex: ansible-playbook --limit=<host_pattern> <playbook.yml>
13.
ansible-vault edit: Edits an encrypted file.ex: ansible-vault edit secrets.yml
14.
ansible-doc: Displays documentation for Ansible modules.ex: ansible-doc <module_name>
15.
ansible-config view: Displays the current Ansible configuration.ex: ansible-config view
16.
ansible-config dump: Dumps the current Ansible configuration variables.ex: ansible-config dump
17.
ansible-config list: Lists configuration settings.ex: ansible-config list
18.
ansible-console: Starts an interactive console for executing Ansible tasks.ex: ansible-console
19.
ansible-lint: Lints Ansible playbooks for best practices and potential errors.ex: ansible-lint <playbook.yml>
20.
ansible-vault encrypt_string: Encrypts a string for use in a playbook.ex: ansible-vault encrypt_string <string>
21.
ansible-vault rekey: Rekeys an encrypted file with a new password.ex: ansible-vault rekey <file>
Please open Telegram to view this post
VIEW IN TELEGRAM
Instead of just looking at the available memory in the free -m output, some users might panic and quickly run the drop_cache command. I strongly advise against doing so.
echo 1 > /proc/sys/vm/drop_cacheecho 2 > /proc/sys/vm/drop_cacheecho 3 > /proc/sys/vm/drop_cachePlease open Telegram to view this post
VIEW IN TELEGRAM
Terraform is an infrastructure as a code tool that lets you build, change, and version infrastructure safely and efficiently.
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Many of us who use AWS often stop, start, or restart instances. However, only some realize differences in how these operations work.
🔄 Instance Reboot:
A reboot is equivalent to a restart operation on a traditional physical machine. It keeps the instance on the same host machine unless the host is unhealthy or has other problems. The instance keeps the same public and private IP addresses, and any data on the instance store volumes and Elastic Block Store (EBS) volumes remains intact.
❓ How does it work
When a reboot command is initiated, the hypervisor sends a signal to the guest operating system to perform a soft reboot, which is a more graceful way to restart the system. The operating system will stop all running processes, flush any cached data to disk, and restart.
🛑 Instance Shutdown (Stop):
Stopping an instance is like shutting down a physical machine. The instance is powered down and no longer running, so you're not billed for additional instance hours. The instance retains its instance ID, but all data in the instance store volumes is lost. The public IP address is released when the instance is stopped (unless associated with an Elastic IP), but the private IP address remains associated. When the instance is started again, it might be run on a different host machine.
❓ How does it work
When a stop command is initiated, the hypervisor sends a signal to the guest operating system to perform a soft shutdown, which is a more graceful way to shut down the system. All the processes will be stopped, and any cached data will be written to disk. After that, the hypervisor will deallocate the previously allocated resources to the instance.
Please open Telegram to view this post
VIEW IN TELEGRAM
1709038826134.gif
3.5 MB
𝐂𝐥𝐨𝐮𝐝 𝐌𝐨𝐧𝐢𝐭𝐨𝐫𝐢𝐧𝐠 𝐓𝐨𝐨𝐥𝐬 𝐂𝐡𝐞𝐚𝐭 𝐒𝐡𝐞𝐞𝐭❗️
The cloud has revolutionized the way we manage and scale our infrastructure, but ensuring its reliability and performance is paramount. That's where cloud monitoring tools come into play.
Here's a cheat sheet to help you navigate the world of cloud monitoring:
🔍 𝐖𝐡𝐚𝐭 𝐭𝐨 𝐌𝐨𝐧𝐢𝐭𝐨𝐫:
🔣 Resource Utilization: Keep tabs on CPU, memory, disk, and network usage.
🔣 Latency: Monitor response times to ensure optimal user experiences.
🔣 Error Rates: Track error occurrences to address issues promptly.
🔣 Traffic: Understand your traffic patterns and spikes.
🔣 Security: Detects and respond to potential security threats.
⚙️ 𝐏𝐨𝐩𝐮𝐥𝐚𝐫 𝐂𝐥𝐨𝐮𝐝 𝐌𝐨𝐧𝐢𝐭𝐨𝐫𝐢𝐧𝐠 𝐓𝐨𝐨𝐥𝐬:
🔣 Amazon CloudWatch: Ideal for AWS users, offering comprehensive monitoring and alerting.
🔣 Google Cloud Monitoring: Seamlessly integrated with GCP for real-time insights.
🔣 Azure Monitor: Microsoft's solution for monitoring Azure resources.
🔣 Prometheus: An open-source option with a robust alerting system.
📈 𝐊𝐞𝐲 𝐌𝐞𝐭𝐫𝐢𝐜𝐬 𝐭𝐨 𝐖𝐚𝐭𝐜𝐡:
🔣 CPU Usage: Indicates the load on your virtual machines.
🔣 Memory Utilization: Monitors available memory and identifies bottlenecks.
🔣 Network Throughput: Tracks data transfer rates.
🔣 Response Times: Measures how quickly your services respond.
🔣 Error Rates: Identifies issues impacting user experiences.
🚨 𝐀𝐥𝐞𝐫𝐭𝐢𝐧𝐠 𝐚𝐧𝐝 𝐀𝐮𝐭𝐨𝐦𝐚𝐭𝐢𝐨𝐧:
Set up alerts for critical metrics to proactively address issues.
Leverage automation to scale resources up or down based on demand.
😎 𝗙𝗼𝗹𝗹𝗼𝘄 @prodevopsguy 𝗳𝗼𝗿 𝗺𝗼𝗿𝗲 𝘀𝘂𝗰𝗵 𝗰𝗼𝗻𝘁𝗲𝗻𝘁 𝗮𝗿𝗼𝘂𝗻𝗱 𝗰𝗹𝗼𝘂𝗱 & 𝗗𝗲𝘃𝗢𝗽𝘀!!! // Join for DevOps DOCs: @devopsdocs
The cloud has revolutionized the way we manage and scale our infrastructure, but ensuring its reliability and performance is paramount. That's where cloud monitoring tools come into play.
Here's a cheat sheet to help you navigate the world of cloud monitoring:
Set up alerts for critical metrics to proactively address issues.
Leverage automation to scale resources up or down based on demand.
Please open Telegram to view this post
VIEW IN TELEGRAM
1707116300601.gif
1.4 MB
Linux's file system is tree-like. The base is "/", with everything else branching off.
/bin
/boot
/dev
/etc
/home
/lib
/media
/mnt
/opt
/proc
/root
/sbin
/srv
/tmp
/usr
/var
cd
ls
mkdir
rmdir
cp
mv
rm
Please open Telegram to view this post
VIEW IN TELEGRAM
JioCinema uses two different cloud providers that include Amazon Web Services (AWS) and Google Cloud Platform (GCP).
JioCinema uses load balancers to distribute the user traffic among multiple backend servers that ensures efficiency and no server is overloaded.
These are implemented in such a way that if the current servers are being overloaded then new servers can be created automatically using autoscaling groups.
JioCinema uses CDNs to distribute content to its users. CDNs are distributed systems of servers that cache and deliver content to users from the closest possible edge locations. This helps to reduce latency and improves user experience.
This approach breaks down the application into smaller and manageable components and becomes easier for scalability and maintenance.
Any specific component can be scaled up or down without affecting other components.
𝙋𝙎: In this post I have only discussed how JioCinema handles such loads efficiently irrespective of how it is coded and what protocols they are using.
Please open Telegram to view this post
VIEW IN TELEGRAM
𝗧𝗳𝘀𝘄𝗶𝘁𝗰𝗵 is a useful tool for managing Terraform versions, particularly when working with multiple projects that require different versions due to syntax changes, provider updates, or other dependencies. Here are some reasons why tfswitch is beneficial:
Tfswitch is available only for Linux and MacOS.
Please open Telegram to view this post
VIEW IN TELEGRAM