From owner-svn-src-user@FreeBSD.ORG Thu Mar 27 01:27:58 2014 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1F24400; Thu, 27 Mar 2014 01:27:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2168929; Thu, 27 Mar 2014 01:27:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2R1RwHn096344; Thu, 27 Mar 2014 01:27:58 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2R1RwtD096340; Thu, 27 Mar 2014 01:27:58 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201403270127.s2R1RwtD096340@svn.freebsd.org> From: Julio Merino Date: Thu, 27 Mar 2014 01:27:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r263786 - in user/jmmv/autotest/node: . configs X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 01:27:58 -0000 Author: jmmv Date: Thu Mar 27 01:27:57 2014 New Revision: 263786 URL: http://svnweb.freebsd.org/changeset/base/263786 Log: Add nginx configuration. Set up nginx in the same way in all cluster machines and install the same static files. While doing this, remove a spurious comment that sneaked in in the last change that prevented autotest_node from being started. Added: user/jmmv/autotest/node/configs/index.html (contents, props changed) user/jmmv/autotest/node/configs/nginx.conf (contents, props changed) Modified: user/jmmv/autotest/node/setup.sh Added: user/jmmv/autotest/node/configs/index.html ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/jmmv/autotest/node/configs/index.html Thu Mar 27 01:27:57 2014 (r263786) @@ -0,0 +1,94 @@ + + + + +FreeBSD test suite results + + + + + + +

FreeBSD test suite results

+ +

Welcome to the FreeBSD test cluster!

+ +

Please excuse the current simplistic view of the test results. Work is +ongoing to provide you with better access to historical data as well as further +details on the execution environment of each run. At the moment, these pages +are generated by ad-hoc scripts +and the goal is for Kyua to do everything by itself. Bear with us in the +meantime; it's a SMOP, but a significant one!

+ +

Please see the FreeBSD Test +Suite project page for more details.

+ +

If you have any questions or suggestions regarding the contents of this page +do not hesitate to contact the freebsd-testing +mailing list.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArchitectureReleaseLatest resultsLatest raw outputAll historical data
amd64HEADHTMLDirectory listingDirectory listing
amd64stable/10HTMLDirectory listingDirectory listing
i386HEADHTMLDirectory listingDirectory listing
i386stable/10HTMLDirectory listingDirectory listing
+ +

Note: If the "Latest results" link is broken, it is likely that the release +build failed. Click on the "Directory listing" for the "Latest raw output" +instead to investigate what happened.

+ + + Added: user/jmmv/autotest/node/configs/nginx.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/jmmv/autotest/node/configs/nginx.conf Thu Mar 27 01:27:57 2014 (r263786) @@ -0,0 +1,44 @@ +worker_processes 1; + +events { + worker_connections 1024; +} + +http { + include mime.types; + types { + text/plain log; + } + default_type application/octet-stream; + + sendfile on; + + keepalive_timeout 65; + + server { + listen 80; + server_name localhost; + + location / { + root /kyua/www; + index index.html index.htm; + } + + location ^~ /head/data/ { + root /kyua; + index index.html index.htm; + autoindex on; + } + + location ^~ /stable-10/data/ { + root /kyua; + index index.html index.htm; + autoindex on; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/local/www/nginx-dist; + } + } +} Modified: user/jmmv/autotest/node/setup.sh ============================================================================== --- user/jmmv/autotest/node/setup.sh Thu Mar 27 01:18:58 2014 (r263785) +++ user/jmmv/autotest/node/setup.sh Thu Mar 27 01:27:57 2014 (r263786) @@ -52,7 +52,7 @@ SETUP_CONFIG_VARS="ATF_REMOTE ATF_REVISI # Packages needed to bootstrap autotest. -PACKAGES="automake autoconf kyua libtool qemu-devel" +PACKAGES="automake autoconf kyua libtool nginx qemu-devel" # Sets defaults for configuration variables and hooks that need to exist. @@ -72,6 +72,25 @@ setup_set_defaults() { } +# Locates a source configuration file for this host and prints its path. +# +# \param name Name of the configuration file to locate. +configfile() { + local name="${1}"; shift + + local candidates= + candidates="${candidates} ${SETUP_ETCDIR}/${name}" + candidates="${candidates} ${SETUP_ETCDIR}/../${name}" + + for candidate in ${candidates}; do + if [ -f "${candidate}" ]; then + echo "${candidate}" + return + fi + done +} + + # Prints the source directory of a specific component. # # \param component Name of the source component. @@ -178,7 +197,28 @@ setup_enable_daemon() { grep "autotest_node_enable=yes" /etc/rc.conf \ || echo "autotest_node_enable=yes" >>/etc/rc.conf - #"${dir}/rc.d/autotest_node" start + "${dir}/rc.d/autotest_node" start +} + + +# Configures, enables and starts nginx for the host, if desired. +setup_setup_nginx() { + local conf="$(configfile nginx.conf)" + if [ -z "${conf}" ]; then + shtk_cli_log "No nginx.conf for host; web server not enabled" + else + cp "${conf}" /usr/local/etc/nginx/nginx.conf + + local index="$(configfile index.html)" + if [ -n "${index}" ]; then + mkdir -p /kyua/www + cp "${index}" /kyua/www + fi + + grep -E "nginx_enable=\"?[Yy][Ee][Ss]\"?" /etc/rc.conf \ + || echo "nginx_enable=yes" >>/etc/rc.conf + /usr/local/etc/rc.d/nginx start + fi } @@ -237,6 +277,7 @@ setup_all() { setup_sync_atf setup_sync_shtk setup_sync_autotest + setup_nginx setup_enable_daemon setup_enable_cron } @@ -284,7 +325,7 @@ main() { "${function}" "${@}" || exit_code="${?}" ;; - enable-cron|enable-daemon|sync-atf|sync-autotest|sync-packages|sync-shtk) + enable-cron|enable-daemon|setup-nginx|sync-atf|sync-autotest|sync-packages|sync-shtk) shtk_bool_check "${expert_mode}" \ || shtk_cli_usage_error "Using ${command} requires expert" \ "mode; try passing -X"