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 adoptopenjdk to userland list #30

Merged
merged 4 commits into from
Apr 26, 2019
Merged

Add adoptopenjdk to userland list #30

merged 4 commits into from
Apr 26, 2019

Conversation

sravyamks
Copy link
Contributor

AdoptopenJDK is added to the userland build list for virtualization and masking.
once changes for Virtualization and Masking are pushed, java8 can safely be removed from the list.

Testing:
added adoptopenjdk-java8 as dependency in app-gate instead of oracle-java8 -> ran pre-push -> http://selfservice.jenkins.delphix.com/job/dlpx-app-gate/job/master/job/build-package/job/pre-push/412/

pre-push for linux-pkg with adoptopenjdk changes -> http://selfservice.jenkins.delphix.com/job/devops-gate/job/master/job/linux-pkg-build/job/master/job/userland/job/pre-push/8/

appliance-build-orchestrator-pre-push with S3 links from above runs -> http://selfservice.jenkins.delphix.com/job/devops-gate/job/master/job/appliance-build-orchestrator-pre-push/766/

Copy link
Contributor

@pzakha pzakha left a comment

Choose a reason for hiding this comment

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

Looking at the appliance-build-orchestrator logs, there's 2 versions of Java installed at that point, but that does seem to still work. That said, /usr/bin/java is used to launch the app-stack, and it is unclear at this point if this points to oracle Java or to adoptopenjdk Java.

There's a few more things that we should test before following through:

With those changes, we should redo another run of appliance-build-orchestrator and verify that oracle Java is not being installed anymore by logging on the created appliance.


function prepare() {
logmust "$TOP/buildpkg.sh" make-jpkg
if [[ $(dpkg-query --show java-package) != *"delphix"* ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that the presence of *"delphix"* in the version string is only there because that's what $DEFAULT_REVISION contains, and that may be customized by a build.
Until we have #22 implemented, we unfortunately need to do some hacks to lay out package dependencies. In this case, we can check for something like -f "$TOP/packages/make-jpkg/tmp/artifacts/"*.deb to determine whether make-jpkg was built (and thus installed) successfully.

}

function fetch() {
logmust cd "$WORKDIR/"

local url="http://artifactory.delphix.com/artifactory"

wget -nv "$url/java-binaries/linux/jdk/8/$tarfile" -O "$tarfile"
logmust wget -nv "$url/java-binaries/linux/jdk/8/$tarfile" -O "$tarfile"
}

function build() {
logmust cd "$WORKDIR/"

env DEB_BUILD_OPTIONS=nostrip fakeroot make-jpkg "$tarfile" <<<y
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you prepend a logmust here?

@pzakha
Copy link
Contributor

pzakha commented Mar 28, 2019

Also, could you please run make check on the linux-pkg changes to make sure there is no style check issues?

@sravyamks
Copy link
Contributor Author

Looking at the appliance-build-orchestrator logs, there's 2 versions of Java installed at that point, but that does seem to still work. That said, /usr/bin/java is used to launch the app-stack, and it is unclear at this point if this points to oracle Java or to adoptopenjdk Java.

There's a few more things that we should test before following through:

With those changes, we should redo another run of appliance-build-orchestrator and verify that oracle Java is not being installed anymore by logging on the created appliance.

Sure. Yes, Both oracleJDK and AdoptopenJDK are installed right now on the image created as i didnot do the changes for Masking for this build and it still needs OracleJDK. Also i verified that java -version points to AdoptopenJDK while JAVA_HOME was still Oracle which i guess will be fixed with change you mentioned for delphix-platform.

Copy link
Contributor

@pzakha pzakha left a comment

Choose a reason for hiding this comment

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

Code LGTM, pending testing.

echo_bold "custom java-package not installed. Building package 'make-jpkg' first."
logmust "$TOP/buildpkg.sh" make-jpkg
fi
for file in "$TOP/packages/make-jpkg/tmp/artifacts/"*.deb
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this code is a bit confusing as it relies on file being equal to the literal "$TOP"'/packages/make-jpkg/tmp/artifacts/*.deb' with the * in the name.
probably something like this would be easier to understand:

if ! ls "$TOP/packages/make-jpkg/tmp/artifacts/"*.deb >/dev/null 2>&1; then
    ...
fi

@sravyamks
Copy link
Contributor Author

sravyamks commented Apr 1, 2019

Testing:

delphix-platform -
changes : delphix/delphix-platform#67

saml-app -
changes : http://reviews.delphix.com/r/48313/

app-gate -
changes : http://reviews.delphix.com/r/48310/
build : http://selfservice.jenkins.delphix.com/job/dlpx-app-gate/job/master/job/build-package/job/pre-push/447/

masking -
changes : http://reviews.delphix.com/r/48311/
build - http://selfservice.jenkins.delphix.com/job/dms-core-gate/job/master/job/build-package/job/pre-push/73/

linux-pkg -
build : http://selfservice.jenkins.delphix.com/job/devops-gate/job/master/job/linux-pkg-build/job/master/job/userland/job/pre-push/15/

appliance-build-orchestrator-pre-push : http://selfservice.jenkins.delphix.com/job/devops-gate/job/master/job/appliance-build-orchestrator-pre-push/806/

Test java version on a VM from image created (dlpx-sravya.meda-master) -

delphix@ip-10-110-226-192:~$ java -version
openjdk version "1.8.0_202"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_202-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.202-b08, mixed mode)
delphix@ip-10-110-226-192:~$ javac -version
javac 1.8.0_202
delphix@ip-10-110-226-192:~$ echo $JAVA_HOME
/usr/lib/jvm/adoptopenjdk-java8-jdk-amd64
delphix@ip-10-110-226-192:~$ cd /usr/lib/jvm/
delphix@ip-10-110-226-192:/usr/lib/jvm$ ls
adoptopenjdk-java8-jdk-amd64

@pzakha pzakha merged commit 9934bb5 into delphix:master Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants