From d23723acd915540db4ed1d4a9b2dd8cee69bb68d Mon Sep 17 00:00:00 2001 From: Stavros Charismiadis Date: Mon, 15 Apr 2024 16:02:34 +0300 Subject: [PATCH 1/2] First draft for deloy script --- deploy.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 deploy.sh diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..5b483bd --- /dev/null +++ b/deploy.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +dirlocation=`pwd`/. +# If no argument is provided, use "main" as the default value +default_branch="main" +default_mon="false" +branch="${1:-$default_branch}" +monitoring="${2:-default_mon}" + +echo "Selected branch: $branch" +echo "We're working with $dirlocation" +cd $dirlocation + + +updaterepo(){ + cd $dirlocation + echo "Build " $1 + if [ ! -d $1 ]; then + git clone https://labs.etsi.org/rep/ocf/$1.git + fi + + cd $1/ + git checkout $branch + git pull +} + +updaterepo capif + +cd $dirlocation +cd capif/services + +./run.sh -m $monitoring \ No newline at end of file -- GitLab From 614d40c7b492926a968a11f8fa610b2466329e2d Mon Sep 17 00:00:00 2001 From: Stavros-Anastasios Charismiadis Date: Mon, 15 Apr 2024 16:47:06 +0300 Subject: [PATCH 2/2] Add instructions on README.md --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index a43067e..358015b 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,23 @@ This repository has the python-flask Mockup servers created with openapi-generat Please refer to [OCF Documentation] for more detailed information. + +# Install and Run +### (to be added in Getting Started section of Documentation) +``` +mkdir OpenCAPIF + +cd OpenCAPIF + +# The link must be changed when finally merged with the default branch and be permanent +wget https://labs.etsi.org/rep/ocf/capif/-/raw/OCF19-local-installation-of-capif-downloading-script/deploy.sh + +chmod +x deploy.sh + +# ./deploy.sh [branch to fetch] [true or false (default) to install monitoring stack or not] +./deploy.sh staging +``` + ## How to run CAPIF services in this Repository Capif services are developed under /service/ folder. -- GitLab