Kubernetes and container orchestration
Advantages of Kubernetes
The use of Kubernetes offer a great amount of advantages for the deployment and management of the OPC Router :
- Evolutivity: Kubernetes enables to make the number of OPC Router instances evolving, based on the actual needs.
- Flexibility: The use of containers enables to manage and deploy easily different versions and configurations of the OPC Router.
- Automation: Kubernetes automatise multiple administratives tasks, including the deploiements, the rollbacks and the scalings, which simplify the management and reduce the errors.
Helm Chart for OPC Router
The Helm Chart for the OPC Router make the deployment and the management of the OPC Router in a Kubernetes Cluster easier. Here is the main functions and possibilities of configuration :
Deployment:
- Helm Chart: Enable to deploy the OPC Router on each Kubernetes Cluster.
- Multiple possible configurations: Taking charge of multiple options of configuration for answering to specific needs.
Configuration:
- Global Parameters: Settings such as the global Docker image registry and StorageClass.
- Common Parameters: Settings for the customisation of the name and settings of the service account.
- OPC Router Parameters: Configurations for the OPC Router image, the environment variables and the project repository.
- MongoDB Parameters: Settings for the MongoDB integration, including authentication and redundancy.
Redundancy:
- OPC Router Redundancy: Taking charge of the Redundancy mode to run a secondary pod with an OPC Router runtime, that will activate if there is a failure of the main pod.
- MongoDB Redundancy: Possibility to run multiples MongoDB pods to make the database redundant and increase reliability.
Best Practice:
To use fully the advantages of Kubernetes and Helm Charts, the following Best Practices should be observed with care.
Private Repositories:
- Ensure, that the Git repositories are private to prevent unauthorised access.
- Connection of the internal Git system of the OPC Router with hosted Git servers such as GitHub, BitBucket or Microsoft Azure DevOps.
Secrets Management:
- Secrets and passwords should never be stored in the Git repository.
- The OPC Router always save the secrets in a separate local vault to ensure that they are not versioned.
Regular Updates and Monitoring:
- Regular updates of the Kubernetes cluster and the Helm Charts
- Survey the Clusters to ensure that all the components function and evolve correctly.
Practical realisation:
Deployment with Helm Chart:
-
Preparation: Make sure that Kubernetes and Helm are installed and configured.
-
Add the Helm repository: Add the repository OPC Router Helm and update it :
helm repo add opc-router https://opc-router.github.io/helm-charts
helm repo update -
Installation of the OPC Router: Use the following command to install the OPC Router :
helm install my-opcrouter opc-router/opc-router --set I_do_accept_the_EULA=true
-
Security configuration: Add the authentication and the security parameters to secure the installation :
helm install my-opcrouter opc-router/opc-router \
--set webManagement.auth.disable=false \
--set webManagement.auth.initialUser.name=<'Username for the initial user of the Web Management'> \
--set webManagement.auth.initialUser.password=<'Password for the initial user of the Web Management'> \
--set mongodb.auth.enabled=true \
--set mongodb.auth.rootPassword=<mongodb root Password> \
--set mongodb.auth.replicaSetKey=<mongodb replicaset key> \
--set I_do_accept_the_EULA=true
Redundancy and Scaling:
-
Activate the OPC Router redundancy: Configure the redundant mode of the OPC Router into the Helm Chart, as soon as he is available.
-
MongoDB Redundancy: Ensure that MongoDB works with the redundant mode by increasing the number of pods :
--set mongodb.replicaCount=2
Launch a project from the Git repository:
-
Reference the project repository and the path in the Helm Chart to load an OPC Router project from a Git repository:
--set project.projectRepo=<'URL to the Git Repository'> \
--set project.projectPath=<'Path to .rpe Project file'> \
--set project.configPath=<'Path to the configuration file of the Project'> \
--set project.auth.ssh_key=<'Private SSH Key'>
Summary
The use of Kubernetes and Helm Charts offer a powerful and flexible way to make the OPC Router working in an evolutive and manageable environment. Through the best practices and by using the posibilities of configuration, companies can maximize the reliability and efficiency of their OPC Router deployments.