Use jboss cli script for docker image generation

Description

Having yet another copy of standalone.xml is too hard to maintain. We could use jboss cli script for it. CLI recipes. This will also help to identify what customization is needed for Zanata to run.

  • system properties

    1 /system-property=foo:add(value=bar)
  • data source

    1 2 /subsystem=datasources/jdbc-driver=postgresql:add(driver-name="postgresql",driver-module-name="org.postgresql.jdbc") data-source add --name=syncDS --jndi-name=java:jboss/datasources/syncDS --driver-name=postgresql --connection-url=jdbc:postgresql://${env.DB_HOSTNAME:syncdb}:5432/${env.DB_NAME:sync_local} --user-name=${env.DB_USER:postgres} --password=${env.DB_PASSWORD:postgres}
  • jms queue

    1 jms-queue add --queue-address=MailsQueue --durable=true --entries=["java:/jms/queue/MailsQueue"]
  • cache container

    1 2 /subsystem=infinispan/cache-container=mycontainer:add(default-cache=<default-cache-name>) /subsystem=infinispan/cache-container=mycontainer/transport=TRANSPORT:add(lock-timeout=<timeout>)
    1 /subsystem=infinispan/cache-container=mycontainer/local-cache=mylocalcache/transaction=TRANSACTION:add(mode=<transaction-mode>)
  • security domain

  • jndi binding (to support old zanata deployments

  • logging config


We need to boot up wildfly during image creation (with RUN instruction) and then run the CLI script. After that we stop the server and clean up. Zanata sync is using it and it seems to be working fine.

Try to use offline/embedded mode

Status

Assignee

Patrick Huang

Reporter

Patrick Huang

Labels

None

Tested Version/s

None

Story Points

2

Components

Sprint

None

Fix versions

Priority

unspecified