Edgefs Image
Signed-off-by: Dmitry Yusupov <dmitry.yusupov@nexenta.com>
This commit is contained in:
1 parent
63c30a03ec
commit
4f958162e1
4 files changed
+71
-1
No files matched your search
@@ -95,7 +95,7 @@ BUILD_REGISTRY := build-$(shell echo $(HOSTNAME)-$(ROOT_DIR) | shasum -a 256 | c
|
||||
endif
|
||||
|
||||
# Select which images (backends) to make; default to all possible images
|
||||
IMAGES ?= ceph cockroachdb minio nfs cassandra
|
||||
IMAGES ?= ceph cockroachdb minio nfs cassandra edgefs
|
||||
|
||||
COMMA := ,
|
||||
SPACE :=
|
||||
|
||||
@@ -35,6 +35,9 @@ cockroachdb.%:
|
||||
minio.%:
|
||||
@$(MAKE) -C minio PLATFORM=$*
|
||||
|
||||
edgefs.%:
|
||||
@$(MAKE) -C edgefs PLATFORM=$*
|
||||
|
||||
nfs.%:
|
||||
@$(MAKE) -C nfs PLATFORM=$*
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Copyright 2018 The Rook Authors. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM edgefs/edgefs:1.0.0
|
||||
|
||||
ADD rook /usr/local/bin/
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/rook"]
|
||||
CMD [""]
|
||||
Executable
+47
@@ -0,0 +1,47 @@
|
||||
# Copyright 2018 The Rook Authors. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
include ../image.mk
|
||||
|
||||
# ====================================================================================
|
||||
# Image Build Options
|
||||
|
||||
EDGEFS_IMAGE = $(BUILD_REGISTRY)/edgefs-$(GOARCH)
|
||||
IMAGES = $(EDGEFS_IMAGE)
|
||||
|
||||
TEMP := $(shell mktemp -d)
|
||||
|
||||
# ====================================================================================
|
||||
# Build Rook EdgeFS
|
||||
|
||||
# since this is a leaf image we avoid leaving around a lot of dangling images
|
||||
# by removing the last build of the final cockroachdb image
|
||||
OLD_IMAGE_ID := $(shell docker images -q $(EDGEFS_IMAGE))
|
||||
CURRENT_IMAGE_ID := $$(docker images -q $(EDGEFS_IMAGE))
|
||||
IMAGE_FILENAME := $(IMAGE_OUTPUT_DIR)/edgefs.tar.gz
|
||||
|
||||
do.build:
|
||||
@echo === docker build $(EDGEFS_IMAGE)
|
||||
@cp Dockerfile $(TEMP)
|
||||
@cp $(OUTPUT_DIR)/bin/linux_$(GOARCH)/rook $(TEMP)
|
||||
@docker build $(BUILD_ARGS) \
|
||||
-t $(EDGEFS_IMAGE) \
|
||||
$(TEMP)
|
||||
@[ "$(OLD_IMAGE_ID)" != "$(CURRENT_IMAGE_ID)" ] && [ -n "$(OLD_IMAGE_ID)" ] && docker rmi $(OLD_IMAGE_ID) || true
|
||||
@if [ ! -e "$(IMAGE_FILENAME)" ] || [ "$(OLD_IMAGE_ID)" != "$(CURRENT_IMAGE_ID)" ] || [ -n "$(OLD_IMAGE_ID)" ]; then \
|
||||
echo === saving image $(EDGEFS_IMAGE); \
|
||||
mkdir -p $(IMAGE_OUTPUT_DIR); \
|
||||
docker save $(EDGEFS_IMAGE) | gzip -c > $(IMAGE_FILENAME); \
|
||||
fi
|
||||
@rm -fr $(TEMP)
|
||||
Reference in new issue
Block a user