How to prepare for AWS Certified DevOps Engineer – Professional certification exam

Recently, I have passed the AWS Certified DevOps Engineer-Professional Certification. In this post, I will share how to prepare for this certification. Introduction AWS Certified DevOps Engineer Professional Certification is a professional certification for those who runs and manages application systems distributed on the AWS platform. This is a great certification to demonstrate your knowledge. Prerequisites Prior experience and knowledge of the foundation of AWS is recommended to start your path to professional certification. Recommended SysOps requirements include obtaining certifications such as AWS Certified SysOps administrator associate or AWS Certified Developer Associate. Additionally a thorough understanding of AWS's core services and best practices is essential to the success of this certification. Overview exam The AWS Certified DevOps Engineer Professional exam is designed to help you gain acceptance in a variety of areas including SDLC automation, configuration management, monitoring, and multiple choice and multi-purpose questions. Research sources Official AWS documentation: Official AWS documentation serves as a comprehensive resource for exam preparation. To gain in-depth knowledge of AWS services and exam-related practices, it is essential to review the AWS white paper, frequently asked questions and documentation is indispensable. Specific documentation recommended for exam preparation includes AWS Well-architected framework, AWS CloudFormation user guide, and AWS security best practices. You can also use the following methods:

Online courses and training: reputable online platforms such as Udemy , A Cloud Guru, Linux academy and Coursera offer courses focused on AWS Certified DevOps Engineer - professional exams. Several DevOps courses are available. I personally used the Udemy course "AWS Certified DevOps Engineer - Professional Certification" by Stephane Maarek .

Practice exams: practice exams play an important role in getting used to the exam format and assessing your level of preparation. The Official AWS practice test provides high quality practice tests to measure efficiency. We recommend that you book some practice tests to identify areas of improvement and improve your testing strategy. Experience To pass the AWS Certified DevOps Engineer-professional qualification exam, in addition to theoretical knowledge, practical experience in the actual AWS environment is very important. By setting up a personal AWS project and actively participating in practical exercises, you will further deepen the conceptual understanding by gaining experience applying DevOps exercises to AWS, this will improve your understanding of your business. Breakdown of test objectives

Domain 1: SDLC automation: in this domain, you need to master the principles of SDLC automation, which are focused on continuous integration and continuous deployment (CI/CD) pipelines, this will help you understand it better. Key topics: AWS CodePipeline、AWS CodeBuild、AWS CodeDeploy。 Domain 2: configuration management and infrastructure as code (IAC): knowledge of tools such as AWS CloudFormation and infrastructure, it is important to respect best practices for managing your business. Key topics: AWS CloudFormation、AWS CLI、AWS SDK。 Domain 3: monitoring and logging: in this domain, it is important to understand AWS monitoring and logging services, effective installation and configuration of logging and monitoring solutions is a key area of focus. Key topics: Amazon CloudWatch, AWS CloudTrail, Amazon CloudWatch Logs. Domain 4: automating AWS implementation policies and standards automating security best practices and policies and standards is the key to this domain. Key topics: AWS Identity and access management (IAM)、AWS configuration Domain 5: events and feedback: this domain focuses on the event feedback strategy and the efficient use of AWS CloudWatch and AWS CloudTrail. Key topics: AWS CloudTrail, AWS Config, AWS CloudWatch event.

Exam day tips On exam day, it is important to effectively manage your time and solve the problem with a calm and focused mindset. Improve exam performance with strategies such as carefully reading questions, eliminating wrong choices, and reviewing difficult questions. Stay focused and calm during the exam and don't spend too much time on any specific questions, just mark them for later review. There are many easy questions, tackle them first. Conclusion Obtaining AWS Certified DevOps Engineer - Professional Certification is an important milestone on the DevOps path and professional development and success of resources in the dynamic DevOps field requires constant learning, manual practice and the latest development of AWS services to maintain control over information.

Solved : Vagrant failed to initialize at a very early stage powershell error

If you are using Vagrant on Ubuntu and encounter any errors related to the Powershell executable, there is no need to panic. This is a very common problem and easy to solve. Here is a simple guide to resolve the “No Powershell executable found in available PATH” error.

Problem:

When you run vagrant status, you may see something like this:

bash
root@cloudvedas:~# vagrant status
Vagrant failed to initialize at a very early stage:
Failed to locate the powershell executable on the available PATH. Please
ensure powershell is installed and available on the local PATH, then
run the command again.

Basically, Vagrant can't find Powershell in your system PATH.

Solution: Add Powershell to PATH

To fix this issue, you need to add the Powershell executable to your system's PATH. Here's how to do this in Ubuntu:

  1. Open Terminal: First of all, open Terminal.

  2. Update your PATH: Run the following command to add the Powershell executable to your PATH.

    bash
    PATH='${PATH}:/mnt/c/Windows/System32/WindowsPowerShell/v1.0'

    This command simply adds the Powershell directory to your existing PATH variable.

  3. Check your PATH: Verify that the PATH update is working by running:

    bash
    echo $PATH

    You should see /mnt/c/Windows/System32/WindowsPowerShell/v1.0 in the output.

  4. Run Vagrant again: Try running the Vagrant command again.

    bash
    vagrant status

Summary

Adding the Powershell path to your system's PATH variable will fix the error, allowing you to use Vagrant without any issues. This way, Vagrant can find the Powershell executable it needs to function properly.

If the issue persists, check the paths you added and make sure that Powershell is installed correctly on your system.

Python: difference between list and tuple with examples



Lists and tuples both are used to store data in a sequence in Python. Lists are enclosed in square brackets [ ], whereas tuples are enclosed in parentheses ( ).

Here is an example of creating a list in Python:

cv_list = [1, 2, 3, 4, 5]


And here is an example of creating a tuple in Python:


cv_tuple = (1, 2, 3, 4, 5)


To access elements in a list or tuple, you use indexing and slicing. The first element in a list or tuple has an index of 0.

Here is an example of indexing in a list:


print(cv_list[0]) # Output: 1


And here is an example of indexing in a tuple:


print(cv_tuple[0]) # Output: 1


You can also slice a list or tuple to access a range of elements. To slice a list or tuple, you specify the start index and end index separated by a colon :.

Here is an example of slicing a list:


print(cv_list[1:3]) # Output: [2, 3]


And here is an example of slicing a tuple:

print(cv_tuple[1:3]) # Output: (2, 3)


In summary, lists and tuples are both useful data structures in Python, but they have some fundamental differences. Lists are mutable, while tuples are immutable. Lists are used when you need to add, remove, or change elements, while tuples are used when you need to store a collection of elements that won't change. Understanding the differences between these two data structures will help you make the right choice for your program.

How to prepare for Certified Kubernetes Administrator exam

Certified Kubernetes Administrator exam preparation

Hello everyone I have recently cleared the Certified Kubernetes Administrator (CKA) exam by Cloud Native Computing Foundation (CNCF), in collaboration with The Linux Foundation.

In this blog I will share the strategy I used to prepare for the exam and the important tips you should remember while you are actually giving the exam.

My CKA exam was on Kubernetes 1.22 version which is the latest exam version as of 21-Oct-21. You can see broad level domains tested in this exam here .

Solved : How to zip directories in Linux


In this post we will see how you can use zip command in Linux to compress directories and files and unzip them. zip is also very useful if you have to further uncompress the files on windows machine as by default windows allows you to open zip files without installing any extra program.

First let's install zip. Below we will show installation instruction for both Ubuntu and Redhat linux/CentOS.

Ubuntu :

Update the package repo:

root@CloudVedas:~# sudo apt-get update

Now let's install zip and unzip packages:

sudo apt-get install zip unzip -y


RHEL/CentOS:

Update the package repo:

root@CloudVedas:~# sudo yum makecache

Install the zip and unzip packages

root@CloudVedas:~# sudo yum install zip unzip


Once the zip and unzip packages are installed we can now see their usage.

The basic syntax of the zip command is below:

zip -r <output_file>.zip  <dir1> <dir2> ... <dirn>

Let's see some examples :

We will zip three directories

root@CloudVedas:~# zip -r finaldir.zip dir1 dir2 dir3

  adding: dir1/ (stored 0%)

  adding: dir1/test11 (stored 0%)

  adding: dir1/test13 (stored 0%)

  adding: dir1/tet12 (stored 0%)

  adding: dir2/ (stored 0%)

  adding: dir2/test21 (stored 0%)

  adding: dir2/test22 (stored 0%)

  adding: dir2/test23 (stored 0%)

  adding: dir3/ (stored 0%)

  adding: dir3/test31 (stored 0%)

  adding: dir3/test32 (stored 0%)

  adding: dir3/test33 (stored 0%)

root@CloudVedas:~#

When we list the contents we can see our zipped file finaldir.zip .

root@CloudVedas:~# ls -lrth

total 4.0K

drwxr-xr-x 1 root root 4.0K Aug 29 13:54 dir1

drwxr-xr-x 1 root root 4.0K Aug 29 13:54 dir2

drwxr-xr-x 1 root root 4.0K Aug 29 13:54 dir3

-rw-r--r-- 1 root root 1.8K Aug 29 13:55 finaldir.zip

root@CloudVedas:~#


You can also zip all the directories in the present working directory using this simple bash script.

for dir in $(ls -d */); do zip script_archive.zip $dir; done 


View contents of a zip file 

If you want to see the contents of a zip file without unzipping it you can use either vi or vim .

root@CloudVedas:~# vim finaldir.zip

or

root@CloudVedas:~# vi finaldir.zip

With the above commands you can easily see the list of files and directories inside the zip.


unzip

Now let's see how you can unzip a file. Be careful when you are unzipping a file with out any extra options as it will overwrite the existing contents if same name exist. Best is to unzip the file in a different directory and then copy the required files and directories as needed in the destination folder.

root@CloudVedas:~/unziptest# unzip finaldir.zip

Archive:  finaldir.zip

   creating: dir1/

 extracting: dir1/test11

 extracting: dir1/test13

 extracting: dir1/tet12

   creating: dir2/

 extracting: dir2/test21

 extracting: dir2/test22

 extracting: dir2/test23

   creating: dir3/

 extracting: dir3/test31

 extracting: dir3/test32

 extracting: dir3/test33

root@CloudVedas:~/unziptest# ls

dir1  dir2  dir3  finaldir.zip

root@CloudVedas:~/unziptest#

If you want to see other useful options on unzip you can use below command

unzip -hh

So above we have seen how you can use zip and unzip in Linux. zip is a good utility for smaller files and directories but if you need better compression you should use tar.gz. Check out our post on most useful tar command examples if you want to know more about tar.gz and tar.bz2 or other compression methods in Linux.

If you want to transfer this file out of the Linux server check our post on how to transfer files to and from linux .

Do let us know in comments section if you have any query or suggestion about this post.