Skip to content

Orb Environment Configuration

iatdaitan edited this page Aug 17, 2021 · 2 revisions

Orb Environment Configuration

Before starting this tutorial, make sure that you have installed all the dependencies below:

  • Docker Engine
  • Docker-compose
  • Golang version 1.15 above
  • Git

Make sure that you already uploaded your ssh public key to GitHub.

Create a folder Projects/NS1 in your home directory

mkdir -p Projects/NS1
cd Projects/NS1

clone the orb repository, using the command bellow

git clone [https://github.com/ns1labs/orb.git](https://github.com/ns1labs/orb.git)

Go into orb folder

cd orb/

Check your git branch

git status

You should get something like that

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/fefbdcaf-4246-4ec3-bcba-3d1a1ef8d004/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210816%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210816T203725Z&X-Amz-Expires=86400&X-Amz-Signature=52bf1e5b6aa585cbc3c2cb97ae83185cbc8a55f7a9b9463fecbe49ff3f6e6533&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22

Make sure that you're on develop branch, if not, checkout to develop with the command below

git checkout develop

Update your project with the last changes, that may exist on git server with the command

git pull origin develop

If everything works right then you're ready to start the project. Use the commands below, and wait for the finish.

make cleandocker
make dockers_dev
docker-compose -f docker/docker-compose.yml up -d

Configuring from WSL

Create a Run Target for the WSL Ubuntu

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/67fc1ce4-1eb8-4427-87bf-295b1dc88466/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210816%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210816T203830Z&X-Amz-Expires=86400&X-Amz-Signature=896fb3e3c675c1411a1a7792e976e2b889cd112adcf3cc15363aed9cd88262ea&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22

On Run/Debug Configuration, choose the WSL - Ubuntu, and choose the "Build on remote target"

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/5bd8dc49-a2a9-4c5f-8fde-7e07d4b76ab3/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210816%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210816T203859Z&X-Amz-Expires=86400&X-Amz-Signature=34d2992a275b9139d70629322d7c19996e0ac904a43fd89be7d2104edb4f8159&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/bc349b06-7afb-4073-805c-b061c0ed4597/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210816%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210816T203927Z&X-Amz-Expires=86400&X-Amz-Signature=75f0c62d300159df7f7d50f32420206650364afa62dc6c0f1cd629f4514e1fd3&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22

https://intellij-support.jetbrains.com/hc/en-us/community/posts/360009409039-Unable-to-save-settings-Failed-to-save-settings-Please-restart-PyCharm

I discovered what happened. When I was using Docker over WSL and the project was on ubuntu filesystem. The Docker changed the owner of the folder .idea to root blocking me to save anything from the Windows perspective over WSL. Changing the folder user owner to my own account fixed the issue.

chown -R <user>.<user> .idea

Test

To run the tests, on the Orb directory, use the command below:

make test

To get the specific Intellij runConfigurations use the command below:

git checkout 85a9ae4070b9a151b9f8c91d41b936735f081bbc .idea/runConfigurations/