StarlingX/Containers/Applications/app-ptp-notification
Application: ptp-notification-armada-app
Source
Building
Build helm charts and application tarball
- From the Debian Build environment:
build-pkgs -p ptp-notification-helm,python3-k8sapp-ptp-notification,stx-ptp-notification-helm
The final output will be under stx-ptp-notification-helm and named "stx-ptp-notification-helm_<version>_amd64.deb"
Build container images
The ptp-notification application builds four images:
- locationservice-base
- notificationservice-base
- notificationservice-base-v2
- notificationclient-base
Build wheel tarball
- From the Debian Build environment:
cd $MY_REPO/build-tools/build-wheels ./build-wheel-tarball.sh --keep-image --cache --os debian
Build container images
$MY_REPO/build-tools/build-docker-images/build-stx-images.sh \ --base starlingx/stx-debian:master-stable-latest \ --os debian \ --wheels $MY_WORKSPACE/std/build-wheels-debian-stable/stx-debian-stable-wheels.tar \ --cache \ --only <image name>
Testing
PTP Notification monitors the status of the PTP time synchronization on a StarlingX host and provides push notifications to subscribed clients when the synchronization state changes.
Setup and installation
Apply host labels to allow ptp-notification pods to be scheduled.
# Apply the "ptp-notification" label to each host that requires PTP monitoring. system host-label-assign controller-0 ptp-notification=true
# Apply the "ptp-registration" label to at least one host so that the registration service can run system host-label-assign controller-0 ptp-registration=true
Upload the application and verify.
system application-upload /usr/local/share/applications/helm/ptp-notification-<version>.tgz system application-list
Set application overrides. Consult the StarlingX documentation for information on what overrides may be required: Install ptp-notification
# Create an override yaml file with required overrides, then apply it system helm-override-update ptp-notification ptp-notification notification --values notification-override.yaml
Apply ptp-notification and verify.
system application-apply ptp-notification system application-list
Deploy a notificationclient pod. Consult the StarlingX documentation for instructions: Integrate notificationclient sidecar
Generate an appropriate deployment yaml file using the StarlingX instructions and apply it.
kubectl apply -f notificationclient.yaml
Testing the ptp-notification API
Verify ptp-notification operation using curl to interact with the API. See the example API calls in the StarlingX documentation: ptp-notification examples