diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9a3b941..54fb854 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,6 +76,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/openebs-k8s-provisioner quay.io/${{ env.IMAGE_ORG }}/openebs-k8s-provisioner + ghcr.io/${{ env.IMAGE_ORG }}/openebs-k8s-provisioner tag-latest: false tag-custom-only: true tag-custom: | @@ -111,6 +112,13 @@ jobs: username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_TOKEN }} + - name: Login to GHCR + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build & Push Image uses: docker/build-push-action@v2 with: @@ -163,6 +171,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/snapshot-provisioner quay.io/${{ env.IMAGE_ORG }}/snapshot-provisioner + ghcr.io/${{ env.IMAGE_ORG }}/snapshot-provisioner tag-latest: false tag-custom-only: true tag-custom: | @@ -198,6 +207,13 @@ jobs: username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_TOKEN }} + - name: Login to GHCR + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build & Push Image uses: docker/build-push-action@v2 with: @@ -250,6 +266,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/snapshot-controller quay.io/${{ env.IMAGE_ORG }}/snapshot-controller + ghcr.io/${{ env.IMAGE_ORG }}/snapshot-controller tag-latest: false tag-custom-only: true tag-custom: | @@ -285,6 +302,13 @@ jobs: username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_TOKEN }} + - name: Login to GHCR + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build & Push Image uses: docker/build-push-action@v2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 689ee4e..40308d4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,6 +52,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/openebs-k8s-provisioner quay.io/${{ env.IMAGE_ORG }}/openebs-k8s-provisioner + ghcr.io/${{ env.IMAGE_ORG }}/openebs-k8s-provisioner tag-latest: true tag-semver: | {{version}} @@ -85,6 +86,13 @@ jobs: username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_TOKEN }} + - name: Login to GHCR + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build & Push Image uses: docker/build-push-action@v2 with: @@ -131,6 +139,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/snapshot-provisioner quay.io/${{ env.IMAGE_ORG }}/snapshot-provisioner + ghcr.io/${{ env.IMAGE_ORG }}/snapshot-provisioner tag-latest: true tag-semver: | {{version}} @@ -164,6 +173,13 @@ jobs: username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_TOKEN }} + - name: Login to GHCR + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build & Push Image uses: docker/build-push-action@v2 with: @@ -210,6 +226,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/snapshot-controller quay.io/${{ env.IMAGE_ORG }}/snapshot-controller + ghcr.io/${{ env.IMAGE_ORG }}/snapshot-controller tag-latest: true tag-semver: | {{version}} @@ -243,6 +260,13 @@ jobs: username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_TOKEN }} + - name: Login to GHCR + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build & Push Image uses: docker/build-push-action@v2 with: diff --git a/Makefile b/Makefile index addbca8..81061aa 100644 --- a/Makefile +++ b/Makefile @@ -29,19 +29,6 @@ export XC_ARCH ARCH:=${XC_OS}_${XC_ARCH} export ARCH -ifeq (${BASE_DOCKER_IMAGEARM64}, ) - BASE_DOCKER_IMAGEARM64 = "arm64v8/ubuntu:18.04" - export BASE_DOCKER_IMAGEARM64 -endif - -ifeq (${ARCH},linux_arm64) - BASEIMAGE:=${BASE_DOCKER_IMAGEARM64} -else - # The ubuntu:16.04 image is being used as base image. - BASEIMAGE:=ubuntu:16.04 -endif -export BASEIMAGE - ifeq (${IMAGE_ORG}, ) IMAGE_ORG=openebs export IMAGE_ORG @@ -81,7 +68,7 @@ build: image: build @cp openebs-provisioner buildscripts/provisioner - @cd buildscripts/provisioner && sudo docker build -t ${DIMAGE}:ci ${DBUILD_ARGS} --build-arg BASE_IMAGE=${BASEIMAGE} . + @cd buildscripts/provisioner && sudo docker build -t ${DIMAGE}:ci ${DBUILD_ARGS} . deploy: @@ -90,7 +77,6 @@ deploy: @sh buildscripts/push clean: - rm -rf vendor rm -f openebs-provisioner rm -f buildscripts/docker/openebs-provisioner rm -f buildscripts/snapshot-controller/snapshot-controller diff --git a/README.md b/README.md index 4e12936..e7269a8 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ _Note: We recommend OpenEBS users to shift towards CSI based provisioner availab This provisioner is based on the Kubenretes external storage provisioner. This code has been migrated from https://github.com/openebs/external-storage/tree/release/openebs, as Kubernetes community deprecated the external-storage repository. -This repository mainly contains code required for running the legacy cStor and Jiva pools and volumes like: +This repository contains code for building legacy cStor and Jiva provisioners like: - `openebs-k8s-provisioner` - used for provisoining the legacy cStor and Jiva pools and volumes. - `snapshot-controller` and `snapshot-operator` - for helping with snapshot and clone on legacy cStor volumes. @@ -16,17 +16,21 @@ This repository mainly contains code required for running the legacy cStor and J Please refer to our documentation at [OpenEBS Documentation](http://openebs.io/). +## Building from source + +``` +$ make all +``` + +## Create a docker image + +``` +$ make container +``` + ## Release -Prior to creating a release tag on this repository on `v2.12.x` branch with the required fixes, ensure that the dependent data engine repositories and provisioner are tagged. Once the code is merged, use the following sequence to release a new version for the legacy components: -- (Optional) New release tag on v2.12.x branch of [openebs/linux-utils](https://github.com/openebs/linux-utils) -- (Optional) New release tag on v0.6.x branch of [openebs/ndm](https://github.com/openebs/node-disk-manager) -- New release tag on v2.12.x branch of [openebs/cstor](https://github.com/openebs/cstor) and [openebs/libcstor](https://github.com/openebs/libcstor) -- New release tag on v2.12.x branch of [openebs/jiva](https://github.com/openebs/jiva) -- New release tag on v2.12.x branch of [openebs/openebs-k8s-provisioner](https://github.com/openebs/openebs-k8s-provisioner) -- New release tag on v2.12.x branch of [openebs/m-exporter](https://github.com/openebs/m-exporter) -- New release tag on v2.12.x branch of [openebs/maya](https://github.com/openebs/maya) -- New release tag on v2.12.x branch of [openebs/velero-plugin](https://github.com/openebs/velero-plugin) +The containers from this repo have to built along with other control plane components. The detailed steps for making a new release are at: https://github.com/openebs/maya/blob/HEAD/README.md#release ## Contributing @@ -45,17 +49,5 @@ OpenEBS welcomes your feedback and contributions in any form possible. -## Building OpenEBS provisioners from source - -``` -$ make all -``` - -## Create a docker image - -``` -$ make container -``` - ## License [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fopenebs%2Fopenebs-k8s-provisioner.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fopenebs%2Fopenebs-k8s-provisioner?ref=badge_large) diff --git a/buildscripts/provisioner/Dockerfile b/buildscripts/provisioner/Dockerfile index b2c2018..ac77b12 100644 --- a/buildscripts/provisioner/Dockerfile +++ b/buildscripts/provisioner/Dockerfile @@ -12,8 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG BASE_IMAGE=ubuntu:16.04 -FROM $BASE_IMAGE +FROM openebs/linux-utils:2.12.x-ci COPY openebs-provisioner / ARG ARCH diff --git a/buildscripts/provisioner/provisioner.Dockerfile b/buildscripts/provisioner/provisioner.Dockerfile index c85d6ee..8db7e11 100644 --- a/buildscripts/provisioner/provisioner.Dockerfile +++ b/buildscripts/provisioner/provisioner.Dockerfile @@ -35,9 +35,7 @@ COPY . . RUN make build -FROM ubuntu:16.04 -RUN apt-get clean && rm -rf /var/lib/apt/lists/* -RUN apt-get update; exit 0 +FROM openebs/linux-utils:2.12.x-ci COPY --from=build /go/src/github.com/openebs/openebs-k8s-provisioner/openebs-provisioner / diff --git a/buildscripts/snapshot-controller/Dockerfile b/buildscripts/snapshot-controller/Dockerfile index dd7441d..ab2e843 100644 --- a/buildscripts/snapshot-controller/Dockerfile +++ b/buildscripts/snapshot-controller/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:3.11.5 +FROM openebs/linux-utils:2.12.x-ci RUN apk add --no-cache \ bash \ diff --git a/buildscripts/snapshot-controller/snapshot-controller.Dockerfile b/buildscripts/snapshot-controller/snapshot-controller.Dockerfile index 271e93a..fab45be 100644 --- a/buildscripts/snapshot-controller/snapshot-controller.Dockerfile +++ b/buildscripts/snapshot-controller/snapshot-controller.Dockerfile @@ -35,7 +35,7 @@ COPY . . RUN make snapshot-controller -FROM alpine:3.11.5 +FROM openebs/linux-utils:2.12.x-ci RUN apk add --no-cache \ bash \ diff --git a/buildscripts/snapshot-provisioner/Dockerfile b/buildscripts/snapshot-provisioner/Dockerfile index 1b127a1..146d86d 100644 --- a/buildscripts/snapshot-provisioner/Dockerfile +++ b/buildscripts/snapshot-provisioner/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:3.11.5 +FROM openebs/linux-utils:2.12.x-ci RUN apk add --no-cache \ bash \ diff --git a/buildscripts/snapshot-provisioner/snapshot-provisioner.Dockerfile b/buildscripts/snapshot-provisioner/snapshot-provisioner.Dockerfile index f688bca..e951dd8 100644 --- a/buildscripts/snapshot-provisioner/snapshot-provisioner.Dockerfile +++ b/buildscripts/snapshot-provisioner/snapshot-provisioner.Dockerfile @@ -35,7 +35,7 @@ COPY . . RUN make snapshot-provisioner -FROM alpine:3.11.5 +FROM openebs/linux-utils:2.12.x-ci RUN apk add --no-cache \ bash \