Public Repository

Last pushed: 2 years ago
Short Description
RVC (RPM) from VCSA 6.5.0-4602587 installed in Photon
Full Description

Dockerfile

FROM photon:latest
MAINTAINER docker@esod.no

# Update OS - ignore
# RUN tdnf -y update

# Install pre-reqs
# NOTE: shadow is needed for "useradd", which is needed in vsan-health-installation
RUN tdnf install -y ruby rubygem-* shadow

# Cleanup
RUN tdnf clean all

# Add & Install RVC, retrieved from VCSA 6.5.0-4602587
# NOTE: Packages are located in the *-disk2.vmdk
ADD rvc_1.5.0-4501438_x86_64.rpm /tmp
ADD VMware-vsan-health-6.5.0-4602587.x86_64.rpm /tmp
ADD VMware-vsanmgmt-6.5.0-0.1.4602587.x86_64.rpm /tmp

# Patch: fix_usermod_patch, from "common-install.sh" in the VCSA 6.5 appliance
# If not patched, the VMware-vsan-health-*.rpm-installation will fail
ADD usermod.new /usr/sbin
RUN cp /usr/sbin/usermod /usr/sbin/usermod.orig
RUN mv /usr/sbin/usermod /usr/sbin/usermod.bk
RUN mv /usr/sbin/usermod.new /usr/sbin/usermod
RUN chmod +x /usr/sbin/usermod

# Point vmw python to photon python.
RUN mkdir -p /opt/vmware/bin
RUN ln -sf /usr/bin/python /opt/vmware/bin/python

# Install RPMs
RUN rpm -ivh /tmp/rvc*
RUN rpm -ivh /tmp/VMware-vsan-health-*
RUN rpm -ivh /tmp/VMware-vsanmgmt-*
RUN rm /tmp/rvc*
RUN rm /tmp/VMware-*

# Run Bash when the image starts
CMD ["/bin/bash"]

Usage (samples)

1) docker run -it --name rvc esod/photon-rvc

FILE: usermod.new

"patch" from VCSA-appliance.

#!/opt/vmware/bin/python
import sys
import subprocess

if 'usermod.bk' in ' '.join(sys.argv):
    print "called recursively", " ".join(sys.argv)
    exit

if '-A' in sys.argv:
    group = sys.argv[-2]
    user = sys.argv[-1]
    cmd = ['/usr/sbin/usermod.bk', '-a', '-G', group, user]
    print ' '.join(cmd)
    errcode =  subprocess.check_call(cmd)
else:
    cmd = sys.argv
    cmd[0] = cmd[0].replace('usermod', 'usermod.bk')
    print ' '.join(cmd)
    errcode = subprocess.check_call(sys.argv)

exit(errcode)



Docker Pull Command
Owner
esod