-
Notifications
You must be signed in to change notification settings - Fork 31
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
Conversation
… dcoa & dcod VMs - Delphix Engine
… dcoa & dcod VMs - Delphix Engine
There was a problem hiding this 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:
- We will need to have a follow-up change in delphix-platform to change JAVA_HOME: https://github.com/delphix/delphix-platform/blob/master/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks/main.yml#L261
- We should modify masking to depend on adoptopenjdk instead of oracle in here https://gitlab.delphix.com/masking/dms-core-gate/blob/master/dist/build.gradle#L531
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.
packages/adoptopenjdk/config.sh
Outdated
|
||
function prepare() { | ||
logmust "$TOP/buildpkg.sh" make-jpkg | ||
if [[ $(dpkg-query --show java-package) != *"delphix"* ]]; then |
There was a problem hiding this comment.
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.
packages/adoptopenjdk/config.sh
Outdated
} | ||
|
||
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 |
There was a problem hiding this comment.
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?
Also, could you please run |
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 |
There was a problem hiding this 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.
packages/adoptopenjdk/config.sh
Outdated
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 |
There was a problem hiding this comment.
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
Testing: delphix-platform - saml-app - app-gate - masking - linux-pkg - 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 (
|
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/