Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TSMatch
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IIoT_external
TSMatch
Commits
7a58a13b
Commit
7a58a13b
authored
2 years ago
by
Rute C. Sofia
Browse files
Options
Downloads
Patches
Plain Diff
Script to adapt the TSMatch docker .env files to the IP being used in the local device.
parent
3f8e0764
No related branches found
No related tags found
No related merge requests found
Pipeline
#36390
failed
2 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ipchange.sh
+29
-0
29 additions, 0 deletions
ipchange.sh
with
29 additions
and
0 deletions
ipchange.sh
0 → 100644
+
29
−
0
View file @
7a58a13b
#!/bin/sh
# Copyright (c) fortiss GmbH 2022
# @author Mert Sarac
#ask for new ip
echo
"enter the old ip adress which need to change"
read
OLD_IP
NEW_IP
=
''
$(
ip addr show
$(
ip route |
awk
'/default/ { print $5 }'
)
|
grep
"inet"
|
head
-n
1 |
awk
'/inet/ {print $2}'
|
cut
-d
'/'
-f1
)
''
;
echo
$NEW_IP
# for thing_discovery container
echo
-e
"
\n
$(
date
-u
)
: Change for thing_discovery container..."
cd
thing_discovery
&&
sed
-i
"s/
$OLD_IP
/
$NEW_IP
/g"
.env
&&
cd
..
# for semantic_matchmaking container
echo
-e
"
\n
$(
date
-u
)
: Change semantic_matchmaking container..."
cd
tsmatch_engine/semantic_matchmaking
&&
sed
-i
"s/
$OLD_IP
/
$NEW_IP
/g"
.env
&&
cd
../..
# for data_aggregation container
echo
-e
"
\n
$(
date
-u
)
: Change data_aggregation container..."
cd
tsmatch_engine/data_aggregation
&&
sed
-i
"s/
$OLD_IP
/
$NEW_IP
/g"
.env
&&
cd
../..
# for ontology_interface container
echo
-e
"
\n
$(
date
-u
)
: Change ontology_interface container..."
cd
esi/ontology_interface
&&
sed
-i
"s/
$OLD_IP
/
$NEW_IP
/g"
.env
&&
cd
../..
# for thing container
echo
-e
"
\n
$(
date
-u
)
: Change service_registry container..."
cd
thing/raspberry_pi/
&&
sed
-i
"s/
$OLD_IP
/
$NEW_IP
/g"
.env
&&
cd
../..
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment