ibm-offline-docs

by Helm

Helm chartv1.0.0App 1.1.0Apache-2.0

IBM Customizable Offline Documentation

About this chart

IBM Customizable Offline Documentation Helm Chart

Introduction

This helm chart contains the current and previous two versions of the IBM Cloud Pak for Multicloud Management documentation to be viewed in an offline, air gap environment. In addition to product documentation, there is a feature to include non-IBM custom documentation content under the Our Content (Non-IBM) product. See the Configuring the custom documentation section for details.

With each new release, the Docker image is updated to include the new release documentation. For the latest documentation, see the live IBM Knowledge Center entry IBM Cloud Pak for Multicloud Management.

Note: This helm chart is updated quarterly with new release versions. If you see either missing or incorrect information, check the live IBM Knowledge Center documentation before you contact IBM support. Maintaining the Our Content (Non-IBM) product is not covered by IBM support.

Resources Required

A persistent volume is required, if you plan on adding custom content.

Chart Details

Prerequisites

PodSecurityPolicy Requirements

This chart requires a PodSecurityPolicy to be bound to the target namespace before installation. Choose either a predefined PodSecurityPolicy or have your cluster administrator create a custom PodSecurityPolicy for you.

  • Predefined PodSecurityPolicy name: ibm-restricted-psp
  • Custom PodSecurityPolicy definition:
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
  name: ibm-websphere-liberty-psp
spec:
  allowPrivilegeEscalation: false
  forbiddenSysctls:
  - '*'
  fsGroup:
    ranges:
    - max: 65535
      min: 1
    rule: MustRunAs
  requiredDropCapabilities:
  - ALL
  runAsUser:
    rule: MustRunAsNonRoot
  seLinux:
    rule: RunAsAny
  supplementalGroups:
    ranges:
    - max: 65535
      min: 1
    rule: MustRunAs
  volumes:
  - configMap
  - emptyDir
  - projected
  - secret
  - downwardAPI
  - persistentVolumeClaim

Configuration scripts can be used to create the required resources

Download the following scripts from the /ibm_cloud_pak/pak_extensions/pre-install directory.

  • The preinstall instructions are at clusterAdministration/createSecurityClusterPrereqs.sh for cluster admins to create the PodSecurityPolicy and ClusterRole for all releases of this chart.

  • The namespace scoped instructions are at namespaceAdministration/createSecurityNamespacePrereqs.sh for the team admin or operator to create the RoleBinding for the namespace. This script takes one argument; the name of a pre-existing namespace where the chart is installed.

    • Example usage: ./createSecurityNamespacePrereqs.sh myNamespace

Configuration scripts can be used to clean up resources created

Download the following scripts from the /ibm_cloud_pak/pak_extensions/post-delete directory.

  • The post-delete instructions are at clusterAdministration/deleteSecurityClusterPrereqs.sh for cluster admins to delete the PodSecurityPolicy and ClusterRole for all releases of this chart.

  • The namespace scoped instructions are at namespaceAdministration/deleteSecurityNamespacePrereqs.sh for the team admin or operator to delete the RoleBinding for the namespace. This script takes one argument; the name of the namespace where the chart was installed.

    • Example usage: ./deleteSecurityNamespacePrereqs.sh myNamespace

Red Hat OpenShift SecurityContextConstraints Requirements

This chart requires a SecurityContextConstraints to be bound to the target namespace prior to installation. To meet this requirement there may be cluster scoped as well as namespace scoped pre and post actions that need to occur.

The predefined SecurityContextConstraints name: ibm-restricted-scc has been verified for this chart, if your target namespace is bound to this SecurityContextConstraints resource you can proceed to install the chart.

Creating the required resources

This chart defines a custom SecurityContextConstraints which can be used to finely control the permissions/capabilities needed to deploy this chart. You can enable this custom SecurityContextConstraints resource using the supplied instructions or scripts in the pak_extensions/pre-install directory.

  • From the user interface, you can copy and paste the following snippets to enable the custom SecurityContextConstraints

    • Custom SecurityContextConstraints definition:
    apiVersion: security.openshift.io/v1
    kind: SecurityContextConstraints
    metadata:
      annotations:
      name: ibm-websphere-liberty-scc
    allowHostDirVolumePlugin: false
    allowHostIPC: false
    allowHostNetwork: false
    allowHostPID: false
    allowHostPorts: false
    allowPrivilegedContainer: false
    allowedCapabilities: []
    allowedFlexVolumes: []
    defaultAddCapabilities: []
    fsGroup:
      type: MustRunAs
      ranges:
      - max: 65535
        min: 1
    readOnlyRootFilesystem: false
    requiredDropCapabilities:
    - ALL
    runAsUser:
      type: MustRunAsNonRoot
    seccompProfiles:
    - docker/default
    seLinuxContext:
      type: RunAsAny
    supplementalGroups:
      type: MustRunAs
      ranges:
      - max: 65535
        min: 1
    volumes:
    - configMap
    - downwardAPI
    - emptyDir
    - persistentVolumeClaim
    - projected
    - secret
    priority: 0
    
  • From the command line, you can run the setup scripts included under pak_extensions/pre-install As a cluster admin the pre-install instructions are located at:

    • pre-install/clusterAdministration/createSecurityClusterPrereqs.sh

    As team admin the namespace scoped instructions are located at:

    • pre-install/namespaceAdministration/createSecurityNamespacePrereqs.sh

