Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
f7b46ea3
Commit
f7b46ea3
authored
1 month ago
by
Jan David Mol
Browse files
Options
Downloads
Plain Diff
Merge branch '
L2SS-2214
-deploy-cdb' into
L2SS-2309
-trigger-deployment
parents
cfe995cd
e38d9acc
No related branches found
No related tags found
1 merge request
!1092
Resolve L2SS-2309 "Trigger deployment"
Pipeline
#116726
passed
1 month ago
Stage: prepare
Stage: render
Stage: test
Stage: deploy
Pipeline: tango
#116732
Pipeline: tango
#116727
Changes
3
Pipelines
4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.deploy.gitlab-ci.yml
+27
-2
27 additions, 2 deletions
.deploy.gitlab-ci.yml
.gitlab-ci.yml
+3
-1
3 additions, 1 deletion
.gitlab-ci.yml
infra/jobs/station/dsconfig.levant.nomad
+14
-0
14 additions, 0 deletions
infra/jobs/station/dsconfig.levant.nomad
with
44 additions
and
3 deletions
.deploy.gitlab-ci.yml
+
27
−
2
View file @
f7b46ea3
...
...
@@ -7,8 +7,6 @@ stages:
deploy_nomad
:
stage
:
deploy
rules
:
-
if
:
$STATION != ""
needs
:
-
pipeline
:
$PARENT_PIPELINE_ID
job
:
render_levant
...
...
@@ -31,3 +29,30 @@ deploy_nomad:
echo "Running station ${STATION} component ${COMPONENT}"
nomad job run -address="http://${HOSTNAME}:4646" jobs/${STATION}/${COMPONENT}.nomad
done
deploy_CDB
:
stage
:
deploy
needs
:
-
pipeline
:
$PARENT_PIPELINE_ID
job
:
render_CDB
image
:
name
:
hashicorp/nomad
entrypoint
:
[
"
"
]
script
:
-
|
RENDER_CDB_JOB_ID=`cat generated/render-cdb-job-id.txt`
echo "render-cdb job ID: ${RENDER_CDB_JOB_ID}"
CDB_JSON_URL="${CI_PROJECT_URL}/-/jobs/${RENDER_CDB_JOB_ID}/artifacts/raw/generated/CDB/deploy/${STATION}.json?inline=false"
echo "Artifact URL: ${CDB_JSON_URL}"
if [ "${STATION}" == "dts-lab" ]; then
# dts-lab test station
HOSTNAME="dts-lab.lofar.net"
else
# core/remote station
HOSTNAME="${STATION}c.control.lofar"
fi
nomad job dispatch -address="http://${HOSTNAME}:4646" dsconfig -meta cdb_json_url="${CDB_JSON_URL}"
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
3
−
1
View file @
f7b46ea3
...
...
@@ -160,6 +160,8 @@ render_CDB:
mkdir -p generated/CDB/deploy
echo "${CI_JOB_ID}" > ${CI_PROJECT_DIR}/generated/render-cdb-job-id.txt
cd CDB/
for STATION in ${LOFAR2_STATIONS}; do
...
...
@@ -182,7 +184,7 @@ render_CDB:
expose_as
:
'
deployment
cdb
configs'
name
:
deploy-cdb
paths
:
-
generated/
CDB/deploy/
-
generated/
# Collect services from this repo, to deploy as Nomad jobs on a station
render_levant
:
...
...
This diff is collapsed.
Click to expand it.
infra/jobs/station/dsconfig.levant.nomad
+
14
−
0
View file @
f7b46ea3
...
...
@@ -15,6 +15,20 @@ job "dsconfig" {
mode
=
"bridge"
}
task
"wait-for-db"
{
lifecycle
{
hook
=
"prestart"
sidecar
=
false
}
driver
=
"docker"
config
{
image
=
"[[ $.registry.astron.url ]]/busybox:latest"
command
=
"sh"
args
=
[
"-c"
,
"while ! nc -z tango.service.consul 10000; do sleep 1; done"
]
}
}
task
"dsconfig"
{
driver
=
"docker"
...
...
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