Solved: How to start or stop Jenkins in Linux and check it's port number

In this post we will see how to start or stop Jenkins on different Linux distributions. Also we will see how to check the status of Jenkins service and identify the port on which it is running or listening.
If you have installed Jenkins on a Fedora or Debian based distribution like Ubuntu, you can use the below commands:
Start Jenkins
$ sudo service jenkins start
Stop Jenkins
$ sudo service jenkins stop
Restart Jenkins
$ sudo service jenkins restart
Check Jenkins status
$ sudo service jenkins status
For other Linux distribution like RHEL or CentOS use:
Start Jenkins
$ sudo systemctl start jenkins.service
Stop Jenkins
$ sudo systemctl stop jenkins.service
Restart Jenkins
$ sudo systemctl restart jenkins.service
Check Jenkins status
$ sudo systemctl status jenkins.service
Check Jenkins Port
To check the port on which Jenkins is listening we can use “lsof”(check installation instructions at the end) command.
[ec2-user@cloudvedas ~]$ sudo /usr/sbin/lsof -i -P | grep -i jenkins

java 1030 jenkins 161u IPv6 27986 0t0 TCP *:8080 (LISTEN)

Above we can see Jenkins is listening on port 8080.
If you do not have lsof you can simply install it with following commands
Ubuntu
sudo apt-get install lsof
RHEL or CentOS
sudo yum install lsof

How to prepare for AWS Certified SysOps Administrator – Associate

In one of our earlier post we have detailed about which AWS certification is suitable for you ?
If you are from System Admin or DevOps background the  AWS Certified SysOps Administrator – Associate certification will be a good plus for you.
If you are  an absolute beginner on AWS you can start with free labs from AWS . To practice further you can create free AWS account. These two actions will get you started on AWS.
Beware that if you go beyond free tier limits you will be billed. Best practice is to create a billing alert.  This alert can save you from unexpected bill shocker.
If you want to learn further you can opt for either classroom course or online course. The classroom course is generally expensive and range between USD 600 to 2000. While the online course can cost you anything between USD 10 to USD 300 depending on which course you choose.
Our personal opinion is that you should go for online courses as they are cheaper and if you follow their labs honestly(yeah not just seeing him do it but actually doing the labs yourself 😉 ) they can be as good as classroom training.
In online courses we found courses from two providers acloudguru and linux academy  to be good. Earlier the Linux Academy course was only available through their site using a monthly plan but the same course is now available on Udemy too. The acloudguru course is already available on Udemy from longtime.  Though both these courses are available to purchase from their respective site under monthly subscription but, if you buy these courses from Udemy you pay only once and get lifetime access to same courses.  And many times Udemy provide heavy discounts on courses which can get you a good bargain.
The acloudguru course is delivered by Ryan who is enthusiastic and teach you really well. Though sometime he can get a bit click happy and can quickly zip past few topics. But, you always have the option to rewind and go through the topic again 🙂 .
The labs in the course are very useful and helps you get deep understanding of topic. The course also has quizzes to check your knowledge.
Overall we found the acloudguru course to be beneficial in getting you exam ready.
However do note that the course alone is not enough to clear the exam. You should go through whitepapers and FAQs of atleast below services .
  • EC2
  • S3
  • VPC
  • Route 53
  • CloudWatch
  • OpsWorks
  • Billing
Exam pattern
Exam has Multiple-choice and multiple-answer questions. Exam is of 80 minutes. You can download the exam blueprint here.
Practice Exam Questions
To get a good evaluation of your preparation you can go through another course  for sample exam questions on Udemy  .
Exam Cost
Exam will cost you USD 150. AWS also gives you an option to book a practice exam for USD 20 before you go for actual exam.
How to book exam
To book an exam you will have to create an account in AWS Training and Certification Portal .
Passing score
AWS doesn’t reveal minimum passing score and it keeps on changing. But we have observed that generally people who score above 70% passed the exam. You will immediately see the score on you screen once you finish the test and will also get a report on your mail within 1 hour.
Exam Tips
  • Get good sleep and keep calm during the exam.
  • You won’t get more than 3 mins per question.
  • You may find some very long questions in exam. Best strategy to tackle them is to read the answer options first and then check for relevant info in question.
  • Since it’s an AWS exam so look for AWS related options in the answers.  Chances are high that  Non-AWS related option in answer will be wrong.
  • AWS exams generally don’t focus on mugging their datasheets. So you won’t get a question like “How much RAM does a C3.xlarge offer?” .
That’s all folks! Best of luck for the exam!
Do let us know in comments section if you have any query.

Solved: How to change from EFI to SMI label and vice-versa

Hello!
In this post we will see how to change the disk label from EFI to SMI in a Solaris server.
Before you decide to change the disk label ensure that the disk doesn't have any important data. If needed take backup of the disk. As during label change all the data will be removed from the disk.
We will use "format -e" command to change the label on disk.
root@cldvds# format -e c0t6006023764A62A00C5H174886B5BC267d0

