Author: Matti Picus <[email protected]> Branch: Changeset: r1097:709f8fb564ac Date: 2019-10-31 07:12 +0200 http://bitbucket.org/pypy/buildbot/changeset/709f8fb564ac/
Log: add a dockerfile to run a centos6-based x64 buildslave diff --git a/README_BUILDSLAVE b/README_BUILDSLAVE --- a/README_BUILDSLAVE +++ b/README_BUILDSLAVE @@ -1,7 +1,13 @@ How to setup a buildslave for PyPy ================================== -The required setup is:: +There are three documented ways to run a PyPy buildslave: + +- "bare metal" on the host machine, described below +- in a chroot, setting up the chroot is described in `README-CHROOT` +- via docker on a centos6-based image, see docker/Dockerfile + +In all cases the required setup is:: - hg - "python" should run a cpython 2.6-2.7 that will run the test suites. - virtualenv that will use the "python" from above diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,46 @@ +# build with something like this, where +# -t is the name of the image +# -f is this file +# the . is a random directory +# docker build -t buildslave -f docker/Dockerfile . +# +# To create the buildslave configuration, call +# docker run --rm -v<build_dir>:/build_dir \ +# -eSLAVENAME=<name> -ePASSWORD=<password> buildslave +# Then you can examine the <build_dir>/buildbot.tac file. +# +# To run the buildslave (after the stage above succeeds) you no longer need the +# SLAVENAME and PASSWORD. The slave will run non-deamonized, which will appear +# to "hang" the console running the slave. To stop the slave, simply CTRL-C or +# kill the process. +# +# To enter the buildslave image +# docker run -it -v<abspath/to/builder/dir>:/build_dir> buildslave /bin/bash + +FROM centos:centos6 + +RUN yum -y update +RUN yum install -y wget bzip2-devel zlib-devel glibc-devel libX11-devel \ + libXt-devel patch expat-devel libXft-devel openssl-devel tk-devel gdbm-devel \ + perl xz-devel libffi-devel ncurses-devel sqlite-devel +RUN yum install -y centos-release-scl + +RUN wget https://github.com/squeaky-pl/centos-devtools/releases/download/8.2-s1/gcc-8.2.0-binutils-2.32-x86_64.tar.bz2 -O - | tar -C / -xj +RUN wget https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-7.0.0-linux_x86_64-portable.tar.bz2 -O - | tar -C /opt -xj +RUN ln -s /opt/pypy-7.0.0-linux_x86_64-portable/bin/pypy /usr/local/bin/pypy + +RUN yum install -y python27 python27-python-virtualenv + +#yuck +ENV LD_LIBRARY_PATH=/opt/rh/python27/root/usr/lib64 +RUN /opt/rh/python27/root/usr/bin/python -mvirtualenv /python27_virt +ENV PATH=/python27_virt/bin:$PATH +ENV PATH=/opt/devtools-8.2/bin:$PATH +RUN pip install --upgrade pip setuptools +RUN pip install buildbot-slave pytest hypothesis cffi vmprof mercurial + +CMD if [ -e /build_dir/buildbot.tac ]; then \ + buildslave start --nodaemon /build_dir; \ + else \ + buildslave create-slave /build_dir buildbot.pypy.org:10407 $SLAVENAME $PASSWORD; \ + fi _______________________________________________ pypy-commit mailing list [email protected] https://mail.python.org/mailman/listinfo/pypy-commit
