Installing Custom Edition with script
The shce.sh script helps you install Self-Hosted Custom Edition (Kubernetes or Red Hat OpenShift Container Platform). The tool is based on Helm charts and values and allows for custom installations tailored to your needs. The script is supported only on x86_64 and ARM64 architectures.
Prerequisites
Make sure that the following prerequisites are met:
-
Helm is installed to deploy Helm charts. To install Helm:
curl -fsSL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash -
A default storage class is set on the cluster. Without storage class, the installation of data stores will fail. Instana requires ReadWriteMany (RWX) or ReadWriteOnce (RWO) storage for raw spans and monitoring data. To verify the default storage class:
kubectl get storageclass -o=jsonpath='{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io/is-default-class=="true")].metadata.name}'If no default storage class is set, run:
kubectl patch storageclass <storageclass_name> -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}' -
Kubernetes version
Kubectl 1.25 or later is installed.
To install the latest stable version:
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" chmod +x kubectl sudo mv kubectl /usr/local/bin/Verify your kubectl installation:
kubectl version --client=trueKubernetes version must be >1.25. Check the server version:
kubectl version -
To deploy Custom Edition on Red Hat OpenShift Container Platform (OCP), OpenShift CLI (oc) and OCP 4.13 or later are required.
To check the Red Hat OpenShift Container Platform version:
oc version -
yqis available to parse YAML files.To install
yqon Mac (Homebrew):brew install yqTo install
yqon Ubuntu or Debian:sudo snap install yqTo check the
yqversion:yq --version
Procedure
-
Clone the Git repository that contains the files required for Custom Edition installation:
git clone https://github.com/instana/self-hosted-custom-edition-setup.git -
Navigate to the following directory in the Git repository that you cloned:
cd ./self-hosted-custom-edition-setup/deploy -
Create a configuration environment file:
vim config.envA sample output is shown in the following example:
DOWNLOAD_KEY=<download_key> AGENT_KEY=<agent_key> SALES_KEY=<sales_key> CLUSTER_TYPE=ocp INSTANA_UNIT_NAME=unit0 INSTANA_TENANT_NAME=tenant0Parameter Description DOWNLOAD_KEY The key to authenticate the download of the Instana agent package from the Instana repository. AGENT_KEY The key to authenticate the agent with the Instana backend and associate the agent with a specific tenant. SALES_KEY The key provided by the sales team. CLUSTER_TYPE Represents the type of cluster INSTANA_UNIT_NAME The parameter in Instana that represents a logical grouping of agents. INSTANA_TENANT_NAME The parameter in Instana that identifies the tenant or organization associated with an agent. {: caption="Table 1. config.envparameters" caption-side="top"} -
Set the username and password for Instana tenant and unit:
vim values/unit/custom-values.yamlA sample output is shown in the following example:
initialAdminUser: admin@instana.local initialAdminPassword: "mypass" properties: [] componentConfigs: [] priorityClassName: "" env: [] coreName: "instana-core" coreNamespace: "instana-core"Parameter Description initialAdminUser The initial admin user for the Instana monitoring agent. initialAdminPassword The initial admin password for the Instana monitoring agent. properties An empty array for storing additional properties related to the Instana monitoring agent. componentConfigs An empty array for storing configuration details for individual components of the Instana monitoring agent. priorityClassName The priority class name for the Instana monitoring agent to an empty string, meaning no specific priority class is assigned. env An empty array for storing environment variables for the Instana monitoring agent. coreName The name of the core component for the Instana monitoring agent. coreNamespace The namespace for the core component of the Instana monitoring agent. For more information on setting the values in the
custom-values.yaml, see README. -
You can run the following commands depending on your requirement:
- Install data stores and the Instana backend:
./shce.sh apply- Uninstall data stores and the Instana backend:
./shce.sh delete- Install only the backend components (operator, core, unit):
./shce.sh backend apply- Uninstall only the backend components (operator, core, unit):
./shce.sh backend delete- Install only data stores:
./shce.sh datastores apply- Install individual data stores, such as Kafka or Postgres:
./shce.sh datastores apply kafka ./shce.sh datastores apply postgres- Uninstall individual data stores, such as Kafka or Postgres:
./shce.sh datastores delete kafka ./shce.sh datastores delete postgresTo get help on the
shce.shcommand:./shce.sh helpFor more information on the
shce.shscript, see README. -
Add the load balancer details and DNS, see Setting up load balancers and DNS.