Jump to content

Guidelines:Edenctl: Difference between revisions

From Sahana Eden Wiki
Dominic (talk | contribs)
Dominic (talk | contribs)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Guidelines:Deployment|All Deployment Guidelines]]
= Server Administration with Edenctl =
= Server Administration with Edenctl =


The '''edenctl''' tool is a ''bash'' script for server administration on Debian/Linux. The general usage of this script is (as root user):
The '''edenctl''' tool is a ''bash'' script for Eden server administration on '''Debian/Linux''' that comes with the DEB-Packages of the Eden release. The general usage of this script is (as root user):


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 27: Line 29:
| clean || Reset the Eden instance ||  
| clean || Reset the Eden instance ||  
|-
|-
| template || Switch to another configuration template ||  
| pull || Update Eden from GitHub || new in Eden-6.1
|-
| template || Switch to another configuration template || new in Eden-6.2 (not yet released)
|-
|-
| compile || (Re-)compile models, controllers and views ||  
| compile || (Re-)compile models, controllers and views ||  
Line 42: Line 46:
This will run you step-by-step through the setup process. Enter your server details as prompted for (or click enter to accept the default value as shown in square brackets).
This will run you step-by-step through the setup process. Enter your server details as prompted for (or click enter to accept the default value as shown in square brackets).


The setup command will not work if the Eden instance has already been set up.
'''''Note:''' The '''setup''' command will not work if the Eden instance has already been set up. To make changes in an already-configured instance, you must edit the configuration files manually.''


Once completed, you can undo the setup with:
Once completed, you can undo the setup with:
Line 50: Line 54:
</syntaxhighlight>
</syntaxhighlight>


'''''Note:''' The teardown command will not drop the Eden database - this must be done manually.''
'''''Note:''' The '''teardown''' command will not drop the Eden database - this must be done manually.''


== Start and Stop ==
== Start and Stop ==


After the setup, you can start the Eden application using:
After the setup, you can start the Eden web interface using:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 60: Line 64:
</syntaxhighlight>
</syntaxhighlight>


To stop the Eden application and prevent user access, run:
To stop the Eden web interface and thereby prevent user access, run:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 66: Line 70:
</syntaxhighlight>
</syntaxhighlight>


'''''Note:''' the front-end web server is always running, so that it can deliver a maintenance info-page to the user if Eden is not active - the '''start''' and '''stop''' commands only start/stop the uWSGI daemon.''
'''''Note:''' the front-end web server is always running, so that it can deliver a maintenance info-page to the web user if Eden is not active - the '''start''' and '''stop''' commands only start/stop the uWSGI daemon.''


== Pull ==
== Pull ==
Line 107: Line 111:


== Switching Templates ==
== Switching Templates ==
* ''new in Eden-6.2 (not yet released)''


You can switch to a different template using:
You can switch to a different template using:

Latest revision as of 23:12, 2 February 2026

All Deployment Guidelines

Server Administration with Edenctl

The edenctl tool is a bash script for Eden server administration on Debian/Linux that comes with the DEB-Packages of the Eden release. The general usage of this script is (as root user):

edenctl [command] [parameters]

Commands Overview

Command Explanation Comments
setup Set up a newly installed Eden instance
teardown Undo a completed setup
start Start the web interface
stop Stop the web interface
shell Open a Python shell in the web2py+Eden environment
run Run a Python script in the web2py+Eden environment
clean Reset the Eden instance
pull Update Eden from GitHub new in Eden-6.1
template Switch to another configuration template new in Eden-6.2 (not yet released)
compile (Re-)compile models, controllers and views

Setup and Teardown

To set up a newly installed Eden, run:

edenctl setup

This will run you step-by-step through the setup process. Enter your server details as prompted for (or click enter to accept the default value as shown in square brackets).

Note: The setup command will not work if the Eden instance has already been set up. To make changes in an already-configured instance, you must edit the configuration files manually.

Once completed, you can undo the setup with:

edenctl teardown

Note: The teardown command will not drop the Eden database - this must be done manually.

Start and Stop

After the setup, you can start the Eden web interface using:

edenctl start

To stop the Eden web interface and thereby prevent user access, run:

edenctl stop

Note: the front-end web server is always running, so that it can deliver a maintenance info-page to the web user if Eden is not active - the start and stop commands only start/stop the uWSGI daemon.

Pull

It is possible to upgrade your Eden instance directly from GitHub, using:

edenctl pull

Note: It can be necessary to perform certain database migrations after the pull for Eden to work correctly - always check the release for migration advice.

Shell

To open a Python shell in the web2py+Eden environment, you can use:

edenctl shell

Running Scripts

To run a Python script in the web2py+Eden shell, use:

edenctl run /path/to/script.py

Clean

You can reset the Eden database using:

edenctl clean

This will remove all data from the database, and perform a fresh first run.

Note: This operation is primarily intended for demos, and not recommended for production servers.

Switching Templates

  • new in Eden-6.2 (not yet released)

You can switch to a different template using:

edenctl template "TEMPLATE"

Instead of a single template, you can also specify a template cascade as a comma-separated list of templates:

edenctl template "TEMPLATE,TEMPLATE.SUB,TEMPLATE.SUB.Demo"

Note: After switching templates, you need to reset the instance using edenctl clean.