Jump to content

Guidelines:Edenctl: Difference between revisions

From Sahana Eden Wiki
Dominic (talk | contribs)
Created page with "= 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): <syntaxhighlight lang="bash"> edenctl [command] [parameters] </syntaxhighlight> == Setup and Teardown == To set up a newly installed Eden, run: <syntaxhighlight lang="bash"> edenctl setup </syntaxhighlight> This will run you step-by-step through the setup process. Enter your server details..."
 
Dominic (talk | contribs)
No edit summary
Line 52: Line 52:


'''''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.''
'''''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:
<syntaxhighlight lang="bash">
edenctl shell
</syntaxhighlight>
== Running Scripts ==
To run a Python script in the web2py+Eden shell, use:
<syntaxhighlight lang="bash">
edenctl run /path/to/script.py
</syntaxhighlight>


== Clean ==
== Clean ==

Revision as of 20:09, 2 February 2026

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):

edenctl [command] [parameters]

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).

The setup command will not work if the Eden instance has already been set up.

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 application using:

edenctl start

To stop the Eden application and 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 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

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.