Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Data Logistics Service
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
eFlows4HPC WP2
Data Logistics Service
Commits
8fd9ffd4
Commit
8fd9ffd4
authored
3 years ago
by
Maria Petrova-El Sayed
Browse files
Options
Downloads
Patches
Plain Diff
Deploy DLS as user mpetrova
parent
16e89efd
No related branches found
No related tags found
No related merge requests found
Pipeline
#85407
passed
3 years ago
Stage: test
Stage: deploy
Stage: cleanup
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/cloudinit.yml
+6
-6
6 additions, 6 deletions
scripts/cloudinit.yml
scripts/deployment.sh
+15
-13
15 additions, 13 deletions
scripts/deployment.sh
with
21 additions
and
19 deletions
scripts/cloudinit.yml
+
6
−
6
View file @
8fd9ffd4
...
...
@@ -29,7 +29,7 @@ users:
-
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCRsldcJ7kiksXTn2hivYfZ+Y9gziBWaMPpfVPNVlPi5XizbMurXAPQ3gUbBTDRp+Plf5LiXAfFNBdPTACb5ymFhIUKj/3sJhxc92uvJktLyjObAZ74ImBzDhVwGzs/cKhWc2otFgyMwrfPuIxdarCiLTjmG+dZ0a+IZbWta241kc3qBPjuqKK/LSZOK/Jx9Dl4rURs780GdcoA7Q2r6I6Bq8m0Cpfl2Otwi5Vr4d6hxWrl8D100ssLctn4FlL4SzVHPyZJVNeFJYQv1boJwldHBST8tJ0r0KC1V5CboB+Rdh1b/Qy1y6l/y9fPX+axFSGIIxSb6egRSwcE89f3kCC1 cboettcher@zam024
-
name
:
m
ari
a
-
name
:
m
petrov
a
gecos
:
Maria Petrova-El Sayed
groups
:
sudo, docker
shell
:
/bin/bash
...
...
@@ -49,11 +49,11 @@ users:
runcmd
:
-
sudo pip3 install docker-compose
-
cd /home/maria
-
'
git
clone
https://gitlab.jsc.fz-juelich.de/eflows4hpc-wp2/data-logistics-service.git
./data-logistics-service'
-
cd /home/mpetrova
-
echo "Current user
:
$(whoami)"
-
sudo -u mpetrova git clone https://gitlab.jsc.fz-juelich.de/eflows4hpc-wp2/data-logistics-service.git ./data-logistics-service
-
cd ./data-logistics-service
-
sudo git checkout mptest
-
cd ..
-
git checkout mptest
#only for testing
# - mkdir airflow
# - cd airflow
# - mkdir -p ./dags ./logs ./plugins ./config ./templates
...
...
@@ -72,6 +72,6 @@ runcmd:
# - echo "Bringing up the docker containers"
# - docker-compose -f ./dockers/docker-compose.yaml --project-directory ../airflow --verbose up airflow-init
# - docker-compose -f ./dockers/docker-compose.yaml --project-directory ../airflow up -d
-
/bin/bash data-logistics-service/scripts/deployment.sh /home/m
ari
a /home/m
ari
a/data-logistics-service
-
sudo -u mpetrova
/bin/bash data-logistics-service/scripts/deployment.sh /home/m
petrov
a /home/m
petrov
a/data-logistics-service
final_message
:
"
The
system
is
finally
up,
after
$UPTIME
seconds"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
scripts/deployment.sh
+
15
−
13
View file @
8fd9ffd4
...
...
@@ -5,32 +5,34 @@
# deployment.sh <project_directory> <git_directory> [API_URL] [SERVER_DOMAIN]
OLD_DIR
=
`
pwd
`
GIT_REPO
=
$
OLD_DIR
/data-logistics-service
GIT_REPO
=
$
HOME
/data-logistics-service
echo
"DEBUG_1
$0
$1
$2
$3
$4
"
if
[
-z
${
1
+x
}
]
;
then
NEW_DIR
=
`
pwd
`
;
else
NEW_DIR
=
$1
;
fi
if
[
-z
${
2
+x
}
]
;
then
GIT_REPO
else
GIT_REPO
=
$2
;
fi
#if null (var + trim empty strings)
if
[
-z
${
1
+x
}
]
;
then
ENTRYPOINT
=
`
pwd
`
;
else
ENTRYPOINT
=
$1
;
fi
if
[
-z
${
2
+x
}
]
;
then
echo
"No user input for starting repository location. Default value:
$GIT_REPO
"
;
else
GIT_REPO
=
$2
;
fi
# if [ -z ${2+x} ]; then API_URL=https://datacatalog.fz-juelich.de/; else API_URL=$2; fi
# if [ -z ${3+x} ]; then SERVER_DOMAIN=datacatalog.fz-juelich.de; else SERVER_DOMAIN=$3; fi
echo
"DEBUG_2
$0
$1
$2
$3
$4
"
echo
"DEBUG values: OLD_DIR=
$OLD_DIR
,
NEW_DIR=
$NEW_DIR
and GIT_REPO=
$GIT_REPO
"
echo
"DEBUG values: OLD_DIR=
$OLD_DIR
,
ENTRYPOINT_DIR=
$ENTRYPOINT
and GIT_REPO=
$GIT_REPO
"
cd
$
NEW_DIR
`
mkdir
-p
airflow
`
cd
$
ENTRYPOINT
mkdir
-p
airflow
cd
airflow
AIRFLOW_DIR
=
`
pwd
`
echo
"Project dir is:
$AIRFLOW_DIR
"
echo
"User in use is:
$(
whoami
)
"
#DEBUG prints
echo
"Project dir is set to:
$AIRFLOW_DIR
"
echo
"Proceeding as user:
$(
whoami
)
"
# Make the necessary folders for the airflow artefacts and copy the corresponging content
`
mkdir
-p
./dags ./logs ./plugins ./config ./templates
`
mkdir
-p
./dags ./logs ./plugins ./config ./templates
cd
$GIT_REPO
`
cp
dags/
*
$AIRFLOW_DIR
/dags
`
`
cp
-r
plugins/
*
$AIRFLOW_DIR
/plugins
`
`
cp
config/
*
$AIRFLOW_DIR
/config
`
`
cp
templates/
*
$AIRFLOW_DIR
/templates
`
cp
dags/
*
$AIRFLOW_DIR
/dags
cp
-r
plugins/
*
$AIRFLOW_DIR
/plugins
cp
config/
*
$AIRFLOW_DIR
/config
cp
templates/
*
$AIRFLOW_DIR
/templates
# Setup environment variables and install requirements
echo
-e
"AIRFLOW_UID=
$(
id
-u
)
"
>
$GIT_REPO
/dockers/.env
export
AIRFLOW_UID
=
$(
id
-u
)
...
...
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