-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-demo.sh
executable file
·76 lines (60 loc) · 2.46 KB
/
run-demo.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env bash
# -*- coding: utf-8 -*-
#
# Copyright 2017-2018 - Swiss Data Science Center (SDSC)
# A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and
# Eidgenössische Technische Hochschule Zürich (ETHZ).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -e
export KEYCLOAK_URL=${KEYCLOAK_URL:-http://keycloak.renku.build:8080}
export KEYCLOAK_ADMIN_USER=${KEYCLOAK_ADMIN_USER:-admin}
export KEYCLOAK_ADMIN_PASSWORD=${KEYCLOAK_ADMIN_PASSWORD:-admin}
export GITLAB_URL=${GITLAB_URL:-http://gitlab.renku.build}
export GITLAB_SUDO_TOKEN=${GITLAB_SUDO_TOKEN:-dummy-secret}
echo ==================================
echo Using the following env variables:
echo KEYCLOAK_URL: $KEYCLOAK_URL
echo KEYCLOAK_ADMIN_USER: $KEYCLOAK_ADMIN_USER
echo KEYCLOAK_ADMIN_PASSWORD: $KEYCLOAK_ADMIN_PASSWORD
echo GITLAB_URL: $GITLAB_URL
echo GITLAB_SUDO_TOKEN: $GITLAB_SUDO_TOKEN
echo ==================================
if [ -z "$DOCKER" ]; then
bash steps/1-check-packages.sh
source "$(pipenv --venv)/bin/activate"
fi
if ! [ -z "$DOCKER" ]; then
mkdir .ssh
ssh-keygen -t rsa -N "" -b 4096 -f ~/.ssh/id_rsa
fi
python steps/2-create-users.py
python steps/3-create-project.py
# Read the remote repository URL, and username/email of the primary user
# from the json file using python.
export REMOTE_REPO_URL=$(python -c \
"import json; print(json.load(open('.gitlab-project-data.json'))['project']['ssh_url_to_repo'])")
export PRIMARY_USER_NAME=$(python -c "
import json;
user = json.load(open('users.json'))[0];
print('{0} {1}'.format(user['firstName'], user['lastName']))
")
export PRIMARY_USER_EMAIL=$(python -c "import json; print(json.load(open('users.json'))[0]['email'])")
bash steps/4-initialize-repo.sh
bash steps/implement-reader/5-commit.sh
python steps/implement-reader/6-ku.py
bash steps/preprocess-data/7-commit.sh
python steps/preprocess-data/8-ku.py
bash steps/analyze-data/9-commit.sh
python steps/analyze-data/10-ku.py
echo Demo project setup was successful