diff --git a/help/deploy/bare-metal/deploy-docker-standalone.md b/help/deploy/bare-metal/deploy-docker-standalone.md new file mode 100644 index 0000000000..6859f95bd7 --- /dev/null +++ b/help/deploy/bare-metal/deploy-docker-standalone.md @@ -0,0 +1,114 @@ +--- +title: "Stand-alone server" +sidebar_position: 3 +--- + +The deployment consists of a few docker containers, [database](../../develop/under-the-hood/infrastructure.md#database) for storing metadata, +and [persistent file storage](../../develop/under-the-hood/infrastructure.md#storage) for storing files + +Datagrok requires PostgreSQL [database](../../develop/under-the-hood/infrastructure.md#database) to store metadata. +We recommend using scalable and highly reliable solutions, such as [AWS RDS](https://aws.amazon.com/rds/). + +For [persistent file storage](../../develop/under-the-hood/infrastructure.md#storage), Datagrok supports a lot of options, including cloud solutions, +for example [AWS S3](https://aws.amazon.com/s3/) and Local File System storage. + +This document contains instructions to deploy Datagrok using [Docker Сompose](https://docs.docker.com/compose/) +on virtual machines or dedicated hosts with Local File System for persistent storage. + +More information about Datagrok design and components: + +* [Architecture](../../develop/under-the-hood/architecture.md) +* [Infrastructure](../../develop/under-the-hood/infrastructure.md) + +## Prerequisites + +### 1. System Requirements +- **Minimal**: 50 GB free disk space, 4 CPUs, 16 GB RAM. +- **Recommended**: 50+ GB free disk space, 8+ CPUs, 32+ GB RAM. + +### 2. Install Docker Compose +- Download and install the latest version of [Docker Compose](https://docs.docker.com/compose/install/). + +--- + +## Preparation + +1. **Download Docker Compose Configuration** + - Obtain the `docker-compose.yml` file: [link](https://github.com/datagrok-ai/public/blob/master/docker/localhost.docker-compose.yaml). + +2. **Pull Required Docker Images** + ```bash + docker compose -f localhost.docker-compose.yaml pull + ``` +## Setup Datagrok components + +### 1. Persistent Storage + +#### a. Local Docker Volume (Default) + +Datagrok uses a local Docker volume as persistent storage by default. + +#### b. Cloud Storage (AWS S3) + +To configure AWS S3 for persistent storage: + +1. Replace the `GROK_PARAMETERS` section in the downloaded `localhost.docker-compose.yaml` file with the following: + + ```json + { + "amazonStorageRegion": "", + "amazonStorageBucket": "", + "amazonStorageId": "", + "amazonStorageKey": "" + } + ``` +### 2. Database + +#### a. Local Database (Default) + +To use a local database, update the GROK_PARAMETERS section in the localhost.docker-compose.yaml file: + + ```json + { + "dbServer": "db", + "dbPort": "5432", + "db": "datagrok", + "dbLogin": "datagrok", + "dbPassword": "SoMeVeRyCoMpLeXpAsSwOrD", + "dbAdminLogin": "postgres", + "dbAdminPassword": "postgres" + } + ``` + +#### b. Cloud Database + +Deploy a database in your cloud provider and update the GROK_PARAMETERS section with the necessary details: + +1. Replace the `GROK_PARAMETERS` section in the downloaded `localhost.docker-compose.yaml` file with the following: + + ```json + { + "dbServer": "", + "dbPort": "5432", + "db": "datagrok", + "dbLogin": "datagrok", + "dbPassword": "SoMeVeRyCoMpLeXpAsSwOrD", + "dbAdminLogin": "", + "dbAdminPassword": "" + } + ``` + +## Deploy Datagrok + +Run the deployment process using Docker Compose: + ```bash + docker compose -f localhost.docker-compose.yaml up -d + ``` +## Verify Deployment +1. Access Datagrok: + Open your browser and navigate to http://:8080. +2. Login Credentials: + • Username: admin + • Password: admin + + diff --git a/help/deploy/bare-metal/deploy-docker-swarm.md b/help/deploy/bare-metal/deploy-docker-swarm.md deleted file mode 100644 index 36bb43c7d9..0000000000 --- a/help/deploy/bare-metal/deploy-docker-swarm.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: "Docker Swarm" -sidebar_position: 3 ---- - -The deployment consists of a few docker containers, [database](../../develop/under-the-hood/infrastructure.md#database) for storing metadata, -and [persistent file storage](../../develop/under-the-hood/infrastructure.md#storage) for storing files - -Datagrok requires PostgreSQL [database](../../develop/under-the-hood/infrastructure.md#database) to store metadata. -We recommend using scalable and highly reliable solutions, such as [AWS RDS](https://aws.amazon.com/rds/). - -For [persistent file storage](../../develop/under-the-hood/infrastructure.md#storage), Datagrok supports a lot of options, including cloud solutions, -for example [AWS S3](https://aws.amazon.com/s3/) and Local File System storage. - -This document contains instructions to deploy Datagrok using [Docker Swarm](https://docs.docker.com/engine/swarm/) -on virtual machines or dedicated hosts with Local File System for persistent storage. - -More information about Datagrok design and components: - -* [Architecture](../../develop/under-the-hood/architecture.md) -* [Infrastructure](../../develop/under-the-hood/infrastructure.md) - -## Prerequisites - -1. We use native [Docker compose](https://docs.docker.com/compose/) commands to run applications on machines. It - simplifies multi-container application development and deployment. - 1. Platform requires 2 hosts: 1 for Datagrok, 1 for CVM with hardware parameters: - * Minimal: 30 GB free disk space, 2 CPUs, 4 GB RAM. - * Recommended: Over 30 GB free disk space, 4 CPUs, 8 GB RAM, or higher. - 2. Download and install the latest version of [Docker Compose](https://docs.docker.com/compose/install/) to your - environment (virtual machines, dedicated hosts, etc.) - -## Preparations - -1. Activate docker swarm mode on your manager node (it should be a datagrok host): - - ```shell - docker swarm init - ``` - - The shell will print a token for adding worker nodes something like that: - - ```shell - Swarm initialized: current node (bvz81updecsj6wjz393c09vti) is now a manager. - - To add a worker to this swarm, run the following command: - - docker swarm join \ - --token SWMTKN-1-testetsttestetst-qwewsdwqdwdqwddwqdwq XX.XX.XX.XX:2377 - - To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions. - ``` - -2. Login on worker node (it should be a CVM host) and add it to the docker-swarm cluster: - - ```shell - docker swarm join --token SWMTKN-1-testetsttestetst-qwewsdwqdwdqwddwqdwq XX.XX.XX.XX:2377 - ``` - -3. From the manager node (datagrok) set labels to all nodes in the swarm cluster. - - 1. List all nodes. We will need ids of the datagrok and CVM nodes for the next step: - - ```shell - docker node ls - ``` - - 2. Add labels ```role==datagrok``` to datagrok node which is the manager and ```role==cvm``` - to CVM node which is the worker in the cluster: - - ```shell - docker node update --label-add role==datagrok - docker node update --label-add role==cvm - ``` - -4. Download a Docker Compose YAML - file: [link](https://github.com/datagrok-ai/public/blob/master/docker/swarm.docker-compose.yaml) - -5. Run the docker stack - - ```shell - docker stack deploy -c ./swarm,docker-compose.yaml datagrok - ``` - -6. Check if Datagrok started successfully: `http://:8080`, login to Datagrok using the - username "`admin`" and password "`admin`". - -7. Edit settings in the running Datagrok platform (Tools -> Settings...). Do not forget to click Apply to save new settings. - * Scripting: - * CVM Url: `http://:8090` - * CVM URL Client: `http://:8090` - * H2o Url: `http://:54321` - * API Url: `http://:8080/api` - * Cvm Split: `true` - * Dev: - * CVM Url: `http://:8090` - * Cvm Split: `true` - * API Url: `http://:8080/api` - -## Users access - -Both Compute and Datagrok engines should be accessible by users. -The easiest way is to create DNS endpoints pointing to public IPs or load balancers in front of the -services: `datagrok.example` -and `cvm.example`.