sa-mw-dach / bobbycar Goto Github PK
View Code? Open in Web Editor NEWIoT Transportation demo using Red Hat OpenShift and Middleware technologies
License: Apache License 2.0
IoT Transportation demo using Red Hat OpenShift and Middleware technologies
License: Apache License 2.0
This is potentially a camel-k bug, but it's not my area, so I thought I'd at least mention it here ;)
I was trying the latest bobbycar on OCP 4.12.12 and noticed the camel-k pod failing with:
{"level":"error","ts":1682181551.5962222,"logger":"cmd","msg":"manager exited non-zero","error":"no matches for kind \"CronJob\" in version \"batch/v1beta1\"","stacktrace":"github.com/apache/camel-k/pkg/cmd/operator.exitOnError\n\tgithub.com/apache/camel-k/pkg/cmd/operator/operator.go:165\ngithub.com/apache/camel-k/pkg/cmd/operator.Run\n\tgithub.com/apache/camel-k/pkg/cmd/operator/operator.go:151\ngithub.com/apache/camel-k/pkg/cmd.(*operatorCmdOptions).run\n\tgithub.com/apache/camel-k/pkg/cmd/operator.go:54\ngithub.com/apache/camel-k/vendor/github.com/spf13/cobra.(*Command).execute\n\tgithub.com/apache/camel-k/vendor/github.com/spf13/cobra/command.go:856\ngithub.com/apache/camel-k/vendor/github.com/spf13/cobra.(*Command).ExecuteC\n\tgithub.com/apache/camel-k/vendor/github.com/spf13/cobra/command.go:960\ngithub.com/apache/camel-k/vendor/github.com/spf13/cobra.(*Command).Execute\n\tgithub.com/apache/camel-k/vendor/github.com/spf13/cobra/command.go:897\nmain.main\n\tcommand-line-arguments/main.go:47\nruntime....
I assume 1.6.10 just assumes older k8s where CronJob/v1beta1 was still a thing. It became stable with k8s 1.21. I upgraded the camel-k operator to the 1.10.x channel and the pod did come up correctly (exact version was 1.10.0+0.1679561624.p). I suppose this is a plain bug in camel-k because according to https://access.redhat.com/labs/ocpouic/?operator=red-hat-camel-k&&ocp_versions=4.10,4.11,4.12 1.6.x is still supported on 4.12.
Feel free to close this, it is more of a heads-up than anything else ;)
Hi, first great demo and showcase of redhat tech!
Would it be possible to replace the google maps with a free opensource solution such as openstreetmap ?
The following snippets would do the trick from issue #49 in the install.sh script
#!/usr/bin/bash
# the log function exists in install.sh already and can be removed
log() {
echo ""
echo "#### $*"
}
# End of functions which are available in install.sh
# Variables
# $PKG for the package name
# Check for HELM and curl the current version if not available
# curl -L https://mirror.openshift.com/pub/openshift-v4/clients/helm/latest/helm-linux-amd64 -o /usr/local/bin/helm
# chmod 755 /usr/local/bin/helm
inst_helm() {
log "INSTALL $PKG"
log "Start curl"
curl -L https://mirror.openshift.com/pub/openshift-v4/clients/helm/latest/helm-linux-amd64 -o /usr/local/bin/helm
chmod 755 /usr/local/bin/helm
}
# Check for helm
PKG=helm
which $PKG >/dev/null 2>&1
if [ $? -eq 0 ]; then
log "Found $PKG - we move on"
else
log "$PKG not found - starting installation"
inst_helm
fi
It'd be cool to use OCS for the storage.
Hello
trying to install the operators but unfortunately the subscription is failing with the operators version not found - see below
oc -n openshift-operator-lifecycle-manager logs -f $(oc -n openshift-operator-lifecycle-manager get pods -l app=catalog-operator -o=custom-columns=:metadata.name --no-headers) | grep ResolutionFailed
I0726 11:05:26.495368 1 event.go:282] Event(v1.ObjectReference{Kind:"Namespace", Namespace:"", Name:"bobbycar", UID:"ddcd06f8-bd87-45d5-a8d2-a90ceb9cbb72", APIVersion:"v1", ResourceVersion:"288160", FieldPath:""}): type: 'Warning' reason: 'ResolutionFailed' constraints not satisfiable: no operators found with name amqstreams.v1.6.2 in channel stable of package amq-streams in the catalog referenced by subscription amq-streams, subscription amq-streams exists
I0726 11:05:26.511488 1 event.go:282] Event(v1.ObjectReference{Kind:"Namespace", Namespace:"", Name:"bobbycar", UID:"ddcd06f8-bd87-45d5-a8d2-a90ceb9cbb72", APIVersion:"v1", ResourceVersion:"289488", FieldPath:""}): type: 'Warning' reason: 'ResolutionFailed' constraints not satisfiable: no operators found with name red-hat-camel-k-operator.v1.2.1 in channel techpreview of package red-hat-camel-k in the catalog referenced by subscription red-hat-camel-k, subscription red-hat-camel-k exists
I0726 11:05:26.542521 1 event.go:282] Event(v1.ObjectReference{Kind:"Namespace", Namespace:"", Name:"bobbycar", UID:"ddcd06f8-bd87-45d5-a8d2-a90ceb9cbb72", APIVersion:"v1", ResourceVersion:"289488", FieldPath:""}): type: 'Warning' reason: 'ResolutionFailed' constraints not satisfiable: no operators found with name red-hat-camel-k-operator.v1.2.1 in channel techpreview of package red-hat-camel-k in the catalog referenced by subscription red-hat-camel-k, subscription red-hat-camel-k exists
The Bobbycar $NAMESPACE is not being created when INSTALL_OPERATORS=false ...
if [[ "$INSTALL_OPERATORS" == true ]]; then
log "Creating namespace $NAMESPACE for Bobbycar demo"
oc new-project "$NAMESPACE" || true
Maybe just moving the oc new-project
command in front of the block will do ... ignoring the error message if $NAMESPACE already exists ...
Hi Ortwin.
See my comments marked with @ortwin.
You can use the install.sh script to simply install the demo.
Upfront running the install.sh script you need on your bastion host:
What you will need is:
Please follow the latest documentation to have an oc client available on your bastion host: https://docs.openshift.com/container-platform/4.8/cli_reference/openshift_cli/getting-started-cli.html
@ortwin: HELM muss da sein, daher koennte man das auch in der install.sh abfangen #50 ...
As we currently rely on HELM charts for the deployment of our environment, please make sure to have the latest HELM release available on your bastion host by following the below procedure:
curl -L https://mirror.openshift.com/pub/openshift-v4/clients/helm/latest/helm-linux-amd64 -o /usr/local/bin/helm
chmod 755 /usr/local/bin/helm
Clone the GIT repo to your bastion host. Feel free to use your preferred method of choice ( ssh/https). In this example https was the easiest way.
git clone https://github.com/sa-mw-dach/bobbycar.git
With the GIT clone you have the following scripts available:
.
├── cleanup.sh
├── install_cleanup_vars.sh
├── install.sh
└── README.md
Please add installation information to install_cleanup_vars.sh
@ortwin: Die Weather API KEY values sollten einen Inhalt haben "" , weil sonst das install.sh fehl schlägt mit einem NIL Fehler
NAMESPACE=bobbycar
APP_DOMAIN=<e.g apps.cluster-pnc6l.pnc6l.sandbox52.opentlc.com>
API_DOMAIN=<e.g. api.cluster-pnc6l.pnc6l.sandbox52.opentlc.com>
GOOGLE_API_KEY=<add your information>
OWM_WEATHER_API_KEY=""
IBM_WEATHER_API_KEY=""
Once you are done - you are ready to start the installation
./install.sh
Add other car brands to show case a cockpit based on their models, e.g. for Volkswagen use picture like https://cdn.meine-vrm.de/eNJwjKieADMknsyskI4uWlVOGt0=/1020x510/smart/1131%2F18776%2F18776260%2F36723229.jpg
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.