Skip to content

Commit b9b5ea2

Browse files
author
kmova
committed
refact(container): standarize base image and more
- Changed the base image of all containers to point to openebs/linux-utils - push containers to ghcr as well - for release, redirect to maya documentation - cleanup unused arg BASE_IMAGE Signed-off-by: kmova <[email protected]>
1 parent 4216be8 commit b9b5ea2

File tree

10 files changed

+69
-46
lines changed

10 files changed

+69
-46
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ jobs:
7676
images: |
7777
${{ env.IMAGE_ORG }}/openebs-k8s-provisioner
7878
quay.io/${{ env.IMAGE_ORG }}/openebs-k8s-provisioner
79+
ghcr.io/${{ env.IMAGE_ORG }}/openebs-k8s-provisioner
7980
tag-latest: false
8081
tag-custom-only: true
8182
tag-custom: |
@@ -111,6 +112,13 @@ jobs:
111112
username: ${{ secrets.QUAY_USERNAME }}
112113
password: ${{ secrets.QUAY_TOKEN }}
113114

115+
- name: Login to GHCR
116+
uses: docker/login-action@v1
117+
with:
118+
registry: ghcr.io
119+
username: ${{ github.actor }}
120+
password: ${{ secrets.GITHUB_TOKEN }}
121+
114122
- name: Build & Push Image
115123
uses: docker/build-push-action@v2
116124
with:
@@ -163,6 +171,7 @@ jobs:
163171
images: |
164172
${{ env.IMAGE_ORG }}/snapshot-provisioner
165173
quay.io/${{ env.IMAGE_ORG }}/snapshot-provisioner
174+
ghcr.io/${{ env.IMAGE_ORG }}/snapshot-provisioner
166175
tag-latest: false
167176
tag-custom-only: true
168177
tag-custom: |
@@ -198,6 +207,13 @@ jobs:
198207
username: ${{ secrets.QUAY_USERNAME }}
199208
password: ${{ secrets.QUAY_TOKEN }}
200209

210+
- name: Login to GHCR
211+
uses: docker/login-action@v1
212+
with:
213+
registry: ghcr.io
214+
username: ${{ github.actor }}
215+
password: ${{ secrets.GITHUB_TOKEN }}
216+
201217
- name: Build & Push Image
202218
uses: docker/build-push-action@v2
203219
with:
@@ -250,6 +266,7 @@ jobs:
250266
images: |
251267
${{ env.IMAGE_ORG }}/snapshot-controller
252268
quay.io/${{ env.IMAGE_ORG }}/snapshot-controller
269+
ghcr.io/${{ env.IMAGE_ORG }}/snapshot-controller
253270
tag-latest: false
254271
tag-custom-only: true
255272
tag-custom: |
@@ -285,6 +302,13 @@ jobs:
285302
username: ${{ secrets.QUAY_USERNAME }}
286303
password: ${{ secrets.QUAY_TOKEN }}
287304

305+
- name: Login to GHCR
306+
uses: docker/login-action@v1
307+
with:
308+
registry: ghcr.io
309+
username: ${{ github.actor }}
310+
password: ${{ secrets.GITHUB_TOKEN }}
311+
288312
- name: Build & Push Image
289313
uses: docker/build-push-action@v2
290314
with:

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
images: |
5353
${{ env.IMAGE_ORG }}/openebs-k8s-provisioner
5454
quay.io/${{ env.IMAGE_ORG }}/openebs-k8s-provisioner
55+
ghcr.io/${{ env.IMAGE_ORG }}/openebs-k8s-provisioner
5556
tag-latest: true
5657
tag-semver: |
5758
{{version}}
@@ -85,6 +86,13 @@ jobs:
8586
username: ${{ secrets.QUAY_USERNAME }}
8687
password: ${{ secrets.QUAY_TOKEN }}
8788

89+
- name: Login to GHCR
90+
uses: docker/login-action@v1
91+
with:
92+
registry: ghcr.io
93+
username: ${{ github.actor }}
94+
password: ${{ secrets.GITHUB_TOKEN }}
95+
8896
- name: Build & Push Image
8997
uses: docker/build-push-action@v2
9098
with:
@@ -131,6 +139,7 @@ jobs:
131139
images: |
132140
${{ env.IMAGE_ORG }}/snapshot-provisioner
133141
quay.io/${{ env.IMAGE_ORG }}/snapshot-provisioner
142+
ghcr.io/${{ env.IMAGE_ORG }}/snapshot-provisioner
134143
tag-latest: true
135144
tag-semver: |
136145
{{version}}
@@ -164,6 +173,13 @@ jobs:
164173
username: ${{ secrets.QUAY_USERNAME }}
165174
password: ${{ secrets.QUAY_TOKEN }}
166175

176+
- name: Login to GHCR
177+
uses: docker/login-action@v1
178+
with:
179+
registry: ghcr.io
180+
username: ${{ github.actor }}
181+
password: ${{ secrets.GITHUB_TOKEN }}
182+
167183
- name: Build & Push Image
168184
uses: docker/build-push-action@v2
169185
with:
@@ -210,6 +226,7 @@ jobs:
210226
images: |
211227
${{ env.IMAGE_ORG }}/snapshot-controller
212228
quay.io/${{ env.IMAGE_ORG }}/snapshot-controller
229+
ghcr.io/${{ env.IMAGE_ORG }}/snapshot-controller
213230
tag-latest: true
214231
tag-semver: |
215232
{{version}}
@@ -243,6 +260,13 @@ jobs:
243260
username: ${{ secrets.QUAY_USERNAME }}
244261
password: ${{ secrets.QUAY_TOKEN }}
245262

263+
- name: Login to GHCR
264+
uses: docker/login-action@v1
265+
with:
266+
registry: ghcr.io
267+
username: ${{ github.actor }}
268+
password: ${{ secrets.GITHUB_TOKEN }}
269+
246270
- name: Build & Push Image
247271
uses: docker/build-push-action@v2
248272
with:

Makefile

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,6 @@ export XC_ARCH
2929
ARCH:=${XC_OS}_${XC_ARCH}
3030
export ARCH
3131

32-
ifeq (${BASE_DOCKER_IMAGEARM64}, )
33-
BASE_DOCKER_IMAGEARM64 = "arm64v8/ubuntu:18.04"
34-
export BASE_DOCKER_IMAGEARM64
35-
endif
36-
37-
ifeq (${ARCH},linux_arm64)
38-
BASEIMAGE:=${BASE_DOCKER_IMAGEARM64}
39-
else
40-
# The ubuntu:16.04 image is being used as base image.
41-
BASEIMAGE:=ubuntu:16.04
42-
endif
43-
export BASEIMAGE
44-
4532
ifeq (${IMAGE_ORG}, )
4633
IMAGE_ORG=openebs
4734
export IMAGE_ORG
@@ -81,7 +68,7 @@ build:
8168

8269
image: build
8370
@cp openebs-provisioner buildscripts/provisioner
84-
@cd buildscripts/provisioner && sudo docker build -t ${DIMAGE}:ci ${DBUILD_ARGS} --build-arg BASE_IMAGE=${BASEIMAGE} .
71+
@cd buildscripts/provisioner && sudo docker build -t ${DIMAGE}:ci ${DBUILD_ARGS} .
8572

8673

8774
deploy:
@@ -90,7 +77,6 @@ deploy:
9077
@sh buildscripts/push
9178

9279
clean:
93-
rm -rf vendor
9480
rm -f openebs-provisioner
9581
rm -f buildscripts/docker/openebs-provisioner
9682
rm -f buildscripts/snapshot-controller/snapshot-controller

README.md

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,29 @@ _Note: We recommend OpenEBS users to shift towards CSI based provisioner availab
88

