This content is brought to you by http://developers.redhat.com - Register today!
Latest HTML: http://bit.ly/msa-tutorial
This is the frontend screenshot that you will see after the deployment of all microservices:
#include::kubeflix.adoc[]
Main repository with documentation and support files
License: Apache License 2.0
This content is brought to you by http://developers.redhat.com - Register today!
Latest HTML: http://bit.ly/msa-tutorial
This is the frontend screenshot that you will see after the deployment of all microservices:
#include::kubeflix.adoc[]
I'm following "Deploy hola (JAX-RS/Wildfly Swarm) microservice" and when running mvn package; oc start-build hola --from-dir=. --follow
I run against
...
Removing intermediate container 09199ec5032a
Successfully built f464550a8de8
E1026 15:03:37.673542 1 cfg.go:58] Reading /var/run/secrets/openshift.io/push failed: read /var/run/secrets/openshift.io/push: is a directory
I1026 15:03:37.673710 1 docker.go:93] Pushing image 172.30.211.192:5000/helloworld-msa/hola:latest ...
F1026 15:03:37.813834 1 builder.go:185] Error: build error: Failed to push image: unauthorized: authentication required
Change the ZipKin service name to a generic one, and make the examples discover it, either by consuming the env vars or by doing a DNS lookup.
Env vars:
SVC_NAME_SERVICE_ADDRESS is the service IP address.
SVC_NAME_SERVICE_PORT is the service TCP port.
DNS lookup:
SVC_NAME.PROJECT_NAME.svc.cluster.local
Where SVC_NAME
is the service name.
I am trying to build hello
using Option 1 (with docker fabric8 maven plugin) and I am hitting this issue.
Currently the various services reply to different service urls, eg /api/hello, api/namaste, ...
I think it would make more sense to have a unified URL like, api/greet. This way it is not encoded into the URL what's supposed to happen. The task of the service is to "greet" and it does so in multiple languages, depending on the service targeted.
Also, in all cases the root route should be valid as well. Either have some content there with a link to the actual service url or it could also be a re-direct to the service URL. I guess it depends a bit where we want to go with this.
At the moment most services add the label '-l hystrix.enabled=true' to be able to select resources with hystrix enabled. However, each service should also define its own specific label (in the setup command), something like 'ola-service', 'helllo-service', ...
This way one can easily act upon all resources belonging to a single service. In particular one can delete all resources for a given service oc delete all -l hola-service
.
Given that all components of the application end up in the same project it is essential that there is a easy way to address just the resources of a single component. AFAIK, the only way to do this in Kubernates/OpenShift are labels.
The documentation proposes to use the demo application with the CDK. When visiting the Red Hat Customer Portal link provided in the README, I only see a CD and DVD download, but no Vagrant or whatsoever image.
MSA aloha deployment fails with a repeated crashback loop due to following error
[osadmin@open-master01 PV_dir]$ oc logs aloha-5-lqslc -f
I> No access restrictor found, access to any MBean is allowed
Jolokia: Agent started with URL https://10.1.5.9:8778/jolokia/
Exception in thread "main" java.lang.IllegalStateException: Failed to create cache dir
at io.vertx.core.impl.FileResolver.setupCacheDir(FileResolver.java:256)
at io.vertx.core.impl.FileResolver.(FileResolver.java:79)
at io.vertx.core.impl.VertxImpl.(VertxImpl.java:138)
at io.vertx.core.impl.VertxImpl.(VertxImpl.java:114)
at io.vertx.core.impl.VertxImpl.(VertxImpl.java:110)
at io.vertx.core.impl.VertxFactoryImpl.vertx(VertxFactoryImpl.java:34)
at io.vertx.core.Vertx.vertx(Vertx.java:79)
at com.redhat.developers.msa.aloha.AlohaApplication.main(AlohaApplication.java:24)
[osadmin@open-master01 PV_dir]$ history
Bit of googling shows its a common issue with vert.x
http://stackoverflow.com/questions/35748582/vert-x-based-application-crashes-on-docker-container
It must be that this fails as reviewing the scc restricted showed this changes were not applied
https://github.com/redhat-helloworld-msa/helloworld-msa/blob/master/ansible/helloworld-msa.yml#L24
After apply these changes to the restricted scc the aloha container started up.
Recommendations. Perhaps rewrite the app so it doesn't attempt to start a cache on a path that is off limits to a container that is started by the default restricted scc
System Info
oc v3.7.0+7ed6862
kubernetes v1.7.6+a08f5eeb62
Docker 1.13.1
When running the command:
oc process -f http://central.maven.org/maven2/io/fabric8/kubeflix/packages/kubeflix/1.0.17/kubeflix-1.0.17-kubernetes.yml | oc create -f -
I see errors in Turbine
`
2018-03-19 23:37:30.920 WARN [bootstrap,,,] 504 --- [ main] i.f.s.cloud.kubernetes.StandardPodUtils : Failed to get pod with name:[turbine-server-1-7wfrv]. You should look into this if things aren't working as you expect. Are you missing serviceaccount permissions?
Caused by: java.net.UnknownHostException: kubernetes.default.svc: Name or service not known
I see errors in the Hystrix Dashboard
2018-03-19 21:41:11.252:WARN:oejs.HomeBaseWarning:main: This instance of Jetty is not running from a separate {jetty.base} directory, this is not recommended. See documentation at http://www.eclipse.org/jetty/documentation/current/startup.html
2018-03-19 21:41:11.388:WARN:oejuc.FileNoticeLifeCycleListener:main:
java.io.FileNotFoundException: /opt/jetty/jetty.state (Permission denied)
`
Can someone please let me know what I'm missing?
Thank you.
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Thu Apr 21 03:48:34 UTC 2016
There was an unexpected error (type=Not Found, status=404).
No message available
Hi, I just did a deployment according to the documentation. Unfortunately, all hello services fail to deploy due to the images not being available:
Reason: Back-off pulling image "redhatmsa/aloha:0.0.1-SNAPSHOT"
17 times in the last 4 minutes
According to the Docker Hub, the 0.0.1-SNAPSHOT
is not available, only latest
.
Any plan for Istio in this demo?
Hi, in an effort to get this app running with the cdk-2.2.0, I used the provided Ansible playbook. The playbook fails to execute due to the --port
option in oc export service ... --port
in ansible-playbook.yml.
TASK: [Install Kubeflix] ******************************************************
failed: [localhost] => {"changed": true, "cmd": "oc create -f http://central.maven.org/maven2/io/fabric8/kubeflix/packages/kubeflix/1.0.17/kubeflix-1.0.17-kubernetes.yml && oc new-app kubeflix && oc expose service hystrix-dashboard --port=8080 --hostname=hystrix-dashboard-helloworld-msa.rhel-cdk.10.1.2.2.xip.io && oc policy add-role-to-user admin system:serviceaccount:helloworld-msa:turbine", "delta": "0:00:03.165838", "end": "2016-09-22 20:39:26.293465", "failed": true, "failed_when_result": true, "rc": 1, "start": "2016-09-22 20:39:23.127627", "stdout_lines": ["template \"kubeflix\" created", "--> Deploying template kubeflix for \"kubeflix\"", "--> Creating resources ...", " serviceaccount \"ribbon\" created", " serviceaccount \"turbine\" created", " service \"hystrix-dashboard\" created", " service \"turbine-server\" created", " replicationcontroller \"hystrix-dashboard\" created", " replicationcontroller \"turbine-server\" created", "--> Success", " Run 'oc status' to view your app."], "warnings": []}
stderr: error: cannot use --port when generating a route
stdout: template "kubeflix" created
--> Deploying template kubeflix for "kubeflix"
--> Creating resources ...
serviceaccount "ribbon" created
serviceaccount "turbine" created
service "hystrix-dashboard" created
service "turbine-server" created
replicationcontroller "hystrix-dashboard" created
replicationcontroller "turbine-server" created
--> Success
Run 'oc status' to view your app.
FATAL: all hosts have already failed -- aborting
And here's the error in isolation:
[vagrant@rhel-cdk ~]$ oc expose service hystrix-dashboard --port=8080 --hostname=hystrix-dashboard-helloworld-msa.rhel-cdk.10.1.2.2.xip.io
error: cannot use --port when generating a route
I can't find helloworld-msa.yml for ansible-playbook as below in docc[1].
$ ansible-playbook helloworld-msa.yml
[1]https://github.com/redhat-helloworld-msa/helloworld-msa/blob/master/ansible.adoc
Image fabric8/hystrix-dashboard:1.0.17 does not launch on my OSE environment:
--- BEGIN CONTAINER LOG SNIPPET ---
Checking *.war in /maven
Linking /maven/ROOT.war --> /opt/jetty/webapps/ROOT.war
ln: failed to create symbolic link '/opt/jetty/webapps/ROOT.war': Permission denied
Running Jetty:
I> No access restrictor found, access to all MBean is allowed
Jolokia: Agent started with URL http://10.1.2.8:8778/jolokia/
2016-09-19 18:59:24.547:INFO:ifasjoejs.Server:jetty-8.y.z-SNAPSHOT
2016-09-19 18:59:24.578:INFO:ifasjoejs.AbstractConnector:Started [email protected]:9779
2016-09-19 18:59:24.851:INFO::main: Logging initialized @567ms
2016-09-19 18:59:24.911:WARN:oejs.HomeBaseWarning:main: This instance of Jetty is not running from a separate {jetty.base} directory, this is not recommended. See documentation at http://www.eclipse.org/jetty/documentation/current/startup.html
2016-09-19 18:59:25.045:WARN:oejuc.FileNoticeLifeCycleListener:main:
java.io.FileNotFoundException: /opt/jetty/jetty.state (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
[...]
--- END CONTAINER LOG SNIPPET ---
I can see that the permission of the target directory does not have write permissions on the jetty directory:
[root@ose3-master1 ~]# oc rsh hystrix-dashboard-tv4vk
sh-4.2$ ls -alsn /maven
total 1576
0 drwxr-xr-x. 2 0 0 21 May 11 09:19 .
4 drwxr-xr-x. 19 0 0 4096 Sep 19 18:59 ..
1572 -rw-r--r--. 1 0 0 1606587 May 11 09:19 ROOT.war
sh-4.2$ ls -asln /opt/jetty/webapps/
total 8
0 drwxr-xr-x. 2 501 20 23 Oct 21 2015 .
4 drwxr-xr-x. 10 501 20 4096 Jul 30 2015 ..
4 -rw-r--r--. 1 501 20 1412 Jul 30 2015 README.TXT
sh-4.2$ id
uid=1000080000 gid=0(root) groups=1000080000
sh-4.2$
At the moment each section just contains information on how to install a given micro service, but not what it actually does.
For the actual hello services it's simple enough, but what is the api-gateway, zipkin, etc.
Building microservices with Apache Camel has been made super-easy in recent times: Spring-boot starters, service call EIP, ribbon, hystrix, zipkin, etc.
Camel is also the basis of JBoss Fuse Integration Services 2.0 (a.k.a. integration microservices on top of Openshift).
We think that a Camel microservice should be included in the Red Hat helloworld msa.
If you agree, I can work on it.
When I start the OpenShift cluster with option 2 / oc cluster up. I get the following IP:
-- Server Information ...
OpenShift server started.
The server is accessible via web console at:
https://192.168.99.102:8443
The link https://192.168.99.10?:8443/console/
noted here https://github.com/redhat-helloworld-msa/helloworld-msa/blob/master/prepare-env.adoc#access-openshift-console-1 doesn't work.
Following the manual deployment steps, the first project errors out. I'm not a Java developer, so don't really know what to do next. (PS: building aloha
worked)
Win 10, Linux Subsystem in Ubuntu 20.04.2 LTS
flavor. I just installed the default maven version. Current HEAD of global repo in above link. Current head of hola repo at e02616b
.
$ mvn --version
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.10, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.19.104-microsoft-standard", arch: "amd64", family: "unix"
Error message:
$ git clone ...
$ cd hola
hola $ mvn package
[...]
------
Custom main() usage is intended to be deprecated in a future release and is no longer supported,
please refer to http://docs.wildfly-swarm.io for YAML configuration that replaces it.
------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:08 min
[INFO] Finished at: 2021-04-23T15:01:37+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.thorntail:thorntail-maven-plugin:2.2.0.Final:package (default) on project hola: Execution default of goal io.thorntail:thorntail-maven-plugin:2.2.0.Final:package failed: An API incompatibility was encountered while executing io.thorntail:thorntail-maven-plugin:2.2.0.Final:package: java.lang.AbstractMethodError: Receiver class org.wildfly.swarm.plugin.maven.RepositorySystemSessionWrapper does not define or inherit an implementation of the resolved method 'abstract org.eclipse.aether.transform.FileTransformerManager getFileTransformerManager()' of interface org.eclipse.aether.RepositorySystemSession.
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>io.thorntail:thorntail-maven-plugin:2.2.0.Final
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/erikb/.m2/repository/io/thorntail/thorntail-maven-plugin/2.2.0.Final/thorntail-maven-plugin-2.2.0.Final.jar
[ERROR] urls[1] = file:/home/erikb/.m2/repository/io/thorntail/fraction-metadata/2.2.0.Final/fraction-metadata-2.2.0.Final.jar
[ERROR] urls[2] = file:/home/erikb/.m2/repository/io/thorntail/meta-spi/2.2.0.Final/meta-spi-2.2.0.Final.jar
[ERROR] urls[3] = file:/home/erikb/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-impl-javaee/2.0.0/shrinkwrap-descriptors-impl-javaee-2.0.0.jar
[ERROR] urls[4] = file:/home/erikb/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-impl-base/2.0.0/shrinkwrap-descriptors-impl-base-2.0.0.jar
[ERROR] urls[5] = file:/home/erikb/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-spi/2.0.0/shrinkwrap-descriptors-spi-2.0.0.jar
[ERROR] urls[6] = file:/home/erikb/.m2/repository/org/ow2/asm/asm/6.0/asm-6.0.jar
[ERROR] urls[7] = file:/home/erikb/.m2/repository/com/eclipsesource/minimal-json/minimal-json/0.9.4/minimal-json-0.9.4.jar
[ERROR] urls[8] = file:/home/erikb/.m2/repository/io/thorntail/tools/2.2.0.Final/tools-2.2.0.Final.jar
[ERROR] urls[9] = file:/home/erikb/.m2/repository/io/thorntail/bootstrap/2.2.0.Final/bootstrap-2.2.0.Final.jar
[ERROR] urls[10] = file:/home/erikb/.m2/repository/org/jboss/modules/jboss-modules/1.6.4.Final/jboss-modules-1.6.4.Final.jar
[ERROR] urls[11] = file:/home/erikb/.m2/repository/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar
[ERROR] urls[12] = file:/home/erikb/.m2/repository/org/jboss/shrinkwrap/shrinkwrap-api/1.2.6/shrinkwrap-api-1.2.6.jar
[ERROR] urls[13] = file:/home/erikb/.m2/repository/org/jboss/shrinkwrap/shrinkwrap-spi/1.2.6/shrinkwrap-spi-1.2.6.jar
[ERROR] urls[14] = file:/home/erikb/.m2/repository/org/jboss/shrinkwrap/shrinkwrap-impl-base/1.2.6/shrinkwrap-impl-base-1.2.6.jar
[ERROR] urls[15] = file:/home/erikb/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-api-jboss/2.0.0/shrinkwrap-descriptors-api-jboss-2.0.0.jar
[ERROR] urls[16] = file:/home/erikb/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-api-javaee/2.0.0/shrinkwrap-descriptors-api-javaee-2.0.0.jar
[ERROR] urls[17] = file:/home/erikb/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-api-base/2.0.0/shrinkwrap-descriptors-api-base-2.0.0.jar
[ERROR] urls[18] = file:/home/erikb/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-impl-jboss/2.0.0/shrinkwrap-descriptors-impl-jboss-2.0.0.jar
[ERROR] urls[19] = file:/home/erikb/.m2/repository/net/lingala/zip4j/zip4j/1.3.2/zip4j-1.3.2.jar
[ERROR] urls[20] = file:/home/erikb/.m2/repository/io/thorntail/spi/2.2.0.Final/spi-2.2.0.Final.jar
[ERROR] urls[21] = file:/home/erikb/.m2/repository/org/jboss/jandex/2.0.5.Final/jandex-2.0.5.Final.jar
[ERROR] urls[22] = file:/home/erikb/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.20/plexus-utils-3.0.20.jar
[ERROR] urls[23] = file:/home/erikb/.m2/repository/org/eclipse/aether/aether-util/1.0.0.v20140518/aether-util-1.0.0.v20140518.jar
[ERROR] urls[24] = file:/home/erikb/.m2/repository/org/jooq/joox-java-6/1.6.0/joox-java-6-1.6.0.jar
[ERROR] urls[25] = file:/home/erikb/.m2/repository/javax/xml/bind/jaxb-api/2.3.0/jaxb-api-2.3.0.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
for a demo we're building we've stood up a (shared) OpenShift cluster. To deploy helloworld-msa to it, we've built the folllowing ansible script: https://github.com/wrichter/hailstorm/tree/master/ansible/roles/layerX_openshift_demo_redhatmsa_on_devclient/tasks
This role is applied to a RHEL system with software collections providing maven and nodejs which connects to the openshift cluster. This system has all the preregs (bzip2,git,bash-completion,atomic-openshift-clients,java-1.8.0-openjdk-devel,rh-maven33,rh-nodejs4) installed via yum and has two OS users called "developer" and "admin". On the Openshift cluster, the admin user has cluster-admin permissions.
This script is almost idempotent and can be run multiple times without failing.
Since we never forked from this repo, I cannot send a pull request :-( but maybe it's still good for inspiration.
The pre-req in the ansible.doc should be updated to 2.4+ of ansible, the ansible playbook will not work without support of include_tasks
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.