-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
self service init - install rpm/deb and release complete image (#8)
- Loading branch information
Showing
11 changed files
with
119 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.deb | ||
*.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
RPM_PATH = "iguazio_yum" | ||
DEB_PATH = "iguazio_deb" | ||
BINARY_NAME = "igz-fuse" | ||
|
||
.PHONY: build | ||
build: | ||
docker build --tag iguaziodocker/flex-fuse:unstable . | ||
|
||
.PHONY: download | ||
download: | ||
@rm -rf hack/libs/${BINARY_NAME}* | ||
@cd hack/libs && wget --quiet $(MIRROR)/$(RPM_PATH)/$(IGUAZIO_VERSION)/$(BINARY_NAME).rpm | ||
@cd hack/libs && wget --quiet $(MIRROR)/$(DEB_PATH)/$(IGUAZIO_VERSION)/$(BINARY_NAME).deb | ||
|
||
.PHONY: release | ||
release: check-req download build | ||
docker tag iguaziodocker/flex-fuse:unstable iguaziodocker/flex-fuse:$(IGUAZIO_VERSION)-$(RELEASE_VERSION) | ||
|
||
check-req: | ||
ifndef MIRROR | ||
$(error MIRROR must be set) | ||
endif | ||
ifndef IGUAZIO_VERSION | ||
$(error IGUAZIO_VERSION must be set) | ||
endif | ||
ifndef RELEASE_VERSION | ||
$(error RELEASE_VERSION must be set) | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,5 +23,5 @@ func main() { | |
} | ||
|
||
journal.Info("Completed flex flow", "result", result) | ||
result.PrintJson() | ||
result.ToJson() | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
LIBS_DIR="$(dirname "$0")/libs" | ||
PKG_MANAGER="" | ||
PACKAGES="fuse librdmacm" | ||
PACKAGE_NAME="igz-fuse" | ||
|
||
echo "$(date) - checking yum or apt" >> /tmp/init.log | ||
HAS_YUM=$(which yum &> /dev/null; echo $?) | ||
HAS_APT=$(which apt &> /dev/null; echo $?) | ||
|
||
if [ "${HAS_YUM}" == "0" ]; then | ||
PKG_MANAGER="yum" | ||
elif [ "${HAS_APT}" == "0" ]; then | ||
PKG_MANAGER="apt-get" | ||
PACKAGES="fuse librdmacm1" | ||
apt-get update | ||
else | ||
echo "Installation supports 'yum' or 'apt-get'" | ||
exit 1 | ||
fi | ||
|
||
echo "$(date) - PKG_MANAGER is ${PKG_MANAGER}" >> /tmp/init.log | ||
|
||
echo "Installing required packages" | ||
echo "$(date) - Installing required packages - ${PACKAGES}" >> /tmp/init.log | ||
|
||
${PKG_MANAGER} install -y ${PACKAGES} &>> /tmp/init.log | ||
|
||
echo "Installing v3io-fuse package" | ||
echo "$(date) - Installing v3io-fuse package" >> /tmp/init.log | ||
|
||
if [ "${HAS_YUM}" == "0" ]; then | ||
echo "$(date) - Installing v3io-fuse package using 'rpm -ivh ${LIBS_DIR}/${PACKAGE_NAME}.rpm'" >> /tmp/init.log | ||
rpm -ivh ${LIBS_DIR}/${PACKAGE_NAME}.rpm &>> /tmp/init.log | ||
else | ||
echo "$(date) - Installing v3io-fuse package using 'dpkg -i ${LIBS_DIR}/${PACKAGE_NAME}.deb'" >> /tmp/init.log | ||
dpkg -i ${LIBS_DIR}/${PACKAGE_NAME}.deb &>> /tmp/init.log | ||
fi | ||
|
||
echo "$(date) - Installation Completed" >> /tmp/init.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters