{"id":5492,"date":"2025-11-04T14:36:14","date_gmt":"2025-11-04T13:36:14","guid":{"rendered":"https:\/\/kairntech.com\/doc\/?page_id=5492"},"modified":"2025-11-04T14:36:15","modified_gmt":"2025-11-04T13:36:15","slug":"migration-guide-docker","status":"publish","type":"page","link":"https:\/\/kairntech.com\/doc\/migration-guide-docker\/","title":{"rendered":"Migration Guide (docker)"},"content":{"rendered":"\n<p>The following lines will guide you trough the migration from the version <strong><code>manta<\/code> <\/strong>to the version <code><strong>naja<\/strong><\/code>.<\/p>\n\n\n\n<p>These notes are based on a <code>docker-compose<\/code> deployment.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u2139\ufe0f <strong>Note<\/strong>: <\/p>\n\n\n\n<p>The main differences reside in new environment files, instead of a single <code>.env<\/code> file. <\/p>\n\n\n\n<p>The new <code>naja<\/code> version also comes with Elastic Search authentication (in addition to MongoDB authentication).<\/p>\n<\/blockquote>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"supported-gpu-hardware\">1. Backup<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo su\ncp -rf \/opt\/sherpa \/opt\/sherpa_bck\/<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">2. Create MongoDB dump (migration 4.0.6 \u2192 7.0.14)<\/h2>\n\n\n\n<p>If MongoDB <strong>with authentication<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MONGODUMP=mongodump.gz\ndocker exec -i sherpa-mongodb rm \"${MONGODUMP}\"\ndocker exec -i sherpa-mongodb mongodump -uadmin -p**** --gzip --quiet --archive=\"${MONGODUMP}\"\nDATENOW=$( date +%Y%m%d )\ndocker cp sherpa-mongodb:\"${MONGODUMP}\" mongodump.\"${DATENOW}\".gz<\/code><\/pre>\n\n\n\n<p>If MongoDB <strong>without authentication<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MONGODUMP=mongodump.gz\ndocker exec -i sherpa-mongodb rm \"${MONGODUMP}\"\ndocker exec -i sherpa-mongodb mongodump --gzip --quiet --archive=\"${MONGODUMP}\"\nDATENOW=$( date +%Y%m%d )\ndocker cp sherpa-mongodb:\"${MONGODUMP}\" mongodump.\"${DATENOW}\".gz<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">3. Stop Sherpa<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/opt\/sherpa\ndocker compose -f docker-compose.yml down<\/code><\/pre>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">4. Remove volumes<\/h2>\n\n\n\n<p>Logs:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for VOL in $(docker volume ls|grep sherpa|grep log|awk -F' ' '{print $2}') ; do docker volume rm $VOL ; done<\/code><\/pre>\n\n\n\n<p>Elasticsearch:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker volume rm sherpa_esdata<\/code><\/pre>\n\n\n\n<p>MongoDB:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker volume rm sherpa_mongo<\/code><\/pre>\n\n\n\n<p>JWT:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rm -rf \/opt\/sherpa\/sherpa-core\/jwt<\/code><\/pre>\n\n\n\n<p>Grafana (if deployed):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker volume rm sherpa_grafana<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">5. Purge deployed files<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>rm -rf \/opt\/sherpa\/*<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">6. Deploy new <code>docker-compose.yml<\/code><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>cp **\/docker-compose.yml \/opt\/sherpa\/docker-compose.yml<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">7. Setup <code>.env<\/code> files<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>SHERPA_INSTALL='\/opt\/sherpa'\nfor ENV in $(cat \"${SHERPA_INSTALL}\/docker-compose.yml\"|grep '\\.env'|grep -v '#'|sort -n|uniq|awk -F '- ' '{print $2}') ; do echo \"touch ${SHERPA_INSTALL}\/${ENV}\" ; done<\/code><\/pre>\n\n\n\n<p>\u2139\ufe0f <strong>Required<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \"${SHERPA_INSTALL}\"\nln -s mongodb-credentials.env .env\ncat elasticsearch-credentials.env &gt;&gt; .env<\/code><\/pre>\n\n\n\n<p>\ud83d\udc49 Here the content of the new environment files:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apollo-client.env\nAPOLLO_API=''\nAPOLLO_OAUTH=''\n\napollo-credentials.env\nAPOLLO_CLIENT_ID=''\nAPOLLO_CLIENT_SECRET=''\n\nazure-openai-client.env\nAZURE_OPENAI_API_BASE=''\nAZURE_OPENAI_DEPLOYMENT_ID=''\nAZURE_OPENAI_API_VERSION=''\n\nazure-openai-credentials.env\nAZURE_OPENAI_API_KEY=''\n\nazure-sso-credentials.env\nOAUTH_AZURE_AD_CLIENT_ID=''\nOAUTH_AZURE_AD_CLIENT_SECRET=''\n\nazure-sso.env\nCHAINLIT_URL=''\nOAUTH_AZURE_AD_TENANT_ID=''\nOAUTH_AZURE_AD_ENABLE_SINGLE_TENANT=true\n\nchatbot.env\nSHERPA_URL=''\nCHAINLIT_PORT= \nCHAT_ROOT_PATH='\/chatbot'\n\ndeepinfra-client.env\nDEEPINFRA_OPENAI_API_BASE='https:\/\/api.deepinfra.com\/v1\/openai'\n\ndeepinfra-credentials.env\nDEEPINFRA_OPENAI_API_KEY=''\n\ndeepl-credentials.env\nDEEPL_API_KEY=''\n\ndeeptranscript-credentials.env\nDT_API_KEY=''\n\nelasticsearch-client.env\nELASTICSEARCH_INDEX_PREFIX=\n\nelasticsearch-credentials.env\nELASTICSEARCH_USERNAME='elastic'\nELASTICSEARCH_PASSWORD=''\n\ngrafana.env\nGF_SERVER_ROOT_URL=''\n\nhuggingface-credentials.env\nHF_API_TOKEN=''\n\nliteralai-credentials.env\nLITERAL_API_KEY=''\n\nmistral-credentials.env\nMISTRAL_API_KEY=''\n\nmongodb-client.env\nMONGODB_DATABASE_PREFIX=\n\nmongodb-credentials.env\nMONGODB_USERNAME='admin'\nMONGODB_PASSWORD=''\n\nncbi-credentials.env\nNCBI_API_KEY=''\n\nopenai-credentials.env\nOPENAI_API_KEY=''\n\nrabbitmq-credentials.env\nRABBITMQ_USERNAME='sherpa'\nRABBITMQ_PASSWORD=''\n\nsherpa-client.env\nSHERPA_CONTEXT_PATH=\n\nsherpa-credentials.env\nSHERPA_ADMIN_PASSWORD=''<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">8. Copy required directories<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>cp -rf **\/sherpa-chat\/ \/opt\/sherpa\ncp -rf **\/sherpa-core\/ \/opt\/sherpa\ncp -rf **\/sherpa-elasticsearch\/ \/opt\/sherpa\ncp -rf **\/sherpa-rabbitmq\/ \/opt\/sherpa\ncp -rf **\/sherpa-haproxy\/ \/opt\/sherpa\n\ncp -rf **\/sherpa-filebeat\/ \/opt\/sherpa\ncp -rf **\/sherpa-prometheus\/ \/opt\/sherpa\ncp -rf **\/sherpa-grafana\/ \/opt\/sherpa<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">9. Update passwords<\/h2>\n\n\n\n<p>RabbitMQ:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker exec -i sherpa-rabbitmq rabbitmqctl hash_password &lt;mypassword&gt;\nvi \/opt\/sherpa\/sherpa-rabbitmq\/definitions\/02-kairntech-users.json<\/code><\/pre>\n\n\n\n<p>Grafana (if deployed):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/opt\/sherpa\/sherpa-grafana\/conf\/.passwd-grafana-admin\nvi \/opt\/sherpa\/sherpa-grafana\/conf\/.passwd-grafana-smtp<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">10. Download Docker images<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/opt\/sherpa\ndocker compose -f docker-compose.yml pull<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">11. Start Docker images<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/opt\/sherpa\ndocker compose -f docker-compose.yml up -d<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">12. Restore MongoDump<\/h2>\n\n\n\n<p>If MongoDB <strong>with authentication<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MONGODUMP=mongodump.gz\ndocker exec -i sherpa-mongodb rm \"${MONGODUMP}\"\nDATENOW=$( date +%Y%m%d )\ndocker cp mongodump.\"${DATENOW}\".gz sherpa-mongodb:\"${MONGODUMP}\"\ndocker exec -i sherpa-mongodb mongorestore -uadmin -p**** --gzip --archive=\"${MONGODUMP}\" --nsExclude admin.system.users<\/code><\/pre>\n\n\n\n<p>If MongoDB <strong>without authentication<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MONGODUMP=mongodump.gz\ndocker exec -i sherpa-mongodb rm \"${MONGODUMP}\"\nDATENOW=$( date +%Y%m%d )\ndocker cp mongodump.\"${DATENOW}\".gz sherpa-mongodb:\"${MONGODUMP}\"\ndocker exec -i sherpa-mongodb mongorestore --gzip --archive=\"${MONGODUMP}\" --nsExclude admin.system.users<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">13. Restart Sherpa Core<\/h2>\n\n\n\n<p>\u2139\ufe0f <strong>Note<\/strong>: In order to take into account the restored dump, the container <code>sherpa-core<\/code> must be restarted.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker restart sherpa-core<\/code><\/pre>\n\n\n\n<p>Wait until deployment is complete:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker logs -f sherpa-core | grep \"Projects deployment complete\"<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">14. Create Kibana user<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>docker exec -it sherpa-elasticsearch curl -X POST -u elastic:\"**********\" \\\n    -H \"Content-Type: application\/json\" \\\n    http:\/\/localhost:9200\/_security\/user\/kibana\/_password \\\n    -d '{\"password\": \"**********\"}' --insecure<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The following lines will guide you trough the migration from the version manta to the version naja. These notes are based on a docker-compose deployment. \u2139\ufe0f Note: The main differences reside in new environment files, instead of a single .env file. The new naja version also comes with Elastic Search authentication (in addition to MongoDB [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5492","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Migration Guide (docker) - Kairntech Documentation<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kairntech.com\/doc\/migration-guide-docker\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Migration Guide (docker) - Kairntech Documentation\" \/>\n<meta property=\"og:description\" content=\"The following lines will guide you trough the migration from the version manta to the version naja. These notes are based on a docker-compose deployment. \u2139\ufe0f Note: The main differences reside in new environment files, instead of a single .env file. The new naja version also comes with Elastic Search authentication (in addition to MongoDB [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kairntech.com\/doc\/migration-guide-docker\/\" \/>\n<meta property=\"og:site_name\" content=\"Kairntech Documentation\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-04T13:36:15+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kairntech.com\/doc\/migration-guide-docker\/\",\"url\":\"https:\/\/kairntech.com\/doc\/migration-guide-docker\/\",\"name\":\"Migration Guide (docker) - Kairntech Documentation\",\"isPartOf\":{\"@id\":\"https:\/\/kairntech.com\/doc\/#website\"},\"datePublished\":\"2025-11-04T13:36:14+00:00\",\"dateModified\":\"2025-11-04T13:36:15+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/kairntech.com\/doc\/migration-guide-docker\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kairntech.com\/doc\/migration-guide-docker\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kairntech.com\/doc\/migration-guide-docker\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/kairntech.com\/doc\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Migration Guide (docker)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kairntech.com\/doc\/#website\",\"url\":\"https:\/\/kairntech.com\/doc\/\",\"name\":\"Kairntech Documentation\",\"description\":\"All the information you need to use Kairntech Software, methodology,  user and installation guides.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kairntech.com\/doc\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Migration Guide (docker) - Kairntech Documentation","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kairntech.com\/doc\/migration-guide-docker\/","og_locale":"en_GB","og_type":"article","og_title":"Migration Guide (docker) - Kairntech Documentation","og_description":"The following lines will guide you trough the migration from the version manta to the version naja. These notes are based on a docker-compose deployment. \u2139\ufe0f Note: The main differences reside in new environment files, instead of a single .env file. The new naja version also comes with Elastic Search authentication (in addition to MongoDB [&hellip;]","og_url":"https:\/\/kairntech.com\/doc\/migration-guide-docker\/","og_site_name":"Kairntech Documentation","article_modified_time":"2025-11-04T13:36:15+00:00","twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/kairntech.com\/doc\/migration-guide-docker\/","url":"https:\/\/kairntech.com\/doc\/migration-guide-docker\/","name":"Migration Guide (docker) - Kairntech Documentation","isPartOf":{"@id":"https:\/\/kairntech.com\/doc\/#website"},"datePublished":"2025-11-04T13:36:14+00:00","dateModified":"2025-11-04T13:36:15+00:00","breadcrumb":{"@id":"https:\/\/kairntech.com\/doc\/migration-guide-docker\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kairntech.com\/doc\/migration-guide-docker\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kairntech.com\/doc\/migration-guide-docker\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kairntech.com\/doc\/"},{"@type":"ListItem","position":2,"name":"Migration Guide (docker)"}]},{"@type":"WebSite","@id":"https:\/\/kairntech.com\/doc\/#website","url":"https:\/\/kairntech.com\/doc\/","name":"Kairntech Documentation","description":"All the information you need to use Kairntech Software, methodology,  user and installation guides.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kairntech.com\/doc\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"}]}},"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/kairntech.com\/doc\/wp-json\/wp\/v2\/pages\/5492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kairntech.com\/doc\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/kairntech.com\/doc\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/kairntech.com\/doc\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/kairntech.com\/doc\/wp-json\/wp\/v2\/comments?post=5492"}],"version-history":[{"count":19,"href":"https:\/\/kairntech.com\/doc\/wp-json\/wp\/v2\/pages\/5492\/revisions"}],"predecessor-version":[{"id":5661,"href":"https:\/\/kairntech.com\/doc\/wp-json\/wp\/v2\/pages\/5492\/revisions\/5661"}],"wp:attachment":[{"href":"https:\/\/kairntech.com\/doc\/wp-json\/wp\/v2\/media?parent=5492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}