footloose
footloose copied to clipboard
Image for SUSE / Tumbleweed
Hi @dlespiau,
I'd like to add an image for SUSE / Tumbleweed. I have the Dockerfile, would you accept a PR and build it through your CI process?
This is what I built - it is a combination of https://github.com/openSUSE/docker-containers/tree/master/derived_images/systemd and your examples for the other images.
FROM opensuse/tumbleweed:latest
RUN zypper -n install systemd; zypper clean ; \
(cd /usr/lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /usr/lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /usr/lib/systemd/system/local-fs.target.wants/*; \
rm -f /usr/lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /usr/lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /usr/lib/systemd/system/basic.target.wants/*;\
rm -f /usr/lib/systemd/system/anaconda.target.wants/*;
RUN zypper --non-interactive install \
openssh \
sudo hostname iproute2 net-tools iputils wget
RUN ln -s /bin/systemd /sbin/init
EXPOSE 22
# https://www.freedesktop.org/wiki/Software/systemd/ContainerInterface/
STOPSIGNAL SIGRTMIN+3
CMD ["bash"]
Output from the above:
[alex@nuc footloose]$ cat footloose.yaml
cluster:
name: cluster
privateKey: cluster-key
machines:
- count: 1
spec:
image: suse:systemd
name: node%d
portMappings:
- containerPort: 22
hostPort: 2222
[alex@nuc footloose]$
[alex@nuc footloose]$ footloose create
INFO[0000] Image: suse:systemd present locally
INFO[0000] Creating machine: cluster-node0 ...
[alex@nuc footloose]$
[alex@nuc footloose]$ footloose ssh root@node0
Have a lot of fun...
node0:~ # cat /etc/os-release
NAME="openSUSE Tumbleweed"
# VERSION="20190403"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20190403"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20190403"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
node0:~ #
Let me know your thoughts.
Alex
cc @feri
@alexellis +1
Note that the quay.io/footloose
images aren't currently updated and pushed regularly, just when PRs are merged into master. So not sure Tumbleweed is the right choice here (vs Leap). That said we should probably have a CI cronjob pushing footloose images regularly.
In any case, you should be able to open a PR with the new image:
- Choose a name,
quay.io/footloose/opensuse
? (the tumbleweed would be implicit without a version) - Put the Docker file in https://github.com/weaveworks/footloose/tree/master/images
- Add the image name to https://github.com/weaveworks/footloose/blob/master/tests/variables.json. That will run tests for that new image as well
- Submit PR. The CI will build your new image locally and execute the tests
- If all green, merging the PR into master will publish
quay.io/footloose/opensuse
you should probably add a zypper clean
in your second RUN
command.
Thank you @dlespiau I'll go ahead and attempt that. Let me know if there are other changes or paperwork needed.