Skip to content

Latest commit

 

History

History
154 lines (80 loc) · 3.93 KB

SETUP.md

File metadata and controls

154 lines (80 loc) · 3.93 KB

Getting started

Installation from scratch

Install nodejs

Make sure you have nodejs You can download it from the offical website or with aptitude :

sudo apt install nodejs

Install npm

npm is distributed with Node.js- which means that when you download Node.js, you automatically get npm installed on your computer. Make sure you have nodejs You can download it from the offical website or with aptitude :

sudo apt install npm

Install angular/cli

upgrade to the latest version of npm :

sudo npm i npm@latest -g /make sure you have the permission/

then install angular/cli :

sudo npm i @angular/cli -g

Make sure you have the Angular CLI installed globally.

Install mongodb

Be careful because the installation depends a lot on the OS you are on. Check this page if the below content doesn't work and follow the instructions.

Make sure you have mongodb You can download it from the offical website or with aptitude :

sudo apt install mongodb

Don't forget to start the service :

sudo service mongodb start

Install yarn

You can use Yarn to manage your dependencies. You can install it from Here or from here :

sudo apt install yarn

Then run

yarn install

to resolve all dependencies (might take a minute).

Note that using Yarn may supplement that of npm in some cases.

Install Kubectl

Kubectl is the (Linux ?) Kubernetes command line client ! So go there and install it. After installing Kubectl we need to setup our config, so make this

mkdir ~/.kube

Then put your kubernetes config file in this reposotory.

You don't have it or don't know how to make it ?

No problem you can retrieve your config file from OVH go to your project pannel then search for your config setup in Containers & Orchestration section then Managed Kubernetes Service then click on your project name, then scroll down and click on kubeconfig. Wait the file creation and download the config file, rename it as "config" (no extension, just config) then past it inside the .kube repository in your HOME. Well done !

Tips : your OVH project administrator and/or your Kubernetes expert will help you a lot if this step is too harsh for you !

Install ng

make sure you have the lastest version of npm, then install globally (sudo needed) ng :

sudo npm i ng -g

Install your dependencies

Run

npm install

In your FrontEnd and in your BackEnd.

Or

Run

yarn install

In your FrontEnd and in your BackEnd.

Update your file BackEnd/Client/os.js

Rename it OS.js and fill the blank with your OVH config

Update your file BackEnd/app.js

Verify the binding of all the settings with your env settings.

For example : port of your mongodb docker/server.

Prepare your BackEnd

Create two repositories at the root of your BackEnd : uploads and downloads

mkdir uploads && mkdir downloads

Run FrontEnd

Run

ng serve

For a dev server.

Run

ng build --prod

For a prod server. The production files will be generated in dist/ folder.

Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Run Backend

Run

npm run dev

For a dev server.

Run

sudo npm install pm2 -g && npm run start

For a prod server

Optionnal steps :

Install OpenStack Swift Client

Install OpenStack Swift Client locally to manage your disk with the command line client.

Be sure to have pip (from Python3) installed on your system, then :

pip install --user python-swiftclient python-keystoneclient

Then follow the instructions and this helpful guide