golang.org/x/build@v0.0.0-20240506185731-218518f32b70/env/linux-ppc64/osuosl/NOTES (about)

     1  The linux-ppc64-sid buildlets run on PPC64 VMs at osuosl.org (OSU Open Source Lab).
     2  
     3  This runs debian sid, and replaces the linux-ppc64-osuosl builders running ubuntu 16.
     4  
     5  Filing tickets: https://support.osuosl.org/
     6      Ticket username: bradfitz@golang.org
     7      Ticket password: go/pw-osuosl-ppc64
     8  
     9  Machines:
    10  
    11  * go-be-debian-1: (30 GB RAM, 50 GB disk, 20 cores, POWER8)
    12  
    13    ssh -i ~/.ssh/id_ed25519_golang1 debian@140.211.10.88
    14    (key from go/go-builders-ssh)
    15  
    16    Linux go-be-debian-1 5.10.0-1-powerpc64 #1 SMP Debian 5.10.4-1 (2020-12-31) ppc64 GNU/Linux
    17  
    18  * go-be-p10-1 : (30 GB RAM, 50 GB disk, 20 cores, POWER10)
    19  
    20    ssh -i ~/.ssh/id_ed25519_golang1 debian@go-be-p10-1.osuosl.org
    21    (key from go/go-builders-ssh)
    22  
    23    Linux go-be-p10-1 6.1.0-7-powerpc64 #1 SMP Debian 6.1.20-2 (2023-04-08) ppc64 GNU/Linux
    24  
    25  # Setting up the debian ppc64 builder for containerized CI
    26  
    27  Copy the files and folders inside this directory onto the CI which preserving
    28  the directory structure.
    29  
    30  There are 3 main tasks, in chronological order:
    31  - install debian packaging tools
    32  - build/install debian upstream's golang-defaults and docker.io package for ppc64
    33  - install rundockerbuilder and systemd unit file, and start the service
    34  
    35  Since this is a rolling distro, these steps may change with time.
    36  
    37  ## Building and installing docker.io
    38  
    39  Install golang-1.19-go, git and the debian packaging tools. The following
    40  is a list of commands which could be used to create the docker.io package.
    41  Note, these may change with time as this is a rolling distro.
    42  
    43  ```
    44  mkdir ~/debs
    45  cd ~/debs
    46  git clone https://salsa.debian.org/go-team/compiler/golang-defaults.git
    47  cd golang-defaults
    48  git am ~/deb-patches/golang-defaults-hack.patch
    49  debuild -us -uc -tc
    50  cd ~/debs
    51  dpkg -i golang-go_1.19~1_ppc64.deb
    52  
    53  # Build docker. Note, the version used is/was the tips of master.
    54  # One day it will not be, and the git checkout command will need updated.
    55  # Also, dependencies need to be installed. debuild will indicate those.
    56  git clone https://salsa.debian.org/docker-team/docker.git
    57  cd docker
    58  git am ~/deb-patches/docker-hack.patch
    59  origtarz --unpack
    60  DEB_BUILD_OPTIONS="nocheck nostrip" debuild -us -uc -tc
    61  cd ~/debs/
    62  dpkg -i docker.io_20.10.17+dfsg1-1_ppc64.deb
    63  sudo usermod -aG docker $USER
    64  ```
    65  
    66  ## Debian sid base image
    67  
    68  Run build-sid.sh inside ~/sid-image
    69  
    70  Use the build-sid.sh script to generate a small ppc64 debian rootfs
    71  
    72  ## Buildlet image
    73  
    74  from ~/buildlet-image, run `sudo docker build --tag=golang/buildlet-stage0 .`
    75  to generate the docker image used to run the CI.
    76  
    77  ## Installing and starting rundockerbuildlet
    78  
    79  Build cmd/rundockerbuildlet from this repo for GOOS=linux GOARCH=ppc64, and
    80  copy it to ~/
    81  
    82  Run the following to install the command and systemd unit files to start
    83  running the service:
    84  
    85  ```
    86  sudo install ~/rundockerbuildlet /usr/local/bin/rundockerbuildlet
    87  sudo systemctl enable /etc/systemd/user/rundockerbuildlet.service || true
    88  sudo systemctl daemon-reload || true
    89  sudo systemctl restart docker.service
    90  sudo systemctl restart rundockerbuildlet.service
    91  ```
    92  
    93  # Warnings and other notes
    94  
    95  - (P9 VM) Do not update the kernel (yet), #54547 causes big problems. The docker.io
    96    packages need rebuilt when the go1.19 packages are updated to include this
    97    fix. Likewise, the bootstrap toolchain for CI will need to be updated to
    98    the latest go1.18 release (the oldest toolchain with this fix).
    99  
   100  - (P9 VM) Following the above, grub is set to boot from the older kernel. This
   101    will need updated if new kernel packages are installed or removed.
   102  
   103  - (P10 VM) Use Dockerfile.p10 to build the golang testing container. This is
   104    needed until the minimum bootstrap version is 1.20 or newer.