Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Build And Release Projects – B1

rajeshkumar created the topic: Build and Release Projects – B1
Project1 (Shell Scripting)
Write a script which can ask user to enter machinename/hostname/ipaddress and based on the entry do the following tasks.
1. Check if the machine name is valid or not, it its not valid, ask user to enter the machine name again. (Play with ping command)
2. if the machine name is valid, Print Name of the drives | total size | free size | used size ( Play with cut command)
3. Install jenkins and start the services
4. and send out an email to rajesh@scmgalaxy.com

Project2 (Ant & Git-Github)
Write a Ant Script which will create a local repostory based on the user parameter passed(name of repos) and it should add numbers of files and commit.
then it should set the required git config and push to the one particular git hub remote repos.

Project3 (Maven)
Write a 2 maven project and each one of these project will consist of three differnt projects
1. Java project
2. donet
Now write a master maven project and call above projects as a sub projects.

Project4- Backup & Restore
all the three projects should be live in 5 mins and I will destroyt these setup and you will restore it within 5 mins.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

sribhavani_u replied the topic: Build and Release Projects – B1
project1
======
#!/bin/bash
#script to ask user to enter machinename/hostname/ipaddress and check if they are valid or not
jen_start()
{
wget -O /etc/yum.repos.d/jenkins.repo pkg.jenkins-ci.org/redhat-stable/jenkins.repo
rpm --import jenkins-ci.org/redhat/jenkins-ci.org.key
yum install jenkins
java -version 1>/dev/null 2>/dev/null
i=$?
if [ $i -ne 0 ]; then
yum install java
else
service jenkins restart
chkconfig jenkins on
fi
}
while :
do
echo "Please enter host you would like to ping(machinename/hostname/ipaddress):"
read PING
count=$( ping -c 1 $PING | grep icmp* | wc -l)
if [ $count -eq 0 ]
then
echo "Given Host is invalid.give the valid host"
else
echo "Given host is valid"
df -Pk | awk ' { printf "%30s %12s %12s %12s \n", $6, $2, $4, $3 } '
echo "starting jenkins server"
jen_start
service jenkins status
i=$?
if [ $i -eq 0 ]; then
echo "jenkinsis up and running" | mail sribhavani_u@yahoo.com
fi
exit
fi
done

sribhavani_u replied the topic: Build and Release Projects – B1
PROJECT#3
=========

parent pom

4.0.0
com.sri
myproject3
jar
1.0-SNAPSHOT
myproject3

SampleApplication
webapp

maven.apache.org

junit
junit
3.8.1
test

 

SampleApplication

myproject3
com.sri
1.0-SNAPSHOT
4.0.0
com.sri
SampleApplication
jar
1.0-SNAPSHOT
SampleApplication
maven.apache.org

junit
junit
3.8.1
test

webapp

myproject3
com.sri
1.0-SNAPSHOT
4.0.0
com.sri
webapp
war
1.0-SNAPSHOT
webapp Maven Webapp
maven.apache.org

junit
junit
3.8.1
test

webapp

 

navneet07 replied the topic: Build and Release Projects – B1
echo "please enter ipaddress:"
read ipaddress
if ping -c 1 $ipaddress &> /dev/null
then
echo "Ip address is valid and Below is the filesystem of this machine $ipaddress "
df -h|cut -c1-43
else
echo "Ip address is invalid,please enter the ip again:"
read ipaddress
echo "New IP" $ipaddress
fi

Rajesh Kumar
Follow me
Latest posts by Rajesh Kumar (see all)
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x