You need to sign in or sign up before continuing.
Newer
Older
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.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
[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.
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
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
```
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
```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}
