2

i want to active console management for server wildfly swarm docker

i have dependecies in pom

        <dependency>
    <groupId>org.wildfly.swarm</groupId>
    <artifactId>management-console</artifactId>
    <version>2017.1.1</version>
</dependency>
<dependency>
    <groupId>org.wildfly.swarm</groupId>
    <artifactId>management</artifactId>
    <version>2017.1.1</version>
    <type>jar</type>
</dependency>

I have Management - STABLE in logs but also WFLYSRV0054: Admin console is not enabled.

I tried do enable the console via the project-stages file and i added:

swarm:
  management:
    security-realms:
      ManagementRealm:
        in-memory-authentication:
          users:
            admin:    
              password: admin                            
    http-interface-management-interface:
      allowed-origins:
      - http://localhost:8080
      security-realm: ManagementRealm

But didn't work. Does anyone can help me please?

bilgin
  • 133
  • 1
  • 13

2 Answers2

3

I added the admin user in my docker image. With this, you will have the same user in all tasks (containers) of a service.

An example of Dockerfile:

FROM jboss/wildfly:latest
# create user
RUN /opt/jboss/wildfly/bin/add-user.sh admin Admin#123 --silent
# enable management console
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]
namokarm
  • 668
  • 1
  • 7
  • 20
1

The below configuration worked for me.

thorntail:
  management:
     audit-access:
       audit-log-logger:
         log-boot: true
         enabled: true
     security-realms:
       ApplicationRealm:
         ssl-server-identity:
           alias: my_app_ssl
           keystore-provider: PKCS12
           keystore-path: /home/keystore.p12
           keystore-password: changeit
       ManagementRealm:
         in-memory-authentication:
           users:
             admin:
               password: admin
         in-memory-authorization:
           users:
             admin:
               roles:
                 - admin
     http-interface-management-interface:
       console-enabled: true
       allowed-origins:
         - http://localhost:8080
       security-realm: ManagementRealm

Below are the dependancies addded in a pom file

<dependency>
            <groupId>io.thorntail</groupId>
            <artifactId>management</artifactId>
        </dependency>
        <dependency>
            <groupId>io.thorntail</groupId>
            <artifactId>management-console</artifactId>
        </dependency>

This how i access the console

http://127.0.0.1:8080/console/

For more see the link below.

https://github.com/thorntail/thorntail-examples/blob/master/management-console/README.md

Dev Fh
  • 586
  • 7
  • 18