Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@ ENV FACTER_VERSION 2.4.6
# Install any dependencies needed
RUN apk update && \
apk add bash sed dmidecode ruby ruby-irb open-lldp util-linux open-vm-tools sudo && \
apk add lshw ipmitool --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted && \
echo "install: --no-rdoc --no-ri" > /etc/gemrc && \
apk add lshw --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/community/ --allow-untrusted

RUN echo "install: --no-rdoc --no-ri" > /etc/gemrc && \
echo ":ssl_verify_mode: 0" >> /etc/gemrc && \
gem install json_pure daemons && \
gem install facter -v ${FACTER_VERSION} && \
find /usr/lib/ruby/gems/2.2.0/gems/facter-${FACTER_VERSION} -type f -exec sed -i 's:/proc/:/host-proc/:g' {} + && \
find /usr/lib/ruby/gems/2.2.0/gems/facter-${FACTER_VERSION} -type f -exec sed -i 's:/dev/:/host-dev/:g' {} + && \
find /usr/lib/ruby/gems/2.2.0/gems/facter-${FACTER_VERSION} -type f -exec sed -i 's:/host-dev/null:/dev/null:g' {} + && \
find /usr/lib/ruby/gems/2.2.0/gems/facter-${FACTER_VERSION} -type f -exec sed -i 's:/sys/:/host-sys/:g' {} +
gem install facter -v ${FACTER_VERSION}

RUN find /usr/lib/ruby/gems/2.3.0/gems/facter-${FACTER_VERSION} -type f -exec sed -i 's:/proc/:/host-proc/:g' {} + && \
find /usr/lib/ruby/gems/2.3.0/gems/facter-${FACTER_VERSION} -type f -exec sed -i 's:/dev/:/host-dev/:g' {} + && \
find /usr/lib/ruby/gems/2.3.0/gems/facter-${FACTER_VERSION} -type f -exec sed -i 's:/host-dev/null:/dev/null:g' {} + && \
find /usr/lib/ruby/gems/2.3.0/gems/facter-${FACTER_VERSION} -type f -exec sed -i 's:/sys/:/host-sys/:g' {} +

ADD pkg/ipmitool.tgz /

ADD hnl_mk*.rb /usr/local/bin/
ADD hanlon_microkernel/*.rb /usr/local/lib/ruby/hanlon_microkernel/

13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
TAG?=test
IMAGENAME?=jtilander/hanlon-microkernel

image:
docker build -t $(IMAGENAME):$(TAG) .

push: image
docker push $(IMAGENAME):$(TAG)

save:
docker save $(IMAGENAME):$(TAG) > cscdock-mk-image.tar
bzip2 -c cscdock-mk-image.tar > /tmp/cscdock-mk-image.tar.bz2
rm cscdock-mk-image.tar
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,15 @@ This project contains the Ruby scripts/classes that are used to control the Hanl
In addition, this project also includes a number of additional ruby files and configuration files that are used by these services, and the 'hnl_mk_init.rb' script itself (which is used to start the appropriate Ruby-based services during the Microkernel boot process).

It should be noted that this project also includes a Dockerfile that is used to build a new instance of the Microkernel container. Instructions for building your own (custom) Microkernel container can be found in the project's Wiki.



## Patches

This project seems a little bit out of date so there were a couple of problems with building it that was fixed:

* Certificates for gems out of date, disabled verification for now
* ipmitool has fallen out of alpine distro, used https://github.com/urzds/ipmitool-docker to build the pkg/ipmitool.tgz file
* Source repro for lshw changed from testing to community (presumably due to the same circumstances as for ipmitool)
* Gems install version changed to 2.3.0

Binary file added pkg/ipmitool.tgz
Binary file not shown.