Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 1a2876a

Browse files
committed
Hyper 0.4 eliminated the docker dependency
Signed-off-by: Wang Xu <gnawux@gmail.com>
1 parent ed44cf8 commit 1a2876a

File tree

2 files changed

+1
-92
lines changed

2 files changed

+1
-92
lines changed

hyper-bootstrap-xen.sh

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ ERR_ROOT_PRIVILEGE_REQUIRED=(10 "This install script need root privilege, please
3939
ERR_NOT_SUPPORT_PLATFORM=(20 "Sorry, Hyper only support x86_64 platform!")
4040
ERR_NOT_SUPPORT_DISTRO=(21 "Sorry, Hyper only support ubuntu/debian/fedora/centos now!")
4141
ERR_NOT_SUPPORT_DISTRO_VERSION=(22)
42-
ERR_DOCKER_NOT_INSTALL=(30 "Please install docker 1.5+ first!")
43-
ERR_DOCKER_LOW_VERSION=(31 "Need Docker version 1.5 at least!")
44-
ERR_DOCKER_NOT_RUNNING=(32 "Docker daemon isn't running!")
45-
ERR_DOCKER_GET_VER_FAILED=(33 "Can not get docker version!")
46-
ERR_DOCKER_UNSUPPORTED_STORE_DRV=(34 "Only docker storage driver 'aufs' and 'devicemapper' are supported!")
4742
ERR_QEMU_NOT_INSTALL=(40 "Please install Qemu 2.0+ first!")
4843
ERR_QEMU_LOW_VERSION=(41 "Need Qemu version 2.0 at least!")
4944
ERR_XEN_NOT_INSTALL=(50 "Please install xen 4.5+ first!")
@@ -105,7 +100,6 @@ check_deps() {
105100
show_message info "Check dependency "
106101
check_deps_platform
107102
check_deps_distro
108-
check_deps_docker
109103
if [ "${SUPPORT_XEN}" == "" ];then
110104
check_deps_qemu
111105
else
@@ -183,45 +177,6 @@ check_deps_distro() {
183177
esac
184178
echo -n "."
185179
}
186-
check_deps_docker() { #docker 1.5+ should be installed and running
187-
if (command_exist docker);then
188-
set +e
189-
${BASH_C} "docker version > /dev/null 2>&1"
190-
if [ $? -ne 0 ];then
191-
show_message error "${ERR_DOCKER_NOT_RUNNING[1]}\n"
192-
cat <<COMMENT
193-
Please start docker service:
194-
sudo service docker start
195-
COMMENT
196-
exit ${ERR_DOCKER_NOT_RUNNING[0]}
197-
fi
198-
local DOCKER_VER=$(${BASH_C} "docker version" 2>/dev/null | sed -ne 's/Server version:[[:space:]]*\([0-9]\{1,\}\)*/\1/p')
199-
set -e
200-
read DMAJOR DMINOR DFIX < <( echo ${DOCKER_VER} | awk -F"." '{print $1,$2,$3}')
201-
if [ -z ${DMAJOR} -o -z ${DMINOR} ];then
202-
show_message error "${ERR_DOCKER_GET_VER_FAILED[1]}"
203-
display_support ${ERR_DOCKER_GET_VER_FAILED[0]}
204-
exit ${ERR_DOCKER_GET_VER_FAILED[0]}
205-
fi
206-
if [ ${DMAJOR} -lt 1 ] || [ ${DMAJOR} -eq 1 -a ${DMINOR} -lt 5 ];then
207-
show_message error "${ERR_DOCKER_LOW_VERSION[1]} but current is ${DMAJOR}.${DMINOR}, please upgrade docker first!"
208-
exit ${ERR_DOCKER_LOW_VERSION[0]]}
209-
fi
210-
STORE_DRV=$(${BASH_C} "docker info 2>/dev/null |sed -ne 's/Storage Driver: \(.*\)/\1/p'")
211-
if [[ $STORE_DRV != "aufs" ]] && [[ $STORE_DRV != "devicemapper" ]]; then
212-
show_message error "${ERR_DOCKER_UNSUPPORTED_STORE_DRV[1]}\n" && exit ${ERR_DOCKER_UNSUPPORTED_STORE_DRV[0]}
213-
fi
214-
else
215-
show_message error "${ERR_DOCKER_NOT_INSTALL[1]}"
216-
if [ "${LSB_DISTRO}" == "ubuntu" ];then
217-
_OS="linux"
218-
fi
219-
echo -e "\nInstructions for installing Docker on ${LSB_DISTRO}${_OS}"
220-
echo -e " https://docs.docker.com/installation/${LSB_DISTRO}${_OS}/\n"
221-
exit ${ERR_DOCKER_NOT_INSTALL[0]}
222-
fi
223-
echo -n "."
224-
}
225180
check_deps_xen() {
226181
set +e
227182
${BASH_C} "which xl" >/dev/null 2>&1

hyper-bootstrap.sh

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ ERR_ROOT_PRIVILEGE_REQUIRED=(10 "This install script need root privilege, please
4040
ERR_NOT_SUPPORT_PLATFORM=(20 "Sorry, Hyper only support x86_64 platform!")
4141
ERR_NOT_SUPPORT_DISTRO=(21 "Sorry, Hyper only support ubuntu/debian/fedora/centos/linuxmint(17.x) now!")
4242
ERR_NOT_SUPPORT_DISTRO_VERSION=(22)
43-
ERR_DOCKER_NOT_INSTALL=(30 "Please install docker 1.5+ first!")
44-
ERR_DOCKER_LOW_VERSION=(31 "Need Docker version 1.5 at least!")
45-
ERR_DOCKER_NOT_RUNNING=(32 "Docker daemon isn't running!")
46-
ERR_DOCKER_GET_VER_FAILED=(33 "Can not get docker version!")
47-
ERR_DOCKER_UNSUPPORTED_STORE_DRV=(34 "Only docker storage driver 'aufs' and 'devicemapper' are supported!")
4843
ERR_QEMU_NOT_INSTALL=(40 "Please install Qemu 2.0+ first!")
4944
ERR_QEMU_LOW_VERSION=(41 "Need Qemu version 2.0 at least!")
5045
ERR_XEN_NOT_INSTALL=(50 "Please install xen 4.5+ first!")
@@ -106,7 +101,6 @@ check_deps() {
106101
show_message info "Check dependency "
107102
check_deps_platform
108103
check_deps_distro
109-
check_deps_docker
110104
if [ "${SUPPORT_XEN}" == "" ];then
111105
check_deps_qemu
112106
else
@@ -193,46 +187,6 @@ check_deps_distro() {
193187
esac
194188
echo -n "."
195189
}
196-
check_deps_docker() { #docker 1.5+ should be installed and running
197-
if (command_exist docker);then
198-
set +e
199-
${BASH_C} "docker version > /dev/null 2>&1"
200-
if [ $? -ne 0 ];then
201-
show_message error "${ERR_DOCKER_NOT_RUNNING[1]}\n"
202-
cat <<COMMENT
203-
Please start docker service:
204-
sudo service docker start
205-
COMMENT
206-
exit ${ERR_DOCKER_NOT_RUNNING[0]}
207-
fi
208-
local DOCKER_VER=$(${BASH_C} "docker version" 2>/dev/null | sed -ne 's/Server version:[[:space:]]*\([0-9]\{1,\}\)*/\1/p')
209-
if [ -z ${DOCKER_VER} ];then local DOCKER_VER=$(${BASH_C} "docker version" 2>/dev/null | grep "Server:" -A1 | sed -ne 's/ Version:[[:space:]]*\([0-9]\{1,\}\)*/\1/p'); fi
210-
set -e
211-
read DMAJOR DMINOR DFIX < <( echo ${DOCKER_VER} | awk -F"." '{print $1,$2,$3}')
212-
if [ -z ${DMAJOR} -o -z ${DMINOR} ];then
213-
show_message error "${ERR_DOCKER_GET_VER_FAILED[1]}"
214-
display_support ${ERR_DOCKER_GET_VER_FAILED[0]}
215-
exit ${ERR_DOCKER_GET_VER_FAILED[0]}
216-
fi
217-
if [ ${DMAJOR} -lt 1 ] || [ ${DMAJOR} -eq 1 -a ${DMINOR} -lt 5 ];then
218-
show_message error "${ERR_DOCKER_LOW_VERSION[1]} but current is ${DMAJOR}.${DMINOR}, please upgrade docker first!"
219-
exit ${ERR_DOCKER_LOW_VERSION[0]]}
220-
fi
221-
STORE_DRV=$(${BASH_C} "docker info 2>/dev/null |sed -ne 's/Storage Driver: \(.*\)/\1/p'")
222-
if [[ $STORE_DRV != "aufs" ]] && [[ $STORE_DRV != "devicemapper" ]]; then
223-
show_message error "${ERR_DOCKER_UNSUPPORTED_STORE_DRV[1]}\n" && exit ${ERR_DOCKER_UNSUPPORTED_STORE_DRV[0]}
224-
fi
225-
else
226-
show_message error "${ERR_DOCKER_NOT_INSTALL[1]}"
227-
if [ "${LSB_DISTRO}" == "ubuntu" ];then
228-
_OS="linux"
229-
fi
230-
echo -e "\nInstructions for installing Docker on ${LSB_DISTRO}${_OS}"
231-
echo -e " https://docs.docker.com/installation/${LSB_DISTRO}${_OS}/\n"
232-
exit ${ERR_DOCKER_NOT_INSTALL[0]}
233-
fi
234-
echo -n "."
235-
}
236190
check_deps_xen() {
237191
set +e
238192
${BASH_C} "which xl" >/dev/null 2>&1
@@ -470,4 +424,4 @@ show_message() {
470424
esac
471425
}
472426
#################
473-
main
427+
main

0 commit comments

Comments
 (0)