Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
eaf34a44
Commit
eaf34a44
authored
Dec 18, 2019
by
Alexander Lercher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed deployment script
manually apply external ip (commented out)
parent
4f59db1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
deploy.py
bin/deploy.py
+15
-3
No files found.
bin/deploy.py
View file @
eaf34a44
import
os
import
os
import
sys
import
sys
EXTERNAL_IP
=
"143.205.173.225"
# apply or delete config
kube_command
=
'apply'
kube_command
=
'apply'
if
len
(
sys
.
argv
)
>
1
:
if
len
(
sys
.
argv
)
==
2
:
kube_command
=
sys
.
argv
[
1
]
kube_command
=
sys
.
argv
[
1
]
paths
=
[]
paths
=
[]
for
p
,
_
,
f
in
os
.
walk
(
'./'
):
for
p
,
_
,
f
in
os
.
walk
(
'./'
):
for
file
in
f
:
for
file
in
f
:
if
'deployment.yml'
==
file
:
if
'deployment.yml'
==
file
:
paths
.
append
(
os
.
path
.
join
(
p
,
''
))
paths
.
append
(
os
.
path
.
normpath
(
p
))
for
path
in
paths
:
for
path
in
paths
:
os
.
system
(
f
"kubectl {kube_command} -f {path}"
)
os
.
system
(
f
"kubectl {kube_command} -f {path}"
)
\ No newline at end of file
# if kube_command == 'apply':
# # apply external ip
# service_name = path.split(os.path.normpath('/'))[-2] # -1 is deployment folder
# if service_name.split('-')[-1] == 'microservice':
# # remove microservice suffix
# service_name = service_name[:len(service_name)-len('-microservice')]
# os.system(f"kubectl patch service {service_name} -p '{{\"spec\":{{\"externalIPs\":[\"{EXTERNAL_IP}\"]}}}}'")
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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