Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
47cce9bf
Commit
47cce9bf
authored
Mar 02, 2020
by
Francesc Guasch
Browse files
doc: moved scripts to a proper location
parent
9ea68410
Changes
3
Hide whitespace changes
Inline
Side-by-side
docs/docs/INSTALL_devel.rst
View file @
47cce9bf
...
@@ -109,7 +109,7 @@ Add a new user for the ravada web. Use ``rvd_back`` to create it.
...
@@ -109,7 +109,7 @@ Add a new user for the ravada web. Use ``rvd_back`` to create it.
.. prompt:: bash $
.. prompt:: bash $
cd ravada
cd ravada
sudo
./bin
/rvd_back
.pl
--add-user user.name
sudo
PERL5LIB=./lib ./script
/rvd_back --add-user user.name
Firewall(Optional)
Firewall(Optional)
...
@@ -141,7 +141,7 @@ The client must have a spice viewer such as virt-viewer. There is a package for
...
@@ -141,7 +141,7 @@ The client must have a spice viewer such as virt-viewer. There is a package for
Daemons
Daemons
-------
-------
Ravada has two daemons that must run on the
production
server:
Ravada has two daemons that must run on the server:
- ``rvd_back`` : must run as root and manages the virtual machines
- ``rvd_back`` : must run as root and manages the virtual machines
- ``rvd_front`` : is the web frontend that sends requests to the backend
- ``rvd_front`` : is the web frontend that sends requests to the backend
...
@@ -149,53 +149,38 @@ Ravada has two daemons that must run on the production server:
...
@@ -149,53 +149,38 @@ Ravada has two daemons that must run on the production server:
Run each one of these commands in a separate terminal
Run each one of these commands in a separate terminal
.. prompt:: bash $
Run the backend in a terminal:
morbo ./rvd_front.pl
.. prompt:: bash
sudo ./bin/rvd_back.pl
$ sudo PERL5LIB=./lib ./script/rvd_back --debug
Starting rvd_back v1.2.0
The backend must be stopped and started again when you change a library file.
Stop it pressing CTRL-C
Run the frontend in another terminal:
.. prompt:: bash $
$ PERL5LIB=./lib morbo ./script/rvd_front
Server available at http://127.0.0.1:3000
Now you must be able to reach ravada at the location http://your.ip:3000/
Now you must be able to reach ravada at the location http://your.ip:3000/
or http://127.0.0.1:3000 if you run it in your own workstation.
If you wish to create a script to automatize the start and shutdown of the ravada server, you can use these two bash scripts:
The frontend will restart itself when it detects a change in the
libraries. There is no need to stop it and start it again.
start_ravada.sh:
::
Start/Shutdown scripts
----------------------
#!/bin/bash
If you wish to create a script to automatize the start and shutdown of the ravada server, you can use these two bash scripts:
#script to initialize ravada server
display_usage()
{
echo "./start_ravada 1 (messages not prompting to terminal)
echo "./start_ravada 0 (prompts enables to this terminal)
}
if [ $# -eq 0 ]
then
display_usage
exit 1
else
SHOW_MESSAGES=$1
if [ $SHOW_MESSAGES -eq 1 ]
then
morbo ./rvd_front.pl > /dev/null 2>&1 &
sudo ./bin/rvd_back.pl > /dev/null 2>&1 &
else
morbo ./rvd_front.pl &
sudo ./bin/rvd_back.pl &
fi
echo "Server initialized succesfully."
fi
shutdown_ravada.sh:
::
.. literalinclude:: start_ravada.sh
:linenos:
#!/bin/ba
sh
.. literalinclude:: shutdown_ravada.
sh
#script to shutdown the ravada server
:linenos:
sudo kill -15 $(pidof './rvd_front.pl')
sudo kill -15 $(pidof -x 'rvd_back.pl')
echo "Server closed succesfully"
docs/docs/shutdown_ravada.sh
0 → 100755
View file @
47cce9bf
#!/bin/bash
#script to shutdown the ravada server
pid_front
=
$(
pidof
'./script/rvd_front'
)
if
[
-n
"
$pid_front
"
]
;
then
echo
"Shutting down rvd_front"
sudo kill
-15
$pid_front
else
echo
rvd_front already down
fi
pid_back
=
$(
pidof
-x
'./script/rvd_back'
)
if
[
-n
"
$pid_back
"
]
;
then
echo
"Shutting down rvd_back"
sudo kill
-15
$pid_back
else
echo
rvd_back already down
fi
docs/docs/start_ravada.sh
0 → 100755
View file @
47cce9bf
#!/bin/bash
#script to start ravada server
display_usage
()
{
echo
"./start_ravada"
echo
"./start_ravada 1 (messages not shown to terminal)"
}
if
[
"
$1
"
==
"-h"
]
then
display_usage
exit
1
else
SHOW_MESSAGES
=
$1
export
PERL5LIB
=
"./lib"
if
[
"
$SHOW_MESSAGES
"
==
"1"
]
then
morbo
-v
./script/rvd_front
>
/dev/null 2>&1 &
sudo
PERL5LIB
=
./lib ./script/rvd_back
--debug
>
/dev/null 2>&1 &
else
morbo
-v
./script/rvd_front &
sudo
PERL5LIB
=
./lib ./script/rvd_back
--debug
&
fi
echo
"Server initialized succesfully."
fi
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment