Skip to content

Commit ceb40e0

Browse files
authored
Use ubuntu focal as base image (kadalu#385)
* github actions: fix the timeout key * travis: change ubuntu version * Ubuntu(20.04 focal) as base image With ubuntu 20.04 LTS, we get a longer LTS image as a base. A good idea to keep it handy if someone wants it. Signed-off-by: Amar Tumballi <[email protected]>
1 parent 6b52885 commit ceb40e0

File tree

10 files changed

+53
-52
lines changed

10 files changed

+53
-52
lines changed

.github/workflows/dockerimage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
-
3535
name: Run Buildx
3636
if: success()
37-
time_minutes: 144
37+
timeout-minutes: 144
3838
run: |
3939
KADALU_VERSION=devel docker buildx build \
4040
--platform linux/arm64,linux/amd64 \

.github/workflows/dockerpush.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
-
5454
name: Run Buildx
5555
if: success()
56-
time_minutes: 144
56+
timeout-minutes: 144
5757
run: |
5858
KADALU_VERSION=${{ env.kadalu_version }} docker buildx build \
5959
--platform linux/arm64,linux/amd64 \

.github/workflows/on-pr.yml

+18
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,21 @@ jobs:
2020
- name: Run pylint
2121
run: make pylint
2222

23+
run-on-minikube:
24+
name: kube 1.20.0
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v2
28+
- name: Install Docker Dependencies
29+
run: sudo apt-get install -y conntrack
30+
- name: Build locally
31+
run: make build-containers
32+
- name: Generate Manifests
33+
run: make gen-manifest
34+
- name: Setup Minikube
35+
run: tests/setup.sh v1.20.0
36+
- name: Run tests
37+
run: tests/travis-test.sh v1.20.0
38+
- name: Cleanup
39+
run: tests/cleanup.sh v1.20.0
40+

.travis.yml

+4-22
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,30 @@
11
---
22
# need for docker build
33
sudo: true
4-
dist: xenial
5-
6-
addons:
7-
apt:
8-
packages:
9-
- realpath
4+
dist: focal
105

116
services:
127
- docker
138

14-
language: python
15-
python:
16-
- "3.7"
17-
189
branches:
1910
only:
2011
- devel
2112

22-
go: 1.12.x
23-
2413
env:
2514
global:
2615
- KADALU_VERSION=canary
27-
- GOLANGCI_VERSION=v1.17.0
2816
- TEST_COVERAGE=stdout
29-
- GO_METALINTER_THREADS=1
30-
- GO_COVER_DIR=_output
3117
- VM_DRIVER=none
3218
- CHANGE_MINIKUBE_NONE_USER=true
3319
- KUBECONFIG=$HOME/.kube/config
3420

35-
install:
36-
- pip install pylint jinja2
37-
38-
before_script:
39-
- pylint --version
40-
4121
jobs:
4222
include:
4323
- name: kadalu with kube 1.20.0
4424
script:
45-
- sudo apt install -y conntrack
25+
- sudo apt-get install -y containerd.io docker-ce docker-ce-cli
26+
- sudo apt-get install -y conntrack
27+
- sudo systemctl restart docker
4628
- make build-containers || travis_terminate 1;
4729
- make gen-manifest || travis_terminate 1;
4830
- tests/setup.sh v1.20.0 || travis_terminate 1;

csi/Dockerfile

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
FROM kadalu/kadalu-base
1+
FROM kadalu/kadalu-base:latest
22

3-
RUN yum install -y glusterfs-fuse
4-
5-
# need these to get grpcio (on arm64/ppc64le/s390x)
6-
RUN yum -y install make automake gcc-g++ openssl-devel kernel-headers python3-distutils-extra
7-
8-
RUN python3 -m pip install --upgrade pip setuptools
3+
RUN apt-get install -y glusterfs-client
94

105
# Suggested in one of the issues to speed up pip install
116
ENV GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS 8
@@ -14,6 +9,8 @@ RUN python3 -m pip install grpcio googleapis-common-protos
149

1510
RUN mkdir -p /kadalu/volfiles /kadalu/templates
1611

12+
RUN mkdir -p /var/log/glusterfs /var/run/gluster
13+
1714
COPY lib/kadalulib.py /kadalu/
1815
COPY csi/controllerserver.py /kadalu/
1916
COPY csi/csi_pb2_grpc.py /kadalu/

operator/Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
FROM kadalu/kadalu-base
1+
FROM kadalu/kadalu-base:latest
22

33
# Always have the latest stable kubectl
4+
5+
RUN apt-get install -y curl
46
RUN curl -L https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/`uname -m | sed 's|aarch64|arm64|' | sed 's|x86_64|amd64|'`/kubectl -o /usr/bin/kubectl
57

68
RUN chmod +x /usr/bin/kubectl

operator/Dockerfile.base

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
FROM docker.io/fedora:33
1+
FROM docker.io/ubuntu:20.04
22

3-
RUN yum update -y
4-
RUN yum -y install procps-ng xfsprogs net-tools telnet wget e2fsprogs python3-pip sqlite
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
RUN apt-get update && apt-get install --no-install-recommends --yes python3
5+
RUN apt-get install -y xfsprogs net-tools telnet wget e2fsprogs python3-pip sqlite
6+
# procps-ng
57

68
# need below dependencies to have xxhash
7-
RUN yum -y install gcc python3-devel
8-
9-
RUN yum clean all -y
10-
RUN rm -rf /var/cache/yum
9+
RUN uname -m | grep x86_64 || apt-get install -y gcc python3-dev
1110

1211
# Install Python GRPC library and copy all CSI related files
1312
RUN python3 -m pip install jinja2 requests datetime xxhash

server/Dockerfile

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM kadalu/kadalu-base
1+
FROM kadalu/kadalu-base:latest
22

3-
RUN yum -y install python3-pyxattr glusterfs-server
4-
RUN rpm -qa | grep gluster | tee /gluster-rpm-versions.txt
3+
RUN apt-get install -y python3-pyxattr glusterfs-server
4+
RUN apt list --installed | grep -v WARNING | grep gluster | tee /gluster-rpm-versions.txt
55

66
RUN python3 -m pip install glustercli || true && echo "External storage Quota feature may not work"
77

@@ -17,6 +17,8 @@ COPY server/stop-server.sh /kadalu/stop-server.sh
1717

1818
RUN mkdir -p /kadalu/templates /kadalu/volfiles
1919

20+
RUN mkdir -p /var/run/gluster /var/log/glusterfs
21+
2022
# Copy Volfile templates
2123
COPY templates/Replica1.client.vol.j2 /kadalu/templates/
2224
COPY templates/Replica2.client.vol.j2 /kadalu/templates/

tests/minikube.sh

+10-9
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ function install_minikube() {
126126
version=${version[2]}
127127
if [[ "${version}" != "${MINIKUBE_VERSION}" ]]; then
128128
echo "installed minikube version ${version} is not matching requested version ${MINIKUBE_VERSION}"
129-
exit 1
129+
#exit 1
130130
fi
131131
echo "minikube already installed with ${version}"
132-
return
132+
return 0
133133
fi
134134

135135
echo "Installing minikube. Version: ${MINIKUBE_VERSION}"
@@ -142,21 +142,21 @@ function install_kubectl() {
142142
version=$(kubectl version --client | grep "${KUBE_VERSION}")
143143
if [[ "x${version}" != "x" ]]; then
144144
echo "kubectl already installed with ${KUBE_VERSION}"
145-
return
145+
return 0
146146
fi
147147
echo "installed kubectl version ${version} is not matching requested version ${KUBE_VERSION}"
148-
exit 1
148+
#exit 1
149149
fi
150150
# Download kubectl, which is a requirement for using minikube.
151151
echo "Installing kubectl. Version: ${KUBE_VERSION}"
152152
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/"${KUBE_VERSION}"/bin/linux/${ARCH}/kubectl && chmod +x kubectl && mv kubectl /usr/local/bin/
153153
}
154154

155155
# configure minikube
156-
MINIKUBE_VERSION=${MINIKUBE_VERSION:-"latest"}
157-
KUBE_VERSION=${KUBE_VERSION:-"v1.16.0"}
156+
MINIKUBE_VERSION=${MINIKUBE_VERSION:-"v1.15.1"}
157+
KUBE_VERSION=${KUBE_VERSION:-"v1.20.0"}
158158
MEMORY=${MEMORY:-"3000"}
159-
VM_DRIVER=${VM_DRIVER:-"virtualbox"}
159+
VM_DRIVER=${VM_DRIVER:-"none"}
160160
#configure image repo
161161
KADALU_IMAGE_REPO=${KADALU_IMAGE_REPO:-"docker.io/kadalu"}
162162
K8S_IMAGE_REPO=${K8S_IMAGE_REPO:-"quay.io/k8scsi"}
@@ -172,11 +172,12 @@ fi
172172

173173
case "${1:-}" in
174174
up)
175-
install_minikube
175+
echo "here"
176+
install_minikube || echo "failure"
176177
#if driver is 'none' install kubectl with KUBE_VERSION
177178
if [[ "${VM_DRIVER}" == "none" ]]; then
178179
mkdir -p "$HOME"/.kube "$HOME"/.minikube
179-
install_kubectl
180+
install_kubectl || echo "failure to install kubectl"
180181
fi
181182

182183
echo "starting minikube with kubeadm bootstrapper"

tests/travis-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ else
1919
sudo tests/minikube.sh cli_tests
2020
fi
2121

22-
sudo chown -R travis: "$HOME"/.minikube /usr/local/bin/kubectl
22+
#sudo chown -R travis: "$HOME"/.minikube /usr/local/bin/kubectl
2323
# functional tests
2424
# sample test
2525

0 commit comments

Comments
 (0)