diff --git a/src/coulobre/hosting/installation_features.py b/src/coulobre/hosting/installation_features.py
index bf499a8..77de4a8 100644
--- a/src/coulobre/hosting/installation_features.py
+++ b/src/coulobre/hosting/installation_features.py
@@ -10,15 +10,26 @@ from coulobre.linked_updates import UNIT_DIR
from .dns_defaults import zone_defaults
from .models import PanelFeaturePolicy
+DEPLOYMENT_GUIDE = (
+ "https://code.hosting.hippogrief.nl/hippogrief/coulobre/"
+ "src/branch/main/docs/deployment.md"
+)
+
@dataclass(frozen=True)
class Feature:
setting: str
label: str
prerequisite: str
+ setup_anchor: str
+ setup_instruction: str
socket: str = ""
role: str = ""
+ @property
+ def setup_url(self):
+ return f"{DEPLOYMENT_GUIDE}#{self.setup_anchor}"
+
@property
def configured(self):
if self.setting == "DEFAULT_DNS_ZONES":
@@ -68,30 +79,40 @@ FEATURES = (
"LOCAL_WEB_ACTIVATION",
"Website provisioning",
"Apache and PHP provisioning",
+ "activate-local-websites-from-the-panel",
+ "Install and enable the local web provisioning worker.",
"coulobre-web-apply",
),
Feature(
"LOCAL_WEB_HTTPS",
"Managed website certificates",
"Website certificate provisioning",
+ "request-https-from-the-panel",
+ "Configure Certbot and install the website certificate worker.",
"coulobre-https-apply",
),
Feature(
"WEB_FILE_MANAGER",
"Website file manager",
"Website file service",
+ "enable-the-website-file-manager",
+ "Install the website file service and enable it for the panel.",
"coulobre-website-files",
),
Feature(
"WEBSITE_JOBS",
"Website scheduled tasks",
"Website task service",
+ "enable-scheduled-website-jobs",
+ "Install the task worker and allow tasks in the hosting package.",
"coulobre-website-jobs",
),
Feature(
"LOCAL_DNS_PUBLISHING",
"DNS publishing",
"Local BIND9 or a linked DNS receiver",
+ "publish-local-dns-zones-from-the-panel",
+ "Configure local BIND9 or connect a Coulobre DNS receiver.",
"coulobre-dns-apply",
"dns",
),
@@ -99,11 +120,15 @@ FEATURES = (
"DEFAULT_DNS_ZONES",
"Default managed DNS zones for new accounts",
"DNS publishing, nameservers and hosting IP addresses",
+ "set-defaults-for-new-hosting-accounts",
+ "Enable DNS publishing and set nameservers and hosting IPs.",
),
Feature(
"LOCAL_MAILBOX_PROVISIONING",
"Mailbox provisioning",
"Local mail services or a linked mail receiver",
+ "provision-local-mailboxes-from-the-panel",
+ "Set up local mail services or connect a Coulobre mail receiver.",
"coulobre-mail-apply",
"mail",
),
@@ -111,35 +136,47 @@ FEATURES = (
"MANAGE_MAIL_DNS",
"Managed mail DNS records",
"Mail exchanger and sending IP addresses",
+ "check-and-provision-mail-dns",
+ "Set the mail exchanger and public sending IPs, then enable mail DNS.",
),
Feature(
"LOCAL_DATABASE_PROVISIONING",
"Database provisioning",
"MariaDB provisioning",
+ "provision-local-databases-from-the-panel",
+ "Install the MariaDB provisioning worker and enable it for the panel.",
"coulobre-database-apply",
),
Feature(
"LOCAL_ACCOUNT_BACKUPS",
"Local account backups",
"Local backup service",
+ "start-local-account-backups-from-the-panel",
+ "Install the account backup worker and enable it for the panel.",
"coulobre-account-backup",
),
Feature(
"OFFSITE_BACKUP_DESTINATIONS",
"Off-site backup destinations",
"A configured destination and the transfer service",
+ "copy-scheduled-account-backups-off-site",
+ "Set up local backups, a restic destination and the transfer worker.",
"coulobre-account-offsite",
),
Feature(
"PHPMYADMIN_URL",
"phpMyAdmin sign-in",
"phpMyAdmin bridge and MariaDB credential service",
+ "open-phpmyadmin-from-the-panel",
+ "Enable database credential access and set up the HTTPS bridge.",
"coulobre-service-credentials",
),
Feature(
"ROUNDCUBE_URL",
"Roundcube sign-in",
"Roundcube bridge and mailbox credential service",
+ "open-a-mailbox-in-roundcube",
+ "Enable mailbox credential access and set up the HTTPS bridge.",
),
)
diff --git a/src/coulobre/hosting/installation_views.py b/src/coulobre/hosting/installation_views.py
index 43a2fd5..66bbe7b 100644
--- a/src/coulobre/hosting/installation_views.py
+++ b/src/coulobre/hosting/installation_views.py
@@ -84,12 +84,18 @@ class FeatureConfigurationForm(forms.Form):
def __init__(self, *args, policy, section=None, **kwargs):
super().__init__(*args, **kwargs)
self.initial["revision"] = policy.saved.revision
- self.configured_features = [
+ features = [
feature
for feature in FEATURES
if (section is None or feature.setting in section)
- and feature.configured
]
+ self.configured_features = []
+ self.features_requiring_setup = []
+ for feature in features:
+ if feature.configured:
+ self.configured_features.append(feature)
+ else:
+ self.features_requiring_setup.append(feature)
for feature in self.configured_features:
self.fields[feature.setting] = forms.BooleanField(
required=False,
diff --git a/src/coulobre/hosting/templates/hosting/feature_configuration.html b/src/coulobre/hosting/templates/hosting/feature_configuration.html
index 258ef47..5b8c0a0 100644
--- a/src/coulobre/hosting/templates/hosting/feature_configuration.html
+++ b/src/coulobre/hosting/templates/hosting/feature_configuration.html
@@ -42,5 +42,23 @@
+ {% if form.features_requiring_setup %}
+ Requires setup
+
+
+
+ {% for feature in form.features_requiring_setup %}
+ Feature Setup
+
+ {% endfor %}
+
+ {{ feature.label }}
+ {% include "hosting/feature_setup.html" with show_dns_link=True %}
+