Skip to content

Commit 4c7dcfc

Browse files
committed
Fix Galleon feature pack
1 parent e870464 commit 4c7dcfc

File tree

9 files changed

+101
-16
lines changed

9 files changed

+101
-16
lines changed

CLAUDE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,28 @@ mvn install -P quick-build
2929
# Native binary (requires GraalVM)
3030
mvn install -P op,prod,native -Dquarkus.native.container-build=false
3131

32+
# Build Galleon feature pack
33+
mvn install -P prod,op,feature-pack
34+
3235
# Run a single test class
3336
mvn test -pl <module> -Dtest=<TestClassName>
3437

3538
# Run a single test method
3639
mvn test -pl <module> -Dtest=<TestClassName>#<methodName>
3740
```
3841

42+
## Galleon Provisioning
43+
44+
After building the feature pack, provision a WildFly server with the HAL console using the Galleon CLI:
45+
46+
```bash
47+
galleon.sh provision op/feature-pack/target/provision.xml --dir=/path/to/wildfly
48+
```
49+
50+
The `provision.xml` in `op/feature-pack/` uses `${project.version}` for the feature pack version. During the build, Maven resource filtering produces `target/provision.xml` with the resolved version. It provisions a full default WildFly standalone server and adds the `halop` layer on top.
51+
52+
Start the provisioned server with `--stability=experimental`.
53+
3954
## Development Mode
4055

4156
Two processes are needed simultaneously:
@@ -78,6 +93,8 @@ All code modules live under `code-parent` for shared dependency management:
7893
Application modules:
7994
- `op/console` — J2CL-compiled SPA (Parcel bundler, PatternFly 6)
8095
- `op/standalone` — Quarkus HTTP server wrapping the SPA
96+
- `op/subsystem` — WildFly subsystem extension for the HAL console
97+
- `op/feature-pack` — Galleon feature pack to provision HAL into WildFly
8198

8299
Supporting modules: `bom` (dependency versions), `build-config` (checkstyle/license rules).
83100

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ is a management interface of a running WIldFly instance.
6060
To build halOP as a standalone Java application, run
6161

6262
```shell
63-
mvn install -P op,prod
63+
mvn install -P prod,op,standalone
6464
```
6565

6666
This will package the transpiled HTML, CSS and JavaScript resources into a Quarkus-based HTTP server. To start it, run
@@ -76,7 +76,7 @@ and open a browser at http://localhost:9090.
7676
To build the native binary of halOP, run
7777

7878
```shell
79-
mvn install -P op,prod,native -Dquarkus.native.container-build=false
79+
mvn install -P prod,op,standalone,native -Dquarkus.native.container-build=false
8080
```
8181

8282
Please make sure that you have a recent version of GraalVM installed.
@@ -92,6 +92,8 @@ chmod +x hal-op-*
9292
xattr -d com.apple.quarantine hal-op-*
9393
```
9494

95+
If you want to customize the port of halOP (Java-based and native), please use `-Dquarkus.http.port=<port>` to change the port.
96+
9597
## Container
9698

9799
halOP is also available as a container image at https://quay.io/repository/halconsole/hal-op. Use
@@ -102,9 +104,15 @@ podman run -it -p 9090:9090 quay.io/halconsole/hal-op
102104

103105
to start it and open a browser at http://localhost:9090.
104106

105-
## Customization
107+
## Galleon Provisioning
106108

107-
If you want to customize the port of halOP (Java-based and native), please use `-Dquarkus.http.port=<port>` to change the port.
109+
halOP is also available as a feature pack that can be provisioned with [Galleon](https://github.com/wildfly/galleon).
110+
111+
1. Build the feature pack with `mvn install -P prod,op,feature-pack`
112+
2. Provision a WildFly server with `galleon.sh provision op/feature-pack/target/provision.xml --dir=$TMPDIR/wildfly --stability-level=experimental`
113+
3. `cd $TMPDIR/wildfly`
114+
4. Add a WildFly admin user with `bin/add-user.sh -u admin -p admin --silent`
115+
5. Start the server with `bin/standalone.sh --stability=experimental`
108116

109117
# halOS (HAL on OpenShift)
110118

@@ -114,7 +122,7 @@ halOS is not yet implemented!
114122

115123
# Contributing
116124

117-
This is an open source project. That means that everybody can contribute. It's not hard to get started. So
125+
This is an open-source project. That means that everybody can contribute. It's not hard to get started. So
118126
start [contributing](CONTRIBUTING.md) today!
119127

120128
# Licenses

op/console/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"start:server": "node server.js 1234 1235",
1414
"open:browser": "wait-on http://localhost:1234 && open http://localhost:1234",
1515
"watch": "concurrently \"npm run start:parcel\" \"npm run start:server\" \"npm run open:browser\"",
16-
"prod": "parcel build src/web/index.html --dist-dir target/console"
16+
"prod:standalone": "parcel build src/web/index.html --dist-dir target/console",
17+
"prod:feature-pack": "parcel build src/web/index.html --dist-dir target/console --public-url /halop"
1718
},
1819
"dependencies": {
1920
"@patternfly-java/charts": "^0.0.13",

op/console/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
<goal>corepack</goal>
215215
</goals>
216216
<configuration>
217-
<arguments>pnpm run prod</arguments>
217+
<arguments>pnpm run ${npm.script}</arguments>
218218
</configuration>
219219
</execution>
220220
</executions>

op/console/src/web/dev.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
<script type="module" src="./main.js"></script>
2727
</head>
2828
<body>
29-
<script type="text/javascript" src="./console.js" defer></script>
29+
<script type="text/javascript" src="console.js" defer></script>
3030
</body>
3131
</html>

op/console/src/web/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
<script type="module" src="./main.js"></script>
2727
</head>
2828
<body>
29-
<script type="text/javascript" src="./console.js" defer></script>
29+
<script type="text/javascript" src="console.js" defer></script>
3030
</body>
3131
</html>

op/feature-pack/pom.xml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
<description>WildFly feature pack for HAL console on premise</description>
3535

3636
<properties>
37+
<halop.stability>experimental</halop.stability>
3738
<version.org.wildfly>39.0.1.Final</version.org.wildfly>
3839
<version.org.wildfly.core>31.0.3.Final</version.org.wildfly.core>
3940
<version.org.wildfly.common>2.0.1</version.org.wildfly.common>
4041
<version.org.wildfly.galleon-plugins>8.1.0.Final</version.org.wildfly.galleon-plugins>
41-
<wildfly.halop.stability>experimental</wildfly.halop.stability>
4242
</properties>
4343

4444
<dependencies>
@@ -69,14 +69,26 @@
6969
<build>
7070
<plugins>
7171
<plugin>
72-
<artifactId>maven-clean-plugin</artifactId>
72+
<artifactId>maven-resources-plugin</artifactId>
7373
<executions>
7474
<execution>
75-
<id>auto-clean</id>
76-
<phase>initialize</phase>
75+
<id>filter-provision-xml</id>
76+
<phase>generate-resources</phase>
7777
<goals>
78-
<goal>clean</goal>
78+
<goal>copy-resources</goal>
7979
</goals>
80+
<configuration>
81+
<outputDirectory>${project.build.directory}</outputDirectory>
82+
<resources>
83+
<resource>
84+
<directory>${project.basedir}</directory>
85+
<filtering>true</filtering>
86+
<includes>
87+
<include>provision.xml</include>
88+
</includes>
89+
</resource>
90+
</resources>
91+
</configuration>
8092
</execution>
8193
</executions>
8294
</plugin>
@@ -96,9 +108,9 @@
96108
<fork-embedded>true</fork-embedded>
97109
<generate-channel-manifest>true</generate-channel-manifest>
98110
<deploy-channel-manifest>false</deploy-channel-manifest>
99-
<minimum-stability-level>${wildfly.halop.stability}</minimum-stability-level>
111+
<minimum-stability-level>${halop.stability}</minimum-stability-level>
100112
<config-stability-level>community</config-stability-level>
101-
<package-stability-level>${wildfly.halop.stability}</package-stability-level>
113+
<package-stability-level>${halop.stability}</package-stability-level>
102114
</configuration>
103115
</execution>
104116
</executions>

op/feature-pack/provision.xml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Copyright 2024 Red Hat
5+
6+
Licensed under the Apache License, Version 2.0 (the "License");
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
https://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
18+
-->
19+
<!-- Just meant as an example for provisioning a WildFly server with HAL OP -->
20+
<installation xmlns="urn:jboss:galleon:provisioning:3.0">
21+
<feature-pack location="org.wildfly:wildfly-galleon-pack:${version.org.wildfly}">
22+
<default-configs inherit="true"/>
23+
<packages inherit="true"/>
24+
</feature-pack>
25+
<feature-pack location="org.jboss.hal:hal-op-feature-pack:${project.version}">
26+
<default-configs inherit="false"/>
27+
<packages inherit="true"/>
28+
</feature-pack>
29+
<config model="standalone" name="standalone.xml">
30+
<layers>
31+
<include name="halop"/>
32+
</layers>
33+
</config>
34+
<options>
35+
<option name="optional-packages" value="passive+"/>
36+
<option name="jboss-fork-embedded" value="true"/>
37+
<option name="stability-level" value="experimental"/>
38+
</options>
39+
</installation>

op/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
<module>console</module>
3838
</modules>
3939

40+
<properties>
41+
<npm.script/>
42+
</properties>
43+
4044
<dependencyManagement>
4145
<dependencies>
4246
<dependency>
@@ -75,13 +79,17 @@
7579
<properties>
7680
<!-- Must match org.jboss.hal.op.HalOpSubsystemRegistrar#CONTEXT_NAME -->
7781
<environment.base>/halop</environment.base>
82+
<npm.script>prod:feature-pack</npm.script>
7883
</properties>
7984
</profile>
8085
<profile>
8186
<id>standalone</id>
8287
<modules>
8388
<module>standalone</module>
8489
</modules>
90+
<properties>
91+
<npm.script>prod:standalone</npm.script>
92+
</properties>
8593
</profile>
8694
</profiles>
8795
</project>

0 commit comments

Comments
 (0)