-
-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ansible: add alpine build image (#1496)
* ansible: add alpine build image * \add zulu bootjdk * Update Alpine.yml * add jdk14
- Loading branch information
Showing
6 changed files
with
195 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM alpine:3 | ||
|
||
RUN apk update; apk add ansible | ||
|
||
COPY . /ansible | ||
|
||
RUN echo "localhost ansible_connection=local" > /ansible/hosts | ||
|
||
RUN set -eux; \ | ||
cd /ansible; \ | ||
ansible-playbook -i hosts ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml --skip-tags="debug,hosts_file,hostname,adoptopenjdk,jenkins,nagios,superuser,docker,swap_file,crontab,nvidia_cuda_toolkit"; \ | ||
rm -rf /ansible; apk del ansible | ||
|
||
ENV \ | ||
JDK8_BOOT_DIR="/usr/lib/jvm/zulu8" \ | ||
JDK14_BOOT_DIR="/usr/lib/jvm/zulu14" \ | ||
JDK15_BOOT_DIR="/usr/lib/jvm/zulu15" \ | ||
JDKLATEST_BOOT_DIR="/usr/lib/jvm/zulu15" \ | ||
JAVA_HOME="/usr/lib/jvm/zulu8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94
ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Alpine.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
--- | ||
########## | ||
# Alpine # | ||
########## | ||
|
||
############################ | ||
# Build Packages and tools # | ||
############################ | ||
- name: Call Build Packages and Tools Task | ||
include_tasks: build_packages_and_tools.yml | ||
|
||
- name: Checking for /usr/lib/jvm | ||
stat: path=/usr/lib/jvm | ||
register: usr_lib_jvm_exists | ||
tags: build_tools | ||
|
||
- name: Creating /usr/lib/jvm if not found | ||
file: | ||
path: /usr/lib/jvm | ||
state: directory | ||
owner: root | ||
mode: 0755 | ||
when: | ||
- not usr_lib_jvm_exists.stat.exists | ||
tags: build_tools | ||
|
||
- name: Check if zulu-8 is already installed in the target location | ||
stat: path=/usr/lib/jvm/zulu8 | ||
register: zulu8_installed | ||
tags: build_tools | ||
|
||
- name: Install latest zulu-8 release if not already installed | ||
unarchive: | ||
src: https://cdn.azul.com/zulu/bin/zulu8.48.0.53-ca-jdk8.0.265-linux_musl_x64.tar.gz | ||
dest: /usr/lib/jvm/ | ||
remote_src: yes | ||
when: | ||
- not zulu8_installed.stat.exists | ||
tags: build_tools | ||
|
||
- name: Create symlink to point at zulu-8 | ||
file: | ||
src: /usr/lib/jvm/zulu8.48.0.53-ca-jdk8.0.265-linux_musl_x64 | ||
dest: /usr/lib/jvm/zulu8 | ||
state: link | ||
when: | ||
- not zulu8_installed.stat.exists | ||
tags: build_tools | ||
|
||
- name: Check if zulu-14 is already installed in the target location | ||
stat: path=/usr/lib/jvm/zulu14 | ||
register: zulu14_installed | ||
tags: build_tools | ||
|
||
- name: Install latest zulu-14 release if not already installed | ||
unarchive: | ||
src: https://cdn.azul.com/zulu/bin/zulu14.29.23-ca-jdk14.0.2-linux_musl_x64.tar.gz | ||
dest: /usr/lib/jvm/ | ||
remote_src: yes | ||
when: | ||
- not zulu14_installed.stat.exists | ||
tags: build_tools | ||
|
||
- name: Create symlink to point at zulu-14 | ||
file: | ||
src: /usr/lib/jvm/zulu14.29.23-ca-jdk14.0.2-linux_musl_x64 | ||
dest: /usr/lib/jvm/zulu14 | ||
state: link | ||
when: | ||
- not zulu14_installed.stat.exists | ||
tags: build_tools | ||
|
||
- name: Check if zulu-15 is already installed in the target location | ||
stat: path=/usr/lib/jvm/zulu15 | ||
register: zulu15_installed | ||
tags: build_tools | ||
|
||
- name: Install latest zulu-15 release if not already installed | ||
unarchive: | ||
src: https://cdn.azul.com/zulu/bin/zulu15.0.73-ea-jdk15.0.0-ea.34-linux_musl_x64.tar.gz | ||
dest: /usr/lib/jvm/ | ||
remote_src: yes | ||
when: | ||
- not zulu15_installed.stat.exists | ||
tags: build_tools | ||
|
||
- name: Create symlink to point at zulu-15 | ||
file: | ||
src: /usr/lib/jvm/zulu15.0.73-ea-jdk15.0.0-ea.34-linux_musl_x64 | ||
dest: /usr/lib/jvm/zulu15 | ||
state: link | ||
when: | ||
- not zulu15_installed.stat.exists | ||
tags: build_tools |
58 changes: 58 additions & 0 deletions
58
ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/vars/Alpine.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
########## | ||
# Alpine # | ||
########## | ||
|
||
# Command Build Tool Packages | ||
Build_Tool_Packages: | ||
- alpine-sdk | ||
- alsa-lib | ||
- alsa-lib-dev | ||
- autoconf | ||
- bash | ||
- bison # OpenJ9 | ||
- cups-dev | ||
- cups-libs | ||
- flex # OpenJ9 | ||
- fontconfig | ||
- fontconfig-dev | ||
- freetype | ||
- freetype-dev | ||
- grep | ||
- libdwarf # OpenJ9 | ||
- libdwarf-dev # OpenJ9 | ||
- libx11 | ||
- libx11-dev | ||
- libxext | ||
- libxext-dev | ||
- libxrandr | ||
- libxrandr-dev | ||
- libxrender | ||
- libxrender-dev | ||
- libxt | ||
- libxt-dev | ||
- libxtst | ||
- libxtst-dev | ||
- linux-headers | ||
- numactl | ||
- numactl-dev # OpenJ9 | ||
- unzip | ||
- wget | ||
- which | ||
- xz | ||
- zip | ||
|
||
Test_Tool_Packages: | ||
- unzip | ||
- zlib | ||
- zlib-dev | ||
- perl | ||
- perl-dev | ||
- libcurl | ||
- curl-dev | ||
- openssl | ||
- openssl-dev | ||
- mercurial | ||
- xauth | ||
- xorg-server | ||
- xvfb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters