Skip to content

External Resources

At this stage, you should create the additional resources as required by your application.

Kafka Topics

Kafka is managed through Strimzi operator in Kubernetes environment

Thanks to Kast deployment you have a functional Kafka cluster, but you need to administrate Kafka topic manually. To create a topic before running your punchline, you'll need this configuration :

apiVersion: kafka.strimzi.io/v1beta1
kind: KafkaTopic
metadata:
  name: my-topic
  namespace: processing
  labels:
    strimzi.io/cluster: kafka
spec:
  partitions: 1
  replicas: 1
  config:
    retention.ms: 7200000
    segment.bytes: 1073741824

To push it, simply write this content in a kafka_topic.yml file and run this command from your PConsole :

kubectl apply -f kafka_topic.yml

Elasticsearch Templates

Once your Punch configuration has been imported into operator nodes, you will find some Elasticsearch templates in your PConsole resources. These templates must be pushed to elasticsearch to ensure the proper functioning of the platform.

These templates are settings (indexing fields settings, index replication settings...) that will be applied to every new Elasticsearch index as soon as it is created, based on the index name matching pattern in each file.

The templates that you must load are located under the platform directory. They are required to correctly insert the monitoring events generated by the PunchPlatform itself. They must be imported in your monitoring elasticsearch instance, but to avoid mistakes depending on your actual setup, you can import them to each of your Elasticsearch cluster.

At this point, you may be in one of these two cases:

  • Elasticsearch is accessible through an ingress.
  • Elasticsearch is not accessible outside the cluster

Push ES templates through an ingress

Simply run this command for each folder (mandatory or custom) containing templates to import:

punchplatform-push-es-templates.sh --directory resources/elasticsearch/templates/platform \
                                    --url <es_ingress_url>

Info

A username and a password will be asked by this command. If Elasticsearch is not protected by an authentication agent, leave them empty.

Push ES templates without an available ingress

Warning

This method requires the image curlimages/curl in the registry of your Kube Cluster. Follow the Punch Images docuementation to download it first by configuring the resources.txt file with:

docker.io/curlimages/curl:latest

And upload it in the registry.

Once your cluster's registry contains the image curlimages/curl, you can push the ES template using the same script with --kube option and targeting the ES service within your kube cluster :

punchplatform-push-es-templates.sh --directory resources/elasticsearch/templates/platform \
                                    --url <es_service_url> \
                                    --kube \
                                    --registry <registry_endpoint>

Kibana Dashboards

The PunchPlatform comes with already made custom Kibana dashboard to easily monitor your platform. All these dashboards are available under the dashboard directory.

Once your Punch configuration has been imported into your operator nodes, you have now some Kibana dashboards in your resources ("standard" from the punch deployer resources, and optionally custom-prepared by your integrator team).

You need to actually import appropriate dashboard into each running kibana domain instance (see deployment settings to identify all instances of Kibana in your platform, their associated Elasticsearch cluster and kibana index name).

punchplatform-setup-kibana.sh --import -d <kibana domain from your punchplatform-deployment.settings file>

Or manually, follow these quick steps:

  • Go to Kibana UI
  • On the left-side panel, go to the "Management > Saved Objects > Import"
  • Drag-n-drop or select the previous NDJSON file (repeat for each file to import)
  • Go to the "Dashboards" tab and start exploring your dashboards !

Grafana Dashboards

The PunchPlatform comes with already made custom Grafana dashboard to easily monitor your platform All these dashboards are available under the "conf/resources/grafana" directory in PConsole

You need to actually import appropriate dashboard into each running grafana UI

  • Go to Grafana UI
  • On the left-side panel, go to the "Dashboard > Manage > Import"
  • Drag-n-drop or select the previous NDJSON file (repeat for each file to import)
  • Go to the "Dashboards" tab and start exploring your dashboards !