Public | Automated Build

Last pushed: 6 days ago
Short Description
Short description is empty for this repo.
Full Description

AeroGear UnifiedPush server environment



This image prepares the environment required to run AeroGear UnifiedPush server with the binaries.

For feature requests or bugs, please file a JIRA here

Install Docker

Follow the instructions

Running the image

We need to run a Keycloak Server and a database for the UPS itself.

Keycloak Server

For the Keycloak instance run the following command:

docker run --name keycloakSRV
           -v /path/to/my/folder/containing/ups-realm:/keycloak-cfg \
           -e KEYCLOAK_USER=admin \
           -e KEYCLOAK_PASSWORD=admin \
           jboss/keycloak:3.2.1.Final \
           "-b 0.0.0.0 -Dkeycloak.import=/keycloak-cfg/ups-realm-sample.json"

For the database of the UnifiedPush Server itself, a similar command is needed:

docker run --name unifiedpushDB \
           -p 11306:3306 \
           -e MYSQL_USER=unifiedpush \
           -e MYSQL_PASSWORD=unifiedpush \
           -e MYSQL_DATABASE=unifiedpush \
           -e MYSQL_ROOT_PASSWORD=supersecret \
           -d mysql:5.5

Note you can skip the -p options for the 2 database containers if you do not want to access the databases directly

The two databases are now linked into the container that serves WildFly, containing the latest release of the UPS

docker run --name ups \
           --link unifiedpushDB:unifiedpush \
           --link keycloakSRV:keycloak \
           -p 9090:8080 \
           -it aerogear/unifiedpush-wildfly

Note: The image will run SSL by default with self signed certificates being automatically generated.
If you want to use your own certificate and key (authority certified certificates for example), proceed as follows :

  1. put your key and certificate respectively named privatekey.key and certificate.crt in a dedicated directory.
  2. Launch the container as above but adding a volume option : -v <path to the dir where you put key and cert>:/keys

The image will use your certificates instead of the self signed ones.

Building the image (alternative)

Note: First, you need to build the Dockerfile of the parent folder!

Afterwards build the unifiedpush-wildfly image yourself, by running:

docker build -t aerogear/unifiedpush-wildfly .

Accessing it

Get the image IP address, for example:

docker-machine ip default or docker inspect IMAGENAME | grep -i IPAdr

Access it:

It only exposes SSL port, all the requests will be redirected to HTTPS.

http://myip:9090/ag-push

Contributing

Patches are welcome, just send a pull request and I will be happy on merging it. If you want more images, open issues
with the request.

Docker Pull Command
Owner
aerogear
Source Repository

Comments (6)
vfbsilva
3 months ago

