Gary Wu | 213a835 | 2017-06-16 13:44:28 -0700 | [diff] [blame^] | 1 | #!/bin/sh |
| 2 | |
| 3 | sed -i 's|archive\.ubuntu\.com|mirrors.ocf.berkeley.edu|g' /etc/apt/sources.list |
| 4 | |
| 5 | echo "192.168.33.1 nexus-proxy" >> /etc/hosts |
| 6 | |
| 7 | |
| 8 | cat >> /etc/inputrc <<EOF |
| 9 | set show-all-if-ambiguous on |
| 10 | set show-all-if-unmodified on |
| 11 | set match-hidden-files off |
| 12 | set mark-symlinked-directories on |
| 13 | EOF |
| 14 | |
| 15 | |
| 16 | apt-get update |
| 17 | apt-get -y install git |
| 18 | git config --global user.email "gary.i.wu@huawei.com" |
| 19 | git config --global user.name "Gary Wu" |
| 20 | apt-get -y install curl openjdk-8-jdk maven unzip |
| 21 | |
| 22 | # install Jenkins |
| 23 | wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - |
| 24 | sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' |
| 25 | apt-get update |
| 26 | apt-get -y install jenkins jenkins-job-builder python-pip |
| 27 | |
| 28 | apt-get -y install docker.io |
| 29 | sudo usermod -aG docker ubuntu |
| 30 | sudo usermod -aG docker jenkins |
| 31 | |
| 32 | su -l jenkins -c "/vagrant/jenkins-init-1.sh" |
| 33 | |
| 34 | sudo systemctl restart jenkins |
| 35 | sleep 5 |
| 36 | |
| 37 | su -l jenkins -c "/vagrant/jenkins-init-2.sh" |
| 38 | |
| 39 | sudo systemctl restart jenkins |
| 40 | sleep 5 |
| 41 | |
| 42 | su -l jenkins -c "/vagrant/jjb-init.sh" |
| 43 | |