Loading src/tests/tools/simap_datastore/Dockerfile +7 −7 Original line number Original line Diff line number Diff line Loading @@ -43,18 +43,18 @@ RUN python3 -m pip install --upgrade 'setuptools==79.0.0' 'wheel==0.45.1' RUN python3 -m pip install --upgrade 'pip-tools==7.3.0' RUN python3 -m pip install --upgrade 'pip-tools==7.3.0' # Create component sub-folders, get specific Python packages # Create component sub-folders, get specific Python packages RUN mkdir -p /var/teraflow/simap_server/ RUN mkdir -p /var/teraflow/simap_datastore/ WORKDIR /var/teraflow/simap_server/ WORKDIR /var/teraflow/simap_datastore/ COPY src/common/tools/rest_conf/server/requirements.in ./requirements.in COPY src/common/tools/rest_conf/server/requirements.in ./requirements.in RUN pip-compile --quiet --output-file=requirements.txt requirements.in RUN pip-compile --quiet --output-file=requirements.txt requirements.in RUN python3 -m pip install -r requirements.txt RUN python3 -m pip install -r requirements.txt # Add component files into working directory # Add component files into working directory COPY src/common/tools/rest_conf/server/restconf_server/ ./simap_server/ COPY src/common/tools/rest_conf/server/restconf_server/ ./simap_datastore/ COPY src/tests/tools/simap_server/yang/*.yang ./yang/ COPY src/tests/tools/simap_datastore/yang/*.yang ./yang/ COPY src/tests/tools/simap_server/startup.json ./startup.json COPY src/tests/tools/simap_datastore/startup.json ./startup.json # Configure RESTCONF Server # Configure RESTCONF Datastore ENV RESTCONF_PREFIX="/restconf" ENV RESTCONF_PREFIX="/restconf" ENV YANG_SEARCH_PATH="./yang" ENV YANG_SEARCH_PATH="./yang" ENV STARTUP_FILE="./startup.json" ENV STARTUP_FILE="./startup.json" Loading @@ -63,4 +63,4 @@ ENV STARTUP_FILE="./startup.json" ENV FLASK_ENV="production" ENV FLASK_ENV="production" # Start the service # Start the service ENTRYPOINT ["gunicorn", "--workers", "1", "--worker-class", "eventlet", "--bind", "0.0.0.0:8080", "simap_server.app:app"] ENTRYPOINT ["gunicorn", "--workers", "1", "--worker-class", "eventlet", "--bind", "0.0.0.0:8080", "simap_datastore.app:app"] src/tests/tools/simap_datastore/README.md +6 −6 Original line number Original line Diff line number Diff line # RESTCONF/SIMAP Server # RESTCONF/SIMAP Datastore This server implements a basic RESTCONF Server that can load, potentially, any YANG data model. This component implements a basic RESTCONF datastore that can load, potentially, any YANG data model. In this case, it is prepared to load a SIMAP Server based on IETF Network Topology + custom SIMAP Telemetry extensions. In this case, it is prepared to load a SIMAP datastore based on IETF Network Topology + custom SIMAP Telemetry extensions. ## Build the RESTCONF/SIMAP Server Docker image ## Build the RESTCONF/SIMAP Datastore Docker image ```bash ```bash ./build.sh ./build.sh ``` ``` ## Deploy the RESTCONF/SIMAP Server ## Deploy the RESTCONF/SIMAP Datastore ```bash ```bash ./deploy.sh ./deploy.sh ``` ``` Loading @@ -19,7 +19,7 @@ In this case, it is prepared to load a SIMAP Server based on IETF Network Topolo ./run_client.sh ./run_client.sh ``` ``` ## Destroy the RESTCONF/SIMAP Server ## Destroy the RESTCONF/SIMAP Datastore ```bash ```bash ./destroy.sh ./destroy.sh ``` ``` src/tests/tools/simap_datastore/build.sh +4 −4 Original line number Original line Diff line number Diff line Loading @@ -16,7 +16,7 @@ # Make folder containing the script the root folder for its execution # Make folder containing the script the root folder for its execution cd $(dirname $0)/../../../../ cd $(dirname $0)/../../../../ # Build image SIMAP Server # Build image SIMAP Datastore docker buildx build -t simap-server:test -f ./src/tests/tools/simap_server/Dockerfile . docker buildx build -t simap-datastore:test -f ./src/tests/tools/simap_datastore/Dockerfile . #docker tag simap-server:test localhost:32000/tfs/simap-server:test #docker tag simap-datastore:test localhost:32000/tfs/simap-datastore:test #docker push localhost:32000/tfs/simap-server:test #docker push localhost:32000/tfs/simap-datastore:test src/tests/tools/simap_datastore/deploy.sh +5 −5 Original line number Original line Diff line number Diff line Loading @@ -15,25 +15,25 @@ # Cleanup # Cleanup docker rm --force simap-server docker rm --force simap-datastore # Create SIMAP Server with InfluxDB configuration # Create SIMAP Datastore with InfluxDB configuration # INFLUXDB_HOST points to the host machine where InfluxDB is running # INFLUXDB_HOST points to the host machine where InfluxDB is running # Use --add-host to make the host accessible from inside the container # Use --add-host to make the host accessible from inside the container docker run --detach --name simap-server \ docker run --detach --name simap-datastore \ --publish 8080:8080 \ --publish 8080:8080 \ --add-host=host.docker.internal:host-gateway \ --add-host=host.docker.internal:host-gateway \ --env INFLUXDB_HOST="host.docker.internal" \ --env INFLUXDB_HOST="host.docker.internal" \ --env INFLUXDB_PORT=8181 \ --env INFLUXDB_PORT=8181 \ --env INFLUXDB_DATABASE=simap_telemetry \ --env INFLUXDB_DATABASE=simap_telemetry \ simap-server:test simap-datastore:test sleep 2 sleep 2 # Dump SIMAP Server container # Dump SIMAP Datastore container docker ps -a docker ps -a Loading src/tests/tools/simap_datastore/destroy.sh +1 −1 Original line number Original line Diff line number Diff line Loading @@ -15,7 +15,7 @@ # Cleanup # Cleanup docker rm --force simap-server docker rm --force simap-datastore # Dump Docker containers # Dump Docker containers Loading Loading
src/tests/tools/simap_datastore/Dockerfile +7 −7 Original line number Original line Diff line number Diff line Loading @@ -43,18 +43,18 @@ RUN python3 -m pip install --upgrade 'setuptools==79.0.0' 'wheel==0.45.1' RUN python3 -m pip install --upgrade 'pip-tools==7.3.0' RUN python3 -m pip install --upgrade 'pip-tools==7.3.0' # Create component sub-folders, get specific Python packages # Create component sub-folders, get specific Python packages RUN mkdir -p /var/teraflow/simap_server/ RUN mkdir -p /var/teraflow/simap_datastore/ WORKDIR /var/teraflow/simap_server/ WORKDIR /var/teraflow/simap_datastore/ COPY src/common/tools/rest_conf/server/requirements.in ./requirements.in COPY src/common/tools/rest_conf/server/requirements.in ./requirements.in RUN pip-compile --quiet --output-file=requirements.txt requirements.in RUN pip-compile --quiet --output-file=requirements.txt requirements.in RUN python3 -m pip install -r requirements.txt RUN python3 -m pip install -r requirements.txt # Add component files into working directory # Add component files into working directory COPY src/common/tools/rest_conf/server/restconf_server/ ./simap_server/ COPY src/common/tools/rest_conf/server/restconf_server/ ./simap_datastore/ COPY src/tests/tools/simap_server/yang/*.yang ./yang/ COPY src/tests/tools/simap_datastore/yang/*.yang ./yang/ COPY src/tests/tools/simap_server/startup.json ./startup.json COPY src/tests/tools/simap_datastore/startup.json ./startup.json # Configure RESTCONF Server # Configure RESTCONF Datastore ENV RESTCONF_PREFIX="/restconf" ENV RESTCONF_PREFIX="/restconf" ENV YANG_SEARCH_PATH="./yang" ENV YANG_SEARCH_PATH="./yang" ENV STARTUP_FILE="./startup.json" ENV STARTUP_FILE="./startup.json" Loading @@ -63,4 +63,4 @@ ENV STARTUP_FILE="./startup.json" ENV FLASK_ENV="production" ENV FLASK_ENV="production" # Start the service # Start the service ENTRYPOINT ["gunicorn", "--workers", "1", "--worker-class", "eventlet", "--bind", "0.0.0.0:8080", "simap_server.app:app"] ENTRYPOINT ["gunicorn", "--workers", "1", "--worker-class", "eventlet", "--bind", "0.0.0.0:8080", "simap_datastore.app:app"]
src/tests/tools/simap_datastore/README.md +6 −6 Original line number Original line Diff line number Diff line # RESTCONF/SIMAP Server # RESTCONF/SIMAP Datastore This server implements a basic RESTCONF Server that can load, potentially, any YANG data model. This component implements a basic RESTCONF datastore that can load, potentially, any YANG data model. In this case, it is prepared to load a SIMAP Server based on IETF Network Topology + custom SIMAP Telemetry extensions. In this case, it is prepared to load a SIMAP datastore based on IETF Network Topology + custom SIMAP Telemetry extensions. ## Build the RESTCONF/SIMAP Server Docker image ## Build the RESTCONF/SIMAP Datastore Docker image ```bash ```bash ./build.sh ./build.sh ``` ``` ## Deploy the RESTCONF/SIMAP Server ## Deploy the RESTCONF/SIMAP Datastore ```bash ```bash ./deploy.sh ./deploy.sh ``` ``` Loading @@ -19,7 +19,7 @@ In this case, it is prepared to load a SIMAP Server based on IETF Network Topolo ./run_client.sh ./run_client.sh ``` ``` ## Destroy the RESTCONF/SIMAP Server ## Destroy the RESTCONF/SIMAP Datastore ```bash ```bash ./destroy.sh ./destroy.sh ``` ```
src/tests/tools/simap_datastore/build.sh +4 −4 Original line number Original line Diff line number Diff line Loading @@ -16,7 +16,7 @@ # Make folder containing the script the root folder for its execution # Make folder containing the script the root folder for its execution cd $(dirname $0)/../../../../ cd $(dirname $0)/../../../../ # Build image SIMAP Server # Build image SIMAP Datastore docker buildx build -t simap-server:test -f ./src/tests/tools/simap_server/Dockerfile . docker buildx build -t simap-datastore:test -f ./src/tests/tools/simap_datastore/Dockerfile . #docker tag simap-server:test localhost:32000/tfs/simap-server:test #docker tag simap-datastore:test localhost:32000/tfs/simap-datastore:test #docker push localhost:32000/tfs/simap-server:test #docker push localhost:32000/tfs/simap-datastore:test
src/tests/tools/simap_datastore/deploy.sh +5 −5 Original line number Original line Diff line number Diff line Loading @@ -15,25 +15,25 @@ # Cleanup # Cleanup docker rm --force simap-server docker rm --force simap-datastore # Create SIMAP Server with InfluxDB configuration # Create SIMAP Datastore with InfluxDB configuration # INFLUXDB_HOST points to the host machine where InfluxDB is running # INFLUXDB_HOST points to the host machine where InfluxDB is running # Use --add-host to make the host accessible from inside the container # Use --add-host to make the host accessible from inside the container docker run --detach --name simap-server \ docker run --detach --name simap-datastore \ --publish 8080:8080 \ --publish 8080:8080 \ --add-host=host.docker.internal:host-gateway \ --add-host=host.docker.internal:host-gateway \ --env INFLUXDB_HOST="host.docker.internal" \ --env INFLUXDB_HOST="host.docker.internal" \ --env INFLUXDB_PORT=8181 \ --env INFLUXDB_PORT=8181 \ --env INFLUXDB_DATABASE=simap_telemetry \ --env INFLUXDB_DATABASE=simap_telemetry \ simap-server:test simap-datastore:test sleep 2 sleep 2 # Dump SIMAP Server container # Dump SIMAP Datastore container docker ps -a docker ps -a Loading
src/tests/tools/simap_datastore/destroy.sh +1 −1 Original line number Original line Diff line number Diff line Loading @@ -15,7 +15,7 @@ # Cleanup # Cleanup docker rm --force simap-server docker rm --force simap-datastore # Dump Docker containers # Dump Docker containers Loading