Skip to content

Commit

Permalink
feat(build): adding pc64le build for local provisioner pv
Browse files Browse the repository at this point in the history
Signed-off-by: Peeyush Gupta <peeygupt@in.ibm.com>
  • Loading branch information
Pensu authored and kmova committed Apr 7, 2020
1 parent 2723394 commit 2d51e0d
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
7 changes: 7 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ ifeq (${BASE_DOCKER_IMAGE_ARM64}, )
export BASE_DOCKER_IMAGE_ARM64
endif

# Specify the name of base image for PPC64LE
ifeq (${BASE_DOCKER_IMAGE_PPC64LE}, )
BASE_DOCKER_IMAGE_PPC64LE = "ubuntu:18.04"
export BASE_DOCKER_IMAGE_PPC64LE
endif


# Specify the name for the binaries
WEBHOOK=admission-server
CSPC_OPERATOR=cspc-operator
Expand Down
2 changes: 2 additions & 0 deletions buildscripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ elif [ "${ARCH}" = "x86_64" ] ; then
XC_ARCH='amd64'
elif [ "${ARCH}" = "aarch64" ] ; then
XC_ARCH='arm64'
elif [ "${ARCH}" = "ppc64le" ] ; then
XC_ARCH='ppc64le'
else
echo "Unusable architecture: ${ARCH}"
exit 1
Expand Down
25 changes: 25 additions & 0 deletions buildscripts/provisioner-localpv/Dockerfile.ppc64le
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#Make the base image configurable. If BASE IMAGES is not provided
#docker command will fail
ARG BASE_IMAGE=ubuntu:18.04
FROM $BASE_IMAGE

RUN apt update && apt install -y \
iproute2 \
bash \
curl \
net-tools \
procps \
ca-certificates

COPY provisioner-localpv /

ARG BUILD_DATE

LABEL org.label-schema.name="provisioner-localpv"
LABEL org.label-schema.description="Dynamic Local PV Provisioner for OpenEBS"
LABEL org.label-schema.url="http://www.openebs.io/"
LABEL org.label-schema.vcs-url="https://github.com/openebs/maya"
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.build-date=$BUILD_DATE

CMD ["/provisioner-localpv"]
9 changes: 9 additions & 0 deletions buildscripts/provisioner-localpv/Makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,12 @@ provisioner-localpv-image.arm64: provisioner-localpv
@cp bin/provisioner-localpv/${PROVISIONER_LOCALPV} buildscripts/provisioner-localpv/
@cd buildscripts/provisioner-localpv && sudo docker build -t openebs/provisioner-localpv-arm64:${IMAGE_TAG} -f Dockerfile.arm64 --build-arg BUILD_DATE=${BUILD_DATE} --build-arg BASE_IMAGE=${BASE_DOCKER_IMAGE_ARM64} . --no-cache
@rm buildscripts/provisioner-localpv/${PROVISIONER_LOCALPV}

.PHONY: provisioner-localpv-image.ppc64le
provisioner-localpv-image.ppc64le: provisioner-localpv
@echo "-------------------------------"
@echo "--> provisioner-localpv image "
@echo "-------------------------------"
@cp bin/provisioner-localpv/${PROVISIONER_LOCALPV} buildscripts/provisioner-localpv/
@cd buildscripts/provisioner-localpv && sudo docker build -t openebs/provisioner-localpv-ppc64le:${IMAGE_TAG} -f Dockerfile.ppc64le --build-arg BUILD_DATE=${BUILD_DATE} --build-arg BASE_IMAGE=${BASE_DOCKER_IMAGE_PPC64LE} . --no-cache
@rm buildscripts/provisioner-localpv/${PROVISIONER_LOCALPV}

0 comments on commit 2d51e0d

Please sign in to comment.