format> la
 [0] SMI Label
 [1] EFI Label
 Specify Label type[1]: 0
 Auto configuration via format.dat[no]?
 Auto configuration via generic SCSI-2[no]?

Geometry: 256 heads, 10 sectors 40960 cylinders result in 104857600 out of 104857600 blocks.
 Do you want to modify the device geometry[no]? yes
 format> p
The disk partition should now change from 0 to 9 slices(EFI) to 0 to 7 slices (SMI).
If you want to change from SMI to EFI you can follow the same steps and instead of choosing option 0 choose option 1.
That's all folks! Do comment if you have any concern or query!

Solved: Create virtual environment with python 3 in linux

Once you have installed python 3.6 as described in the last post you can create virtual environment to work with it.
  • First let’s install the package of virtual environment for python 3.
CentOS/RHEL
sudo yum install -y python3-venv
Ubuntu
sudo apt-get install -y python3-venv 
  • Create a directory for you virtual environment and get inside it.
mkdir virtualenvscd virtualenvs
  • Now let’s create our virtual environment.
python3.6 -m venv cloudvedasenv
  • Finally activate the new virtual environment. Notice the new environment name in brackets once you run the source command. That means you are now inside the virtual environment.
[ec2-user@cloudvedas ~]$ source cloudvedasenv/bin/activate
(cloudvedasenv) [ec2-user@cloudvedas ~]$
  • If you want to install a package inside the virtual environment you can use pip .
(cloudvedasenv) [ec2-user@cloudvedas ~]$ pip install zappa requests flask

How to prepare for AWS Certified Developer - Associate certificationexam

In one of our earlier post we have detailed about which AWS certification is suitable for you ?
If you have decided to go for AWS Certified Developer – Associate certification this post is for you.
If you are  an absolute beginner you can start with free labs from AWS . To practice further you can create free AWS account. These two actions will get you started on AWS.
Beware that if you go beyond free tier limits you will be billed. Best practice is to create a billing alert.  This alert can save you from unexpected bill shockers.
To further hone your skills you can either go for AWS classroom training or go for online courses. The classroom training will cost you from USD 800 to USD 2000. While the online courses can cost you from USD 10 to USD 300, depending on which course you choose.
Our personal opinion is that you should go for online courses as they are cheaper and if you follow their labs honestly they can be as good as classroom training.
In online courses we recommend two providers acloudguru and Linux Academy.  Both have monthly plans to buy the courses but they can become bit costly if you can’t complete the course in 1 month.
We have observed that acloudguru also provide the same course on Udemy where you get lifetime access to course with just one time payment. Also, Udemy provide heavy discounts on courses during sale which can get you a good bargain.
Thus, we recommend this AWS Certified Developer – Associate course  of acloudguru on Udemy . Also, once you buy this course on Udemy you will get access of the same course on acloudguru website also.
The acloudguru course instructor Ryan is an industry expert and deliver the course really well. The course will cover almost all the main topics which are asked in exam.  (Though we have observed that as of Apr-18 it was missing a session on AWS lambda for which the questions have started appearing in exam. Hope they update the course soon.) Currently you can learn about lambda from Ryan’s other course on AWS Lambda .
It’s a good idea to follow all the labs with the instructor and once you get confidence redo the labs independently. Don’t forget to complete the practice quizzes to check your knowledge.
This course will give you good base for the exam. But, the course itself is not enough to clear the exam.  You should go through whitepapers and FAQs of atleast below service .
  • EC2
  • S3
  • SQS
  • RDS
  • DynamoDB
  • Lambda
Exam pattern
Exam has Multiple-choice and multiple-answer questions. Exam is of 80 minutes.
Practice Exam Questions
To get a good evaluation of your preparation you can go through another course of  acloudguru sample exam questions on Udemy  .  Many test takers have said that they got similar questions in exam.
Exam Cost
Exam will cost you USD 150. AWS also gives you an option to book a practice exam for USD 20 before you go for actual exam.
How to book exam
To book an exam you will have to create an account in AWS Training and Certification Portal .
Passing score
AWS doesn’t reveal minimum passing score and it keeps on changing. But we have observed that generally people who score above 80% passed the exam. You will immediately see the score on you screen once you finish the test and will also get a report on your mail within 1 hour.
Exam Tips
  • Get good sleep and keep calm during the exam.
  • You won’t get more than 3 mins per question.
  • You may find some very long questions in exam. Best strategy to tackle them is to read the answer options first and than check for relevant info in question.
  • Since it’s an AWS exam so look for AWS related options in the answers.  Chances are high that  Non-AWS related option in answer will be wrong.
  • AWS exams generally don’t focus on mugging their datasheets. So you won’t get a question like “How much RAM does a C3.xlarge offer?” .
That’s all folks! Best of luck for the exam!
Do let us know in comments section if you have any query.