|
| 1 | +# How to provision an Oracle bare metal runner |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +This document describes how to provision an Oracle bare metal instance on |
| 6 | +Oracle Cloud Infrastructure (OCI). |
| 7 | + |
| 8 | +1. Create the instance |
| 9 | +2. Set up the instance |
| 10 | +3. Set up GitHub self-hosted runner |
| 11 | + |
| 12 | +## Step 1: Create the instance |
| 13 | + |
| 14 | +1. Log in to the [Oracle Cloud Console](https://www.oracle.com/cloud/sign-in.html) |
| 15 | +2. Click the **hamburger menu** (☰) in the top-left corner |
| 16 | +3. Select **Compute → Instances** |
| 17 | +4. Click **Create Instance** |
| 18 | +5. Configure: |
| 19 | + - **Compartment**: Select **github-self-hosted-runners** |
| 20 | + - **Image**: Click **Change Image** → select **Ubuntu** → |
| 21 | + choose **Canonical Ubuntu 24.04** |
| 22 | + - **Shape**: Click **Change Shape** → select **Bare Metal Machine** → |
| 23 | + choose **BM.Standard3.64** |
| 24 | + - **Networking**: Under **Primary VNIC information**: |
| 25 | + 1. Change the **VCN compartment** to **OpenTelemetry** |
| 26 | + 2. Select VCN **vcn-20240506-1118** |
| 27 | + 3. Change the **Subnet compartment** to **OpenTelemetry** |
| 28 | + (this is a separate dropdown from the VCN compartment) |
| 29 | + 4. Select subnet **subnet-20240506-1118** |
| 30 | + - **SSH key**: Under **Add SSH keys**, select **Generate a key pair |
| 31 | + for me** and click **Download private key** to download it. |
| 32 | + Store the private key in the SIG Project Infrastructure 1Password vault. |
| 33 | +6. Click **Create** |
| 34 | + |
| 35 | +## Step 2: Set up the instance |
| 36 | + |
| 37 | +SSH into the instance and install required software: |
| 38 | + |
| 39 | +```bash |
| 40 | +ssh ubuntu@<instance-ip> |
| 41 | + |
| 42 | +# Update packages |
| 43 | +sudo apt-get update && sudo apt-get upgrade -y |
| 44 | + |
| 45 | +# Install Docker and allow the runner to use it without sudo |
| 46 | +sudo apt-get install -y docker.io |
| 47 | +sudo usermod -aG docker $USER |
| 48 | + |
| 49 | +# No other tools need to be installed on the host. |
| 50 | +# Workloads should use container-based workflows to bring their own dependencies. |
| 51 | +# See https://docs.github.com/en/actions/writing-workflows/choosing-where-your-workflow-runs/running-jobs-in-a-container |
| 52 | +``` |
| 53 | + |
| 54 | +## Step 3: Set up GitHub self-hosted runner |
| 55 | + |
| 56 | +1. Go to the [org runner settings](https://github.com/organizations/open-telemetry/settings/actions/runners) |
| 57 | +2. Click **New self-hosted runner** |
| 58 | +3. Select **Linux** and **x64** |
| 59 | +4. Follow the instructions shown on the page to download, configure, and start |
| 60 | + the runner on the instance |
| 61 | +5. When prompted for runner group, enter |
| 62 | + **Oracle Cloud bare metal benchmark runners** |
| 63 | +6. When prompted for runner name, enter the runner label |
| 64 | + (e.g., **oracle-bare-metal-64cpu-1024gb-x86-64-ubuntu-24**) |
| 65 | +7. When prompted for additional labels, enter the same runner name |
| 66 | + (e.g., **oracle-bare-metal-64cpu-1024gb-x86-64-ubuntu-24**) |
| 67 | +8. When prompted for work folder, press **Enter** to accept the default (`_work`) |
| 68 | +9. Install and start the runner as a service (instead of using `./run.sh`): |
| 69 | + |
| 70 | + ```bash |
| 71 | + sudo ./svc.sh install |
| 72 | + sudo ./svc.sh start |
| 73 | + ``` |
| 74 | + |
| 75 | + This ensures the runner starts automatically on reboot. |
| 76 | + See [configuring the self-hosted runner application as a service](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/configuring-the-self-hosted-runner-application-as-a-service). |
| 77 | +10. Reboot the instance to verify everything starts automatically: |
| 78 | + |
| 79 | + ```bash |
| 80 | + sudo reboot |
| 81 | + ``` |
0 commit comments