You can also deploy Skedler Reports in Kubernetes. To deploy Skedler on Kubernetes, follow the steps given below,
System Requirements
- Minimum of 4 CPU cores and 8 GB of RAM is recommended for deploying Skedler.
- Kubernetes greater than 1.11.x should be installed
- Skedler Reports v4.0 or higher is only supported.
Step-by-Step Instruction
Basic Skedler configurations using reporting.yml
Skedler needs a datastore to store Skedler metadata and history data. By default Skedler uses Internal Database as a Datastore. Alternatively, you can configure either Elasticsearch or an external “mysql” or “sqlite” database as a Datastore in skedler-configmap.yaml.
If Skedler Reports defaults are not enough, one may want to customize reporting.yml through a ConfigMap. Please refer to Reporting.yml and ReportEngineOptions Configuration for all available attributes.
Creating a ConfigMap
1. Create a skedler-configmap.yaml file as follows,
apiVersion: v1 kind: ConfigMap metadata: name: skedler-config labels: app: skedler data: reporting.yml: | --- #**************BASIC SETTINGS************ #port: 3000 #host: "0.0.0.0" #*******SKEDLER SECURITY SETTINGS******* #skedler_anonymous_access: true #Skedler admin username `skedlerAdmin` #Allows you to change Skedler admin password. By default the admin password is set to `skedlerAdmin` #skedler_password: skedlerAdmin #*******INDEX SETTINGS*********** #skedler_index: ".skedler" ui_files_location: "/var/lib/skedler/uifiles" log_dir: "/var/lib/skedler/log" #****************DATASTORE SETTINGS************* ####### ELASTICSEARCH DATASTORE SETTINGS ######## # The Elasticsearch instance to use for all your queries. #elasticsearch_url: "http://localhost:9200" #skedler_elasticsearch_username: user #skedler_elasticsearch_password: pass ######## DATABASE DATASTORE SETTINGS ############ #You can configure the database connection by specifying type, host, name, user and password #as separate properties or as on string using the url properties. #Either "mysql" and "sqlite", it's your choice #database_type: "mysql" #For `mysql` database configuration #database_hostname: 127.0.0.1 #database_port: 3306 #database_name: skedler #database_history_name: skedlerHistory #database_username: user #database_password: pass #For `sqlite` database configuration only, path relative to data_path setting #database_path: "/var/lib/skedler/skedler.db" #database_history_path: "/var/lib/skedler/skedlerHistory.db"
2. To deploy your configmap, execute the following command,
kubectl create -f skedler-configmap.yaml
Creating a Deployment
1. Create a skedler-deployment.yaml file as follows,
apiVersion: apps/v1 kind: Deployment metadata: name: skedler-reports labels: app: skedler spec: replicas: 1 selector: matchLabels: app: skedler template: metadata: labels: app: skedler spec: containers: - name: skedler image: skedler/reports:latest imagePullPolicy: Always command: ["/opt/skedler/bin/skedler"] ports: - containerPort: 3000 volumeMounts: - name: skedler-reports-storage mountPath: /var/lib/skedler - name: skedler-config mountPath: /opt/skedler/config/reporting.yml subPath: reporting.yml volumes: - name: skedler-reports-storage - name: skedler-config configMap: name: skedler-config --- apiVersion: v1 kind: Service metadata: name: skedler labels: app: skedler spec: selector: app: skedler ports: - port: 3000 protocol: TCP nodePort: 30000 type: LoadBalancer
2. For deployment, execute the following command,
kubectl create -f skedler-deployment.yaml
3. To get your deployment with kubectl, execute the following command,
kubectl get deployments
4. We can get the service details by executing the following command,
kubectl get services
Now, Skedler will be deployed in 30000 port.
Accessing Skedler
Skedler Reports can be accessed from the following URL,
http://<hostIP>:30000
The following folders are persisted in the mapped volume (ie skedler-reports-storage)
- Log files - log_dir: Persist log information in /var/lib/skedler/logs folder.
- Custom images, images and custom CSS - ui_files_location: Persist UI information in /var/lib/skedler/uifiles folder.
- Database - Persist Skedler infomations in /var/lib/skedler/skedler.db and /var/lib/skedler/skedlerHistory.db
- *Reports - reports_dir: Persist generated report information in /var/lib/skedler/reports folder.
Note: *Report generation path needs to be configured for "Base Folder Directory" as "/var/lib/skedler/reports" in the Skedler configuration page to persist the generated reports
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article