Created
November 18, 2015 16:56
-
-
Save rezen/888780adbce9cb6eb9e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# yum | |
sudo yum -y update | |
sudo rpm -Uvh http://repo.webtatic.com/yum/el6/latest.rpm | |
sudo rm -f /etc/localtime | |
sudo ln -s /usr/share/zoneinfo/US/Pacific /etc/localtime | |
echo ">>> Installing Base Items" | |
# Install base items | |
sudo yum install -y vim curl wget build-essential python-software-properties python-setuptools libaio gcc gcc-c++ make automake autoconf | |
# sudo apt-get install build-essential autoconf zlib1g-dev curl libcurl4-openssl-dev libexpat1-dev gettext zlib1g-dev asciidoc | |
sudo yum install -y zlib-devel perl-ExtUtils-MakeMaker asciidoc xmlto openssl-devel | |
# valid in every os | |
cd ~ | |
wget -O git.zip https://github.com/git/git/archive/master.zip | |
unzip git.zip | |
cd git-master | |
sudo make configure | |
sudo ./configure --prefix=/usr/local | |
sudo make all doc | |
sudo make install install-doc install-html | |
# python stuffs | |
sum yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel | |
# sudo apt-get install libssl-dev ncurses-dev | |
# tools be good | |
sudo yum install -y screen inotify-tools perl perl-CPAN | |
# sudo apt-get install screen inotify-tools perl perl-CPAN | |
# | |
# java is the best ... | |
sudo yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel | |
# sudo add-apt-repository ppa:openjdk-r/ppa | |
# sudo apt-get update | |
# sudo apt-get install -y openjdk-8-jdk | |
echo ">>> Installing Jenkins!" | |
# install jenkins! | |
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo | |
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key | |
sudo yum install jenkins | |
# wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - | |
# sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list' | |
# sudo apt-get update | |
# sudo apt-get -y install jenkins | |
# update timezone ... if need be | |
# sudo sed -e 's@JENKINS_JAVA_OPTIONS="@&-Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Los_Angeles @' /etc/sysconfig/jenkins | sudo tee /etc/sysconfig/jenkins | |
sudo service jenkins start | |
# wait for jenkins to warm up | |
sleep 30 | |
echo ">>> Installing Jenkins plugins" | |
# grab the jenkins cli | |
cd /var/lib/jenkins && sudo wget http://127.0.0.1:8080/jnlpJars/jenkins-cli.jar | |
# https://github.com/jenkinsci/puppet-jenkins/blob/master/manifests/cli.pp | |
# change the owner | |
sudo chown jenkins:jenkins /var/lib/jenkins/jenkins-cli.jar | |
# allow execution | |
sudo chmod +x /var/lib/jenkins/jenkins-cli.jar | |
# list of plugins we should install | |
jenkins_plugins=( | |
'active-directory' | |
'build-name-setter' | |
'build-pipeline-plugin' | |
'clone-workspace-scm' | |
'conditional-buildstep' | |
'dashboard-view' | |
'git' | |
'git-client' | |
'groovy' | |
'jira' | |
'jenkins-jira-issue-updater' | |
'jobConfigHistory' | |
'slack' | |
'ssh' | |
'ssh-agent' | |
'stashNotifier' | |
'timestamper' | |
'token-macro' | |
'versionnumber' | |
'build-environment' | |
) | |
for plugin in "${jenkins_plugins[@]}" | |
do | |
java -jar jenkins-cli.jar -s http://127.0.0.1:8080/ install-plugin $plugin -deploy | |
done | |
java -jar jenkins-cli.jar -s http://127.0.0.1:8080/ restart | |
echo ">>> Installing Perl modules" | |
perl -MCPAN -e 'my $c = "CPAN::HandleConfig"; $c->load(doit => 1, autoconfig => 1); $c->edit(prerequisites_policy => "follow"); $c->edit(build_requires_install_policy => "yes"); $c->commit' | |
cpan_modules=($( cat './perl_modules.txt')) | |
cpan "${cpan_modules[@]}" | |
# @todo | |
# - setup security with LDAP | |
# - add optional systems such as selenium |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Archive::Zip | |
CPAN::Meta | |
CPAN::Meta::YAML | |
Capture::Tiny | |
Class::ErrorHandler | |
Class::Loader | |
Convert::ASCII::Armour | |
Convert::ASN1 | |
Convert::PEM | |
Crypt::Blowfish | |
Crypt::CBC | |
Crypt::DES | |
Crypt::DES_EDE3 | |
Crypt::DH | |
Crypt::DSA | |
Crypt::IDEA | |
Crypt::OpenSSL::RSA | |
Crypt::OpenSSL::Random | |
Crypt::Primes | |
Crypt::RSA | |
Crypt::Random | |
Data::Buffer | |
Digest::BubbleBabble | |
Digest::HMAC | |
Digest::MD2 | |
Digest::MD5 | |
Digest::SHA1 | |
Email::Abstract | |
Email::Address | |
Email::Date::Format | |
Email::Send | |
Email::Simple | |
Encode::Locale | |
Expect | |
File::Listing | |
File::Which | |
Font::TTF | |
HTML::Parser | |
HTML::Tagset | |
HTTP::Cookies | |
HTTP::Daemon | |
HTTP::Date | |
HTTP::Message | |
HTTP::Negotiate | |
IO::HTML | |
IO::Socket::SSL | |
IO::Tty | |
IPC::Run3 | |
Image::Size | |
LWP | |
LWP::MediaTypes | |
List::Util | |
MIME::Base64 | |
MIME::Charset | |
MIME::EncWords | |
MIME::Lite | |
MIME::Tools | |
MIME::Types | |
MRO::Compat | |
Mail::DKIM | |
Mail::Sender | |
Math::Base85 | |
Math::BigInt | |
Math::BigInt::Pari | |
Math::GMP | |
Math::Pari | |
Module::Build | |
Mozilla::CA | |
Net | |
Net::DNS | |
Net::FTPSSL | |
Net::HTTP | |
Net::IPv4Addr | |
Net::IPv6Addr | |
Net::SCP::Expect | |
Net::SMTP::TLS | |
Net::SSH::Perl | |
Net::SSLeay | |
Net::Telnet | |
PDF::API2 | |
Parse::CPAN::Meta | |
Perl | |
Probe::Perl | |
RTF::Writer | |
Return::Value | |
Socket | |
Sort::Versions | |
String::CRC32 | |
String::Random | |
Sub::Uplevel | |
Term::ReadPassword | |
Test::Deep | |
Test::Exception | |
Test::NoWarnings | |
Test::Script | |
Test::Simple | |
Tie::EncryptedHash | |
WWW::RobotRules |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment