contactcatalogus
by Conduction
Het Contacten Component bevat lijsten van contactpersonen, hiermee heeft het vanuit bron perspectief doorgaans een aanvullende of vervangende taak ten opzichte van het BRP. Met andere woorden in het Contacten Component vinden we personen die we niet uit het BRP halen. Dat kan zijn, omdat deze personen niet in het BRP staan, we nog niet weten wat het BSN van een persoon is of omdat we simpelweg geen rechten of toegang hebben tot het BRP vanuit het proces waar we mee bezig zijn. Daarnaast fungeert het Contacten Component als een Common Ground variant van de contactpersonenlijst, zoals we die kennen vanuit een e-mail applicatie of telefoon. Het is dus ook mogelijk om personen op te nemen in een contactenlijst. Hiermee worden contact en functionaliteiten voor gebruikers (in application form) gerealiseerd. Als laatste biedt het Contacten Component de mogelijkheid om gegevens van organisaties op te slaan. Het component ondersteunt bewust alleen de persoonsgegevens, maar kan in samenwerking met het CMR en ORC een Customer Relation Management systeem vormen, waarbij het ORC de mogelijkheid biedt om bijvoorbeeld leads in kaart te brengen.
About this chart
Contacten Catalogus Helm Chart
This application is part of the european gaia-x and dutch commonground projects, it is therefore installable on al kubernetes cluseters confirming to the haven standard.
It should however work out of the box on any kubernetes environment, we do however advice to us an installation dashboard to manage your envirnoment. eg
Installation
For installation of components you will have to have helm 3 and kubectl installed.
Minimal system requirements for your cluster
- Kubernetes 1.16 of later
- A minimum 3 nodes
- 4 vCPUs per node
- 4 GB RAM per node
- 50 GB disk space per node
Quick Installation
$ helm repo add contacten-catalogus https://github.com/ConductionNL/contactcatalogus/api/helm
$ helm repo update
$ helm install contacten-catalogus/contacten-catalogus
Take a look at the helm repro command for more options.
Kubernetes Providers
There is a number of Kubernetes providers that are suitable to run CommonGround components. Most notable are:
For which we have to note that although the last three providers have servers within The Netherlands, because the Safe Harbour ruling has been invalidated by the European court of Justice and the American ownership of these servers are not suitable for production clusters.
Deploying trough commonground.nu
We strongly advise you to use the conduction commonground dashboard for the deployment of your components. An extensive tutorial can be found here.
If you do not wish to use the kubernetes managment dashboard, you will have to follow the following tutorial. Otherwise, we strongly encourage you to read the chapter about helm settings
Setting up helm repositories
We will first show you how to add the ingress nginx repository of helm and kubernetes to your helm repositories. We do this using the following command:
$ helm repo list
If in the output there is no repository 'ingress-nginx' we need to add it:
$ helm repo add stable https://kubernetes.github.io/ingress-nginx
Congratulations! You added your first repository to helm.
Setting up ingress
We need at least one nginx controller per kubernetes kluster, doh optionally we could set on up on a per namebase basis
$ helm install ingress-nginx/ingress-nginx --name loadbalancer --kubeconfig kubeconfig.yaml
After installing a component we can check that out with
$ kubectl describe ingress pc-dev-ingress -n=kube-system --kubeconfig kubeconfig.yaml
Setting up Kubernetes Dashboard
After we installed helm we can easily use both to install kubernetes dashboard
$ kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml --kubeconfig kubeconfig.yaml
This should return the token, copy it to somewhere save (just the token not the other returned information) and start up a dashboard connection
$ kubectl proxy --kubeconfig kubeconfig.yaml
This should proxy our dashboard to helm making it available trough our favorite browser and a simple link
http://localhost:8001/api/v1/namespaces/kube-system/services/https:dashboard-kubernetes-dashboard:https/proxy/#!/login
Then, you can login using the Kubeconfig option and uploading your kubeconfig.
## Deploying trough helm
First we always need to update our dependencies
```CLI
$ helm dependency update ./api/helm
Then we need to set up the desired namespaces
$ kubectl create namespace dev
$ kubectl create namespace stag
$ kubectl create namespace prod
If you want to create a new instance
$ helm install pc-dev ./api/helm --kubeconfig kubeconfig.yaml --namespace dev --set settings.env=dev,settings.debug=1
$ helm install pc-stag ./api/helm --kubeconfig kubeconfig.yaml --namespace stag --set settings.env=stag,settings.debug=0,settings.cache=1
$ helm install pc-prod ./api/helm --kubeconfig kubeconfig.yaml --namespace prod --set settings.env=prod,settings.debug=0,settings.cache=1
This will create an instance by the name of pc-dev (line 1) pc-stag (line 2) or pc-prod (line 3) on your cluster, with the environment, debug and cache settings configured (see helm settings for more information).
Or update if you want to update an existing one
$ helm upgrade pc-dev ./api/helm --kubeconfig kubeconfig.yaml --namespace dev --set settings.env=dev,settings.debug=1
$ helm upgrade pc-stag ./api/helm --kubeconfig kubeconfig.yaml --namespace stag --set settings.env=stag,settings.debug=0,settings.cache=1
$ helm upgrade pc-prod ./api/helm --kubeconfig kubeconfig.yaml --namespace prod --set settings.env=prod,settings.debug=0,settings.cache=1
Or just restart the containers of the component
$ kubectl rollout restart deployments/pc-php --namespace dev --kubeconfig kubeconfig.yaml
$ kubectl rollout restart deployments/pc-nginx --namespace dev --kubeconfig kubeconfig.yaml
$ kubectl rollout restart deployments/pc-varnish --namespace dev --kubeconfig kubeconfig.yaml
Or del if you want to delete an existing one
$ helm del pc-dev --kubeconfig kubeconfig.yaml
$ helm del pc-stag --kubeconfig kubeconfig.yaml
$ helm del pc-prod --kubeconfig kubeconfig.yaml
Note that you can replace common ground with the namespace that you want to use (normally the name of your component).
Helm settings
When installing components there is a number of settings that can be edited to modify the working of your component. The most important of these settings are:
settings.env: This setting influences primarily the container to be used. There are three regular possibilities:dev,stagandprod.devwill load the latest new container, which can be unstable because this is the version that is developed on.stagwill load the latest semi-stable version of the container, this setting is recommended for acceptation environmentsprodwill load thelatestimages, which are the latest stable version. This setting is recommended for production environments
settings.debug: This setting can enable the extensive debugging tools included in Symfony. This is recommended in development environments by setting it to 1. However, debugging takes a lot of power from your cluster, so we recommend to switch it off in production or acceptation environments (by setting it to 0)settings.cache: This setting can enable caching in your component. This means that traffic can be prevented by checking if a resource has already been requested and if it is still in cache. However, this means also that a version of a resource can be loaded that has been changed on the source. Therefore we recommend to switch this off in development environments (by setting this option to 0) and enable (by setting this option to 1) it on production environments to enhance the response times of the component.settings.web: This setting determines if the component has to be exposed to the outside world. Setting it to 0 will not expose your component outside of the cluster (recommended), switching it to 1 will expose your component to ingress (recommended for front-end applications).
Making your app known on NLX
The proto component comes with an default NLX setup, if you made your own component however you might want to provide it trough the NLX service. Fortunately the proto component comes with an nice setup for NLX integration.
First of all change the necessary lines in the .env file, basically everything under the NLX setup tag. Keep in mind that you wil need to have your component available on an (sub)domain name (a simple IP wont sufice).
To force the re-generation of certificates simply delete the org.crt en org.key in the api/nlx-setup folder.
Setting up analytics and a help chat function
As a developer you might be interested to know how your application documentation is used, so you can see which parts of your documentation are most read and which parts might need some additional love. You can measure this (and other user interactions) with google tag manager. Just add your google tag id to the .env file (replacing the default) under GOOGLE_TAG_MANAGER_ID. This will only enable Google analytics on your documentation page, it will never analyse the actual traffic of the API.
Have you seen our sweet support-chat on the documentation page? We didn't build that ourselves ;) We use a Hubspot chat for that, just head over to Hubspot, create an account and enter your Hubspot embed code in het .env file (replacing the default) under HUBSPOT_EMBED_CODE.
Would you like to use a different analytics or chat-tool? Just shoot us a [feature request](https://github.com/ConductionNL/commonground-component/issues/new?assignees=&labels=&template=feature_request.md&title=New Analytics or Chat provider)
Deploy contactcatalogus with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has contactcatalogus on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartcontactcatalogus is pinned at v1.0.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply