项目作者: sswguo

项目描述 :
Integration test for indy to auditquery
高级语言: Shell
项目地址: git://github.com/sswguo/indy-test.git
创建时间: 2019-04-19T07:51:51Z
项目社区:https://github.com/sswguo/indy-test

开源协议:

下载


openshift-play

Try to install the auditquery and jgroups-gossip on the openshif.io.

openshift.io instance

  1. oc login https://api.starter-us-east-1.openshift.com --token=<>
  2. You have one project on this server: "nos-local"
  3. Using project "nos-local".

Deploy the GossipRouter on OSE

  1. $> oc new-app jboss/jgroups-gossip -e LogLevel=trace
  2. --> Found Docker image 8c23d5c (2 months old) from Docker Hub for "jboss/jgroups-gossip"
  3. * An image stream tag will be created as "jgroups-gossip:latest" that will track this image
  4. * This image will be deployed in deployment config "jgroups-gossip"
  5. * Port 12001/tcp will be load balanced by service "jgroups-gossip"
  6. * Other containers can access this service through the hostname "jgroups-gossip"
  7. --> Creating resources ...
  8. imagestream.image.openshift.io "jgroups-gossip" created
  9. deploymentconfig.apps.openshift.io "jgroups-gossip" created
  10. service "jgroups-gossip" created
  11. --> Success
  12. Application is not exposed. You can expose services to the outside world by executing one or more of the commands below:
  13. 'oc expose svc/jgroups-gossip'
  14. Run 'oc status' to view your app.

Deploy the auditquery on OSE

AuditQuery test images

  1. $> oc new-app jind0001/auditquery:1.0
  2. --> Found Docker image a4d775b (2 hours old) from Docker Hub for "jind0001/auditquery:1.0"
  3. * An image stream tag will be created as "auditquery:1.0" that will track this image
  4. * This image will be deployed in deployment config "auditquery"
  5. * Port 8082/tcp will be load balanced by service "auditquery"
  6. * Other containers can access this service through the hostname "auditquery"
  7. --> Creating resources ...
  8. imagestream.image.openshift.io "auditquery" created
  9. deploymentconfig.apps.openshift.io "auditquery" created
  10. service "auditquery" created
  11. --> Success
  12. Application is not exposed. You can expose services to the outside world by executing one or more of the commands below:
  13. 'oc expose svc/auditquery'
  14. Run 'oc status' to view your app.oc new-app jind0001/auditquery:1.0

Create ConfigMaps from the existing config files

  1. oc create configmap auditquery-config --from-file app/auditquery/docker/conf/

Add ConfigMap for auditquery

Add Config Files in Applications/Deployments/auditquery

  • select config map source
  • fill the mount path (target path for the config files), e.g.: /opt/auditquery/conf

Then we can ref the config files from the mounted path.

Deploy the indy on OSE

Indy test images

  1. oc new-app jind0001/indy:1.4
  2. --> Found Docker image 7132f25 (2 minutes old) from Docker Hub for "jind0001/indy:1.4"
  3. * An image stream tag will be created as "indy:1.4" that will track this image
  4. * This image will be deployed in deployment config "indy"
  5. * Port 8080/tcp will be load balanced by service "indy"
  6. * Other containers can access this service through the hostname "indy"
  7. * WARNING: Image "jind0001/indy:1.4" runs as the 'root' user which may not be permitted by your cluster administrator
  8. --> Creating resources ...
  9. imagestreamtag.image.openshift.io "indy:1.4" created
  10. deploymentconfig.apps.openshift.io "indy" created
  11. service "indy" created
  12. --> Success
  13. Application is not exposed. You can expose services to the outside world by executing one or more of the commands below:
  14. 'oc expose svc/indy'
  15. Run 'oc status' to view your app.

JGroups tcp config

  1. <config xmlns="urn:org:jgroups"
  2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups-4.0.xsd">
  4. ....
  5. <TCPGOSSIP initial_hosts="${jgroups.gossip_router_hosts:HostA[12001]}" ></TCPGOSSIP>
  6. ....
  7. </config>

jgroups gossip config

Issues:

1: IPv6
  1. Use of IPv6. JGroups does work with IPv6, but some JDK implementations still have issues with it, so you can turn IPv6 off
  2. by passing the "-Djava.net.preferIPv4Stack=true" system property to the JVM. You can force use of IPv6 addresses by using
  3. setting system property -Djava.net.preferIPv6Addresses=true. If you use IPv6 addresses, you should also define IPv6
  4. addresses in your configuration; e.g. if you set bind_addr="192.168.1.5" in UDP, JGroups will try to pick IPv4 addresses if
  5. an IPv4 stack is available, or you're running a dual stack.