Seems to no build
2017-06-22 16:49:40,397 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 94) MSC000001: Failed to start service jboss.persistenceunit."unifiedpush-server-wildfly.war#unifiedpush-default": org.jboss.msc.service.StartException in service jboss.persistenceunit."unifiedpush-server-wildfly.war#unifiedpush-default": org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
2017-06-22 16:49:40,397 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 93) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./auth: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./auth: java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.jboss.aerogear.unifiedpush.keycloak.UpsKeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)
2017-06-22 16:49:40,431 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "unifiedpush-server-wildfly.war")]) - failure description: {
2017-06-22 16:49:40,438 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "unifiedpush-auth-server.war")]) - failure description: {
2017-06-22 16:49:40,496 ERROR [stderr] (DeploymentScanner-threads - 2) java.io.IOException: Mount point not found
2017-06-22 16:49:40,496 ERROR [stderr] (DeploymentScanner-threads - 2) at sun.nio.fs.LinuxFileStore.findMountEntry(LinuxFileStore.java:91)
2017-06-22 16:49:40,497 ERROR [stderr] (DeploymentScanner-threads - 2) at sun.nio.fs.UnixFileStore.<init>(UnixFileStore.java:65)
2017-06-22 16:49:40,497 ERROR [stderr] (DeploymentScanner-threads - 2) at sun.nio.fs.LinuxFileStore.<init>(LinuxFileStore.java:44)
2017-06-22 16:49:40,497 ERROR [stderr] (DeploymentScanner-threads - 2) at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:51)
2017-06-22 16:49:40,497 ERROR [stderr] (DeploymentScanner-threads - 2) at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:39)
2017-06-22 16:49:40,498 ERROR [stderr] (DeploymentScanner-threads - 2) at sun.nio.fs.UnixFileSystemProvider.getFileStore(UnixFileSystemProvider.java:368)
2017-06-22 16:49:40,498 ERROR [stderr] (DeploymentScanner-threads - 2) at java.nio.file.Files.getFileStore(Files.java:1461)
2017-06-22 16:49:40,498 ERROR [stderr] (DeploymentScanner-threads - 2) at org.jboss.as.controller.persistence.FilePersistenceUtils.getPosixAttributes(FilePersistenceUtils.java:124)
2017-06-22 16:49:40,498 ERROR [stderr] (DeploymentScanner-threads - 2) at org.jboss.as.controller.persistence.FilePersistenceUtils.createTempFileWithAttributes(FilePersistenceUtils.java:112)
2017-06-22 16:49:40,499 ERROR [stderr] (DeploymentScanner-threads - 2) at org.jboss.as.controller.persistence.FilePersistenceUtils.writeToTempFile(FilePersistenceUtils.java:99)
2017-06-22 16:49:40,499 ERROR [stderr] (DeploymentScanner-threads - 2) at org.jboss.as.controller.persistence.ConfigurationFilePersistenceResource.doCommit(ConfigurationFilePersistenceResource.java:55)
2017-06-22 16:49:40,499 ERROR [stderr] (DeploymentScanner-threads - 2) at org.jboss.as.controller.persistence.AbstractFilePersistenceResource.commit(AbstractFilePersistenceResource.java:58)
2017-06-22 16:49:40,499 ERROR [stderr] (DeploymentScanner-threads - 2) at org.jboss.as.controller.ModelControllerImpl$4.commit(ModelControllerImpl.java:789)
2017-06-22 16:49:40,499 ERROR [stderr] (DeploymentScanner-threads - 2) at org.jboss.as.controller.AbstractOperationContext.executeDoneStage(AbstractOperationContext.java:743)
2017-06-22 16:49:40,500 ERROR [stderr] (DeploymentScanner-threads - 2) at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:680)
2017-06-22 16:49:40,500 ERROR [stderr] (DeploymentScanner-threads - 2) at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:370)
2017-06-22 16:49:40,500 ERROR [stderr] (DeploymentScanner-threads - 2) at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1329)
2017-06-22 16:49:40,500 ERROR [stderr] (DeploymentScanner-threads - 2) at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:400)
2017-06-22 16:49:40,501 ERROR [stderr] (DeploymentScanner-threads - 2) at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:222)
2017-06-22 16:49:40,501 ERROR [stderr] (DeploymentScanner-threads - 2) at org.jboss.as.controller.ModelControllerImpl$3$1$1.run(ModelControllerImpl.java:756)
2017-06-22 16:49:40,501 ERROR [stderr] (DeploymentScanner-threads - 2) at org.jboss.as.controller.ModelControllerImpl$3$1$1.run(ModelControllerImpl.java:750)
2017-06-22 16:49:40,501 ERROR [stderr] (DeploymentScanner-threads - 2) at java.security.AccessController.doPrivileged(Native Method)
2017-06-22 16:49:40,504 ERROR [stderr] (DeploymentScanner-threads - 2) at org.jboss.as.controller.ModelControllerImpl$3$1.run(ModelControllerImpl.java:750)
2017-06-22 16:49:40,508 ERROR [stderr] (DeploymentScanner-threads - 2) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
2017-06-22 16:49:40,513 ERROR [stderr] (DeploymentScanner-threads - 2) at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2017-06-22 16:49:40,519 ERROR [stderr] (DeploymentScanner-threads - 2) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
2017-06-22 16:49:40,520 ERROR [stderr] (DeploymentScanner-threads - 2) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
2017-06-22 16:49:40,521 ERROR [stderr] (DeploymentScanner-threads - 2) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2017-06-22 16:49:40,521 ERROR [stderr] (DeploymentScanner-threads - 2) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2017-06-22 16:49:40,521 ERROR [stderr] (DeploymentScanner-threads - 2) at java.lang.Thread.run(Thread.java:748)
2017-06-22 16:49:40,521 ERROR [stderr] (DeploymentScanner-threads - 2) at org.jboss.threads.JBossThread.run(JBossThread.java:320)

free4murad
6 months ago

Tried building the image using the following command
docker build -t aerogear/unifiedpush-wildfly .

But the process terminates at step 10/16

Step 10/16 : COPY liquibase.properties $UPSDIST/migrator/ups-migrator/
lstat liquibase.properties: no such file or directory

mmontone
2 years ago

I have errors:

21:29:41,935 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit."ag-push.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ag-push.war".PARSE: JBAS018733: Failed to process phase PARSE of deployment "ag-push.war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_65]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
Caused by: org.jboss.msc.service.ServiceNotFoundException: Service service jboss.ejb.default-resource-adapter-name-service not found
    at org.jboss.msc.service.ServiceContainerImpl.getRequiredService(ServiceContainerImpl.java:668) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
    at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.getDefaultResourceAdapterName(MessageDrivenComponentDescriptionFactory.java:278)
    at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.processMessageBeans(MessageDrivenComponentDescriptionFactory.java:155)
    at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.processAnnotations(MessageDrivenComponentDescriptionFactory.java:82)
    at org.jboss.as.ejb3.deployment.processors.AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.processAnnotations(AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.java:58)
    at org.jboss.as.ejb3.deployment.processors.AbstractDeploymentUnitProcessor.deploy(AbstractDeploymentUnitProcessor.java:81)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
    ... 5 more

