Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added cluster setup using go processes #5346

Merged
merged 19 commits into from
Nov 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/e2e-test-cluster.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: e2e Test Cluster
on: [push, pull_request]
jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13

- name: Check out code
uses: actions/checkout@v1

- name: Get dependencies
run: |
sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@morgo how do we know which version of mysql is being used here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the one included in ubuntu-latest, so likely 8.0. I can change it to MySQL 5.7 from Oracle repos. For the local-example it does the same, but a matrix build probably makes more sense so we catch both.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked into this further, it is 5.7:

mysql-client is already the newest version (5.7.27-0ubuntu0.18.04.1).
mysql-server is already the newest version (5.7.27-0ubuntu0.18.04.1).

The ubuntu-latest is 18.04. Assuming GitHub plans to bump this with new lts releases, this will change to 20.04, and MySQL 8.0 in April 2020. The fix then is to switch to the MySQL team repos, or consider upgrading our testsuite. Since MySQL 8.0 initializes slower, we will most likely chose the repo switch:

        wget https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb
        sudo apt install -y ./mysql-apt-config_0.8*
        sudo sed -i 's/mysql-8.0/mysql-5.7/' /etc/apt/sources.list.d/mysql.list
        sudo apt-get update
        sudo apt-get install mysql-community-server mysql-community-client

sudo service mysql stop
sudo service etcd stop
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
go mod download

- name: Run bootstrap.sh
run: |
echo "Copying new bootstrap over location of legacy one."
cp .github/bootstrap.sh .
./bootstrap.sh

- name: Build
run: |
GOBIN=$PWD/bin make build

- name: Run e2e test cluster
run: |
export PATH=$PWD/bin:$PATH
source ./dev.env
VTDATAROOT=/tmp/vtdataroot VTTOP=$PWD VTROOT=$PWD tools/e2e_test_cluster.sh
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ unit_test_race: build
e2e_test_race: build
tools/e2e_test_race.sh

e2e_test_cluster: build
tools/e2e_test_cluster.sh

.ONESHELL:
SHELL = /bin/bash

Expand Down
11 changes: 11 additions & 0 deletions dev.env
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,14 @@ export PKG_CONFIG_PATH
alias gt='cd $GOTOP'
alias pt='cd $PYTOP'
alias vt='cd $VTTOP'

# Etcd path.
case $(uname) in
Linux) etcd_platform=linux;;
Darwin) etcd_platform=darwin;;
esac

ETCD_VERSION=$(cat "${VTROOT}/dist/etcd/.installed_version")
ETCD_BINDIR="${VTROOT}/dist/etcd/etcd-${ETCD_VERSION}-${etcd_platform}-amd64/"
PATH=$(prepend_path "$PATH" "$ETCD_BINDIR")
export PATH
Loading