mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
This commit break long command-line prompts into multiple lines so that the command is visible without scrolling.
49 lines
2.1 KiB
Plaintext
49 lines
2.1 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * hosted_control_planes/hcp-disconnected/hcp-deploy-dc-bm.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="hcp-dc-web-server_{context}"]
|
|
= Configuring the web server for {hcp} in a disconnected environment
|
|
|
|
You need to configure an additional web server to host the {op-system-first} images that are associated with the {product-title} release that you are deploying as a hosted cluster.
|
|
|
|
.Procedure
|
|
|
|
To configure the web server, complete the following steps:
|
|
|
|
. Extract the `openshift-install` binary from the {product-title} release that you want to use by entering the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc adm -a ${LOCAL_SECRET_JSON} release extract --command=openshift-install \
|
|
"${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}-${ARCHITECTURE}"
|
|
----
|
|
|
|
. Run the following script. The script creates a folder in the `/opt/srv` directory. The folder contains the {op-system} images to provision the worker nodes.
|
|
+
|
|
[source,bash]
|
|
----
|
|
#!/bin/bash
|
|
|
|
WEBSRV_FOLDER=/opt/srv
|
|
ROOTFS_IMG_URL="$(./openshift-install coreos print-stream-json | jq -r '.architectures.x86_64.artifacts.metal.formats.pxe.rootfs.location')" <1>
|
|
LIVE_ISO_URL="$(./openshift-install coreos print-stream-json | jq -r '.architectures.x86_64.artifacts.metal.formats.iso.disk.location')" <2>
|
|
|
|
mkdir -p ${WEBSRV_FOLDER}/images
|
|
curl -Lk ${ROOTFS_IMG_URL} -o ${WEBSRV_FOLDER}/images/${ROOTFS_IMG_URL##*/}
|
|
curl -Lk ${LIVE_ISO_URL} -o ${WEBSRV_FOLDER}/images/${LIVE_ISO_URL##*/}
|
|
chmod -R 755 ${WEBSRV_FOLDER}/*
|
|
|
|
## Run Webserver
|
|
podman ps --noheading | grep -q websrv-ai
|
|
if [[ $? == 0 ]];then
|
|
echo "Launching Registry pod..."
|
|
/usr/bin/podman run --name websrv-ai --net host -v /opt/srv:/usr/local/apache2/htdocs:z quay.io/alosadag/httpd:p8080
|
|
fi
|
|
----
|
|
+
|
|
<1> You can find the `ROOTFS_IMG_URL` value on the OpenShift CI Release page.
|
|
<2> You can find the `LIVE_ISO_URL` value on the OpenShift CI Release page.
|
|
|
|
After the download is completed, a container runs to host the images on a web server. The container uses a variation of the official HTTPd image, which also enables it to work with IPv6 networks. |