Skip to content

Commit 45e6149

Browse files
authored
Update Dockerfile and Makefile for formal OMSA (#146)
* Dockerfile and Makefule for formal OMSA Signed-off-by: Maho Takara <[email protected]> * Update for change request Signed-off-by: Maho Takara <[email protected]> --------- Signed-off-by: Maho Takara <[email protected]>
1 parent 4343466 commit 45e6149

File tree

6 files changed

+33
-18
lines changed

6 files changed

+33
-18
lines changed

.github/workflows/main.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
- name: Run test
2727
run: make test
2828

29+
- name: Download iDRAC Tools
30+
run: make download-idractools
31+
2932
- name: Build binaries
3033
run: make install GOBIN=`pwd`/docker
3134

.github/workflows/release.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ jobs:
1919
- name: setup
2020
run: make setup
2121

22+
- name: Download iDRAC Tools
23+
run: make download-idractools
24+
2225
- name: Build binaries
2326
run: make install GOBIN=`pwd`/docker
2427

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
\#*#
44
.*.swp
55
/.vscode
6+
*.tar.gz

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ ifdef GOBIN
4242
endif
4343
GOBIN=$(GOBIN) CGO_ENABLED=0 go install -ldflags="-s -w" $(foreach f, $(BINS), ./pkg/$(f))
4444

45+
.PHONY: download-idractools
46+
download-idractools:
47+
# Must change the URL to the latest version of iDRAC Tools.
48+
# Please see https://www.dell.com/support/home/ja-jp/drivers/driversdetails?driverid=mfv7t
49+
curl 'https://dl.dell.com/FOLDER12638439M/1/Dell-iDRACTools-Web-LX-11.3.0.0-795_A00.tar.gz' \
50+
-H 'user-agent: setup-hw' \
51+
--output idrac-tools.tar.gz
52+
tar -xzf idrac-tools.tar.gz -C docker
53+
4554
build-image: install
4655
ifdef GOBIN
4756
mkdir -p $(GOBIN)
@@ -51,4 +60,4 @@ else
5160
endif
5261
cd docker && docker build -t ghcr.io/cybozu-go/setup-hw:dev .
5362

54-
.PHONY: all generate check-generate setup test install build-image
63+
.PHONY: all generate check-generate setup test install download-idractools build-image

docker/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ monitor-hw
44
setup-apply-firmware
55
setup-hw
66
setup-isoreboot
7+
COPYRIGHT.txt
8+
iDRACTools/
9+
license.txt

docker/Dockerfile

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,25 @@ COPY monitor-hw /usr/local/sbin/monitor-hw
66
COPY collector /usr/local/sbin/collector
77
COPY setup-apply-firmware /usr/local/sbin/setup-apply-firmware
88
COPY setup-isoreboot /usr/local/sbin/setup-isoreboot
9+
910
CMD ["/usr/local/sbin/monitor-hw"]
1011

1112
# Install vendor tools
1213
FROM stage1
1314
LABEL org.opencontainers.image.source="https://github.com/cybozu-go/setup-hw"
1415

15-
# See https://linux.dell.com/repo/community/openmanage/
16-
ARG OMSA_VERSION=11100
17-
ARG UBUNTU_VERSION=jammy
18-
19-
# Setup DELL repository
20-
RUN apt-get update -y && apt-get install -y --no-install-recommends wget gnupg ca-certificates curl\
21-
&& echo "deb http://linux.dell.com/repo/community/openmanage/${OMSA_VERSION}/${UBUNTU_VERSION} ${UBUNTU_VERSION} main" | tee -a /etc/apt/sources.list.d/linux.dell.com.sources.list \
22-
&& wget https://linux.dell.com/repo/pgp_pubkeys/0x1285491434D8786F.asc \
23-
&& apt-key add 0x1285491434D8786F.asc \
24-
&& rm 0x1285491434D8786F.asc
25-
26-
# To avoid error postinstall script of srvadmin-all in the contaioner enviroment.
16+
# Do not delete the following line to prevent installation errors in a container environment.
2717
COPY systemctl-dummy /usr/bin/systemctl
2818

29-
# Install DELL's tools
30-
# monitor-hw call /usr/libexec/instsvcdrv-helper which depends on "kmod" package. We must install "kmod"
3119
RUN apt-get update -y \
32-
&& ln -s /usr/lib/x86_64-linux-gnu/libssl.so.3 /usr/lib/libssl.so \
33-
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends srvadmin-all srvadmin-idracadm8 kmod \
34-
&& rm /usr/bin/systemctl
20+
&& apt-get install -y --no-install-recommends pciutils libargtable2-0 kmod
21+
22+
RUN mkdir /pkg
23+
COPY iDRACTools/racadm/UBUNTU22/x86_64/*.deb /pkg/
24+
RUN dpkg -i /pkg/srvadmin-hapi_11.3.0.0_amd64.deb \
25+
&& dpkg -i /pkg/srvadmin-idracadm7_11.3.0.0_all.deb \
26+
&& dpkg -i /pkg/srvadmin-idracadm8_11.3.0.0_amd64.deb
27+
28+
RUN apt-get clean \
29+
&& rm -rf /pkg \
30+
&& rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)