Linux Foundation Administrators | 0fae409 | 2018-01-29 10:58:36 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0> |
| 3 | ############################################################################## |
| 4 | # Copyright (c) 2016 The Linux Foundation and others. |
| 5 | # |
| 6 | # All rights reserved. This program and the accompanying materials |
| 7 | # are made available under the terms of the Eclipse Public License v1.0 |
| 8 | # which accompanies this distribution, and is available at |
| 9 | # http://www.eclipse.org/legal/epl-v10.html |
| 10 | ############################################################################## |
| 11 | |
| 12 | case "$(facter operatingsystem)" in |
| 13 | Ubuntu) |
| 14 | apt-get update |
| 15 | ;; |
| 16 | *) |
| 17 | # Do nothing on other distros for now |
| 18 | ;; |
| 19 | esac |
| 20 | |
| 21 | IPADDR=$(facter ipaddress) |
| 22 | HOSTNAME=$(facter hostname) |
| 23 | FQDN=$(facter fqdn) |
| 24 | |
| 25 | echo "${IPADDR} ${HOSTNAME} ${FQDN}" >> /etc/hosts |
| 26 | |
| 27 | #Increase limits |
| 28 | cat <<EOF > /etc/security/limits.d/jenkins.conf |
| 29 | jenkins soft nofile 16000 |
| 30 | jenkins hard nofile 16000 |
| 31 | EOF |
| 32 | |
| 33 | cat <<EOSSH >> /etc/ssh/ssh_config |
| 34 | Host * |
| 35 | ServerAliveInterval 60 |
| 36 | |
| 37 | # we don't want to do SSH host key checking on spin-up systems |
| 38 | Host 10.30.122.* |
| 39 | StrictHostKeyChecking no |
| 40 | UserKnownHostsFile /dev/null |
| 41 | EOSSH |
| 42 | |
| 43 | cat <<EOKNOWN > /etc/ssh/ssh_known_hosts |
| 44 | github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== |
| 45 | EOKNOWN |
| 46 | |
| 47 | # vim: sw=2 ts=2 sts=2 et : |