-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add setup and running services doc #37
Open
AIIX
wants to merge
4
commits into
master
Choose a base branch
from
add/setup_ovos_services
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
# Running & Setting Up OVOS Services | ||
|
||
OpenVoiceOS is a software stack that includes six important services, with some being optional, depending on the platform or environment. If you are a developer or would like to quickly test OpenVoiceOS for debugging purposes, you can run each service separately in a terminal. However, for users, distributions, and packagers, it is recommended to use systemd or any other init service that their userland supports for launching and managing OpenVoiceOS services. | ||
|
||
### Here are the commands for launching each of the services from the CLI: | ||
|
||
- Launching the Messagebus service: python3 -m mycroft.messagebus.service | ||
- Launching the Skills service: python3 -m mycroft.skills | ||
- Launching the PHAL service: python3 -m ovos_PHAL | ||
- Launching the Audio service: python3 -m mycroft.audio | ||
- Launching the Voice service: python3 -m mycroft.client.speech | ||
- Launching the GUI service: python3 -m mycroft.gui | ||
|
||
OpenVoiceOS services can be set up as SYSTEM or USER systemd services. The choice of which type to use and how to set them up is left up to the user, packager, and distributions. Keep in mind that these service scripts are just examples and may require changes based on your requirements. | ||
|
||
### Setup the OpenVoiceOS service: | ||
- Create a service file called "ovos.service" under "/usr/lib/systemd/user/" with the following contents: | ||
|
||
``` | ||
[Unit] | ||
Description=OpenVoiceOS Software stack. | ||
Requires=ovos-messagebus.service | ||
Requires=ovos-skills.service | ||
Requires=ovos-audio.service | ||
Requires=ovos-voice.service | ||
Requires=ovos-gui.service | ||
Requires=ovos-phal.service | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/bin/true | ||
RemainAfterExit=yes | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
``` | ||
|
||
Here are the service files required for each of the individual services: | ||
|
||
### Setting up Messagebus service as a user service: | ||
- Create a service file called "ovos-messagebus.service" under "/usr/lib/systemd/user/" with the following contents: | ||
|
||
``` | ||
[Unit] | ||
Description=OpenVoiceOS Messagebus | ||
Requires=ovos.service | ||
PartOf=ovos.service | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/bin/python -m mycroft.messagebus.service | ||
TimeoutStartSec=1m | ||
TimeoutStopSec=1m | ||
Restart=on-failure | ||
StartLimitInterval=5min | ||
StartLimitBurst=4 | ||
|
||
[Install] | ||
WantedBy=ovos.service | ||
``` | ||
|
||
### Setting up Skills service: | ||
- Create a service file called "ovos-skills.service" under "/usr/lib/systemd/user/" with the following contents: | ||
|
||
``` | ||
[Unit] | ||
Description=OpenVoiceOS Skills | ||
PartOf=ovos.service | ||
Requires=ovos-messagebus.service | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/bin/python -m mycroft.skills | ||
TimeoutStartSec=1m | ||
TimeoutStopSec=1m | ||
Restart=on-failure | ||
StartLimitInterval=5min | ||
StartLimitBurst=4 | ||
|
||
[Install] | ||
WantedBy=ovos.service | ||
``` | ||
|
||
### Setting up PHAL service: | ||
- Create a service file called "ovos-phal.service" under "/usr/lib/systemd/user/" with the following contents: | ||
|
||
``` | ||
[Unit] | ||
Description=OVOS PHAL | ||
PartOf=ovos.service | ||
Requires=ovos-messagebus.service | ||
|
||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/bin/python -m ovos_PHAL | ||
TimeoutStartSec=1m | ||
TimeoutStopSec=1m | ||
Restart=on-failure | ||
StartLimitInterval=5min | ||
StartLimitBurst=4 | ||
|
||
[Install] | ||
WantedBy=ovos.service | ||
``` | ||
|
||
### Setting up Audio service: | ||
- Create a service file called "ovos-audio.service" under "/usr/lib/systemd/user/" with the following contents: | ||
|
||
``` | ||
[Unit] | ||
Description=OVOS Audio | ||
PartOf=ovos.service | ||
Requires=ovos-messagebus.service | ||
|
||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/bin/python -m mycroft.audio | ||
TimeoutStartSec=1m | ||
TimeoutStopSec=1m | ||
Restart=on-failure | ||
StartLimitInterval=5min | ||
StartLimitBurst=4 | ||
|
||
[Install] | ||
WantedBy=ovos.service | ||
``` | ||
|
||
### Setting up Voice service: | ||
- Create a service file called "ovos-voice.service" under "/usr/lib/systemd/user/" with the following contents: | ||
|
||
``` | ||
[Unit] | ||
Description=OVOS Voice | ||
PartOf=ovos.service | ||
Requires=ovos-messagebus.service | ||
|
||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/bin/python -m mycroft.client.speech | ||
TimeoutStartSec=1m | ||
TimeoutStopSec=1m | ||
Restart=on-failure | ||
StartLimitInterval=5min | ||
StartLimitBurst=4 | ||
|
||
[Install] | ||
WantedBy=ovos.service | ||
``` | ||
|
||
### Setting up GUI service: | ||
- Create a service file called "ovos-gui.service" under "/usr/lib/systemd/user/" with the following contents: | ||
|
||
``` | ||
[Unit] | ||
Description=OVOS Gui | ||
PartOf=ovos.service | ||
Requires=ovos-messagebus.service | ||
|
||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/bin/python -m mycroft.gui | ||
TimeoutStartSec=1m | ||
TimeoutStopSec=1m | ||
Restart=on-failure | ||
StartLimitInterval=5min | ||
StartLimitBurst=4 | ||
|
||
[Install] | ||
WantedBy=ovos.service | ||
``` | ||
|
||
### Using helper scripts | ||
|
||
You can find helper scripts such as **start-mycroft.sh** and **stop-mycroft.sh** on this website: https://github.com/OpenVoiceOS/scripts. These scripts are designed to mimic a daemon and manage multiple OVOS services. However, please note that they are optional and should be used with care. They are not the most recommended method for running OVOS services. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we also mention running either mycroft-gui or ovos-shell?