-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathLayerfile
56 lines (45 loc) · 1.77 KB
/
Layerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM vm/ubuntu:18.04
# install curl, python and mysql-client
RUN sudo apt update && \
sudo apt install -y curl python-pip mysql-client-core-5.7
# install sbt
RUN wget https://github.com/sbt/sbt/releases/download/v1.3.5/sbt-1.3.5.tgz && \
sudo tar xzvf sbt-1.3.5.tgz -C /usr/share/ && \
sudo update-alternatives --install /usr/bin/sbt sbt /usr/share/sbt/bin/sbt 100
# install the latest version of Docker
RUN apt-get update && \
apt-get install apt-transport-https ca-certificates curl software-properties-common && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" && \
apt-get update && \
apt install docker-ce
# install java
RUN apt-get update && \
sudo apt-get install openjdk-8-jdk
# set environment variables
ENV MEMSQL_PORT=5506
ENV MEMSQL_USER=root
ENV MEMSQL_DB=test
ENV JAVA_HOME=/usr/lib/jvm/jdk1.8.0
ENV CONTINUOUS_INTEGRATION=true
ENV SBT_OPTS=-Xmx1g
ENV SBT_OPTS=-Xms1g
SECRET ENV LICENSE_KEY
SECRET ENV SINGLESTORE_PASSWORD
SECRET ENV SINGLESTORE_JWT_PASSWORD
# increase the memory
MEMORY 4G
MEMORY 8G
MEMORY 12G
MEMORY 16G
# split to 21 states
# each of them will run different version of the singlestore and spark
SPLIT 21
# copy the entire git repository
COPY . .
# setup split specific env variables
RUN scripts/define-layerci-matrix.sh >> ~/.profile
# start singlestore cluster
RUN ./scripts/setup-cluster.sh
# run tests
RUN sbt ++$SCALA_VERSION -Dspark.version=$SPARK_VERSION "${TEST_FILTER}"