-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·50 lines (37 loc) · 1.39 KB
/
setup.sh
File metadata and controls
executable file
·50 lines (37 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
# DNS fix (Yes this is already in init.sh, but I DONT CARE,
# this is for people who run this standalone ;-] )
sudo cp dhcpcd.conf /etc/dhcpcd.conf
sudo chmod 664 /etc/dhcpcd.conf
sudo chown root:netdev /etc/dhcpcd.conf
sudo service dhcpcd restart
# Update OS & Install pip (& git if init not run...)
sudo apt-get update
sudo apt-get -y dist-upgrade
sudo apt-get -y autoremove
sudo apt-get install -y git
sudo apt-get install -y python-pip
# Install docker
sudo chmod +x get-docker.sh
sudo ./get-docker.sh
# Install python docker + futures
sudo pip install docker
sudo pip install futures
# Redo (idk why this is needed again, but it is)
sudo apt-get update
sudo apt-get -y dist-upgrade
# Build Docker Image
#sudo docker build -t twizzel/clustermd5sum docker-image
# Make Docker API public
sudo mkdir /etc/systemd/system/docker.service.d
sudo chown -R root:root /etc/systemd/system/docker.service.d
sudo chmod 755 /etc/systemd/system/docker.service.d
sudo cp remote-api.conf /etc/systemd/system/docker.service.d/remote-api.conf
sudo chmod 644 /etc/systemd/system/docker.service.d/remote-api.conf
# Reload Docker Daemon
sudo systemctl daemon-reload
sudo systemctl restart docker
# Swarm Setup
sudo docker swarm join --token SWMTKN-1-2ykeifmtnzicmpt0cc4ly5bfxwum1sxigb8mag163dc5iq21as-3jk1ict0xj6h2b1bnne48s78i 192.168.1.15:2377
# Yeahhh... Some sneaky reference ;-)
echo "SETUP DONE! - Made by Twizzel"