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
bcd15a4b
Commit
bcd15a4b
authored
6 years ago
by
Mohamed, Fawzi Roberto (fawzi)
Browse files
Options
Downloads
Patches
Plain Diff
add userapi and watcher deployments and services
parent
eb232c72
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
deploy.sh
+63
-22
63 additions, 22 deletions
deploy.sh
with
63 additions
and
22 deletions
deploy.sh
+
63
−
22
View file @
bcd15a4b
...
@@ -495,11 +495,12 @@ EOF
...
@@ -495,11 +495,12 @@ EOF
fi
fi
echo
" kubectl apply -f
$targetF
"
echo
" kubectl apply -f
$targetF
"
for
imageType
in
beaker jupyter creedo remotevis
;
do
for
imageType
in
beaker jupyter creedo remotevis
userapi watcher
;
do
echo
"##
$imageType
Initial setup: create container manager service"
if
[
"
$imageType
"
!=
"watcher"
]
;
then
if
[
-n
updateDeploy
]
;
then
echo
"##
$imageType
Initial setup: create container manager service"
cat
>
container-manager-service-
$imageType
.yaml
<<
HERE
if
[
-n
updateDeploy
]
;
then
cat
>
container-manager-service-
$imageType
.yaml
<<
HERE
kind: Service
kind: Service
apiVersion: v1
apiVersion: v1
metadata:
metadata:
...
@@ -514,12 +515,13 @@ spec:
...
@@ -514,12 +515,13 @@ spec:
targetPort: 3003
targetPort: 3003
type: NodePort
type: NodePort
HERE
HERE
fi
echo
" kubectl create -f container-manager-service-
$imageType
.yaml"
fi
fi
echo
" kubectl create -f container-manager-service-
$imageType
.yaml"
if
[
-n
"
$updateDeploy
"
]
;
then
if
[
-n
"
$updateDeploy
"
]
;
then
targetF
=
container-manager-deploy-
$imageType
.yaml
targetF
=
container-manager-deploy-
$imageType
.yaml
cat
>
$targetF
<<
HERE
cat
>
$targetF
<<
HERE
apiVersion: apps/v1beta2
apiVersion: apps/v1beta2
kind: Deployment
kind: Deployment
metadata:
metadata:
...
@@ -545,13 +547,66 @@ spec:
...
@@ -545,13 +547,66 @@ spec:
- name: nomad-container-manager
- name: nomad-container-manager
image:
$name
image:
$name
imagePullPolicy:
$pullPolicy
imagePullPolicy:
$pullPolicy
ports:
- containerPort: 3003
HERE
if
[
"
$imageType
"
=
"watcher"
]
;
then
cat
>>
$targetF
<<
HERE
command:
- npm
- start
- watcher
HERE
elif
[
"
$imageType
"
=
"userapi"
]
;
then
cat
>>
$targetF
<<
HERE
command:
- npm
- start
- apiserver
readinessProbe:
httpGet:
path: "/userapi"
port: 3003
scheme: "
$scheme
"
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
httpGet:
path: "/userapi"
port: 3003
scheme: "
$scheme
"
initialDelaySeconds: 30
periodSeconds: 30
HERE
else
cat
>>
$targetF
<<
HERE
command:
command:
- npm
- npm
- start
- start
- webserver
- webserver
ports:
readinessProbe:
- containerPort: 3003
httpGet:
path: "/nmdalive"
port: 3003
scheme: "
$scheme
"
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
httpGet:
path: "/nmdalive"
port: 3003
scheme: "
$scheme
"
initialDelaySeconds: 30
periodSeconds: 30
HERE
fi
cat
>>
$targetF
<<
HERE
env:
env:
- name: MONGODB_URL
valueFrom:
secretKeyRef:
name: notebook-db-mongo-pwd
key: root-connect
- name: SESSION_DB_PASSWORD
- name: SESSION_DB_PASSWORD
valueFrom:
valueFrom:
secretKeyRef:
secretKeyRef:
...
@@ -607,20 +662,6 @@ EOF
...
@@ -607,20 +662,6 @@ EOF
name: user-shared
name: user-shared
- mountPath: "/nomad/nomadlab/user-data/private"
- mountPath: "/nomad/nomadlab/user-data/private"
name: user-private
name: user-private
readinessProbe:
httpGet:
path: "/nmdalive"
port: 3003
scheme: "
$scheme
"
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
httpGet:
path: "/nmdalive"
port: 3003
scheme: "
$scheme
"
initialDelaySeconds: 30
periodSeconds: 30
volumes:
volumes:
- name: kube-certs
- name: kube-certs
secret:
secret:
...
...
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