Installing in an air gap environment by using a bastion server
A cluster administrator can install WebSphere Automation in an air gap environment that has a bastion server with external internet access.
About this task
cloudctl
utility. For the more recent method, using the ibm-pak
plugin, see Installing by mirroring images to a private container registry (with ibm-pak plug-in).Before you begin
Installation in an air gap environment has the following prerequisites:
- A bastion server that has access to the Red Hat® OpenShift® Container Platform 4.14 or later cluster, the local container registry, and the internet. The bastion server must be on a Linux® x86_64 or Linux on IBM Z platform with a Red Hat Enterprise Linux version 8 operating system.
- Docker 17.05 or later or Podman version 1.4 or later installed on the bastion.
- OpenShift Container Platform CLI tool (
oc
). - A container registry that supports Docker Image Manifest V2 format, accessible by the bastion server and the Red Hat OpenShift cluster.
- An entitlement key to the IBM® Entitled
Container Fulfillment Registry.
- Log in to MyIBM Container Software Library with the IBMid and password that are associated with the entitled software.
- In the Active entitlement keys section, click Copy to copy the entitlement key to the clipboard.
Procedure
Mirroring WebSphere Automation container images and configuring a cluster
- Install
cloudctl
.- Follow the instructions at the IBM public IBM Cloud Pak cli repository
to download and verify the
cloudctl
tool. - After you download and verify the
cloudctl
binary for your operating system, move the binary to the path appropriate for your operating system. For example, for Linux, run the following command to change and move the file.sudo mv cloudctl-os-arch /usr/local/bin/cloudctl
- Follow the instructions at the IBM public IBM Cloud Pak cli repository
- Download Container Application Software for Enterprises (CASE).
Run the
cloudctl
case save command to download the CASE metadata.
For the current release of WebSphere Automation,cloudctl case save \ --repo https://github.com/IBM/cloud-pak/raw/master/repo/case --case $CASE_NAME --version $CASE_VERSION \ --outputdir ./ibm-websphere-automation
CASE_NAME=ibm-websphere-automation
CASE_VERSION
is the version of WebSphere Automation that you want to install, for example,1.8.2
; you can see the available versions.
- Create environment variables.
Replace variables in the following example with your own information.
export MIRROR_REGISTRY=registry export MIRROR_REGISTRY_USERNAME=username export MIRROR_REGISTRY_PASSWORD=password export CASEPATH=absolute_path_to_downloaded_ibm-websphere-automation
- Log in to your Red Hat OpenShift Container Platform
cluster.
oc login https://your_api_cluster_url
- Create credentials for the mirror registry.
cloudctl case launch \ --case $CASEPATH \ --inventory automationOperatorSetup \ --action configure-creds-airgap \ --args "--registry $MIRROR_REGISTRY --user $MIRROR_REGISTRY_USERNAME --pass $MIRROR_REGISTRY_PASSWORD"
- If you use a mirror registry that is insecure, configure an insecure registry.
Configure the cluster to enable pulling images from this registry. Replace
registry
with the name of your registry and then run the patch command.oc patch image.config.openshift.io/cluster --type=merge \ -p '{"spec":{"registrySources":{"insecureRegistries":["registry"]}}}'
- Create credentials for the IBM entitlement registry.
Replace
entitlement_key
with your entitlement key and then run thecloudctl
case launch command.cloudctl case launch \ --case $CASEPATH \ --inventory automationOperatorSetup \ --action configure-creds-airgap \ --args "--registry cp.icr.io --user cp --pass entitlement_key"
- Mirror the
images.
export OFFLINEDIR=absolute_path_to_outputdir_from_previous_cloudctl_case_save cloudctl case launch \ --case $CASEPATH \ --inventory automationOperatorSetup \ --action mirror-images \ --args "--registry $MIRROR_REGISTRY --inputDir $OFFLINEDIR"
- Configure
ImageContentSourcePolicy
and create a global pull secret.Run the following command to configure the cluster to redirect image requests to the mirrored registry and create a global pull secret for the mirrored registry.
cloudctl case launch \ --case $CASEPATH \ --namespace default \ --inventory automationOperatorSetup \ --action configure-cluster-airgap \ --args "--registry $MIRROR_REGISTRY --inputDir $OFFLINEDIR"
Tip: Deployment of theImageContentSourcePolicy
resource takes several minutes while each node is drained of its pods. Before you move to the next step, ensure that the status of all nodes isReady
. Run the oc get nodes command to get status. - Wait for rollout process to finish.
Run the following command to verify that
Updated
is set totrue
.oc get machineconfigpools
Installing the WebSphere Automation operator
- Set the WSA_OPERATOR_NAMESPACE and
WSA_INSTANCE_NAMESPACE shell variables.
For the AllNamespaces installation mode, set WSA_OPERATOR_NAMESPACE to openshift-operators. Set WSA_INSTANCE_NAMESPACE to the instance namespace, for example, websphere-automation. For SingleNamespace, use different namespace values. For OwnNamespace mode, set WSA_OPERATOR_NAMESPACE to the same value as WSA_INSTANCE_NAMESPACE.
WSA_OPERATOR_NAMESPACE=openshift-operators WSA_INSTANCE_NAMESPACE=websphere-automation
- Create the namespaces, if needed.
For catalog namespace, openshift-marketplace exists. For AllNamespaces installation mode, the openshift-operators namespace exists.
oc create namespace $WSA_OPERATOR_NAMESPACE oc create namespace $WSA_INSTANCE_NAMESPACE
- For either OwnNamespace or SingleNamespace mode, create an OperatorGroup.Note: For the default AllNamespaces mode, skip this step.
cat <<EOF | oc apply -f - apiVersion: operators.coreos.com/v1alpha2 kind: OperatorGroup metadata: name: ibm-websphere-automation namespace: $WSA_OPERATOR_NAMESPACE spec: targetNamespaces: - $WSA_INSTANCE_NAMESPACE EOF
- Install operator catalog for WebSphere Automation and its
dependencies.
cloudctl case launch \ --case $CASEPATH \ --namespace openshift-marketplace \ --inventory automationOperatorSetup \ --action install-catalog \ --args "--inputDir $OFFLINEDIR --recursive --registry icr.io"
- Install the WebSphere Automation
operator.
cloudctl case launch \ --case $CASEPATH \ --namespace $WSA_OPERATOR_NAMESPACE \ --inventory automationOperatorSetup \ --action install-operator \ --args "--inputDir $OFFLINEDIR"
Creating an instance of WebSphere Automation
Deploy the following configuration to create an instance of WebSphere Automation an air gap environment.
cat <<EOF | oc apply -f -
apiVersion: automation.websphere.ibm.com/v1
kind: WebSphereSecure
metadata:
name: wsa-secure
namespace: $WSA_INSTANCE_NAMESPACE
spec:
license:
accept: false
cveMonitor:
suspend: true
---
apiVersion: automation.websphere.ibm.com/v1
kind: WebSphereHealth
metadata:
name: wsa-health
namespace: $WSA_INSTANCE_NAMESPACE
spec:
license:
accept: false
EOF
To install only the security capability, omit the WebSphereHealth
portion from
the configuration.
The .spec.cveMonitor.suspend
property disables a job that runs periodically to
download the most recent security bulletin information from ibm.com. If your
cluster does not have internet access, set that property to true
to populate WebSphere Automation with a static set of security bulletins. For more
information about how to customize the WebSphere Automation instance,
see WebSphereSecure resource configuration.
If your cluster has internet access through proxy server, then you can configure the
WebSphereSecure
custom resource with the proxy server configuration. For more
information, see Configuring to use a proxy server. In the
cveMonitor
specification, ensure that the .spec.cveMonitor.suspend
property is set with a value of false
.
Set the .spec.license.accept
property to true
from its default
value of false
to indicate your agreement to the license terms at https://ibm.biz/WebSphereAutoLicense.
What to do next
Validate the installation and access the WebSphere Automation UI.
For information about changing the default password, see Changing the cluster administrator access credentials.