Hi @Yohan_Prasetia_Siswa,
we're working on setting up ODK Central on Azure/Kubernetes. It's possible, and the setup is more specific to Kubernetes as to Azure.
The best approach would be to have a Helm chart setting up ODK Central in Kubernetes in the same way the docker-compose file orchestrates Central in a Docker swarm/stack. We simply reproduced the orchestration from docker-compose through the fantastic tool rancher on Kubernetes.
In the cloud (Azure or otherwise):
- Install rancher in two steps as shown under "get started" here. Our IT crew still have sparkly eyes when they talk about how easy it was to set up rancher. They used openshift before (with less sparkle and more horror in their eyes).
On a local machine:
- On a local machine (we did it on Ubuntu 19.10) clone odk central and submodules
- Build the images for nginx and service and publish them to dockerhub - feel free to use our images linked here.
- Note the settings (ssh, email, domain) are not updated, we override the defaults in the runtime config for the docker images.
git clone https://github.com/opendatakit/central
git submodule update -i
docker build . -f nginx.dockerfile -t dbcawa/odk_nginx
docker build . -f service.dockerfile -t dbcawa/odk_service
docker push dbcawa/odk_nginx
docker push dbcawa/odk_service
In rancher (rancher terminology italizised, values bold):
- create a namespace e.g. odk
- Create a config map (we named it odk-service) with
{
"default": {
"database": {
"host": "postgres",
"user": "POSTGRES_USER",
"password": "POSTGRES_PASSWORD",
"database": "POSTGRES_DATABASE"
},
"email": {
"serviceAccount": "no-reply-odk@yourdomain.com",
"transport": "smtp",
"transportOpts": {
"host": "OUR.SMTP.SERVER",
"port": OUR.SMTP.PORT
}
},
"env": {"domain": "odkcentral.yourdomain.com"},
"external": {}
}
}
The result is ODK Central's nginx running on an IP:PORT as shown in rancher. You now have to reverse proxy that IP:PORT to a friendly host name (e.g. odkcentral.yourdomain.com).
So overall the setup seems to work, although we have a few gremlins between the SSL certs and our email server. Reported here.
However, we can create web users on the command line in workload service, running pod, shell:
odk-cmd --email example@opendatakit.org user-create
odk-cmd --email example@opendatakit.org user-promote
Hope that helps!