-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_linux_box.sh
More file actions
executable file
·181 lines (127 loc) · 5.77 KB
/
setup_linux_box.sh
File metadata and controls
executable file
·181 lines (127 loc) · 5.77 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
#!/bin/bash
BASE_FOLDER=~/mydata/projects/private/shell-tools/setup_linux_box
TEXT_COLOR_LIGHTRED='\033[1;31m'
TEXT_COLOR_ORANGE='\033[0;33m'
TEXT_COLOR_GREEN='\033[0;32m'
TEXT_COLOR_LIGHTBLUE='\033[0;34m'
TEXT_COLOR_OFF='\033[0m'
function print_headline() {
echo -e "${TEXT_COLOR_LIGHTBLUE}"
echo ""
echo ""
echo "#########################################################################"
echo "# $1"
echo "#########################################################################"
echo -e "${TEXT_COLOR_OFF}"
}
function print_todo() {
echo ""
echo -e "${TEXT_COLOR_ORANGE}>>> TODO for ${USER}: $1${TEXT_COLOR_OFF}"
}
function print_ok() {
echo "OK."
}
####################################################################################
# Prerequisites
####################################################################################
print_headline "Check prerequisites"
[ -d "~/mydata" ] && \
echo -e "${TEXT_COLOR_LIGHTRED}~/mydata has not yet been restored from backup, this must be done first." && \
echo "" && \
echo "Giving up." && \
echo -e "${TEXT_COLOR_OFF}" && \
exit 1
[ ! -d "~/mydata" ] && \
print_ok
###################################################################################
# File download
####################################################################################
print_headline "Download files"
$BASE_FOLDER/download_files.sh
print_ok
###################################################################################
# Software installation
####################################################################################
print_headline "Install packages/apps"
BASE_FOLDER=$BASE_FOLDER $BASE_FOLDER/install_apps.sh
####################################################################################
# SDKMAN!
# https://sdkman.io/
####################################################################################
print_headline "Download and install SDKMAN!, install packages"
$BASE_FOLDER/setup_sdkman.sh
####################################################################################
# Java TrustStore (cacerts)
####################################################################################
print_headline "Copy Java TrustStore(s) in place"
$BASE_FOLDER/setup_java_truststore.sh
print_ok
####################################################################################
# mise (mise-en-place)
# https://github.com/jdx/mise/
# https://mise.jdx.dev/
####################################################################################
print_headline "Install mise"
$BASE_FOLDER/setup_mise.sh
####################################################################################
# Install dev tools via mise
# https://github.com/jdx/mise/
# https://mise.jdx.dev/
####################################################################################
print_headline "Install dev tools via mise"
$BASE_FOLDER/setup_dev_env_via_mise.sh
####################################################################################
# Global npm packages
####################################################################################
###print_headline "Install global npm packages"
###$BASE_FOLDER/install_global_npm_packages.sh
####################################################################################
# OpenVPN
# https://openvpn.net/
####################################################################################
print_headline "Setup VPNs"
$BASE_FOLDER/setup_vpn.sh && \
print_todo "Open the VPN config UI and enter your credentials (username, password)" && \
print_todo "Check that the checkboxes 'Use this connection only for resources on its network' are ticked for IPv4 and IPv6"
####################################################################################
# Google Cloud CLI (gcloud)
# https://cloud.google.com/sdk/docs/install
####################################################################################
print_headline "Download, install, and setup Google Cloud CLI (gcloud), install components"
$BASE_FOLDER/setup_gcloud_cli.sh
####################################################################################
# AWS CLI (aws)
# https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
####################################################################################
###print_headline "Download, install, and setup AWS CLI (aws)"
###$BASE_FOLDER/setup_aws_cli.sh
####################################################################################
# Terraform CLI
# https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli
####################################################################################
print_headline "Setup Terraform CLI"
$BASE_FOLDER/setup_terraform_cli.sh
print_ok
####################################################################################
# Minikube
# https://minikube.sigs.k8s.io
####################################################################################
###print_headline "Setup minikube"
###$BASE_FOLDER/setup_minikube.sh
####################################################################################
# Symlinks
####################################################################################
print_headline "Create symlinks"
$BASE_FOLDER/setup_symlinks.sh
####################################################################################
# Directory permissions
####################################################################################
print_headline "Check/Fix directory permissions"
$BASE_FOLDER/fix_directory_permissions.sh && \
print_ok
####################################################################################
# Result
####################################################################################
print_headline "End of setup. Close terminal now."
echo "Done."
echo ""