Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
container-manager
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
nomad-lab
container-manager
Commits
6fb1b843
Commit
6fb1b843
authored
6 years ago
by
Mohamed, Fawzi Roberto (fawzi)
Browse files
Options
Downloads
Patches
Plain Diff
cron job for services update
parent
1a2cc7b7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
deploy.sh
+76
-0
76 additions, 0 deletions
deploy.sh
with
76 additions
and
0 deletions
deploy.sh
+
76
−
0
View file @
6fb1b843
...
...
@@ -378,6 +378,82 @@ echo " kubectl create secret generic ${secretWebCerts} --from-file=key.pem=key.
echo
" popd"
echo
echo
"# create cron job updating info on services"
if
[
-n
updateDeploy
]
;
then
targetF
=
service-dumper.yaml
cat
>
"
$targetF
"
<<
EOF
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: hello
spec:
schedule: "*/15 * * * *"
jobTemplate:
spec:
template:
spec:
metadata:
labels:
app: nomad-container-manager-dumper
imagePullSecrets:
- name: garching-kube
restartPolicy: OnFailure
containers:
- name: dumper
image:
$name
imagePullPolicy:
$pullPolicy
command:
- node
- app.js
- serviceDumper
- --out-file
- /services-info/
$target_hostname
.services.yaml
env:
- name: KUBERNETES_SERVER_URL
valueFrom:
secretKeyRef:
name: kube-certs
key: server.url
- name: KUBERNETES_NODE
valueFrom:
secretKeyRef:
name: kube-certs
key: node.addr
- name: NODE_ENV
value: "
$NODE_ENV
"
- name: NODE_APP_INSTANCE
value: "
$imageType
"
volumeMounts:
- mountPath: "/services-info"
name: services-info
EOF
if
[
-n
"
$debug
"
]
;
then
cat
>>
$targetF
<<
EOF
- mountPath: "/usr/src/app"
name: app-source
EOF
fi
cat
>>
$targetF
<<
EOF
- mountPath: "/usr/src/app/kube-certs"
name: kube-certs
readOnly: true
volumes:
- name: kube-certs
secret:
secretName: kube-certs
- name: services-info
hostPath:
path: "
$nomadRoot
/servers/
$target_hostname
/analytics/services-info"
EOF
if
[
-n
"
$debug
"
]
;
then
cat
>>
$targetF
<<
EOF
- name: app-source
hostPath:
path: "
$nomadRoot
/servers/
$target_hostname
/analytics/
$imageType
"
EOF
fi
fi
for
imageType
in
beaker jupyter creedo remotevis
;
do
echo
"##
$imageType
Initial setup: create container manager service"
...
...
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