Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Managed server poc #344

Draft
wants to merge 34 commits into
base: main
Choose a base branch
from
Draft

Managed server poc #344

wants to merge 34 commits into from

Conversation

kabir
Copy link
Contributor

@kabir kabir commented Sep 6, 2022

First we need to build the the managed server and builder images, from my s2i branch. The managed server image is tagged as wildfly/wildfly-managed-server-jdk17:latest. kabir/built-server-image:latest is the name of the image containing the server.

s2i build file:///some/where/deployment/ \
wildfly/wildfly-managed-server-jdk17:latest \
kabir/built-server-image:latest \
-e MANAGED_SERVER_SERVER_FEATURE_PACK_GA="org.wildfly:wildfly-galleon-pack" \
-e MANAGED_SERVER_SERVER_FEATURE_PACK_VERSION="27.0.0.Alpha5" \
-e MANAGED_SERVER_CLOUD_FEATURE_PACK_GA="org.wildfly.cloud:wildfly-cloud-galleon-pack" \
-e MANAGED_SERVER_CLOUD_FEATURE_PACK_VERSION="2.0.0.Alpha4" \
-e MANAGED_SERVER_DATASOURCES_FEATURE_PACK_GA=org.wildfly:wildfly-datasources-galleon-pack \
-e MANAGED_SERVER_DATASOURCES_FEATURE_PACK_VERSION="2.2.5.Final"

/some/where/deployment is a directory containing a war, containing a WEB-INF/classes/META-INF/server-config.xml. Its contents currently list the layers the user wants:

<?xml version="1.0" encoding="UTF-8"?>
<server-config>
    <layers>
        <layer>cloud-server</layer>
        <layer>jaxrs-server</layer>
        <!--<layer>postgresql-driver</layer>-->
    </layers>
</server-config>

We can also optionally add CLI and YAML files to update the configuration. They must be in WEB-INF/classes/META-INF/server-init.cli and WEB-INF/classes/META-INF/server-init.yml in the war.

To create the runtime image, I build the following docker file, and run the resulting image:

FROM wildfly/wildfly-runtime-jdk11:latest
COPY --chown=jboss:root --from=kabir/built-server-image:latest /opt/server $JBOSS_HOME
# An image containing the deployment in /tmp/artifacts/ROOT.war
COPY -–chown=jboss:root --from=wildfly-managed-server-builder-test-deployment:latest \
      /tmp/artifacts/ROOT.war $JBOSS_HOME/standalone/deployments/
RUN chmod -R ug+rwX $JBOSS_HOME

@jfdenise
Copy link
Contributor

jfdenise commented Sep 6, 2022

In the example you are using the latest final release (so 26.1.2.Final) with 2.0.0.Alpha4 cloud feature-pack that is expected to work with WF27. You should use: MANAGED_SERVER_SERVER_FEATURE_PACK="wildfly@maven(org.jboss.universe:community-universe)#27.0.0.Alpha4" or perhaps better "org.wildfly:wildfly-galleon-pack:27.0.0.Alpha4"

@kabir kabir force-pushed the managed-server-poc branch from 0ffa00b to b86fc78 Compare September 6, 2022 15:32
@kabir kabir force-pushed the managed-server-poc branch from 3129fd1 to 3346590 Compare September 21, 2022 13:44
This replaces the previous galleon universe stuff
If channels are used, we don't use the
MANAGED_SERVER_XXX_FEATURE_PACK_VERSION env vars when specifying the
feature packs to use.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants