Skip to content

Commit

Permalink
relocated runner scripts & bugfixes
Browse files Browse the repository at this point in the history
Signed-off-by: Shyam Jesalpura s.jesalpura@gmail.com
  • Loading branch information
shyamjesal committed Jan 22, 2021
1 parent 2f6417d commit 7d17a81
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 9 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build_docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@ jobs:
integ_test_image:
name: Build integration test docker images
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
image: [integration_test, github_runner]
steps:
- uses: actions/checkout@v2
with:
ref: master
- name: docker build images
run: |
DOCKER_BUILDKIT=1 docker build --file ./scripts/Dockerfile.integration_test .
DOCKER_BUILDKIT=1 docker build --file ./scripts/test_runner/Dockerfile.${{ matrix.image }} .
4 changes: 4 additions & 0 deletions scripts/test_runner/Dockerfile.github_runner
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM myoung34/github-runner:ubuntu-bionic

RUN apt-get update && \
apt-get install --yes git sudo apt-utils wget curl make gcc iproute2 iptables
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ RUN apt-get update && \
wget "https://dl.google.com/go/go1.15.linux-amd64.tar.gz" -O go.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go.linux-amd64.tar.gz && \
ln -s /usr/local/go/bin/go /usr/bin/go

# Get Github action token and link the runner to Github Actions
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,25 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# start a container
docker run --rm -it --privileged \
--ipc=host \
--volume /dev:/dev \
--volume /run/udev/control:/run/udev/control \
vhive_integration_test:latest bash
# download and install docker
sudo apt-get update

sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"

sudo apt-get update
sudo apt-get install --yes docker-ce docker-ce-cli containerd.io

sudo usermod -aG docker $USER
newgrp docker
34 changes: 34 additions & 0 deletions scripts/test_runner/start_runners.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# MIT License
#
# Copyright (c) 2020 Shyam Jesalpura and EASE lab
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# start a container
# create access token as mentioned here (https://github.com/myoung34/docker-github-actions-runner#create-github-personal-access-token)
docker run -d --restart always --privileged \
--name integration_test-github_runner \
-e REPO_URL="https://github.com/ease-lab/vhive" \
-e ACCESS_TOKEN="" \
--ipc=host \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /tmp/github-runner-vhive:/tmp/github-runner-vhive \
--volume /dev:/dev \
--volume /run/udev/control:/run/udev/control \
vhiveease/integ_test_runner

0 comments on commit 7d17a81

Please sign in to comment.