diff options
author | Andrew Grimberg <agrimberg@linuxfoundation.org> | 2016-09-23 10:56:38 -0700 |
---|---|---|
committer | Andrew Grimberg <agrimberg@linuxfoundation.org> | 2016-09-23 12:01:57 -0700 |
commit | 128b3e738f0a3c30342b0d1c7554a3acc49ca8b7 (patch) | |
tree | e195b0cf48863298a311b0652867e1e4c1ed66e3 /jenkins-scripts/basic_settings.sh | |
parent | 490530fd80827046db0eca6eb016521f316a4583 (diff) |
Jenkins spin-up scripts
Scripts used for Jenkins minion startup when used with OpenStack plugin
managed minions
Change-Id: I616222a0fab12d8f283b5e633a612551c0d5f313
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Diffstat (limited to 'jenkins-scripts/basic_settings.sh')
-rwxr-xr-x | jenkins-scripts/basic_settings.sh | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/jenkins-scripts/basic_settings.sh b/jenkins-scripts/basic_settings.sh new file mode 100755 index 000000000..412dfff38 --- /dev/null +++ b/jenkins-scripts/basic_settings.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0> +############################################################################## +# Copyright (c) 2016 The Linux Foundation and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +############################################################################## + +case "$(facter operatingsystem)" in + Ubuntu) + apt-get update + # make sure that the ca-certs are properly updated + /usr/sbin/update-ca-certificates + + # attach to the fd.io.dev apt repo + echo 'deb http://nexus.fd.io/content/repositories/fd.io.dev/ ./' >> /etc/apt/sources.list + ;; + *) + # Do nothing on other distros for now + ;; +esac + +IPADDR=$(facter ipaddress) +HOSTNAME=$(facter hostname) +FQDN=$(facter fqdn) + +echo "${IPADDR} ${HOSTNAME} ${FQDN}" >> /etc/hosts + +#Increase limits +cat <<EOF > /etc/security/limits.d/jenkins.conf +jenkins soft nofile 16000 +jenkins hard nofile 16000 +EOF + +cat <<EOSSH >> /etc/ssh/ssh_config +Host * + ServerAliveInterval 60 + +# we don't want to do SSH host key checking on spin-up systems +# Don't use CIDR since SSH won't parse it +# 10.30.48.0/23 +Host 10.30.48.* 10.30.49.* + StrictHostKeyChecking no + UserKnownHostsFile /dev/null +EOSSH + +cat <<EOKNOWN > /etc/ssh/ssh_known_hosts +[gerrit.fd.io]:29418,[162.253.54.31]:29418 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC76FxV43JIk/HpI5JUZfizmak9znK/QzsjPoNHt/Eo2Vp68kvJIRZ+PzI7RJR0NsdsXlyqzRsGuH+Cj99ZuLVjNMqz1Y1A5y6itYAgT42KDcnV/JoPx6WV+THdQ+oMSp2dINtvD1kc6Om8iAA2CwYOfIZ/FQS5A9OX2xzFopo4qAN3nRk9kpcHyC698R5SDNZBbk6eqlsBz0827KJrSpOSEEMBhtroBM4JV8vImcSWeJuQ5QFdZgQdQaI8R5YFBRbWu3mDSgJfjJk89xT2CkUiqIynNJeiQMM4IZxcdQB3zJ1RUEJepxv77yV09NZ8jwhaN6X659UJZjsCZ5ffvc77 +EOKNOWN + +# vim: sw=2 ts=2 sts=2 et : |