X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=jenkins-scripts%2Fmininet.sh;h=cd8aecf396c4708c11e42e30e6307d03e5eceb48;hb=622f0e865ae93d7874827aa85cdaa294e3dce2c0;hp=26e0e0f3be8aa45ec4af99f429889d07ce8f3ff7;hpb=9861689bfcb732263d2545af9af07e0bca20fa6c;p=releng%2Fbuilder.git diff --git a/jenkins-scripts/mininet.sh b/jenkins-scripts/mininet.sh index 26e0e0f3b..cd8aecf39 100755 --- a/jenkins-scripts/mininet.sh +++ b/jenkins-scripts/mininet.sh @@ -1,10 +1,45 @@ #!/bin/bash +# make sure we don't require tty for sudo operations +cat </etc/sudoers.d/89-jenkins-user-defaults +Defaults:jenkins !requiretty +jenkins ALL = NOPASSWD: ALL +EOF + +# for whatever reason netopeer & CPqD aren't installed (they weren't in +# one of the yum repos we were hooked up to when the base image was +# built, they are now. Make sure they're install +yum install -q -y netopeer-server-sl CPqD-ofsoftswitch13 + +# the vagrant configuration for netopeer doesn't configure SSH correctly +# as it uses and here document via echo and not cat fix that +cat << EOSSH >> /etc/ssh/sshd_config + +# Added for netconf / netopeer testing +Port 22 +Port 830 +Subsystem netconf /usr/bin/netopeer-server-sl +EOSSH + +# sshd has to get a restart because of the above +service sshd restart + +# found out while doing testing to fix netopeer that the selinux perms +# aren't set correctly (thanks Rackspace for having an EL6 image that +# didn't have selinux on at first!) fix it so that the password can be +# set +/sbin/restorecon -R /etc + # According to Luis in RT7956 the controller SSH capabilities require # that for NETCONF it uses a password (how broken!) So we're going to # force a password onto the jenkins user echo 'jenkins' | passwd -f --stdin jenkins +# netopeer doesn't work correctly for non-root users from what I'm +# seeing (at least for the initial connection). Let's allow the tests to +# get in as the root user since jenkins already has full sudo +echo 'root' | passwd -f --stdin root + # make sure the firewall is stopped service iptables stop