Utility to install a server via Redfish
This update introduces the implementation for a docker container named 'rvmc', standing for Redfish Virtual Media Controller, which executes a python file that imports the open source redfish-python-library used to establish a secure Redfish communication session with a Redfish supported Board Management Controller to insert a URL based ISO image into its Virtual Media CD/DVD device so that on that server's next reboot will boot and install that image. This container supports single and multi target configuration files with IPV4 and IPV6 BMC addressing. Change-Id: I4d555046800c8d193686b9ef3a2b1e61c13d4ff8 Depends-On: https://review.opendev.org/#/c/700434/ Depends-On: https://review.opendev.org/#/c/700080/ Story: 2006980 Task: 37775 Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
This commit is contained in:
parent
6ccd0f4a43
commit
8959d8258d
|
@ -7,3 +7,4 @@ installer/pxe-network-installer
|
|||
kickstart
|
||||
inventory
|
||||
python-inventoryclient
|
||||
tools/rvmc
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
tools/rvmc
|
|
@ -0,0 +1,2 @@
|
|||
TIS_PATCH_VER=1
|
||||
BUILD_IS_SLOW=5
|
|
@ -0,0 +1,16 @@
|
|||
ARG BASE
|
||||
FROM ${BASE}
|
||||
MAINTAINER eric.macdonald@windriver.com
|
||||
RUN yum install -y iproute python3 pip3 datetime time
|
||||
RUN pip3 install pyyaml redfish
|
||||
COPY rvmc.py /usr/local/bin
|
||||
ENV debug=0
|
||||
ENV target=None
|
||||
ENTRYPOINT /usr/local/bin/rvmc.py --target $target --debug $debug
|
||||
|
||||
# Execution Examples:
|
||||
#
|
||||
# sudo docker run -v /etc/rvmc.yaml:/etc/rvmc.yaml rvmc:latest
|
||||
# sudo docker run -v /etc/rvmc.yaml:/etc/rvmc.yaml --env target=dcloud1 rvmc:latest
|
||||
# sudo docker run -v /etc/rvmc.yaml:/etc/rvmc.yaml --env target=dcloud1,dcloud2 rvmc:latest
|
||||
# sudo docker run -v /etc/rvmc.yaml:/etc/rvmc.yaml --env target=dcloud1,dcloud2 --env debug=1 rvmc:latest
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: rvmc-subcloud1
|
||||
spec:
|
||||
ttlSecondsAfterFinished: 60
|
||||
activeDeadlineSeconds: 600
|
||||
backoffLimit: 1
|
||||
template:
|
||||
spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/hostname: controller-0
|
||||
containers:
|
||||
- name: rvmc
|
||||
image: rvmc:dev-centos-stable-build
|
||||
volumeMounts:
|
||||
- mountPath: /etc/rvmc.yaml
|
||||
name: rvmc-config
|
||||
volumes:
|
||||
- name: rvmc-config
|
||||
hostPath:
|
||||
path: /etc/rvmc_subcloud1.yaml
|
||||
restartPolicy: Never
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
virtual_media_iso:
|
||||
dcloud1:
|
||||
bmc_address: <bmc ip address>
|
||||
bmc_username: <bmc username>
|
||||
bmc_password: <bmc password - base64 encoded >
|
||||
image: <url address, port and path to image>
|
||||
dcloud2:
|
||||
bmc_address: <bmc ip address>
|
||||
bmc_username: <bmc username>
|
||||
bmc_password: <bmc password - base64 encoded>
|
||||
image: <url address, port and path to image>
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: rvmc
|
||||
spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/hostname: controller-0
|
||||
containers:
|
||||
- name: rvmc
|
||||
image: rvmc:dev-centos-stable-build
|
||||
volumeMounts:
|
||||
- mountPath: /etc/rvmc.yaml
|
||||
name: rvmc-config
|
||||
volumes:
|
||||
- name: rvmc-config
|
||||
hostPath:
|
||||
path: /etc/rvmc.yaml
|
||||
restartPolicy: Never
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
bmc_address: <bmc ip address>
|
||||
bmc_username: <bmc username>
|
||||
bmc_password: <bmc password - base64 encoded>
|
||||
image: <url address, port and path to image>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,2 @@
|
|||
BUILDER=docker
|
||||
LABEL=rvmc
|
Loading…
Reference in New Issue