Limitations

This chart is available only for Linux® x86_64.

Installing the Chart

The helm chart has the following values that can be overridden by using --set name=value. For example:

  • helm install ibm-offline-docs --name ibm-offline-docs -f overrides.yaml --tls

Configuration

QualifierParameterDefinitionAllowed Value
imagepullPolicyImage Pull PolicyAlways, Never, or IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. See Kubernetes - Updating Images
repositoryName of image, including repository prefix (if required)See Docker - Extended tag description
tagDocker image tagSee Docker - Tag
licenseThe license state of the image that is being deployedEmpty (default) for development. accept if you have previously accepted the production license.
extraVolumeMountsAdditional volumeMounts for server podsYAML array of volumeMounts definitions
podextraVolumesAdditional volumes for server podsYAML array of volume definitions

Configuring the Custom Documentation

Adding custom documentation content

You can add custom documentation content to be displayed in the product list under the Our Content (Non-IBM) product. To do this you need to set the image.extraVolumeMounts and pod.extraVolumes configuration parameters to specify where to pick up the custom content.

Example overrides.yaml file:

image:
  extraVolumeMounts:
    - name: ourcontent
      mountPath: /ourcontent
      readOnly: false

pod:
  extraVolumes:
    - name: ourcontent
      hostPath:
        path: /path/to/ourcontent

Inside your custom content folder, you must have a summary.md file that describes the table of contents for your content and all of your HTML files that contain your content.

For example:

# Summary

 * [Our Content](product_welcome_custom.html)
   * [Intro](Intro.html)

In this example, product_welcome_custom.html is the main welcome page for your content and intro.html is an example topic.

Persisting logs

Create a persistent volume (PV) in a shared storage, for example NFS, with the following specification:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: <persistent volume name>
spec:
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteOnce
  storageClassName: <optional - must match PVC>
  nfs:
    server: <NFS Server IP>
    path: <NFS PATH>

Note: For NFS PATH, you need to create your directory manually before you deploy the persistent volume.

You can create a PV by using this template by running:

kubectl create -f <yaml-file>

You can also create a PV from the IBM Cloud Pak for Multicloud Management dashboard by following these steps:

  1. From the dashboard, click Create resource.
  2. Select the cluster where the resource will be deployed.
  3. Copy and paste the PV template into the YAML editor.
  4. Click Create.

Note: For volumes that support ownership management, specify the group ID of the group that owns the persistent volumes' file systems by using the persistence.fsGroupGid parameter.

Analyzing log messages

Logging in JSON format is enabled by default. Log events are forwarded to Elasticsearch automatically. Audit events can also be forwarded to Elasticsearch. Audit events can contain sensitive data. Make sure you have enabled security in the logging stack.

Ingress configuration

If you are deploying your chart into the IBM Cloud Pak for Multicloud Management:

  • ingress.host can be provided and set to a fully qualified domain name that resolves to the IP address of your cluster’s proxy node. For example, example.com resolved to the proxy node. When a domain name is not available, the service nip.io can be used to provide a resolution based on an IP address. For example, liberty.<IP>.nip.io where <IP> would be replaced with the IP address of your cluster’s proxy node. The IP address of your cluster’s proxy node can be found by using the following command: kubectl get nodes -l proxy=true. Users can also leave this parameter as empty.

  • ingress.secretName set to the name of the secret containing Ingress TLS certificate and key. If this is not provided, it dynamically creates a self-signed certificate/key, stores it in a Kubernetes secret and uses the secret in Ingress' TLS.

If the chart is deployed into IBM Cloud Kubernetes Service:

  • ingress.host must be provided and set to the IBM-provided Ingress subdomain or your custom domain. See Select an app domain and TLS termination for more info on how to get this value in IBM Cloud Kubernetes Service.
  • ingress.secretName must be provided. If you are using the IBM-provided Ingress domain, set this parameter to the name of the IBM-provided Ingress secret. However, if you are using a custom domain, set this parameter to the secret that you created earlier that holds your custom TLS certificate and key. See IBM Cloud Kubernetes Service documentation for more information on how to get these values in an IBM Cloud Kubernetes Service cluster.

Deploy ibm-offline-docs with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ibm-offline-docs on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartibm-offline-docs is pinned at v1.0.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply