### Install IOM using Helm Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/ToolsAndConcepts.rst Example command to install the IOM Helm chart. This requires a 'values.yaml' file for configuration and specifies the namespace, timeout, and wait behavior. It's a demonstration and requires preconditions to be met. ```shell # Now the repo can be used to install IOM. # The following command was taken from the examples section. Without the preconditions described there, it will not work. # It is shown here only for demonstration of how to reference the IOM Helm-chart after adding the according repository. helm install demo intershop/iom --values=values.yaml --namespace iom --timeout 20m0s --wait ``` -------------------------------- ### Install IOM using Helm Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/ExampleDemo.rst This section details the process of installing the IOM Helm chart. It requires a pre-configured `values.yaml` file and involves creating a namespace and then executing the Helm installation command. ```shell # create diretories for persistent storage mkdir -p ~/iom-share ~/pgdata # create namespace "iom" kubectl create namespace iom # install IOM into namespace "iom" helm install demo intershop/iom --values=values.yaml --namespace iom --timeout 20m0s --wait ``` -------------------------------- ### Install Intershop Helm Chart via Command Line Source: https://github.com/intershop/helm-charts/blob/main/README.md Example command to install an Intershop chart using Helm. Replace '' with the specific chart name. ```bash helm install my-release intershop/ ``` -------------------------------- ### Install Intershop PWA Helm Chart via Command Line Source: https://github.com/intershop/helm-charts/blob/main/charts/pwa/README.md This snippet demonstrates the command-line steps to install the Intershop PWA Helm chart. It covers adding the Intershop Helm repository, updating the local repository cache, and performing the installation of the 'pwa-main' chart with a release name. ```bash helm repo add intershop https://intershop.github.io/helm-charts helm repo update helm install my-release intershop/pwa-main ``` -------------------------------- ### Install Intershop IOM using Helm Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/ExampleProd.rst Installs Intershop IOM by first creating a namespace and then using Helm to deploy the IOM chart with specified values and namespace. The process includes waiting for the installation to complete. ```shell # create namespace mycompany-iom kubectl create namespace mycompany-iom # install IOM into namespace mycompany-iom helm install ci intershop/iom --values=values.yaml --namespace mycompany-iom --timeout 30m0s --wait ``` -------------------------------- ### Build and Install PWA Helm Chart Locally Source: https://github.com/intershop/helm-charts/blob/main/charts/pwa/README.md Commands to build and install the PWA Helm chart from a local development folder. It first ensures all chart dependencies are downloaded and then performs a local installation using a specified values file. This is useful for testing local changes before committing or deploying. ```bash $ helm dependency build helm-charts/charts/pwa $ helm install dev-release -f development.values.yaml helm-charts/charts/pwa ``` -------------------------------- ### Install PWA Chart via Helm CLI Source: https://context7.com/intershop/helm-charts/llms.txt Instructions to add the Intershop Helm repository, update its index, and install the PWA chart using the Helm CLI. Supports installation with default, custom values, or a values file. ```bash # Add the Intershop Helm repository helm repo add intershop https://intershop.github.io/helm-charts # Update repository index helm repo update # Install PWA chart with release name helm install my-pwa-release intershop/pwa-main # Install with custom values helm install my-pwa-release intershop/pwa-main \ --set image.tag=4.1.0 \ --set replicaCount=3 \ --set upstream.icmBaseURL=https://api.example.com # Install with values file helm install my-pwa-release intershop/pwa-main -f custom-values.yaml ``` -------------------------------- ### Install NGINX Ingress Controller using Helm Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/ExampleDemo.rst This snippet demonstrates the Helm commands required to add the NGINX Ingress Controller repository, update repositories, create a dedicated namespace, and install the controller. ```shell # get ingress-nginx Helm Charts helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx helm repo update # create namespace "nginx" kubectl create namespace nginx # install NGINX Ingress controller into namespace "nginx" helm install global ingress-nginx/ingress-nginx -n nginx --timeout 10m0s --wait ``` -------------------------------- ### Monitor IOM Pod Status during Installation Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/ExampleDemo.rst These commands show how to monitor the status of pods within the 'iom' namespace during the installation process. It illustrates the different states pods can be in, from 'Pending' to 'Running' and 'Init'. ```shell # A few seconds after start of IOM, only the integrated Postgres server is in "Init" phase. All other # pods are in earlier phases. kubectl get pods -n iom NAME READY STATUS RESTARTS AGE demo-iom-0 0/1 Pending 0 2s demo-mailpit-5dd4565b98-jphkm 0/1 ContainerCreating 0 2s demo-postgres-7b796887fb-j4hdr 0/1 Init:0/1 0 2s # After some seconds all pods except IOM are "Running" and READY (integrated PostgreSQL server, integrated # SMTP server). IOM is in Init-phase, which means the init-container is currently executed. kubectl get pods -n iom NAME READY STATUS RESTARTS AGE demo-iom-0 0/1 Init:1/2 0 38s demo-mailpit-5dd4565b98-jphkm 1/1 Running 0 38s demo-postgres-7b796887fb-j4hdr 1/1 Running 0 38s ``` -------------------------------- ### Helm Chart Prefetch Configuration Example (YAML) Source: https://github.com/intershop/helm-charts/blob/main/charts/pwa/README.md This snippet shows an example of how to configure the NGINX cache prefetch job within Helm chart values. It specifies the host, path, and cron schedule for the prefetch job. ```yaml prefetch: - host: customer-int.pwa.intershop.de path: /b2c/home cron: "0 23 * * *" ``` -------------------------------- ### Datadog Kubernetes Integration Example for IOM (YAML) Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/Metrics.rst An example Kubernetes Pod definition demonstrating how to configure Datadog's autodiscovery for integrating IOM metrics. It specifies annotations for the Datadog agent to find and process metrics from IOM containers, including the integration name, init configurations, and instance configurations. ```yaml apiVersion: v1 kind: Pod # (...) metadata: name: '' annotations: ad.datadoghq.com/.check_names: '[]' ad.datadoghq.com/.init_configs: '[]' ad.datadoghq.com/.instances: '[]' # (...) spec: containers: - name: '' # (...) ``` -------------------------------- ### Dynamic Provisioning with Delete Reclaim Policy Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/PersistentStorage.rst Example configuration for dynamic provisioning using a storage class with a 'Delete' reclaim policy. This is suitable for test and demo systems where automatic deletion of PVs is desired. ```yaml persistence: dynamic: annotations: ``` -------------------------------- ### Manage Intershop Helm Charts Repository and Deployments Source: https://context7.com/intershop/helm-charts/llms.txt Commands to add, update, search, install, upgrade, rollback, list, and uninstall Intershop Helm charts. This enables managing different chart versions and namespaces for various environments (development, staging, production). Ensure Helm CLI is installed and configured. ```bash # Add repository with custom name helm repo add intershop https://intershop.github.io/helm-charts helm repo update # Search available charts helm search repo intershop helm search repo intershop/icm --versions # Install specific chart version helm install production-icm intershop/icm \ --version 2.18.0 \ --namespace ecommerce-prod \ --create-namespace \ --values production-values.yaml # Install with dry-run to validate helm install staging-icm intershop/icm \ --version 2.18.0 \ --namespace ecommerce-staging \ --values staging-values.yaml \ --dry-run --debug # Upgrade existing release helm upgrade production-icm intershop/icm \ --version 2.18.0 \ --namespace ecommerce-prod \ --values production-values.yaml \ --reuse-values # Rollback to previous version helm rollback production-icm 1 --namespace ecommerce-prod # List installed releases helm list --namespace ecommerce-prod # Uninstall release helm uninstall production-icm --namespace ecommerce-prod ``` -------------------------------- ### Basic Ingress Configuration (YAML) Source: https://github.com/intershop/helm-charts/blob/main/charts/pwa/docs/migrate-to-0.8.0.md A fundamental example of the new ingress declaration format in version 0.8.0. It enables ingress, specifies the class name, and defines basic host and TLS settings. ```yaml ingress: enabled: true className: nginx instances: ingress: annotations: kubernetes.io/tls-acme: "false" tlsSecretName: tls-star-pwa-intershop-de hosts: - host: pwa.example.local ``` -------------------------------- ### Ingress Migration Example (Old vs. New YAML) Source: https://github.com/intershop/helm-charts/blob/main/charts/pwa/docs/migrate-to-0.8.0.md Compares the old ingress and ingresssplit configurations with the new, unified ingress declaration format in version 0.8.0. This highlights the consolidation of settings and the removal of path configurations. ```yaml # Old ingress configuration ingress: enabled: true className: nginx annotations: kubernetes.io/tls-acme: "false" hosts: - host: pwa.example.local paths: - path: / pathType: ImplementationSpecific tls: - secretName: tls-star-pwa-intershop-de ingresssplit: enabled: true className: nginx annotations: kubernetes.io/tls-acme: "false" configuration-snippet: |- satisfy any; allow xxx.xxx.xxx.xxx; deny all; hosts: - host: pwa-test.example.local paths: - path: / pathType: ImplementationSpecific - host: pwa2-test.example.local paths: - path: / pathType: ImplementationSpecific tls: - secretName: tls-star-pwa-intershop-de # New ingress configuration ingress: enabled: true className: nginx instances: ingress: annotations: kubernetes.io/tls-acme: "false" tlsSecretName: tls-star-pwa-intershop-de hosts: - host: pwa.example.local ingresssplit: annotations: kubernetes.io/tls-acme: "false" configuration-snippet: |- satisfy any; allow xxx.xxx.xxx.xxx; deny all; tlsSecretName: tls-star-pwa-intershop-de hosts: - host: pwa-test.example.local - host: pwa2-test.example.local ``` -------------------------------- ### Configure Kubernetes Ingress Resources Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/ParametersIOM.rst Defines Ingress resources for Kubernetes, specifying host, paths, and path types. This is essential for exposing services to external traffic. Assumes Kubernetes Ingress controller is installed. ```yaml ingress: enabled: true hostname: "your.domain.com" tls: [] paths: - path: "/" pathType: "Prefix" ``` -------------------------------- ### Connection Monitor Script Log Output Example Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/ParametersIOM.rst This snippet demonstrates the log output format of the connection_monitor.sh script. It includes fields such as logHost, logVersion, appName, appVersion, logType, timestamp, level, processName, message, and configName. The 'message' field contains comma-separated values representing connection counts and details. ```json { "logHost": "ci-iom-connection-monitor-27154801-c6lk4", "logVersion": "1.0", "appName": "iom", "appVersion": "4.5.0", "logType": "script", "timestamp": "2023-08-18T12:01:01+00:00", "level": "INFO", "processName": "connection_monitor.sh", "message": "count,application_name,client_addr\n51,OMS_ci-iom-0,40.67.249.40\n2,psql,40.67.249.40", "configName": null } ``` -------------------------------- ### Add and Update Helm Repository Source: https://github.com/intershop/helm-charts/blob/main/README.md Commands to add the Intershop Helm chart repository and update it locally. These are prerequisites for installing any Intershop chart. ```bash helm repo add intershop https://intershop.github.io/helm-charts helm repo update ``` -------------------------------- ### Dynamic Provisioning with Retain Reclaim Policy Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/PersistentStorage.rst Example configuration for dynamic provisioning using a storage class with a 'Retain' reclaim policy. This is recommended for production systems to prevent automatic deletion of Persistent Volumes (PVs) upon Helm release deletion. ```yaml persistence: dynamic: storageClass: azurefile-iom annotations: ``` -------------------------------- ### Monitor Kubernetes Pods during IOM Installation/Upgrade Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/ExampleProd.rst Provides commands to observe the status of Kubernetes pods during the Intershop IOM installation or upgrade process. It shows the evolution of pod states from Pending to Running and Ready. ```shell # One second after start, all pods are in very early phases. kubectl get pods -n mycompany-iom NAME READY STATUS RESTARTS AGE prod-iom-0 0/1 Pending 0 1s # After a few seconds IOM is "Running", but not "READY" yet. The database will now be filled, migrated and configured. IOM- and project-applications are then deployed into the Wildfly application server. kubectl get pods -n mycompany-iom NAME READY STATUS RESTARTS AGE prod-iom-0 0/1 Running 0 43s # The first iom-pod is "Running" and "READY", which means the IOM System is usable now. # The second iom-pod has just started and is not ready yet. kubectl get pods -n mycompany-iom NAME READY STATUS RESTARTS AGE prod-iom-0 1/1 Running 0 5m35s prod-iom-1 0/1 Running 0 10s # Both iom-pods are "Running" and "READY". Installation of IOM is finished. kubectl get pods -n mycompany-iom NAME READY STATUS RESTARTS AGE prod-iom-0 1/1 Running 0 10m prod-iom-1 1/1 Running 0 5m49s ``` -------------------------------- ### Configure Hybrid Deployment Approach Source: https://github.com/intershop/helm-charts/blob/main/charts/pwa/README.md Enables a hybrid deployment mode where Intershop PWA and ICM system are installed in the same Kubernetes namespace. This configuration activates conditional dependencies on umbrella charts for ICM components. ```yaml image: repository: intershophub/intershop-pwa-ssr --- cache: image: repository: intershophub/intershop-pwa-nginx --- icm: icm-as: image: repository: intershophub/icm-as --- icm-web: webadapter: image: repository: intershophub/icm-webadapter ``` -------------------------------- ### Install/Upgrade Intershop Job Server Helm Chart Source: https://github.com/intershop/helm-charts/blob/main/charts/icm-job/README.md Deploys or upgrades the Intershop Job Server Helm chart. This command installs the 'icm-job' release in the 'icm-system' namespace. Ensure the namespace exists before execution. ```bash helm upgrade --install icm-job icm-job -n icm-system ``` -------------------------------- ### Upgrade Intershop IOM using Helm Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/ExampleProd.rst Upgrades an existing Intershop IOM installation using Helm. This command applies changes defined in the `values.yaml` file, such as log level adjustments, to the specified namespace, waiting for completion. ```shell helm upgrade ci intershop/iom --values=values.yaml --namespace mycompany-iom --timeout 30m0s --wait ``` -------------------------------- ### View Logs for IOM Init Container Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/ExampleDemo.rst This command allows you to view the logs of the 'dbaccount' init-container within the 'demo-iom-0' pod in the 'iom' namespace. This is useful for diagnosing issues during the database account creation phase. ```shell # The init-container executed in iom-pod is dbaccount. Log messages can be seen # by executing the following command. If everything works well, the last message will announce the # successful execution of the create_dbaccount.sh script. kubectl logs demo-iom-0 -n iom -f -c dbaccount ... {"logHost":"demo-iom-0","logVersion":"1.0","appName":"iom-dbaccount","appVersion":"2.0.0","logType":"script","timestamp":"2023-11-06T11:33:17+00:00","level":"INFO","processName":"create_dbaccount.sh","message":"success","configName":null} ``` -------------------------------- ### List PostgreSQL Databases and Encoding Information via kubectl Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/IOMDatabase.rst This snippet demonstrates how to retrieve the list of PostgreSQL databases, their owners, encoding, collation, and Ctype settings. This is crucial for troubleshooting IOM database initialization errors related to encoding mismatches. It involves identifying the PostgreSQL pod using `kubectl get pods` and then executing `psql -l` within that pod. ```shell # get name of PostgreSQL pod kubectl get pods -n iom NAME READY STATUS RESTARTS AGE demo-ingress-nginx-controller-6c6f5b88cc-6wsfh 1/1 Running 0 67s demo-iom-0 0/1 Init:Error 3 67s demo-mailpit-5d7677c7c5-zl8gl 1/1 Running 0 67s demo-postgres-96676f4b-mt8nl 1/1 Running 0 67s # execute psql -U postgres -l within PostgreSQL pod kubectl exec demo-postgres-96676f4b-mt8nl -n iom -t -- psql -U postgres -l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+----------+----------+------------+------------+----------------------- postgres | postgres | UTF8 | en_US.utf8 | en_US.utf8 | template0 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | =c/postgres + | | | | | postgres=CTc/postgres (3 rows) ``` -------------------------------- ### Get Application URL with Ingress Enabled (kubectl) Source: https://github.com/intershop/helm-charts/blob/main/charts/pwa/templates/NOTES.txt Retrieves the application URL when ingress is enabled. This command queries for the ingress resource associated with the release namespace. ```Shell kubectl get --namespace {{ .Release.Namespace }} ingress ``` -------------------------------- ### Configure IOM Deployment with Probes and DB Settings Source: https://context7.com/intershop/helm-charts/llms.txt Configures the deployment of Intershop Order Management (IOM), specifying replica count, downtime preference, image details, and comprehensive probe settings (startup, liveness, readiness) for robust container management. It also includes settings for database account creation and PostgreSQL connection parameters. ```yaml # values.yaml for IOM deployment replicaCount: 2 downtime: true image: repository: docker.tools.intershop.com/iom/intershophub/iom tag: "5.1.0" pullPolicy: IfNotPresent # Startup probe for handling long initialization times startupProbe: enabled: true periodSeconds: 10 initialDelaySeconds: 60 timeoutSeconds: 5 failureThreshold: 354 # Allows ~60 minutes for initialization livenessProbe: enabled: true periodSeconds: 10 initialDelaySeconds: 60 timeoutSeconds: 5 failureThreshold: 3 readinessProbe: enabled: true periodSeconds: 10 initialDelaySeconds: 60 timeoutSeconds: 8 failureThreshold: 1 successThreshold: 1 # Database account creation (first install only) dbaccount: enabled: true tablespace: iom_data options: "ENCODING='UTF8' LC_COLLATE='en_US.utf8' LC_CTYPE='en_US.utf8' CONNECTION LIMIT=-1 TEMPLATE=template0" searchPath: "iom_schema" image: repository: docker.tools.intershop.com/iom/intershophub/iom-dbaccount tag: 2.0.0 # PostgreSQL connection settings pg: host: postgres-service.database.svc.cluster.local port: "5432" sslMode: require sslCompression: "0" user: postgres userSecretKeyRef: name: postgres-admin-secret key: username passwdSecretKeyRef: name: postgres-admin-secret key: password db: postgres ``` -------------------------------- ### Add and Update Helm Repositories Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/ToolsAndConcepts.rst Commands to add the Intershop Helm chart repository and update the local Helm repository cache. This is a prerequisite for installing any Intershop Helm charts. ```shell # Add all Intershop charts helm repo add intershop https://intershop.github.io/helm-charts helm repo update ``` -------------------------------- ### Get Persistent Volume (PV) Command Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/PersistentStorageExamplesReusePV.rst Command to retrieve and display information about Persistent Volumes (PVs) in a Kubernetes cluster. Useful for verifying PV status, reclaim policy, and claims. ```shell kubectl get pv ``` -------------------------------- ### IOM Helm Chart Values Configuration (YAML) Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/ExampleDemo.rst This YAML configuration defines settings for deploying Intershop Order Management (IOM) using Helm charts. It specifies replica count, image details, resource limits, ingress configuration, persistence settings for shared file system and PostgreSQL, and configurations for the database account and Mailpit SMTP server. Ensure to update `persistence.local.hostPath` and `postgres.persistence.local.hostPath` to valid, Docker-shared directories. ```yaml # use one IOM server only (requirement #8). replicaCount: 1 imagePullSecrets: - name: intershop-pull-secret image: repository: "docker.tools.intershop.com/iom/intershophub/iom" tag: "5.0.0" # Define a timeout for startupProbe, that matches the requirements of the current # IOM installation. In combination with the default values, this configuration results # in a timeout value of 11 minutes for the initialization and migration of the database. startupProbe: failureThreshold: 60 # Remove resource binding for CPU. This makes the system significantly # faster, especially the startup. resources: limits: cpu: requests: cpu: # Configure ingress to forward requests for host "localhost" to IOM (requirement #9). ingress: enabled: true hosts: - host: localhost paths: - path: "/" pathType: Prefix # IOM has to know its own public URL. oms: publicUrl: "https://localhost/" db: # Do not reset existing data during installation (requirement #3). resetData: false # Optional, since false is default. # Store data of shared-FS into a local directory (requirement #6, #7). persistence: provisioning: local local: hostPath: /Users/username/iom-share # Create IOM database and according database users before starting IOM. dbaccount: enabled: true image: repository: "docker.tools.intershop.com/iom/intershophub/iom-dbaccount" tag: "2.0.0" # Use integrated PostgreSQL server (requirement #1). # Store database data persistently into a local directory (requirement #2). postgres: enabled: true persistence: enabled: true provisioning: local local: hostPath: /Users/username/pgdata # Enable integrated SMTP server (requirement #4). # Configure Ingress to forward requests for any host to Mailpit GUI (requirements #5). # Hostname 'localhost' is already used for OMT, so Mailpit GUI needs to be bound to another hostname. Usually # every computer has a second hostname besides 'localhost', which can be determined using the 'hostname' command. # In this example, we assume that this second hostname is 'mymacpro'. If you want to comprehend this example, # use the hostname of your computer. mailpit: enabled: true ingress: hostname: mymacpro ``` -------------------------------- ### Get Application URL with Ingress Source: https://github.com/intershop/helm-charts/blob/main/charts/icm-as/templates/NOTES.txt Retrieves the application URL when Ingress is enabled. It iterates through configured hosts and paths to construct the full URL. Requires Ingress to be enabled in Helm values. ```Go Templating {{- if .Values.ingress.enabled }} {{- range $host := .Values.ingress.hosts }} {{- range .paths }} http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} {{- end }} {{- end }} {{- end }} ``` -------------------------------- ### Configure Ingress Hosts in YAML Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/ParametersIOM.rst Defines the hostnames and paths for accessing the Intershop application via ingress. This configuration is crucial for external access and must adhere to Kubernetes ingress object specifications. The default entry grants access using 'iom.example.local'. ```yaml - host: iom.example.local paths: ``` -------------------------------- ### Ingress with Host-Specific TLS Overrides (YAML) Source: https://github.com/intershop/helm-charts/blob/main/charts/pwa/docs/migrate-to-0.8.0.md An advanced ingress configuration example demonstrating how to set host-specific TLS secret names. This allows for granular control over TLS certificates for different hostnames served by the ingress. ```yaml ingress: enabled: true className: nginx instances: ingress: annotations: kubernetes.io/tls-acme: "false" tlsSecretName: tls-star-pwa-intershop-de hosts: - host: pwa.example.local - host: store.example.local tlsSecretName: store.tls-star-pwa-intershop-de - host: else.example.local tlsSecretName: else.tls-star-pwa-intershop-de ``` -------------------------------- ### Helm Values for Datadog Microprofile Metrics Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/Metrics.rst Example Helm values configuration for Datadog integration with Microprofile Metrics. It specifies pod annotations for Datadog's OpenMetrics check, including initialization configurations and instance details like the metrics endpoint and namespaces. The 'namespace' and 'metrics' fields require user adaptation. ```yaml podAnnotations: ad.datadoghq.com/iom.check_names: '["openmetrics"]' ad.datadoghq.com/iom.init_configs: '[{}]' ad.datadoghq.com/iom.instances: | [ { "openmetrics_endpoint": "http://%%host%%:9990/metrics", "namespace": "iom.appserver", "metrics": [ "application_*", "base_gc_*" ] } ] ``` -------------------------------- ### Deploy Intershop Charts via Flux CD (HelmRelease) Source: https://context7.com/intershop/helm-charts/llms.txt Declarative deployment of Intershop PWA charts using Flux CD's HelmRelease custom resource. Enables GitOps for automated continuous delivery and synchronization from Git repositories. Includes configuration for rollbacks, waits, and timeouts. ```yaml apiVersion: helm.fluxcd.io/v1 kind: HelmRelease metadata: name: production-pwa namespace: ecommerce-production spec: rollback: enable: true force: true wait: true timeout: 270 releaseName: production-pwa chart: repository: https://intershop.github.io/helm-charts name: pwa-main version: 0.9.3 values: replicaCount: 5 image: repository: intershophub/intershop-pwa-ssr tag: 4.1.0 pullPolicy: IfNotPresent upstream: icmBaseURL: https://icm.production.example.com cdnPrefixURL: https://cdn.example.com ingress: enabled: true className: nginx instances: ingress: annotations: kubernetes.io/tls-acme: "true" cert-manager.io/cluster-issuer: letsencrypt-prod tlsSecretName: tls-pwa-production hosts: - host: shop.example.com resources: requests: memory: "512Mi" cpu: "250m" limits: memory: "2Gi" cpu: "1000m" environment: - name: FEATURES value: | - punchout - quickorder - wishlist ``` -------------------------------- ### Get Application URL with ClusterIP Service (Shell) Source: https://github.com/intershop/helm-charts/blob/main/charts/pwa/templates/NOTES.txt Retrieves the application URL for a ClusterIP service. It forwards traffic to a local port (8080) using port-forwarding. Requires kubectl and pod selection. ```Shell export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "pwa-main.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") kubectl port-forward $POD_NAME 8080:4200 ``` -------------------------------- ### Configure Resource Requests and Limits Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/ParametersTests.rst Allows setting resource requests and limits for the deployed pods. This is crucial for managing CPU and memory allocation. The default value is an empty map, implying no specific resource constraints are set by default. ```yaml iom-tests: resources: {} ``` -------------------------------- ### Get Application URL with NodePort Service (Shell) Source: https://github.com/intershop/helm-charts/blob/main/charts/pwa/templates/NOTES.txt Retrieves the application URL when the service type is NodePort. It exports the NodePort and Node IP, then constructs the URL. Requires kubectl and environment variables. ```Shell export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "pwa-main.fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT ``` -------------------------------- ### Enable Basic PWA Monitoring Source: https://github.com/intershop/helm-charts/blob/main/charts/pwa/README.md A simple configuration to enable basic monitoring for the PWA Helm chart. When enabled, this will deploy Prometheus and Grafana instances, which are pre-configured to scrape metrics from the PWA containers and include a dashboard for visualizing PWA metrics. ```yaml monitoring: enabled: true ``` -------------------------------- ### Get Application URL with NodePort Service Source: https://github.com/intershop/helm-charts/blob/main/charts/icm-web/templates/NOTES.txt Retrieves the application URL for a service of type NodePort. It fetches the allocated NodePort and the IP address of a node, then constructs the URL. Requires kubectl access. ```shell {{- else if contains "NodePort" .Values.service.type }} export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "icm-web.fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT {{- end }} ``` -------------------------------- ### Enable Hybrid Approach Deployment Source: https://github.com/intershop/helm-charts/blob/main/charts/pwa/README.md Enables or disables the Hybrid Approach deployment for Intershop. This feature allows for a combined deployment strategy. The configuration specifies the backend service and port for the ICM Web Adapter. ```yaml hybrid: enabled: true backend: service: icm-web port: 443 ``` -------------------------------- ### Enable New Relic APM Monitoring (YAML) Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/ParametersIOM.rst Configures the integration of New Relic APM for monitoring Intershop application performance. When enabled, the IOM (Intershop Order Management) will be started with the '-javagent' parameter to load the New Relic Java agent. This feature requires IOM version 5.0.0 or newer and a valid license key for data ingestion. ```yaml newRelic: apm: enabled: false licenseKey: "YOUR_NEW_RELIC_LICENSE_KEY" ``` -------------------------------- ### Render PWA Helm Chart Locally Source: https://github.com/intershop/helm-charts/blob/main/charts/pwa/README.md Commands to render the Kubernetes manifests generated by the PWA Helm chart. This allows developers to preview the resulting YAML without actually applying it to a cluster, facilitating debugging and understanding of the chart's output. ```bash $ helm template helm-charts/charts/pwa $ helm template -f development.values.yaml helm-charts/charts/pwa $ helm template -f development.values.yaml -s templates/deployment.yaml helm-charts/charts/pwa ``` -------------------------------- ### Get Application URL with LoadBalancer Service (Shell) Source: https://github.com/intershop/helm-charts/blob/main/charts/pwa/templates/NOTES.txt Retrieves the application URL for a LoadBalancer service. It may take time for the IP to become available. This command fetches the service IP and constructs the URL. ```Shell export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "pwa-main.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') echo http://$SERVICE_IP:{{ .Values.service.port }} ``` -------------------------------- ### Upgrade Intershop (IOM) using Helm Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/ExampleDemo.rst Initiates an upgrade process for the Intershop (IOM) deployment managed by Helm. This command applies changes defined in a 'values.yaml' file to the existing Helm release named 'demo' in the 'iom' namespace. The '--wait' flag ensures the command blocks until all resources are in a ready state. The '--timeout' specifies how long Helm should wait for the upgrade to complete. ```shell helm upgrade demo intershop/iom --values=values.yaml --namespace iom --timeout 20m0s --wait ``` -------------------------------- ### Get Application URL with NodePort Service Source: https://github.com/intershop/helm-charts/blob/main/charts/icm-as/templates/NOTES.txt Retrieves the application URL for a NodePort service. It obtains the NodePort and Node IP using kubectl commands and constructs the URL. Requires kubectl and a NodePort service type. ```Bash {{- else if contains "NodePort" .Values.service.type }} export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "icm-as.fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT ``` -------------------------------- ### Access Application with ClusterIP Service Source: https://github.com/intershop/helm-charts/blob/main/charts/icm-as/templates/NOTES.txt Provides access to an application using a ClusterIP service by setting up port forwarding. It finds the pod name and forwards local port 8080 to the pod's port 80. Requires kubectl and a ClusterIP service type. ```Bash {{- else if contains "ClusterIP" .Values.service.type }} export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "icm-as.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") echo "Visit http://127.0.0.1:8080 to use your application" kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 {{- end }} ``` -------------------------------- ### Kubernetes Secret Definition Example Source: https://github.com/intershop/helm-charts/blob/main/charts/iom/docs/SecretKeyRef.rst This YAML code defines a Kubernetes Secret named 'pgsecrets' of type 'Opaque'. It contains base64 encoded data for 'pguser' and 'pgpasswd', demonstrating how sensitive information can be stored securely. ```yaml apiVersion: v1 kind: Secret metadata: name: pgsecrets type: Opaque data: pguser: cG9zdGdyZXM= pgpasswd: ZGJ1c2VycGFzc3dk ```