From d43f5a3b886409c3d5efc5d90349db32b051c9c0 Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines Date: Mon, 22 Apr 2024 13:16:07 +0200 Subject: [PATCH] Include deploy script documentation --- doc/gettingstarted/howtorun.md | 54 ++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/doc/gettingstarted/howtorun.md b/doc/gettingstarted/howtorun.md index bf8100c..8858bfd 100644 --- a/doc/gettingstarted/howtorun.md +++ b/doc/gettingstarted/howtorun.md @@ -1,3 +1,7 @@ +- [Downloading the project](#downloading-the-project) + - [1. Create a folder to download the project](#1-create-a-folder-to-download-the-project) + - [2. Download the deployment script](#2-download-the-deployment-script) + - [3. Run the deployment script](#3-run-the-deployment-script) - [Run All CAPIF Services locally with Docker images](#run-all-capif-services-locally-with-docker-images) - [Run All CAPIF Services locally with Docker images and deploy monitoring stack](#run-all-capif-services-locally-with-docker-images-and-deploy-monitoring-stack) - [Run each service using Docker](#run-each-service-using-docker) @@ -5,6 +9,52 @@ Capif services are developed under [services folder](https://labs.etsi.org/rep/ocf/capif/-/tree/main/services). +### Downloading the project + +You can easily download CAPIF to run in local environment following next steps: + +#### 1. Create a folder to download the project + +``` +mkdir OpenCAPIF + +cd OpenCAPIF +``` + +#### 2. Download the deployment script + +Download the deployment / environment preparation script: + + +``` +wget https://labs.etsi.org/rep/ocf/capif/-/raw/staging/deploy.sh +``` + +Make it executable: + +``` +chmod +x deploy.sh +``` + +#### 3. Run the deployment script + +This script selects the branch for capif repository project to pull from. + +If you run the script without selecting a branch the the main branch is going to be selected. + +We recommend: + +* **main** branch for the most stable experience and **staging** branch for an experience with the latest features (for staging branch installation, it is strongly advisable that you may as well follow the staging documentation) + +``` +# ./deploy.sh [branch to fetch] [true or false (default) to install monitoring stack or not] + +sudo ./deploy.sh staging +``` + + +> **We recommend running the deploy.sh script with root permissions! In other case, some directories may not be accessible by the project building tools and hinder the smooth installation.** + ### Run All CAPIF Services locally with Docker images To run using docker and docker compose, version 2.10 or higher, you must ensure you have those tools installed in your machine. Also to simplify the process, we have 3 scripts allowing docker images to deploy, check and cleanup. @@ -16,7 +66,7 @@ To run CAPIF APIs locally using docker and docker-compose you can use run.sh scr Usage: ./run.sh -c : Setup different hostname for capif - -m : Clean monitoring service + -m : Launch monitoring service -h : show this help ``` This script builds and runs all services using docker images, including mongodb and nginx locally and in the background, and imports ca.crt to nginx. By default monitoring is not activated and Nginx is deployed use **capifcore** as a hostname. @@ -30,7 +80,7 @@ Some examples of use: ./run.sh -c opencapif.etsi.org # opencapif.etsi.org as CAPIF_HOSTNAME and monitoring activated -./run.sh -c opencapif.etsi.org -m true +./run.sh -c opencapif.etsi.org -m ``` -- GitLab