forked from golang/build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes golang/go#21189 Updates golang/go#21260 Updates golang/go#34830 (ppc64 big endian remains) Change-Id: I7ff38edb519bf4f34cd05bb795b6a41f72b10640 Reviewed-on: https://go-review.googlesource.com/c/build/+/201637 Reviewed-by: Carlos Eduardo Seo <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]>
- Loading branch information
Showing
16 changed files
with
182 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ Filing tickets: https://support.osuosl.org/ | |
|
||
Machines: | ||
|
||
* go-be-xenial-3: (10 GB RAM, 50 GB disk, 10 cores, POWER8) | ||
* go-be-xenial-3: (20 GB RAM, 50 GB disk, 10 cores, POWER8) | ||
|
||
ssh -i ~/.ssh/id_ed25519_golang1 [email protected] | ||
(key from http://go/go-builders-ssh) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rundockerbuildlet.ppc64le |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright 2019 The Go Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style | ||
# license that can be found in the LICENSE file. | ||
|
||
FROM debian:buster | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt-get update && \ | ||
apt-get install --yes \ | ||
gcc curl strace \ | ||
ca-certificates netbase \ | ||
procps lsof psmisc \ | ||
openssh-server | ||
|
||
RUN mkdir /usr/local/go-bootstrap && \ | ||
curl --silent https://storage.googleapis.com/go-builder-data/gobootstrap-linux-ppc64le.tar.gz | \ | ||
tar -C /usr/local/go-bootstrap -zxv | ||
|
||
ENV GOROOT_BOOTSTRAP /usr/local/go-bootstrap | ||
ADD stage0 /usr/local/bin/stage0 | ||
|
||
ENV GO_BUILD_KEY_DELETE_AFTER_READ true | ||
ENV GO_BUILD_KEY_PATH /buildkey/gobuildkey | ||
|
||
CMD ["/usr/local/bin/stage0"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
power8: | ||
./setup-remote.sh [email protected] host-linux-ppc64le-osu | ||
|
||
power9: | ||
./setup-remote.sh [email protected] host-linux-ppc64le-power9-osu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,24 @@ | ||
The linux-ppc64le buildlets run on PPC64 VMs at osuosl.org (OSU Open Source Lab). | ||
|
||
They run Debian jessie. | ||
They run Ubuntu bionic on the host, with Docker images running | ||
debian:buster running the buildlets. | ||
|
||
Filing tickets: https://support.osuosl.org/ | ||
Ticket username: [email protected] | ||
Ticket password: http://go/pw-osuosl-ppc64 | ||
|
||
Machines: | ||
|
||
* go-le-bionic-1: (10 GB RAM, 50 GB disk, 10 cores, POWER9) | ||
* go-le-bionic-1: (20 GB RAM, 50 GB disk, 10 cores, POWER9) | ||
Linux go-le-bionic-1 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:08:54 UTC 2019 ppc64le ppc64le ppc64le GNU/Linux | ||
|
||
ssh -i ~/.ssh/id_ed25519_golang1 [email protected] | ||
(key from http://go/go-builders-ssh) | ||
|
||
Linux go-le-bionic-1 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:08:54 UTC 2019 ppc64le ppc64le ppc64le GNU/Linux | ||
|
||
* go-le-bionic-2: (10 GB RAM, 50 GB disk, 10 cores, POWER8) | ||
* go-le-bionic-2: (20 GB RAM, 50 GB disk, 10 cores, POWER8) | ||
Linux go-le-bionic-2 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:08:54 UTC 2019 ppc64le ppc64le ppc64le GNU/Linux | ||
|
||
ssh -i ~/.ssh/id_ed25519_golang1 [email protected] | ||
(key from http://go/go-builders-ssh) | ||
|
||
Linux go-le-bionic-2 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:08:54 UTC 2019 ppc64le ppc64le ppc64le GNU/Linux | ||
|
||
* Old machines, to be returned: (currently Debian buster): | ||
|
||
go-le-2: [email protected] | ||
go-le-3: [email protected] | ||
go-le-4: [email protected] | ||
go-le-5: [email protected] | ||
|
||
Each was once configured by scping setup.bash to them, logging in to | ||
each, and running: | ||
|
||
$ sudo ./setup.bash <BUILDKEY_HERE> | ||
|
||
TODO: these should be updated like linux-arm and linux-arm64 to use Docker | ||
per build. That is https://golang.org/issue/21189 | ||
To configure the hosts, see the Makefile and trace what that does. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -x | ||
|
||
HOST_TYPE=$1 | ||
if [ "$HOST_TYPE" = "" ]; then | ||
echo "Missing host type arg; this file is not supposed to be run directly; see Makefile for usage" >&2 | ||
exit 2 | ||
fi | ||
|
||
sudo mv .gobuildkey /etc/gobuild.key | ||
sudo install rundockerbuildlet.ppc64le /usr/local/bin/rundockerbuildlet | ||
|
||
curl -o stage0 https://storage.googleapis.com/go-builder-data/buildlet-stage0.linux-ppc64le | ||
chmod +x stage0 | ||
docker build -t golang/builder . | ||
|
||
sed "s/env=XXX/env=$HOST_TYPE/" rundockerbuildlet.service > rundockerbuildlet.service.expanded | ||
sudo cp rundockerbuildlet.service.expanded /etc/systemd/user/rundockerbuildlet.service | ||
sudo systemctl enable /etc/systemd/user/rundockerbuildlet.service || true | ||
sudo systemctl daemon-reload || true | ||
sudo systemctl restart docker.service | ||
sudo systemctl restart rundockerbuildlet.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
# Just the docker setup, ending at adding our regular user to the docker group. | ||
# The setup.bash script does everything else. | ||
|
||
set -e | ||
sudo apt-get update | ||
sudo apt-get --yes upgrade | ||
sudo apt-get --yes install docker.io | ||
sudo usermod -aG docker $USER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[Unit] | ||
Description=Run Buildlets in Docker | ||
After=network.target | ||
|
||
[Install] | ||
WantedBy=network-online.target | ||
|
||
[Service] | ||
Type=simple | ||
# The (-n * -cpu) values must currently be <= number of host cores. | ||
# The host has 10 cores, so the -n=5 (five containers) * -cpu=2 (two CPUs per container) == 10. | ||
ExecStart=/usr/local/bin/rundockerbuildlet -basename=power_ -image=golang/builder -n=5 -cpu=2 -memory=3.9g --env=XXX | ||
Restart=always | ||
RestartSec=2 | ||
StartLimitInterval=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
# See Makefile for usage | ||
|
||
set -e | ||
|
||
USER_AT_HOST=$1 | ||
if [ "$USER_AT_HOST" = "" ]; then | ||
echo "Missing user@host arg; see Makefile for usage" >&2 | ||
exit 2 | ||
fi | ||
HOST_TYPE=$2 | ||
if [ "$HOST_TYPE" = "" ]; then | ||
echo "Missing host type arg; see Makefile for usage" >&2 | ||
exit 2 | ||
fi | ||
|
||
GOARCH=ppc64le GOOS=linux go build -o rundockerbuildlet.ppc64le golang.org/x/build/cmd/rundockerbuildlet | ||
|
||
rsync -e "ssh -i ~/.ssh/id_ed25519_golang1" -avPW ./ $USER_AT_HOST:./ | ||
scp -i ~/.ssh/id_ed25519_golang1 $HOME/keys/${HOST_TYPE}.buildkey $USER_AT_HOST:.gobuildkey | ||
|
||
# Install Docker, including adding our username to the "docker" group: | ||
ssh -i ~/.ssh/id_ed25519_golang1 $USER_AT_HOST ./install-docker.bash | ||
|
||
# Now that we have Docker, "log in" again (with access to the docker | ||
# group) and do the rest: | ||
ssh -i ~/.ssh/id_ed25519_golang1 $USER_AT_HOST ./install-buildlet.bash $HOST_TYPE | ||
|
||
|
Oops, something went wrong.