-
Notifications
You must be signed in to change notification settings - Fork 0
/
userdata.sh
47 lines (27 loc) · 1.04 KB
/
userdata.sh
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
#!/bin/bash
##########################################
# Install Gitlab Server on Ubuntu 18.04 #
# by ventx GmbH #
##########################################
# Path for openvpn vars
export DEBIAN_FRONTEND=noninteractive
# Starting Setup
echo "=======[ Installation started ]====="
echo "=======| 1. Update, upgrade and install tools"
apt-get update
apt-get upgrade -q -y | tee -a
sudo apt install ca-certificates -y
echo "=======| 2. Installing GitLab"
curl -LO https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh
sudo bash script.deb.sh
sudo EXTERNAL_URL="${subdomain}.${domain}" apt-get install gitlab-ce
sudo apt install
echo "=======| 3. Firewall settings"
sudo ufw allow http
sudo ufw allow https
sudo ufw allow OpenSSH
echo "=======| 6. Setup gitlab"
#echo "letsencrypt['enable'] = true" >> /etc/gitlab/gitlab.rb
#echo "letsencrypt['contact_emails'] = ['alexander@ventx.de']" >> /etc/gitlab/gitlab.rb
sudo gitlab-ctl reconfigure
echo "==============END OF Installation============="