forked from mariadb-corporation/MaxScale
-
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.
- Loading branch information
Showing
4 changed files
with
58 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,4 +50,3 @@ CMakeFiles/* | |
*/*/*/CMakeFiles/* | ||
*/*/*/*/CMakeFiles/* | ||
*.cmake | ||
Makefile |
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,38 @@ | ||
FROM centos:7 | ||
|
||
COPY MariaDB.repo /etc/yum.repos.d/MariaDB.repo | ||
|
||
# Install Prerequisites | ||
RUN yum install -y epel-release | ||
RUN yum update -y | ||
RUN yum install -y lsb | ||
RUN yum install -y gcc gcc-c++ ncurses-devel bison flex glibc-devel cmake libgcc perl make libtool \ | ||
openssl-devel libaio libaio-devel librabbitmq-devel libcurl-devel pcre-devel rpm-build libedit-devel \ | ||
git xz-devel | ||
RUN yum install -y mariadb-server | ||
RUN yum install -y mariadb-devel | ||
RUN git clone https://github.com/cbegin/GPLScale.git | ||
|
||
# Install PCRE2 | ||
RUN mkdir -p /GPLScale/pcre2/build | ||
WORKDIR /GPLScale/pcre2/build | ||
RUN cmake .. -DCMAKE_C_FLAGS=-fPIC -DBUILD_SHARED_LIBS=N -DPCRE2_BUILD_PCRE2GREP=N -DPCRE2_BUILD_TESTS=N | ||
RUN make | ||
RUN make install | ||
|
||
# Install MaxScale | ||
RUN mkdir -p /GPLScale/build | ||
WORKDIR /GPLScale/build | ||
RUN cmake .. -DPACKAGE=Y | ||
RUN make | ||
RUN make install | ||
|
||
# Test MaxScale | ||
RUN make testcore | ||
|
||
# Package MaxScale | ||
RUN make package | ||
RUN mkdir /packages && \ | ||
mv maxscale*.rpm /packages && \ | ||
mv maxscale*.tar.gz /packages | ||
|
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 @@ | ||
|
||
all: build dist | ||
|
||
build: | ||
docker build -t gplscale -f Dockerfile.build . | ||
|
||
dist: | ||
mkdir -p ./build | ||
docker run -v ${shell realpath ./build}:/build gplscale bash -c "cp /packages/* /build" | ||
docker run -v ${shell realpath ./build}:/build gplscale bash -c "cp /etc/maxscale.cnf.template /build" | ||
|
||
run: | ||
docker run -ti gplscale bash | ||
|
||
.PHONY: all build dist |
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 @@ | ||
[mariadb] | ||
name = MariaDB | ||
baseurl = http://yum.mariadb.org/10.1/centos7-amd64 | ||
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB | ||
gpgcheck=1 |