aboutsummaryrefslogtreecommitdiffstats
path: root/yocto-autobuilder-setup
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-autobuilder-setup')
-rw-r--r--yocto-autobuilder-setup200
1 files changed, 0 insertions, 200 deletions
diff --git a/yocto-autobuilder-setup b/yocto-autobuilder-setup
deleted file mode 100644
index b84d42b7..00000000
--- a/yocto-autobuilder-setup
+++ /dev/null
@@ -1,200 +0,0 @@
-# Yocto Build Server Setup Script
-# Elizabeth Flanagan <pidge@toganlabs.com>
-#
-# Copyright (C) 2011-2017 Intel Corp.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-#########################################
-# buildbot update wants to parse the config
-# So, we export bogus values just to get the
-# config to parse
-#########################################
-
-export WORKERBASEDIR=`pwd`/yocto-worker
-export PUBLISH_BUILDS=False
-export PUBLISH_SOURCE_MIRROR=False
-export PUBLISH_SSTATE=False
-export SSTATE_PUBLISH_DIR="/tmp/yocto-autobuilder/sstate_mirror"
-export SOURCE_PUBLISH_DIR="/tmp/yocto-autobuilder/source"
-export DL_DIR="/tmp/yocto-autobuilder/downloads"
-export SSTATE_DIR="/tmp/yocto-autobuilder/sstate"
-export BUILD_PUBLISH_DIR="/tmp/yocto-autobuilder/builds"
-export RELEASE_PUBLISH_DIR="/tmp/yocto-autobuilder/releases"
-export BUILD_HISTORY_COLLECT=False
-export SOURCE_DL_DIR="/tmp/yocto-autobuilder/downloads"
-export SOURCE_SSTATE_DIR="/tmp/yocto-autobuilder/sstate"
-export LSB_SSTATE_DIR="/tmp/yocto-autobuilder/lsb-sstate"
-export CLEAN_SOURCE_DIR=False
-export BUILD_HISTORY_DIR="/tmp/yocto-autobuilder/buildhistory"
-export BUILD_HISTORY_REPO="file:////tmp/yocto-autobuilder/buildhistory-repo"
-export EMGD_DRIVER_DIR="/tmp/yocto-autobuilder/emgd-driver"
-export ADTREPO_POPULATE=False
-export ADTREPO_GENERATE_INSTALLER=False
-export ADTREPO_DEV_POPULATE=False
-export ADTREPO_GENERATE_DEV_INSTALLER=True
-export ADTREPO_URL="http://adtrepo.yoctoproject.org/"
-export ADTREPO_PATH="/srv/www/vhosts/adtrepo.yoctoproject.org/"
-export ADTREPO_DEV_URL="http://adtrepo-dev.yoctoproject.org/"
-export ADTREPO_DEV_PATH="/srv/www/vhosts/adtrepo-dev/"
-export PATH=`pwd`/bin:$PATH
-export YOCTO_AB_CONFIG=`pwd`/buildset-config/yoctoAB.conf
-export RESOLVED_TRIGGERED_HEAD=True
-export OPTIMIZED_GIT_CLONE=False
-export OGIT_TRASH_DIR=/tmp/yocto-autobuilder/git/trash
-export OGIT_TRASH_CRON_TIME="0 0 * * *"
-export OGIT_TRASH_NICE_LEVEL="19"
-if ! HOST_ADDR=$(hostname -I 2> /dev/null); then
- HOST_ADDR=$(hostname -i)
-fi
-
-##########################
-#
-# Check to see if we've got a username/password set
-#
-##########################
-if [ ! -f "${PWD}/yocto-controller/buildbot.tac" ]; then
- echo ""
- echo "Creating yocto-controller/buildbot.tac from an example buildbot.tac"
- echo ""
- /bin/cp yocto-controller/buildbot.tac.example yocto-controller/buildbot.tac
-fi
-
-if [ ! -f "${PWD}/yocto-worker/buildbot.tac" ]; then
- echo ""
- echo "Creating yocto-worker/buildbot.tac from an example buildbot.tac"
- echo ""
- /bin/cp yocto-worker/buildbot.tac.example yocto-worker/buildbot.tac
-fi
-
-
-if [ ! -f "${PWD}/yocto-controller/controller.cfg" ]; then
- echo ""
- echo "Creating yocto-controller/controller.cfg from an example controller.cfg"
- echo ""
- /bin/cp yocto-controller/controller.cfg.example yocto-controller/controller.cfg
-fi
-
-if [ "${PWD}/yocto-controller/controller.cfg" ]; then
- config_check=`cat ${PWD}/yocto-controller/controller.cfg|grep "<PASS>"`
-fi
-
-USERSITE="`python2 -m site --user-site`"
-ABPTHPATH="${USERSITE}/autobuilder.pth"
-if [ ! -f "${ABPTHPATH}" ]; then
- echo "Adding autobuilder modules to ${ABPTHPATH}"
- mkdir -p ${USERSITE}
- cat ${PWD}/autobuilder.pth.in | sed "s@<YPABDIR>@${PWD}@g" > ${ABPTHPATH}
-fi
-
-#########################################
-#
-# I dislike people touching my .bashrc
-# so, let's warn here that they should add
-# this to their env
-#
-#########################################
-echo "#########################################################################"
-echo " Setting envvars. "
-echo " In the future though please add the following to your shell environment: "
-echo " PATH=${PWD}/bin:"'$PATH'
-echo " YOCTO_AB_CONFIG=${PWD}/buildset-config/yoctoAB.conf"
-echo ""
-echo " If you don't, you should source this script everytime you want start the "
-echo " autobuilder."
-
-##########################
-#
-# Check to see if we've got an autobuilder.conf
-#
-##########################
-if [ ! -f "./config/autobuilder.conf" ]; then
- echo ""
- echo "Creating config/autobuilder.conf from an example autobuilder.conf"
- echo ""
- /bin/cp config/autobuilder.conf.example config/autobuilder.conf
-fi
-
-if [ ! -d "./buildset-config" ]; then
- echo ""
- echo "Creating buildset-config from buildset-config.controller"
- echo ""
- /bin/cp -R buildset-config.controller buildset-config
-fi
-
-
-if [ -n "${config_check:+x}" ]; then
- echo ""
- echo " You've not setup the autobuilder before. Generating a server/client password"
- echo " combo for you."
- password=`cat /dev/urandom|tr -dc "a-zA-Z0-9"|fold -w 9|head -n1`
- echo " Client/Server Password = $password "
- echo ""
- echo " Modifying the following files with this password:"
- echo ""
- echo " ${PWD}/yocto-controller/controller.cfg "
- sed -i "s/<PASS>/$password/g" ${PWD}/yocto-controller/controller.cfg
- echo " ${PWD}/yocto-controller/buildbot.tac "
- sed -i "s/<PASS>/$password/g" ${PWD}/yocto-controller/buildbot.tac
- echo " ${PWD}/yocto-worker/buildbot.tac "
- sed -i "s/<PASS>/$password/g" ${PWD}/yocto-worker/buildbot.tac
-
- echo ""
- echo " Updating worker-init script used for google cloud building. "
- sed -i "s/<HOST_ADDR>/$HOST_ADDR/" ${PWD}/bin/worker-init
- sed -i "s/<PASS>/$password/" ${PWD}/bin/worker-init
- echo ""
- echo " If you wish to use your own generated username and password please "
- echo " modify the above files as needed. Please see the README for more "
- echo " information. "
- echo ""
- htpath=${PWD}/.htpasswd
-
- if [ ! -f $htpath ]; then
- touch $htpath
- upassword=`cat /dev/urandom|tr -dc "a-zA-Z0-9"|fold -w 8|head -n1`
- echo " Generating an .htpasswd file using your current username and $upassword at ${PWD}/.htpasswd"
- ./bin/htpasswd -b $htpath $USER $upassword
- fi
- sed -i "s?<HTPASSWDPATH>?$htpath?g" ${PWD}/yocto-controller/controller.cfg
- echo "#########################################################################"
- echo ""
- echo " Please modify ${PWD}/config/autobuilder.conf if you wish to specify "
- echo " a different location in which to publish build artifacts, etc."
- echo ""
- echo "#########################################################################"
- echo ""
- echo " Ready to start the yocto autobuilder."
- echo ""
- echo " The yocto-autobuilder runs buildbot 0.8.8 with some modifications and"
- echo " a different git fetcher (yoctogit.py)"
- echo ""
- echo "#########################################################################"
- buildbot upgrade-master ${PWD}/yocto-controller
- ################
- #
- # We touch this because we know they've at least run this once
- #
- ################
- touch ${PWD}/.setupdone
-fi
-
-echo " To start the autobuilder:"
-echo " ./yocto-start-autobuilder <worker|controller|both>"
-echo ""
-echo " To stop the autobuilder:"
-echo " ./yocto-stop-autobuilder <worker|controller|both>"
-echo ""