# {: .center} This documentation covers the technical aspects of projects developed by the Grandlyon in cooperation with [Cozy Cloud](https://cozy.io/fr/). ## Installing prerequisites In order to work with a self-data environment, there are a couple of prerequisites. Don't forget to take a look at our general development guidelines [wiki](https://forge.grandlyon.com/web-et-numerique/wiki_web_num) first. Name | Required | Details ---------------------------------- | -------- | ------- [Node](https://nodejs.org/en/download/) | Yes | Node 16 must be installed as it is the version that runs on the official cozystack. [Yarn](https://classic.yarnpkg.com/en/docs/install) | Yes | Yarn is our projects package manager. [Docker](https://www.docker.com/get-started) | Yes | See [cozystack]() for more information. [Docker-compose](https://docs.docker.com/compose/install/) | Yes [WSL](index.md#wsl) | No | Required for windows users. ## Usage ### Node NVM You might need to manage several NodeJS versions on the same computer when working on different projects. To manage it properly, you can use the `nvm` package on windows or `n` package on linux. ```console $ yarn global add nvm ``` === "Install a version" ```console $ nvm install X.X.X ``` === "See installed node versions" ```console $ nvm list ``` === "Switch to a specific version" ```console $ nvm use X.X.X ``` === "Check your current version" ```console $ node -v ``` ### WSL First open Powershell as administrator and launch the following command: ```powershell dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart ``` This command will install WSL on your computer. After this, you'll need to ==**reboot**==. #### Upgrade to WSL 2 If you're on WSL 1 and want to upgrade to WSL 2, here is the process: 1. Open an elevated powershell and paste the following command: ```powershell dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart ``` 2. Then, enable the Virtual Machine Platform optional feature. ```powershell dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart ``` 3. Now restart your computer to apply these features. Once it's done, open an elevated powershell again and set the default wsl version to 2 ```console $ wsl --set-default-version 2 ``` !!! warning "You might see this message after running the command above" WSL 2 requires an update to its kernel component. For information please visit [wsl2kernel](https://aka.ms/wsl2kernel). If you install the MSI from [wsl2kernel](https://aka.ms/wsl2kernel). Once you have the kernel installed, please run `wsl --set-default-version 2` again and it should complete successfully without showing the message. #### Install your Linux distribution After reboot, open the microsoft store and install the distribution of your choice, for instance: ==Ubuntu 20.04 lts==. Once it's done, open it and after a few minutes you'll be prompted for the creation of a user account. To make sure it's correctly installed and working, you can open Powershell and paste the following command : ```powershell wsl.exe --list --running ``` Now you should see the name of your distribution in the list. #### Setup your distribution 1. Start updating the packages list by typing: ```console $ sudo apt update ``` 2. Install nodejs using the apt package manager ```console $ sudo apt install ``` 3. To verify the Installation execute the following command: ```console $ nodejs --version ``` 4. To be able to download npm package, you need to install the npm, the Node.js package manager. To do so type: ```console $ sudo apt install npm ``` 5. To verify the npm Install check using the command: ```console $ npm --version ``` 6. To Download and Setup Yarn ```console $ sudo apt install yarn ``` 7. To check the installed version of Yarn: ```console $ yarn --version ``` Now you'll probably be in version 0.23+git, if so you'll have to upgrade to 1.22 to make everything work properly. In order to achieve this, you'll have to launch several commands: ``` sudo apt-get remove cmdtest sudo apt autoremove sudo apt-get update sudo apt install curl -y curl -o- -L https://yarnpkg.com/install.sh | bash source ~/.bashrc ``` Now you should be at least in version ==^1.22== and ready to go on. ## Contributing to the documentation To install and run the documentation on your laptop, follow the steps in the [README](https://forge.grandlyon.com/web-et-numerique/llle_project/self-data-technical-doc). Then: - Create a branch for your change - Add documentation pages to `docs`, and supporting assets to `img`. - Write some [markdown](https://guides.github.com/features/mastering-markdown/) - Submit a merge request {: .inline-center-left} 