UNCLASSIFIED

Commit d200e929 authored by Nigel Stolting's avatar Nigel Stolting
Browse files

First commit for Peaxy hpac-em application

parent 258986a3
Pipeline #157283 passed with stages
in 67 minutes and 32 seconds
ARG BASE_REGISTRY=registry1.dsop.io
ARG BASE_IMAGE=redhat/ubi/ubi8
ARG BASE_TAG=8.3
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
ARG VERSION=1.0.0.0
ARG USERNAME=alpha
ARG GROUPNAME=alpha
ARG UID=1000
ARG GID=1000
USER root
RUN groupadd --gid $GID $GROUPNAME && \
useradd --uid $UID --gid $GID -m $USERNAME
RUN mkdir /app && \
mkdir ./app/dependencies
COPY --chown=1000:1000 \
LICENSE \
README.md \
hpac.tar.gz \
hpac_dependencies.tar.gz \
./
RUN yum install -y python3.8 openssl-devel bzip2-devel sqlite-devel && \
yum clean all && \
rm -rf /var/cache/dnf && \
mv /hpac.tar.gz /app/hpac.tar.gz && \
mv hpac_dependencies.tar.gz /app/ && \
mv LICENSE /app/ && \
mv README.md /app/ && \
tar -zxf /app/hpac.tar.gz --directory /app/ && \
chown -R $UID:$GID /app/ && \
chmod a+x /app/server.pyc && \
rm /app/hpac.tar.gz
USER $UID:$GID
RUN tar -zxf ./app/hpac_dependencies.tar.gz --directory ./app/dependencies && \
python3 -m pip install --user --no-warn-script-location --no-index --find-links ./app/dependencies -r ./app/dependencies/requirements.txt && \
rm -rf /dependencies && \
rm /app/hpac_dependencies.tar.gz
WORKDIR /app
HEALTHCHECK --interval=12s --timeout=10s \
CMD curl --fail http://localhost:6310/actuator/health || exit 1
ENTRYPOINT ["/usr/bin/python3"]
CMD ["server.pyc"]
For information on Peaxy licensing and pricing options please contact us at:
Email: info@peaxy.net
Phone: (408) 441-6500
Website: https://www.peaxy.net/
# peaxy-hpac-em
# HPAC-EM
peaxy hpac-em
\ No newline at end of file
Emulates HPAC (High Pressure Air Compressor) telemetry data using a REST API.
Sensors are enumerated within an embedded json file, with their average, high and low values and possible noise sources. Noise sources can be either gaussian, white or sawtooth, and they are additive. There is no limit to the number of noise sources, though having more sources than types of sources doesn't really make sense.
If the sensors have error codes associated with them for going out of range, those are thrown if and when the sensors are out of range.
---
## Container Requirements
**Software Requirements**:
**Memory Requirements**: 512 MiB RAM
**CPU Requirements**: 1 CPU core from a 2.4GHz Intel Core i5-6300U or equivalent processor.
**Disk Requirements**: 1 GiB of local storage
**Storage volume Requirements**: HPAC-EM doesn't require a storage volume directly. Data generated by the HPAC-EM sends data to the Peaxy Neptune application where it will be stored within a Postgres database.
---
## API Overview
This service runs on port `6310`.
#### POST /start/{id}/{data}
Starts the HPAC simulator
**request params:**
* `id` -- The id of HPAC to emulate, usually `1`
* `data` -- The name of the data file. Currently, this must be set to `hpac_75B.json`
**response**: 204
**curl example**: `curl -X POST http://hpac-em.gemini:6310/start/1/hpac_75B.json`
#### POST /stop/{id}
Stops the HPAC simulator
**request params:**
* `id` -- The id of HPAC to stop
**response**: 204
**curl example**: `curl -X POST http://hpac-em.gemini:6310/stop/1`
---
## Noise Sources
To improve the realism several noise sources have been emedded within the application.
1. **Gaussian noise**
Supply a standard deviation for this source. The noise component is centered at zero.
2. **White noise**
Supply a minimum and a maximum for this souce. The noise is not necessarily centered at zero.
3. **Sawtooth noise**
This is supposed to prod values to go out of range --- *i.e.* drifting either high or low --- and then bring them back under control after a time. This noise source, also may be asynchronously reset, if the allow_reset flag is `true` (it is `false` by default). Only linear drift is specified at this time. The user specifies the drift as a partial derivative, in units of value/time. The time is interpretated by the program as kiloseconds and derivatives may be positive or negative. The user also specifies a reset criterion that, after the noise exceeds this criterion, it will be reset to zero.
---
For more information on licensing and pricing options please contact us at:
Email: info@peaxy.net
Phone: +1 408 441-6500
Website: https://www.peaxy.net
---
apiVersion: v1
# The repository name in registry1, excluding /ironbank/
name: "peaxy/hpac-em"
# List of tags to push for the repository in registry1
# The most specific version should be the first tag and will be shown
# on ironbank.dsop.io
tags:
- "1.0.0.0"
- "latest"
# Build args passed to Dockerfile ARGs
args:
BASE_IMAGE: "redhat/ubi/ubi8"
BASE_TAG: "8.3"
# Docker image labels
labels:
org.opencontainers.image.title: "hpac-em"
## Human-readable description of the software packaged in the image
org.opencontainers.image.description: "HPAC emulator"
## License(s) under which contained software is distributed
org.opencontainers.image.licenses: "Contact arl-aws@peaxy.net"
## URL to find more information on the image
org.opencontainers.image.url: "https://peaxy.net/"
## Name of the distributing entity, organization or individual
org.opencontainers.image.vendor: "Peaxy, Inc"
org.opencontainers.image.version: "1.0.0.0"
## Keywords to help with search (ex. "cicd,gitops,golang")
# mil.dso.ironbank.image.keywords: "user management"
## This value can be "opensource" or "commercial"
mil.dso.ironbank.image.type: "commercial"
## Product the image belongs to for grouping multiple images
mil.dso.ironbank.product.name: "hpac-em"
# List of resources to make available to the offline build context
resources:
- filename: hpac.tar.gz
url: s3://peaxy-core/hpac-em/hpac.tar.gz
validation:
type: sha256
value: 1cf5266218b70ae1b49a4df9332a632d37ba936564c8c3dd8f3b9c3a835aea38
auth:
id: peaxy-credential
region: us-east-1
- filename: hpac_dependencies.tar.gz
url: s3://peaxy-core/hpac-em/hpac_dependencies.tar.gz
validation:
type: sha256
value: 4587a4d10d1a707bb4e042969bad523892016359a24f1c35e949df05f1a53c78
auth:
id: peaxy-credential
region: us-east-1
# List of project maintainers
maintainers:
- name: "Nigel Stolting"
username: "nstolting"
email: "nstolting@peaxy.net"
- name: "Kyle Tran"
username: "ktran"
email: "ktran@peaxy.net"
- name: "Joshua Ghallagher"
username: "JGhallagher"
email: "JGhallagher@peaxy.net"
- name: "Jeff Weatherford"
username: "jweatherford"
email: "jweatherford@oteemo.com"
cht_member: true
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment