Skip to content

Commit dd71124

Browse files
committed
Merge branch 'master' of github.com-Heshdude:leopardslab/installer.to into generate-summary-and-update-readme
2 parents 8c1e85e + 8701c79 commit dd71124

File tree

5 files changed

+190
-0
lines changed

5 files changed

+190
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/sh
2+
3+
CURL_CMD=$(which curl) # curl tool
4+
YUM_CMD=$(which yum) # yum package manager for RHEL & CentOS
5+
DNF_CMD=$(which dnf) # dnf package manager for new RHEL & CentOS
6+
APT_GET_CMD=$(which apt-get) # apt package manager for Ubuntu & other Debian based distributions
7+
PACMAN_CMD=$(which pacman) # pacman package manager for ArchLinux
8+
APK_CMD=$(which apk) # apk package manager for Alpine
9+
GIT_CMD=$(which git) # to build from source pulling from git
10+
SUDO_CMD=$(which sudo) # check if sudo command is there
11+
12+
USER="$(id -un 2>/dev/null || true)"
13+
SUDO=''
14+
if [ "$USER" != 'root' ]; then
15+
if [ ! -z $SUDO_CMD ]; then
16+
SUDO='sudo'
17+
else
18+
cat >&2 <<-'EOF'
19+
Error: this installer needs the ability to run commands as root.
20+
We are unable to find "sudo". Make sure its available to make this happen
21+
EOF
22+
exit 1
23+
fi
24+
fi
25+
26+
if [ ! -z $APT_GET_CMD ]; then
27+
$SUDO apt-get update
28+
$SUDO apt-get install curl
29+
$SUDO curl -L "https://github.com/docker/compose/releases/download/1.26.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
30+
$SUDO chmod +x /usr/local/bin/docker-compose
31+
32+
elif [ ! -z $YUM_CMD ]; then
33+
$SUDO yum install curl
34+
$SUDO curl -L "https://github.com/docker/compose/releases/download/1.26.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
35+
$SUDO chmod +x /usr/local/bin/docker-compose
36+
37+
else
38+
echo "Couldn't install package"
39+
exit 1;
40+
fi

installers/docker/installer.sh

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/bin/sh
2+
3+
CURL_CMD=$(which curl) # curl tool
4+
YUM_CMD=$(which yum) # yum package manager for RHEL & CentOS
5+
DNF_CMD=$(which dnf) # dnf package manager for new RHEL & CentOS
6+
APT_GET_CMD=$(which apt-get) # apt package manager for Ubuntu & other Debian based distributions
7+
PACMAN_CMD=$(which pacman) # pacman package manager for ArchLinux
8+
APK_CMD=$(which apk) # apk package manager for Alpine
9+
GIT_CMD=$(which git) # to build from source pulling from git
10+
SUDO_CMD=$(which sudo) # check if sudo command is there
11+
12+
USER="$(id -un 2>/dev/null || true)"
13+
SUDO=''
14+
if [ "$USER" != 'root' ]; then
15+
if [ ! -z $SUDO_CMD ]; then
16+
SUDO='sudo'
17+
else
18+
cat >&2 <<-'EOF'
19+
Error: this installer needs the ability to run commands as root.
20+
We are unable to find "sudo". Make sure its available to make this happen
21+
EOF
22+
exit 1
23+
fi
24+
fi
25+
26+
if [ ! -z $APT_GET_CMD ]; then
27+
$SUDO apt-get update
28+
$SUDO apt-get install \
29+
apt-transport-https \
30+
ca-certificates \
31+
curl \
32+
gnupg-agent \
33+
software-properties-common
34+
35+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
36+
37+
$SUDO add-apt-repository \
38+
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
39+
$(lsb_release -cs) \
40+
stable"
41+
42+
$SUDO apt-get update
43+
44+
$SUDO apt-get install docker-ce docker-ce-cli containerd.io
45+
46+
elif [ ! -z $YUM_CMD ]; then
47+
$SUDO yum install -y yum-utils
48+
$SUDO yum-config-manager \
49+
--add-repo \
50+
https://download.docker.com/linux/centos/docker-ce.repo
51+
$SUDO yum install docker-ce docker-ce-cli containerd.io
52+
53+
# elif [ ! -z $PACMAN_CMD ]; then
54+
# pacman -Sy git
55+
56+
# elif [ ! -z $DNF_CMD ]; then
57+
# $SUDO dnf install git
58+
59+
# elif [ ! -z $APK_CMD ]; then
60+
# $SUDO apk add git
61+
62+
else
63+
echo "Couldn't install package"
64+
exit 1;
65+
fi

installers/docker/installer.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[apt]
2+
sh = """
3+
@sudo apt-get update
4+
@sudo apt-get install apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
5+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
6+
@sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
7+
@sudo apt-get update
8+
@sudo apt-get install docker-ce docker-ce-cli containerd.io
9+
"""
10+
11+
[yum]
12+
sh = """
13+
@sudo yum install -y yum-utils
14+
@sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
15+
@sudo yum install docker-ce docker-ce-cli containerd.io
16+
"""
17+

installers/hlf/installer.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/sh
2+
3+
CURL_CMD=$(which curl) # curl tool
4+
YUM_CMD=$(which yum) # yum package manager for RHEL & CentOS
5+
DNF_CMD=$(which dnf) # dnf package manager for new RHEL & CentOS
6+
APT_GET_CMD=$(which apt-get) # apt package manager for Ubuntu & other Debian based distributions
7+
PACMAN_CMD=$(which pacman) # pacman package manager for ArchLinux
8+
APK_CMD=$(which apk) # apk package manager for Alpine
9+
GIT_CMD=$(which git) # to build from source pulling from git
10+
SUDO_CMD=$(which sudo) # check if sudo command is there
11+
12+
USER="$(id -un 2>/dev/null || true)"
13+
SUDO=''
14+
if [ "$USER" != 'root' ]; then
15+
if [ ! -z $SUDO_CMD ]; then
16+
SUDO='sudo'
17+
else
18+
cat >&2 <<-'EOF'
19+
Error: this installer needs the ability to run commands as root.
20+
We are unable to find "sudo". Make sure its available to make this happen
21+
EOF
22+
exit 1
23+
fi
24+
fi
25+
26+
27+
if ! command -v docker
28+
then
29+
echo "docker could not be found"
30+
curl https://installer.to/docker | bash
31+
else
32+
echo "docker found"
33+
fi
34+
35+
36+
echo "downloading Fabric........"
37+
curl -sSL http://bit.ly/2ysbOFE -o bootstrap.sh
38+
chmod 755 ./bootstrap.sh
39+
$SUDO bash ./bootstrap.sh
40+
41+
# Copying binaries
42+
$SUDO cp ./fabric-samples/bin/* /usr/local/bin
43+

installers/hlf/installer.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[apt]
2+
sh = """
3+
@sudo apt-get update
4+
@sudo apt-get install git
5+
"""
6+
7+
[yum]
8+
sh = """
9+
@sudo yum install git
10+
"""
11+
12+
[pacman]
13+
sh = """
14+
pacman -Sy git
15+
"""
16+
17+
[dnf]
18+
sh = """
19+
@sudo dnf install git
20+
"""
21+
22+
[apk]
23+
sh = """
24+
@sudo apk add git
25+
"""

0 commit comments

Comments
 (0)