Skip to content

Instantly share code, notes, and snippets.

View lucamaf's full-sized avatar

Luca Ferrari lucamaf

View GitHub Profile
@lucamaf
lucamaf / gist:a559ac553cc58f0be24f90857596a47d
Created September 10, 2024 06:31
testing out podman rootless access to webcam
testing out with centos9 stream and ffmpeg
$ podman run --rm -p 5000:5000 --name=python-defect-rec -e MQTT_BROKER_URL=192.168.1.48 -e VIDEO_DEV=1 --device=/dev/video1:/dev/video1:rwm --group-add=keep-groups localhost/python-defect-rec:latest
Inside the container:
# ls: cannot access '/dev/video1': Permission denied
# ?????????? ? ? ? ? ? video1
$ podman run --rm -p 5000:5000 --name=python-defect-rec -e MQTT_BROKER_URL=192.168.1.48 -e VIDEO_DEV=1 --device=/dev/video1:/dev/video1:rwm --security-opt label=disable --group-add keep-groups localhost/python-defect-rec:latest
Inside the container can see dev video1:
Added 'admin' to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json', restart server to load user
-b 0.0.0.0
=========================================================================
Using PostgreSQL database
=========================================================================
14:27:40,667 INFO [org.jboss.modules] (CLI command executor) JBoss Modules version 1.12.0.Final
14:27:40,737 INFO [org.jboss.msc] (CLI command executor) JBoss MSC version 1.4.13.Final
Create a routing rule like this one and name it virtual-service-reviews-test-v2.yaml:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: reviews
spec:
hosts:
- reviews
http:
# after install istio with the shown CRD.yaml file please follow the instructions here.
# UPDATE SECURITY CONTEXT CONSTRAINTS
# To add the service account used by Bookinfo application to anyuid and privileged SCCs in "bookinfo" namespace:
oc adm policy add-scc-to-user anyuid -z default -n bookinfo
oc adm policy add-scc-to-user privileged -z default -n bookinfo
# DEPLOYING BOOKINFO APPLICATION
# download bookinfo.yaml into your local directory:
curl -o bookinfo.yaml https://raw.githubusercontent.com/Maistra/bookinfo/master/bookinfo.yaml
# commands to stand an istio test environment. The following will deploy the CentOS-based Istio community images.
# Download istiooc from: https://github.com/Maistra/origin/releases. Then execute the following:
# Create a Minimum Installation Custom Resource file as here:
apiVersion: "istio.openshift.com/v1alpha1"
kind: "Installation"
metadata:
name: "istio-installation"
namespace: istio-operator
myWebhook:
'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':
post:
requestBody:
description: Callback payload
content:
'application/json':
schema:
$ref: '#/components/schemas/SomePayload'
responses:
paths:
/users/{id}:
parameters:
- name: id
in: path
required: true
description: the user identifier, as userId
schema:
type: string
get: