NCSC-NL / taranis3

Taranis
Other
59 stars 17 forks source link

how to swap live versions #21

Closed bsi-lz closed 5 years ago

bsi-lz commented 5 years ago

Sry to bother you again, but i cannot update live version to 3.5.1. The Initialisation of git in taranis bash worked. So far so good. Now i want to upgrade to 3.5.1 via git.

As descriped in installing-via-git i do:

//login, picking the 'git' alternative.
tara$  cd sources/taranis-git
tara$  git checkout v3.5.1
tara((v3.5.1))$  taranis install      
tara$  taranis restart

Checking the "About"-section in Taranis still shows 3.5.0 as installed before. Neither was a "taranis-3.5.1" folder created in "~/taranis/".

//so trying again different branch
//login, picking the 'git' alternative.
tara$  cd sources/taranis-git
tara$  git checkout release-3.5
tara(3.5)$  taranis install      
tara$  taranis restart
tara$  exit
$ su -l taranis
==
== Welcome to TARANIS maintenance
==
Which version of Taranis do you want to use?
    3.5.0           installed
  * 3.5.1           installed
    git             branch release-3.5
pick a version from above: [3.5.1]: 

Now the "taranis-3.5.1" folder was created in "~/taranis/". Checking the "About"-section in Taranis still shows 3.5.0....

So my question is how to swap live versions?

bsi-lz commented 5 years ago

Ok, a look inside ~/taranis/lib/apache_vhosts.conf gave the answer.

You can close this issue :)

markov2 commented 5 years ago

So my question is how to swap live versions? https://github.com/NCSC-NL/taranis3/issues/21

Go to ~taranis/sources/taranis- The call "bin/taranis install"

What also should work is "taranis install --version

This makes this version the one which is visible under port 80. But the other versions are available is well, on ports numbered from '81' onwards. That can be modified via "~taranis/etc/setup-*" followed by "make install" -- Success MarkOv

bsi-lz commented 5 years ago

Go to ~taranis/sources/taranis- The call "bin/taranis install"

How to get the sources for taranis-3.5.1 inside the ~taranis/sources/ folder? Unpacking the tar.gz manually into there?

What also should work is "taranis install --version

Even for versions i istalled via "install via git"? Here you don't have a source-folder... I tried "taranis install --version 3.5.1" -> Then it asking for sudo password, none is working.

This makes this version the one which is visible under port 80. But the other versions are available is well, on ports numbered from '81' onwards. That can be modified via "~taranis/etc/setup-*" followed by "make install"

By "make install" you mean calling "taranis install"?

bsi-lz commented 5 years ago

This makes this version the one which is visible under port 80. But the other versions are available is well, on ports numbered from '81' onwards. That can be modified via "~taranis/etc/setup-*" followed by "make install"

Is it possible to deactivate the feature, that older versions are available on other ports? I want to end up with one live version - not several ones on different ports. Workarround would be to delete the sections in apache_vhosts.conf...

markov2 commented 5 years ago

I am a little in doubt whether this feature is useful or not. We sometime use it having the previous and current version next to another during test, to see what behaviour is expected and what has changed.

Yo can remove versions with taranis install --remove

-- MarkOv

bsi-lz commented 5 years ago

Yo can remove versions with taranis install --remove

not working - it is asking me for sudo password when calling "install --remove "

markov2 commented 5 years ago

This look to me like a generic sysadmin problem.

When installing Taranis, script install/121.sudo creates a file /etc/sudoers.d/taranis which make it possible for the 'taranis' command under username 'taranis' to gain root permissions for some specific tasks. But, you system may not have sudo enabled.

Anyone around you with Linux experience? -- MarkOv


   Mark Overmeer MSc                                MARKOV Solutions
   Mark@Overmeer.net                          solutions@overmeer.net

http://Mark.Overmeer.net http://solutions.overmeer.net

bsi-lz commented 5 years ago

Yes i have someone, but he does not have the time to check all the taranis bash scripts -.-

This is the content of my /etc/sudoers.d/taranis file:

taranis ALL = (root) NOPASSWD: /home/taranis/etc/setup-3.5.1.json/bin/taranis, /home/taranis/etc/setup-git.json/bin/taranis, /home/taranis/sources/taranis-*/bin/taranis
$root visudo -c
/etc/sudoers: Analyse OK
/etc/sudoers.d/taranis: Analyse OK

What is your content of /etc/sudoers.d/taranis? Am i missing entries?

My Workarround:
When i manually add following line to /etc/sudoers.d/taranis the taranis bash doesn't ask for sudo:

/home/taranis/taranis-*/bin/taranis

But the install-scripts are overwriting my changes each time.

markov2 commented 5 years ago

What wonders me most, is that no-one reported this before. Your analysis is correct.

There is now a fix in Git, to be included in 3.5.2 Internal issue number 271.

markov2 commented 5 years ago

Fix is in 3.6 as well