99
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.
1010

11-
This repository mainly contains code required for running the legacy cStor and Jiva pools and volumes like:
11+
This repository contains code for building legacy cStor and Jiva provisioners like:
1212
- `openebs-k8s-provisioner` - used for provisoining the legacy cStor and Jiva pools and volumes.
1313
- `snapshot-controller` and `snapshot-operator` - for helping with snapshot and clone on legacy cStor volumes.
1414

1515
## Install
1616

1717
Please refer to our documentation at [OpenEBS Documentation](http://openebs.io/).
1818

19+
## Building from source
20+
21+
```
22+
$ make all
23+
```
24+
25+
## Create a docker image
26+
27+
```
28+
$ make container
29+
```
30+
1931
## Release
2032

21-
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:
22-
- (Optional) New release tag on v2.12.x branch of [openebs/linux-utils](https://github.com/openebs/linux-utils)
23-
- (Optional) New release tag on v0.6.x branch of [openebs/ndm](https://github.com/openebs/node-disk-manager)
24-
- New release tag on v2.12.x branch of [openebs/cstor](https://github.com/openebs/cstor) and [openebs/libcstor](https://github.com/openebs/libcstor)
25-
- New release tag on v2.12.x branch of [openebs/jiva](https://github.com/openebs/jiva)
26-
- New release tag on v2.12.x branch of [openebs/openebs-k8s-provisioner](https://github.com/openebs/openebs-k8s-provisioner)
27-
- New release tag on v2.12.x branch of [openebs/m-exporter](https://github.com/openebs/m-exporter)
28-
- New release tag on v2.12.x branch of [openebs/maya](https://github.com/openebs/maya)
29-
- New release tag on v2.12.x branch of [openebs/velero-plugin](https://github.com/openebs/velero-plugin)
33+
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
3034

3135
## Contributing
3236

@@ -45,17 +49,5 @@ OpenEBS welcomes your feedback and contributions in any form possible.
4549

4650

4751

48-
## Building OpenEBS provisioners from source
49-
50-
```
51-
$ make all
52-
```
53-
54-
## Create a docker image
55-
56-
```
57-
$ make container
58-
```
59-
6052
## License
6153
[![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)

buildscripts/provisioner/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
ARG BASE_IMAGE=ubuntu:16.04
16-
FROM $BASE_IMAGE
15+
FROM openebs/linux-utils:2.12.x-ci
1716
COPY openebs-provisioner /
1817

1918
ARG ARCH

buildscripts/provisioner/provisioner.Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ COPY . .
3535

3636
RUN make build
3737

38-
FROM ubuntu:16.04
39-
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
40-
RUN apt-get update; exit 0
38+
FROM openebs/linux-utils:2.12.x-ci
4139

4240
COPY --from=build /go/src/github.com/openebs/openebs-k8s-provisioner/openebs-provisioner /
4341

buildscripts/snapshot-controller/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM alpine:3.11.5
15+
FROM openebs/linux-utils:2.12.x-ci
1616

1717
RUN apk add --no-cache \
1818
bash \

buildscripts/snapshot-controller/snapshot-controller.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ COPY . .
3535

3636
RUN make snapshot-controller
3737

38-
FROM alpine:3.11.5
38+
FROM openebs/linux-utils:2.12.x-ci
3939

4040
RUN apk add --no-cache \
4141
bash \

buildscripts/snapshot-provisioner/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM alpine:3.11.5
15+
FROM openebs/linux-utils:2.12.x-ci
1616

1717
RUN apk add --no-cache \
1818
bash \

buildscripts/snapshot-provisioner/snapshot-provisioner.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ COPY . .
3535

3636
RUN make snapshot-provisioner
3737

38-
FROM alpine:3.11.5
38+
FROM openebs/linux-utils:2.12.x-ci
3939

4040
RUN apk add --no-cache \
4141
bash \

0 commit comments

Comments
 (0)