and

21:29:42,864 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./auth: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./auth: Failed to start service
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_65]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
Caused by: java.lang.RuntimeException: Failed to construct public org.jboss.aerogear.unifiedpush.keycloak.UpsKeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)
    at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:160)
    at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2211)
    at org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:295)
    at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:236)
grange74
2 years ago

I was googling the errors i got and it seem to be very similar to the problem detailed in this JIRA:
https://issues.jboss.org/browse/AGPUSH-1309

grange74
2 years ago

I'm not having much luck with this, i think my last problem was Boot2docker related so i recreated my VM and now it starts up but i get a number of errors and when i go to https://boot2docker:8443/ag-push i get a simple text page with 404 page not found. If i stop the container i get the normal connection refused so the URL should be right.

Here are the errors i'm getting on startup:

23:25:14,782 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 54) MSC000001: Failed to start service jboss.persistenceunit."ag-push.war#unifiedpush-default": org.jboss.msc.service.StartException in service jboss.persistenceunit."ag-push.war#unifiedpush-default": org.hibernate.HibernateException: Missing table: AndroidVariant
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:172) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
    at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_65]
    at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:474)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
23:25:17,493 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "ag-push.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"ag-push.war#unifiedpush-default\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"ag-push.war#unifiedpush-default\": org.hibernate.HibernateException: Missing table: AndroidVariant
    Caused by: org.hibernate.HibernateException: Missing table: AndroidVariant"}}
23:25:17,582 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: WildFly 8.1.0.Final "Kenny" started (with errors) in 9344ms - Started 443 of 545 services (36 services failed or missing dependencies, 112 services are lazy, passive or on-demand)
grange74
2 years ago

Tried running this image on docker 1.7 on Boot2docker on OSX 10.10.3 and got the following error messages and the container exits straight away.

bash-3.2$ docker run -it -p 8443:8443 aerogear/unifiedpush-wildfly
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /opt/jboss/wildfly

  JAVA: /usr/lib/jvm/java-1.7.0-openjdk/bin/java

  JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true

=========================================================================

java.lang.IllegalArgumentException: Failed to instantiate class "org.jboss.logmanager.handlers.PeriodicRotatingFileHandler" for handler "FILE"
    at org.jboss.logmanager.config.AbstractPropertyConfiguration$ConstructAction.validate(AbstractPropertyConfiguration.java:119)
    at org.jboss.logmanager.config.LogContextConfigurationImpl.doPrepare(LogContextConfigurationImpl.java:338)
    at org.jboss.logmanager.config.LogContextConfigurationImpl.prepare(LogContextConfigurationImpl.java:291)
    at org.jboss.logmanager.config.LogContextConfigurationImpl.commit(LogContextConfigurationImpl.java:300)
    at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:542)
    at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:97)
    at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:300)
    at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:262)
    at java.util.logging.LogManager$2.run(LogManager.java:320)
    at java.util.logging.LogManager$2.run(LogManager.java:318)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:318)
    at java.util.logging.LogManager.getLogManager(LogManager.java:300)
    at java.util.logging.Logger.<init>(Logger.java:265)
    at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:1468)
    at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:1466)
    at java.util.logging.LogManager$1.run(LogManager.java:204)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.util.logging.LogManager.<clinit>(LogManager.java:181)
    at org.jboss.modules.Main.main(Main.java:443)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.jboss.logmanager.config.AbstractPropertyConfiguration$ConstructAction.validate(AbstractPropertyConfiguration.java:117)
    ... 19 more
Caused by: java.io.FileNotFoundException: /opt/jboss/wildfly/standalone/log/server.log (No such file or directory)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
    at org.jboss.logmanager.handlers.FileHandler.setFile(FileHandler.java:154)
    at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.setFile(PeriodicRotatingFileHandler.java:105)
    at org.jboss.logmanager.handlers.FileHandler.setFileName(FileHandler.java:192)
    at org.jboss.logmanager.handlers.FileHandler.<init>(FileHandler.java:122)
    at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.<init>(PeriodicRotatingFileHandler.java:73)
    ... 24 more
java.lang.IllegalStateException: JBAS018704: Could not create server data directory: /opt/jboss/wildfly/standalone/data
    at org.jboss.as.server.ServerEnvironment.<init>(ServerEnvironment.java:411)
    at org.jboss.as.server.Main.determineEnvironment(Main.java:262)
    at org.jboss.as.server.Main.main(Main.java:92)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.jboss.modules.Module.run(Module.java:312)
    at org.jboss.modules.Main.main(Main.java:460)