@@ -234,6 +234,144 @@ function install_darwin_deps {
234234}
235235
236236# ------------------------------------------------------------------------------
237+ <<< <<< < HEAD
238+ =======
239+ function install_deps_with_apt_get {
240+ log " Checking for and updating 'apt-get' support on Linux"
241+ if [[ -z " $( which apt-get) " ]]; then
242+ error " 'apt-get' is not found. That's the only Debian/Ubuntu linux installer I know, sorry."
243+ fi
244+ if [[ -z " $( which add-apt-repository) " ]]; then
245+ $SUDO apt-get install -y software-properties-common python-software-properties
246+ fi
247+ $SUDO add-apt-repository -y ppa:git-core/ppa
248+ $SUDO apt-get -y update
249+
250+ # -- CURL:
251+ log " Installing/updating external dependency: curl"
252+ if [[ -z " $( which curl) " || " $FORCE " == true ]]; then
253+ $SUDO apt-get -y install curl
254+ fi
255+
256+ # -- GIT:
257+ log " Installing/updating external dependency: git"
258+ if [[ -z " $( which git) " || " $FORCE " == true ]]; then
259+ $SUDO apt-get -y install git
260+ log " Please review any setup requirements for 'git' from: https://git-scm.com/downloads"
261+ fi
262+
263+ # -- Docker:
264+ install_docker
265+
266+ # -- kubectl:
267+ log " Installing/updating external dependency: kubectl"
268+ if [[ -z " $( which kubectl) " || " $FORCE " == true ]]; then
269+ local kube_version=$( get_kubectl_version)
270+ curl --progress-bar -LO https://storage.googleapis.com/kubernetes-release/release/v$kube_version /bin/linux/amd64/kubectl
271+ $SUDO mv ./kubectl /usr/local/bin/kubectl
272+ $SUDO chmod +x /usr/local/bin/kubectl
273+ log " Please review any setup requirements for 'kubectl' from: https://kubernetes.io/docs/tasks/tools/install-kubectl/"
274+ fi
275+
276+ # -- helm:
277+ log " Installing/updating external dependency: helm"
278+ if [[ -z " $( which helm) " || " $FORCE " == true ]]; then
279+ curl -fsSL https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
280+ log " Please review any setup requirements for 'helm' from: https://github.com/kubernetes/helm/blob/master/docs/install.md"
281+ fi
282+ }
283+
284+ # ------------------------------------------------------------------------------
285+ function install_deps_with_eopkg {
286+ logrevert " Checking for and updating 'eopkg' support on Linux"
287+ if [[ -z " $( which eopkg) " ]]; then
288+ error " 'eopkg' is not found. Thats the only linux installer I know, sorry."
289+ fi
290+ $SUDO eopkg ur Solus
291+
292+ # -- CURL:
293+ log " Installing/updating external dependency: curl"
294+ if [[ -z " $( which curl) " || " $FORCE " == true ]]; then
295+ $SUDO eopkg it curl
296+ fi
297+ # -- GIT:
298+ log " Installing/updating external dependency: git"
299+ if [[ -z " $( which git) " || " $FORCE " == true ]]; then
300+ $SUDO eopkg it git
301+ log " Please review any setup requirements for 'git' from: https://git-scm.com/downloads"
302+ fi
303+
304+ # -- Docker:
305+ log " Installing/updating external dependency: docker"
306+ if [[ -z " $( which docker) " || " $FORCE " == true ]]; then
307+ $SUDO eopkg it docker
308+ if [ " $SUDO " ]; then
309+ # Allow docker to run as a non-root user (if not running as root).
310+ sudo groupadd docker 2> /dev/null
311+ sudo usermod -aG docker $USER 2> /dev/null
312+ else
313+ log ' If you want to run docker without sudo run: "sudo groupadd docker && sudo usermod -aG docker $USER"'
314+ fi
315+ log " Please review any setup requirements for 'docker' from: https://docs.docker.com/engine/installation/"
316+ fi
317+
318+ # -- kubectl:
319+ log " Installing/updating external dependency: kubectl"
320+ if [[ -z " $( which kubectl) " || " $FORCE " == true ]]; then
321+ $SUDO eopkg it kubectl
322+ log " Please review any setup requirements for 'kubectl' from: https://kubernetes.io/docs/tasks/tools/install-kubectl/"
323+ fi
324+
325+ # -- helm:
326+ log " Installing/updating external dependency: helm"
327+ if [[ -z " $( which helm) " || " $FORCE " == true ]]; then
328+ curl -fsSL https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
329+ log " Please review any setup requirements for 'helm' from: https://github.com/kubernetes/helm/blob/master/docs/install.md"
330+ fi
331+ }
332+
333+ # ------------------------------------------------------------------------------
334+ function install_deps_with_yum {
335+ log " Checking for and updating 'yum' support on Linux"
336+ if [[ -z " $( which yum) " ]]; then
337+ error " 'yum' is not found. That's the only RedHat/Centos linux installer I know, sorry."
338+ fi
339+
340+ # -- CURL:
341+ log " Installing/updating external dependency: curl"
342+ if [[ -z " $( which curl) " || " $FORCE " == true ]]; then
343+ $SUDO yum -y install curl
344+ fi
345+ # -- GIT:
346+ log " Installing/updating external dependency: git"
347+ if [[ -z " $( which git) " || " $FORCE " == true ]]; then
348+ $SUDO yum install -y git
349+ log " Please review any setup requirements for 'git' from: https://git-scm.com/downloads"
350+ fi
351+
352+ # -- Docker:
353+ install_docker
354+
355+ # -- kubectl:
356+ log " Installing/updating external dependency: kubectl"
357+ if [[ -z " $( which kubectl) " || " $FORCE " == true ]]; then
358+ $SUDO sh -c ' printf "[kubernetes]\nname=Kubernetes\nbaseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg\n" > /etc/yum.repos.d/kubernetes.repo'
359+ local kube_version=$( get_kubectl_version)
360+ local kube_yum_version=$( yum --showduplicates list kubectl -y | grep -Eo " ($kube_version \-[0-9*])" )
361+ $SUDO yum install -y kubectl-$kube_yum_version
362+ log " Please review any setup requirements for 'kubectl' from: https://kubernetes.io/docs/tasks/tools/install-kubectl/"
363+ fi
364+
365+ # -- helm:
366+ log " Installing/updating external dependency: helm"
367+ if [[ -z " $( which helm) " || " $FORCE " == true ]]; then
368+ curl -fsSL https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
369+ log " Please review any setup requirements for 'helm' from: https://github.com/kubernetes/helm/blob/master/docs/install.md"
370+ fi
371+ }
372+
373+ # ------------------------------------------------------------------------------
374+ >>>>>>> Added support for Solus.
237375function install_docker {
238376
239377 # -- Docker:
0 commit comments