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

Add new sample for native web workloads #748

Closed
wants to merge 1 commit into from

Conversation

olegz
Copy link
Collaborator

@olegz olegz commented Jan 22, 2024

Add new sample to use Spring native support with web workloads

By submitting this pull request

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I confirm that I've made a best effort attempt to update all relevant documentation.

Copy link
Collaborator

@maschnetwork maschnetwork left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Added a few minor comments. I see we also have a Java bootstrap file and assembly configuration - do we need it in this sample? If so we should mention it in the README on how to build the non-native version as well.

@deki deki added this to the Release 2.0 milestone Jan 24, 2024
@@ -0,0 +1,46 @@
FROM arm64v8/amazonlinux:2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use Amazon Linux 2023 and GraalVM 21.0.2

my working version:

FROM public.ecr.aws/amazonlinux/amazonlinux:2023

RUN yum -y update \
    && yum install -y unzip tar gzip bzip2-devel ed gcc gcc-c++ gcc-gfortran \
    less libcurl-devel openssl openssl-devel readline-devel xz-devel \
    zlib-devel glibc-static zlib-static \
    && rm -rf /var/cache/yum

# Graal VM
ENV GRAAL_VERSION 21.0.2
ENV GRAAL_FILENAME graalvm-community-jdk-${GRAAL_VERSION}_linux-x64_bin.tar.gz
RUN curl -4 -L https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${GRAAL_VERSION}/${GRAAL_FILENAME} | tar -xvz
RUN mv graalvm-community-openjdk-${GRAAL_VERSION}* /usr/lib/graalvm

# Maven
ENV MVN_VERSION 3.9.6
ENV MVN_FOLDERNAME apache-maven-${MVN_VERSION}
ENV MVN_FILENAME apache-maven-${MVN_VERSION}-bin.tar.gz
RUN curl -4 -L https://archive.apache.org/dist/maven/maven-3/${MVN_VERSION}/binaries/${MVN_FILENAME} | tar -xvz
RUN mv $MVN_FOLDERNAME /usr/lib/maven

#Native Image dependencies
RUN ln -s /usr/lib/graalvm/bin/native-image /usr/bin/native-image
RUN ln -s /usr/lib/maven/bin/mvn /usr/bin/mvn

ENV JAVA_HOME /usr/lib/graalvm

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update

@olegz
Copy link
Collaborator Author

olegz commented Jan 24, 2024

I will be closing this PR and submitting an update to #739 which will include sample with changes sugested here

@olegz
Copy link
Collaborator Author

olegz commented Jan 24, 2024

Also, I was not successful with the docker file update since I need arm64v8 image and the one i got form here, i had issues with.
Also it appears we need two Docker files and some mechanism of switching between two architectures.

@olegz
Copy link
Collaborator Author

olegz commented Jan 24, 2024

Closing it, since new sample will be pushed as an update to #739

@olegz olegz closed this Jan 24, 2024
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.

3 participants