Skip to content
GitLab
Menu
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Tools
scripts
Commits
a2a30573
Commit
a2a30573
authored
3 years ago
by
Sana Temrikar
Browse files
Options
Download
Email Patches
Plain Diff
added new file
parent
3f69270a
sana
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Kubernetes/cluster-init.sh
+54
-0
Kubernetes/cluster-init.sh
with
54 additions
and
0 deletions
+54
-0
Kubernetes/cluster-init.sh
0 → 100644
+
54
-
0
View file @
a2a30573
# redirect stdout/stderr to a file
###################################################################################################
##
###################################################################################################
###################################################################################################
## checking config file presence
###################################################################################################
echo
"Stage 1 executing ..."
sleep
2
echo
"Checking config file presense"
FILE
=
./config.json
if
test
-f
"
$FILE
"
;
then
echo
"
$FILE
exists."
else
wget https://gitlab.livnsense.com/tools1/scripts/-/raw/sana/Kubernetes/config.json
exists 1
fi
echo
"Stage 1 completed ..."
###################################################################################################
## install dependency packages
###################################################################################################
echo
"Stage 2 executing ..."
echo
"installing dependency packages"
sudo
apt
install
jq
-y
##json parser package for ubuntu os
echo
"Stage 2 completed ..."
###################################################################################################
## reading config from configuration file
###################################################################################################
echo
"Stage 3 executing ..."
project_name
=
`
jq
'.project_name'
config.json |
tr
-d
\"
`
env
=
`
jq
'.env'
config.json |
tr
-d
\"
`
docker_registry
=
`
jq
'.docker_registry'
config.json |
tr
-d
\"
`
IPV4
=
68.183.80.58
ssh-keygen
cat
~/.ssh/id_rsa.pub
cp
ssh-rsa key to list of nodes
ssh root@
$IPV4
echo
master node
cat
/root/.ssh/id_rsa.pub
scp ssh-key
echo
worker node
nano /root/.ssh/authorized_keys
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets