How to set up a dev environment?


#1

I have a simple request… For a developper :smiley:

How to set up a dev environment on my Mac?
I don’t want to set up such environment on my Nethserver ( it’s my firewall/gateway ). But on the Mac, I want to.

I had seen tutorial about the Nethserver Installation… Until video tutorial !!! Something very trivial for me.
But nothing more “skilled”.

How to setup your environment to master the e-smith layer, to jiggle with templates like you said.
How to make a left menu entry.
How to make a field in a blank page.

If someone could help for this trivials tasks for a developper.


Explaining e-smith layer - learning by doing
(Stéphane de Labrusse) #2

install in a virtual NS6 nethserver-mock then you will be ready

after in a folder of your choice

git clone https://github.com/NethServer/nethserver-openssh.git

you will retrieve the source, ready to be read

when you have modified something do

git commit -m 'my message of commit'

and build your rpm

make-rpms

read the full example, all answers to your questions are in /usr/share/nethesis/NethServer (of the git folder you have just cloned) and http://docs.nethserver.org/projects/nethserver-devel/en/latest/create_interface_module.html

some module examples : https://github.com/NethServer/nethserver-ui-examples

but you have other clues more developer oriented


http://dev.nethserver.org/nethgui/Documentation/Api/index.html


Introducing new members on community - 7 Mar 16
(Bogdan Costin) #3

Hi Stephdl,
Your example is ok but it is not enough.
I suggest that a clear tutorial from step 1 create a git account to step X install your new develop package into NS and test.

with each step explained like: "You do this Y step because it will result in Z"
Eventually with a clear concrete example of how you create a module (like the UI example). Something that can have effective result and impact.
The more concrete and explained the tutorial / how-to will attract more and more (beginner) developers.

Just my opinion.

PS: I’m not so wise/sure in setting up the right and correct dev environment to do such a document myself :cry:

BR
Bogdan


#4

Yes. exactly.

If you ( developpers ) are thinking that us (sysadmins) are dumbers for managing our system ( i.e, the disk management module is not implemented because it can break the system :angry: ), or the webgui made sysadmin stupid…
Push this logic until extreme: If we are dumber for managing system… We are more dumber for coding, yet :japanese_goblin:


(Stéphane de Labrusse) #5

You point us something really important…if you want to develop a module you must know

Git for managing version
Mock for building rpm
Sysadmin of centos
Template & database for esmith layer
Netgui for the webUI

Perl for writing templates
Php for writing webUI
Python optional for webUI
Javascript optional for webUI

Obviously that need a lot more lines if we want to explain better than I did…I just gave some clues.

You are right ctek


(Stéphane de Labrusse) #6

Sorry jim…it is a real job…you can become developer…but it is not easy and you need to work hard


#7

A bunch of tutorials to come? :pray:


(Stéphane de Labrusse) #8

Well not sure that it could be efficient, what you need is to catch a ‘developer point of view’, to know really well how works nethserver, to be as close as possible than other developers…this is how I learnt to be a developer…and the only solution that I have in mind is you must stick to redmine, following bugs report, testing patch, reading them in github, taking notes how a developer writes a function…

I took one year of my life reading patchs and one day I started to write them myself.


#9

I think it can be efficient “to make brigde between developpers and sysadmins”.

In one side, there’s sysadmin who want to do more.
In the other side, there’s develloper who complain that sysadmin only request feature without doing nothing :smiley:

Sure, not everyboby will go through the bridge(s)…But even 10%, It’s could be a big step for the community.


(Alessio Fattorini) #10

Guys I love such discussions! Keep it up :wink:


(Giacomo Sanchietti) #11

Really? Because I don’t like so much. :pensive:

We have:

And, as a side note, a chapter about development environment: http://docs.nethserver.org/projects/nethserver-devel/en/latest/building_rpms.html

Also someone of the dev team is writing down a simple and quick howto for a new package.

But sorry guys, we don’t have time to write development tutorial on Git, Mock and all the other stuff…otherwise who really will write the code? :smile:


(Bogdan Costin) #12

Hi @giacomo. This is what I was saying.
To expand on this kind of documents.

I don’t see anything wrong on having more tutorials. And even better if the community can add this documents. It will be better for you (devs) allowing you to focus on other task like you were saying.

BR
Bogdan


(Alessio Fattorini) #13

@giacomo guess I have been misunderstood, obviously as suggested by @filippo_carletti and @Ctek community should create this kind of getting-started documents.


#14

And I will said again something about a wiki …
Actually the doc is at three click or more…
With a wiki, all will be more accessible… One clic max


(Stefano) #15

I agree 130% with you…

out there there are zillions of howtos… Steph give us the steps to be able to start… all the info outside Steph’s post must be considered prerequisites that everyone must comply to, full stop.

anyone, even if with a small experience (but with an active interest in being involved) can setup a dev invironment in minutes, maybe hours… it’s not a matter of skills but of willness and interests.


(Stefano) #16

in other words: you don’t need a Masterchef like kitchen to cook 2 eggs… just start cooking… then, when and if you feel confortable, add some tools, improve your knowledge…

but I see many people just asking for a professional kitchen (made by others) to prepare a spaghetti dish…


(Bogdan Costin) #17

I agree 130% with you…

out there there are zillions of howtos…

How many are for NS ?? how many applies to NS ? Should I spend a few weeks months to read some of them before I can begin?

Steph give us the steps to be able to start… all the info outside Steph’s post must be considered prerequisites that everyone must comply to, full stop.

What information I need ? Do I know this information ? What to look for to be able to begin ? What kind of information should i be searching for ?

anyone, even if with a small experience (but with an active interest in being involved) can setup a dev invironment in minutes, maybe hours… it’s not a matter of skills but of willness and interests.

What experience ? If i do not have experience but i have interest, what should i do ?

This kind of approach is very negative.

Basically you are saying : Go learn Linux. Go learn C/C++, perl, PHP etc, go learn linux system administration, get yourself some programming skills, go learn some debugging… and after that come here to learn by Trial & Error what I don’t want to share with you, because i do not feel like you are worthy enough to be teached and you must discover yourself.

So in this regard, trust me that you will not have many (even at all) new devs or tweakers…

Before you know how to do a surgery you must be instructed how! You do not investigate on the patient by opening him up and going like “What does this little organ is… let’s chomp a little from here and see what happens”

:smile:


(Stefano) #18

please, re-read CAREFULLY this post:

tha’s all you really need…
if you don’t know what’s a virtual machine, how to install a package or run a CLI command, you definitely don’t need a dev environment.

documenting how to setup a vm, to install a package or run a CLI command is out of this community scope.

all other considerations are just noise


(Bogdan Costin) #19

Stefano, I’ve read them. trust me I’ve done this (more than once)

You win.
I agree that we have sufficient information and documentation.
It is better to leave it like this, And what ever happens happens.

As you like to say:

Full stop

Best regards
Bogdan


#20

I’m really sad to read such thing :cry:

When I start this thread, It what to point one or two things that lack here.
The lack of accessibility to the information.
And to make something.

Here, to do something, the gui must be really motivate, without this, he can’t go ahead.

Yes, the doc exsit, but it’s not accessible, it’s hidden, or it’s in another site.
Yes, the doc exist, but perhaps it lack another intermediate doc to make things easier

And when the gui, like Ctek is motivate, there’s other gui to dismotivate, to said it’s useless. :cold_sweat:
Really bad day