diff --git a/README.md b/README.md index 6da251c..b8aeb3f 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,6 @@ # DC Project -## Installation of Development environment -### On windows -1. Install git - - Download and install: https://git-scm.com/download/win -2. Install Make - - Go to [ezwinports](https://sourceforge.net/projects/ezwinports/files/). - - Download `make-4.1-2-without-guile-w32-bin.zip` (get the version without guile). - - Extract zip. - - Copy the contents to your `Git\mingw64\` merging the folders, but **do NOT overwrite/replace** any existing files. - -### Add JAVA_HOME path -In CMD (Not Powershell) -```cmd -$ setx -m JAVA_HOME "C:\Users\%USERNAME%\.jdks\corretto-11.0.7" -$ setx -m PATH "%PATH%;%JAVA_HOME%\bin"; -``` +[Installation](./doc/installation) ### Run dockers ```bash diff --git a/doc/installation/Installation-linux.md b/doc/installation/Installation-linux.md new file mode 100644 index 0000000..acef7cd --- /dev/null +++ b/doc/installation/Installation-linux.md @@ -0,0 +1,20 @@ +Installation on Linux (debian) +===================== + +## Prerequisites +```bash +apt-get update +``` + +### Install docker +See: [docs.docker.com/get-docker](https://docs.docker.com/get-docker/) +```bash +apt-get install docker +apt-get install docker-compose +``` + +### Install Git +See: [git-scm.com/downloads](https://git-scm.com/downloads) +```powershell +apt-get install git +``` \ No newline at end of file diff --git a/doc/installation/Installation-windows.md b/doc/installation/Installation-windows.md new file mode 100644 index 0000000..f0f5973 --- /dev/null +++ b/doc/installation/Installation-windows.md @@ -0,0 +1,50 @@ +Installation on Windows +============ + +## Prerequisites +### Install chocolaty (optional) +First install Chocolaty => [https://chocolatey.org/install](https://chocolatey.org/install) +```powershell +Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) +``` + +### Install make (optional) +Install make with chocolaty +```powershell +chocolatey install make +``` +Install make for gitbash +[https://gist.github.com/evanwill/0207876c3243bbb6863e65ec5dc3f058#make]() + +### Install awk (optional) +Install awk with chocolaty +```powershell +chocolatey install awk +``` + +### Install docker +See: [docs.docker.com/get-docker](https://docs.docker.com/get-docker/) +```powershell +choco install docker-desktop +``` + +If you use docker with WSL2, you need to change config for elasticsearch: +```powershell +wsl -d docker-desktop +sysctl -w vm.max_map_count=262144 +echo "vm.max_map_count = 262144" > /etc/sysctl.d/99-docker-desktop.conf +``` +then restart docker-desktop + +### Install Git +See: [git-scm.com/downloads](https://git-scm.com/downloads) +```powershell +choco install git +``` + +### Add JAVA_HOME path +In CMD (Not Powershell) +```cmd +$ setx -m JAVA_HOME "C:\Users\%USERNAME%\.jdks\corretto-11.0.7" +$ setx -m PATH "%PATH%;%JAVA_HOME%\bin"; +``` \ No newline at end of file diff --git a/doc/installation/Installation.md b/doc/installation/Installation.md new file mode 100644 index 0000000..ed6fbf4 --- /dev/null +++ b/doc/installation/Installation.md @@ -0,0 +1,7 @@ +Installation +============ + +1. [Installation on Windows](Installation-windows.md) +2. [Installation on Linux](Installation-linux.md) +3. [Problems in installations](Problems.md) + diff --git a/doc/installation/Problems.md b/doc/installation/Problems.md new file mode 100644 index 0000000..2b7e5ea --- /dev/null +++ b/doc/installation/Problems.md @@ -0,0 +1,29 @@ +Problems +======== + +1. [max_map_count](#max_map_count) + +max_map_count +------------- + +**Context**: + + Elasticsearch in Docker on WSL2 + +**Error**: +``` +max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] +``` + +**Resolution**: + +[Stackoverflow](https://stackoverflow.com/questions/42111566/elasticsearch-in-windows-docker-image-vm-max-map-count) + +In Powershell: +```powershell +wsl -d docker-desktop +sysctl -w vm.max_map_count=262144 +echo "vm.max_map_count = 262144" > /etc/sysctl.d/99-docker-desktop.conf +``` + +restart docker-desktop \ No newline at end of file