Commit c0a8e6dd authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Merge branch 'minor_fix_remote_scripts' into 'staging'

Minor fix remote scripts

See merge request !70
parents 51078a90 f4f057e2
Loading
Loading
Loading
Loading
Loading
+1 −15
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
- [Common API Framework (CAPIF)](#common-api-framework-capif)
- [CAPIF\_API\_Services](#capif_api_services)
- [Documentation](#documentation)
- [Install and Run](#install-and-run)
  - [How to run CAPIF services in this Repository](#how-to-run-capif-services-in-this-repository)
    - [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)
@@ -25,20 +26,6 @@ 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.
@@ -172,4 +159,3 @@ Frequently asked questions can be found here: [FAQ Directory]
[Testing with Robot Framework]: ./docs/testing_with_robot/README.md  "Testing with Robot Framework"
[FAQ Directory]: https://ocf.etsi.org/documentation/latest/FAQ/ "FAQ Url"
[OCF Documentation]: https://ocf.etsi.org/documentation/latest/ "OCF Documentation"
+2 −0
Original line number Diff line number Diff line
@@ -123,6 +123,8 @@ helm $KUBECONFIG upgrade --install -n $CAPIF_NAMESPACE $CAPIF_NAME_VERSION_CHART
--set mock-server.ingress.hosts[0].paths[0].path="/" \
--set mock-server.ingress.hosts[0].paths[0].pathType="Prefix" \
--set mock-server.env.logLevel="DEBUG" \
--set mock-server.service.port=$MOCK_SERVER_PORT \
--set mock-server.livenessProbe.tcpSocket.port=$MOCK_SERVER_PORT \
--set mongo-register.persistence.storageClass=$CAPIF_STORAGE_CLASS \
--set mongo-register.persistence.storage=$CAPIF_MONGO_REGISTER_STORAGE_SIZE \
--set mongo-register.extraFlags[0]="--repair" \
+2 −0
Original line number Diff line number Diff line
@@ -94,6 +94,8 @@ export PROMETHEUS_URL="http://$MONITORING_SERVICE_NAME-prometheus.$MONITORING_NA
export VAULT_INTERNAL_HOSTNAME="$VAULT_SERVICE_NAME.$VAULT_NAMESPACE.svc.cluster.local"
export VAULT_PORT="8200"
export VAULT_ACCESS_TOKEN="dev-only-token"
## Only for testing purpouses, configuration of mock-server port
export MOCK_SERVER_PORT="9100"

######### POST PROCESSING VARIABLES SET ########
### To deploy in other environment we need to setup urls according to it and also using specific kubeconfig:
+6 −0
Original line number Diff line number Diff line
#!/bin/bash

# Directories variables setup (no modification needed)
export IMAGE_SCRIPTS_DIR=$(dirname "$(readlink -f "$0")")
export TOOLS_DIR=$(dirname "$IMAGE_SCRIPTS_DIR")
export CAPIF_BASE_DIR=$(dirname "$TOOLS_DIR")
 No newline at end of file
+23 −0
Original line number Diff line number Diff line
#!/bin/bash
source $(dirname "$(readlink -f "$0")")/common.sh

DOCKER_ROBOT_IMAGE=labs.etsi.org:5050/ocf/capif/robot-tests-image
DOCKER_ROBOT_IMAGE_VERSION=1.0

TEST_FOLDER=$CAPIF_BASE_DIR/tests
RESULT_FOLDER=$CAPIF_BASE_DIR/results
ROBOT_DOCKER_FILE_FOLDER=$TOOLS_DIR/robot

cd $ROBOT_DOCKER_FILE_FOLDER
docker login labs.etsi.org:5050

docker build --no-cache --platform linux/amd64 -t ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION}-amd64 .
docker push ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION}-amd64

docker build --no-cache --platform linux/arm64 -t ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION}-arm64 .
docker push ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION}-arm64

docker manifest create ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION} \
  --amend ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION}-amd64 \
  --amend ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION}-arm64
docker manifest push ${DOCKER_ROBOT_IMAGE}:${DOCKER_ROBOT_IMAGE_VERSION}
Loading