diff --git a/content/Contributing/Applications/AppArticleTemplate.md b/content/Contributing/Applications/AppArticleTemplate.md index 25bfabb3dc..a1d2b4d6cb 100644 --- a/content/Contributing/Applications/AppArticleTemplate.md +++ b/content/Contributing/Applications/AppArticleTemplate.md @@ -8,132 +8,292 @@ tags: - apps --- -{{< hint type=note title="Work in Progress" >}} -This partial template is awaiting further development. +{{< hint type=important icon=gdoc_code title="Work in Progress" >}} +We are actively developing and improving this template. Check back for updates! {{< /hint >}} -Use this template as a guideline when creating a new application tutorial. -The shaded areas encompass standard article content but feel free to change by adding or removing sections to fit the app installation process. -Change the front matter `description` parameter to suit the subject and content of the new tutorial. -The description text must not exceed 160 alphanumeric or special characters, including spaces between characters. +## How to Use this Template + +Click **Edit Page** above or locate the Markdown file at [/Contributing/Applications/AppArticleTemplate.md](https://github.com/truenas/documentation/blob/master/content/Contributing/Applications/AppArticleTemplate.md) on the documentation [Github Repository](https://github.com/truenas/documentation). + +Copy the template content to an existing [Community Apps]({{< relref "communityapps.md" >}}) placeholder article (or create a new one if needed for this app) to begin writing. + +Detailed template instructions are commented out of the rendered copy of this template but show in the Markdown file. + + + + +--- + + + + + + + + + + + +{{< include file="/static/includes/apps/CommunityApp.md" >}} + + + + + -``` -``` *AppName* is a community-maintained application. -Enter a description of this app and common or specific uses for it. Also, include any links to documentation created by the application developer. -For example, -*AppName provides a [Quickstart Setup Guide](\https://docs.appName/setup) with step-by-step instructions to help users create a Storj node.* + ## Before You Begin -``` -``` -Enter information about the configuration or preparation steps required before beginning the installation process. + + +Prepare TrueNAS before installing the app by: + +{{< include file="/static/includes/apps/BeforeYouBeginStableApps.md" >}} +{{< include file="/static/includes/apps/BeforeYouBeginRunAsUser.md" >}} + + + + +{{< include file="/static/includes/apps/BeforeYouBeginAddAppDatasets.md" >}} + + +

Create a parent dataset, such as appName, and then the storage datasets (config and data) under it. + Select apps as the Dataset Preset for these datasets. You can modify the dataset ACLs at the time of creation, or modify them later when adding them in the app.

+ +
{{< include file="/static/includes/apps/BeforeYouBeginAddAppDatasetsProcedure.md" >}}
+ + +{{< include file="/static/includes/apps/BeforeYouBeginAddAppCertificate.md" >}} + +

Adding a certificate is optional but if you want to use a certificate for this application, either create a new self-signed CA and certificate or import an existing CA and create the certificate for Nextcloud. A certificate is not required to deploy the application.

+ + +{{< include file="/static/includes/apps/BeforeYouBeginAddNewAppUser.md" >}} + + + ## Installing the Application -Go to **Apps**, and click on **Discover Apps**. -Either scroll down to the ***AppNName*** widget or begin typing the name into the search field to locate the widget. +{{< hint info >}} +This basic procedure covers the required *appName* app settings. +For optional settings, see [Understanding App Installation Wizard Settings](#understanding-app-installation-wizard-settings). +{{< /hint >}} + +{{< include file="static/includes/apps/MultipleAppInstancesAndNaming.md" >}} + +{{< include file="/static/includes/apps/LocateAndOpenInstallWizard.md" >}} + + +{{< include file="/static/includes/apps/InstallWizardAppNameAndVersion.md" >}} + + +Enter the ***App* Configuration** settings. + +The TrueNAS app is configured with all the required environment variables, but if you want to further customize the container, click **Add** to the right of **Additional Environment Variables** for each to enter the variable(s) and values(s). + + +Add your **Storage Configuration** settings. + +Set **Type** to **Host Path (Path that already exists on the system)** for ***Data Storage***. +Select **Enable ACL**, and then enter or browse to select the ***data*** dataset to populate the **Host Path** field. + + +Click **Add** to the right of **ACL Entries** for each user or group entry you want to add. +Set **ID Type** to **Entry is for a USER**, enter the ***0*** in **ID**, and give it full control permissions. +For example, add the ***0*** user, and give each **FULL_CONTROL Access**. + + +## Understanding App Installation Wizard Settings -{{\< trueimage src="/images/SCALE/Apps/LocateImageNameWidget.png" alt="Locate *AppName* Widget" id="Locate *AppName* Widget" >}} +The following section provides more detailed explanations of the settings in each section of the **Install *Appname*** installation wizard. + -Click on the widget to open the ***AppNName*** information screen. +### Application Name Settings -{{\< trueimage src="/images/SCALE/Apps/AppNameDetailsScreen.png" alt="*AppName* Information Screen" id="*AppName* Information Screen" >}} +{{< include file="/static/includes/apps/InstallWizardAppNameAndVersion.md" >}} -Click **Install** to open the **Install *AppNName*** configuration wizard. +### AppName Configuration Settings + +*AppName* configuration settings include setting up credentials, *APT packages* (previously referred to as the commands), the *host IP and port, data directory path, upload limits, execution times, memory limits and cache memory consumption, adding a cron job with schedule, and adding additional environment variables*. -{{\< trueimage src="/images/SCALE/Apps/InstallAppNameScreen.png" alt="Install *AppName* Screen" id="Install *AppName* Screen" >}} +If you have an existing *AppName* account, add the credentials for that account in the **Admin User** and **Admin Password** fields. +If you do not have an existing account, enter the name and password you want to use to create the *AppName* login credentials. -Scroll down to each section or click the navigation menu item on the right of the screen to jump to that section. +#### Adding Environment Variables -Accept the default name or enter a new name for your application if you prefer. -Enter a name that consists of, and begins or ends with lowercase alphanumeric characters. -Do not use a hyphen as the first or last character. For example, *appName*, or *app-name*, but not *-appName* or *appName-*. +{{< include file="/static/includes/apps/InstallWizardEnvironVariablesSettings.md" >}} +Refer to [*AppName* documentation](URL for environment variables documentation provided in the app provider) for more information on environment variables. -Do not change the **Version**. TrueNAS alerts you when a new version is available for deployed apps, and allows you to update through the click of a button on the **Installed** application screen. + +### User and Group Configuration + -1. Enter the ***AppName* Configuration** settings: +{{< include file="/static/includes/apps/InstallWizardUserAndGroupConfig.md" >}} - a. Enter each required configuration setting in this section. +### Network Configuration +The default web port for *AppName* is ***30027***. + +{{< include file="static/includes/apps/InstallWizardHostNetworkSettings.md" >}} +{{< include file="/static/includes/apps/InstallWizardDefaultPorts.md" >}} +{{< include file="/static/includes/apps/InstallWizardAdvancedDNSSettings.md" >}} + +{{< include file="/static/includes/apps/InstallWizardCertificateSettings.md" >}} - b. Click **Add** to show **Additional Environmental Variables** fields. These are optional settings. Describe any environment variables to enter. +### Storage Configuration +TrueNAS provides two options for storage volumes: ixVolumes and host paths. +{{< include file="/static/includes/apps/InstallAppsStorageConfig.md" >}} + +You can add extra storage volumes at the time of installation or edit the application after it deploys. Stop the app before editing settings. -5. Configure the **Storage Configuration** settings. - You can use the default **ixVolume** option to allow TrueNAS to create a data storage volume or select **Host Path** to select the path to the new datasets created earlier in this document. + +{{< include file="/static/includes/apps/InstallAppsStorageConfig2.md" >}} - {{\< trueimage src="/images/SCALE/Apps/InstallAppNameStorage.png" alt="Add Datasets" id="Add Datasets" >}} +#### Setting Dataset ACL Permissions +You can configure ACL permissions for the required dataset in the **Install Netdata** wizard, or from the **Datasets** screen any time after adding the datasets. - Select the option to configure ACL entries if you want to configure this while installing the app, otherwise, use the **Permissions** widget for each dataset to edit ACL settings and ACE entries for the app user. +{{< include file="/static/includes/apps/InstallWizardStorageACLConfig.md" >}} + +{{< expand "Adding ACL Permissions from the Datasets Screen" "v">}} +First, select the dataset row, then scroll down to the **Permissions** widget, and then click **Edit** to open the **Edit ACL** screen. +Change the **@owner** and **@group** values from **root** to the administrative user for your TrueNAS system, and click apply for each. +Next, add an ACL entry for the run-as user. +For *Netdata*, the run-as users is **0** for **root**. Add a user entry for this user. +Save the ACL before leaving the screen. +{{< /expand >}} - To modify the dataset permissions, select **Enable ACL** to show the option to create an ACL entry to customize the dataset permissions. - - Repeat the above for any additional datasets. +#### Mounting an SMB Share Storage Volume - If you created and want to add more datasets for additional storage, click **Add** to the right of **Additional Storage Volumes** to show another set of storage options. - The additional storage options include the **ixVolume** and **Host Path** options, and the option to create an **SMB share** volume. +TrueNAS **Additional Storage** options include the ability to mount an SMB share inside the container pod. +{{< include file="/static/includes/apps/InstallAppsStorageConfig2.md" >}} - Setting up an SMB share option to set up data sharing using SMB. +{{< include file="/static/includes/apps/InstallWizardStorageSMBOption.md" >}} -6. Review the **Resource Configuration** settings. - Accept the default values or enter new CPU and memory values. - By default, this application is limited to using no more than 2 CPUs and 4096 megabytes of available memory. - The application might use considerably less system resources. +### Labels Configuration - To customize the CPU and memory allocated to the container uses, enter new CPU values as a plain integer value. - The default is 2, which means the app can use 2 cores. +{{< include file="/static/includes/apps/InstallWizardLabelsConfiguration.md" >}} - Accept the default value of 4096 MB allocated memory or enter a new limit in megabytes. - Enter a plain integer. For example, 8192. +### Resources Configuration + -7. Click **Install**. - The system opens the **Installed** applications screen with the *AppName* app in the **Deploying** state. - When the installation completes it changes to **Running**. +{{< include file="/static/includes/apps/InstallWizardResourceConfig.md" >}} + +{{< include file="/static/includes/apps/InstallWizardGPUPassthrough.md" >}} -### Using the Web Portal -Click **Web Portal** on the **Application Info** widget to open the application web interface. +## Troubleshooting Tips + -The time required to install the app varies depending on your hardware and network configuration. -``` -``` + diff --git a/content/Contributing/Applications/_index.md b/content/Contributing/Applications/_index.md index 6a21bb627b..0b7d04160a 100644 --- a/content/Contributing/Applications/_index.md +++ b/content/Contributing/Applications/_index.md @@ -37,7 +37,7 @@ Users can submit changes to an existing application catalogs through: To request a feature change, go to the [TrueNAS Community Forum](https://forums.truenas.com/), and click **Feature Request**. Read the **About the Feature Requests category - README First** topic, then click **Open Draft** on the top right of the screen. Populate the new request form with the relevant information for each section, **Problem/Justification**, **Impact**, and **User Story**. - The form provides guidance on how to populate these sections. + The form guides you on populating these sections. Click **Create Topic** to add your suggestion to the list of topics. Users vote and comment on these suggestions. @@ -49,23 +49,130 @@ Users can submit changes to an existing application catalogs through: To see a current list of apps, visit the [TrueNAS Apps repository](https://github.com/truenas/apps) on GitHub. ## Contributing to TrueNAS Application Documentation -Community members can submit change requests or add new tutorials to the Community Apps tutorials section of the Documentation Hub. +Community members can submit change requests or add new tutorials to the **Truenas Apps > Community Apps** tutorials section of the Documentation Hub. + For more information on submitting change requests, forking repos, and submitting PRs, see [Updating Content]({{< relref "/Contributing/Documentation/ContentUpdate.md" >}}). +### Submitting New Tutorial Articles When submitting new tutorials or requesting changes to existing TrueNAS Documentation Hub application tutorials: -* Create the PR against a forked copy of the [TrueNAS Documentation Hub public repository](https://github.com/truenas/documentation/tree/master). - - In your local forked repository, open the existing article file in either the **CommunityApps** or the **StableApps** folder of the **/content/TrueNASApps/** directory. +1. Create the PR against a forked copy of the [TrueNAS Documentation Hub public repository](https://github.com/truenas/documentation/tree/master). + +2. Open the existing article file in the /content/TrueNASApps/CommunityApps directory of your local forked repository. - If submitting a new tutorial, add the new tutorial to the **CommunityApps** folder in your local copy of the repository. +3. Add the new tutorial to the CommunityApps folder in your local copy of the repository if submitting a new tutorial. - Use the text editor of your choice to make changes to the [application tutorial template]({{< relref "/Contributing/Applications/AppArticleTemplate.md" >}}) as the basis for your new article. +4. Use the text editor of your choice to make changes to the [application tutorial template]({{< relref "/Contributing/Applications/AppArticleTemplate.md" >}}) as the basis for your new article. Article content is written in Commonmark Markdown. - (Optional) Save images in the **/documentation/static/images/scale/apps** folder of your local branch. +5. (Optional) Save images in the **/documentation/static/images/scale/apps** folder of your local branch. + +6. Submit the PR against the **Master** branch. + +### Using the App Tutorial Template +Feel free to change standard article content by adding or removing sections to fit the app installation process. +Change the front matter description: parameter at the top of the article to suit the subject and content of the new tutorial. +Description text must not exceed 160 alphanumeric or special characters, including spaces between characters. +After updating content, delete commented-out sections providing instructions for using this template when they are no longer needed. +When documenting a **Community** train app, not delete any of the commented-out instructions in the COMMUNITY APP INTRO SNIPPETS section. - Submit the PR against the **Master** branch. +#### Formatting Tips for Content Development +Standard text emphasis: +* Apply **Bold** to UI elements seen on the screen, including field, button, and navigation option names, other descriptions, etc. + Use double asterisks preceding and following the name or text string to make it bold. + Do not use bold in code strings. -* Click **Edit Article** at the top of the Documentation Hub article to request changes to an existing article. - Refer to the [Content Updates]({{< relref "/Contributing/Documentation/ContentUpdate.md" >}}) article for more details. +* Apply *Italics* to any variable. + Use single asterisks preceding and following the name or text string to make it italics. + If using a variable in a code example, use the HTML tags (\\) and not the Markdown tags. + +* Apply HTML file tags (\\) when entering a path to a file or file name, for example \iso\, which renders as iso. + +* Apply HTML keyboard tags (\\) to keys on a keyboard, for example \Enter\, which renders as Enter. + +When entering commands, command strings, or code blocks: + +* Apply backticks(\`\`) or HTML \\ tags to format command strings or output, for example \`string\` or \string\, which render as string. + +* Apply HTML \\ tags to strings with variables. + + * Do not enclose variables in angle or square brackets as these can also be part of command syntax. + + * Do not enter variables in all caps unless the command requires entering the value in all caps. + +To create a code block, either use three backticks (```) on the line before and after the content block, or use the HTML code tags. + +#### Using the Apps Snippet Library +When creating your articles you can use the library of snippets that contain explanations of settings and configuration instructions for the various app Install Wizard settings in your submitted content. +These snippets are maintained by the Technical Documentation team, but you can submit change requests for these files just as with full articles if you find content that needs updating or changing. + +The tutorial template includes the shortcode that calls these files into the app wizard sections of the Stable Apps and Enterprise Apps tutorials in the Documentation Hub. +To use snippets where the template does not have one, enter the include file shortcode where you want to call another snippet. +The shortcode to call snippet files is {{\}}, where *snippetFileName.md* is the name of the snippet file. + +The following table shows the current list of snippet files. +{{< expand "App Tutorial Snippet Files" "v" >}} +Snippet files are located in the /documentation/static/includes/apps folder. +Not all snippet files in this folder apply to tutorial content. +Refer to the tables below for a list of snippet files with content about tutorial sections. +Open and read snippet files to determine where to use them in your tutorial. + +**Community Apps General Snippets** +{{< truetable >}} +| File Name | Snippet Use and Content | +|-----------|-------------------------| +| CommunityApp.md | Introduces Community Apps section tutorials, and contributing content. | +| CommunityPleaseExpand.md | States the tutorial is incomplete or a placeholder needing further development. Use if you are proposing a partial expansion of the content, but further work is needed. | +| CommunityPleaseImprove.md | States the tutorial content is suspected to be out of date or inaccurate. Use if you suspect the Community app documentation is out of date, inaccurate, or needs further improvement. | +{{< /truetable >}} + +**Before You Begin Snippets** +{{< truetable >}} +| File Name | Snippet Use and Content | +|-----------|-------------------------| +| BeforeYouBeginStableApps.md | Bullet point for adding the apps pool. Includes warning about choosing an encrypted pool for apps. | +| BeforeYouBeginRunAsUser.md | Bullet point describing where to find the run as user information, and includes a screenshot of the app information screen for the app being documented. | +| BeforeYouBegigAddAppDatasets.md | Bullet point for adding datasets for the app. Does does not include details on adding datasets as these vary by app. | +| BeforeYouBeginAddAppDatasetsProcedure.md | Procedure for correctly creating datasets for apps in an expand/collapse area. | +| BeforeYouBeginAddAppCertificate.md | Bullet point for adding a certificate if required for the app. Also include the AddingAppCertificate.md snippet with detailed instructions on adding a self-signed certificate. | +| AddingAppCertificate.md | Detailed set procedure on adding a self-signed certificate authority (CA) and certificate. | +| BeforeYouBeginAddNewUser.md | Single bullet point and procedure for adding a new user as a TrueNAS app administrator. | +{{< /truetable >}} + +**Installing the App** +{{< truetable >}} +| File Name | Snippet Use and Content | +|-----------|---------------------| +| LocateAndOpenInstallWizard.md | Describes locating the app widget, and opening the install wizard for the app. | +| MultipleAppInstancesAndNaming.md | Describes adding more than one instance of the same app and naming it. For example, adding two stable or community app instances, or an enterprise and stable train version of the same app. | +| Configuring the app | InstallWizardEnvironVariablesSettings.md | Details the Environment Variable settings. Can use this if the procedure requires adding environment variables, or leave the snippet in the Understanding App Install Wizard section and refer to it for more information. | +| InstallWizardAdvancedDNSSettings.md | Details the Advanced DNS setting options that might be included as part of the app configuration or network configuration settings. | +{{< /truetable >}} + +**Understanding App Install Wizard Settings** +{{< truetable >}} +| Wizard Settings | File Name | Snippet Use and Content | +|---------|-----------|---------------------| +| App Name and Version | InstallWizardAppNameAndVersion.md | Details the **Application Name** and **Version** settings. | +| Advanced DNS | InstallWizardAdvancedDNSSettings.md | Details DNS option settings. Might be included as a Network Configuration or App Configuration setting option. | +| Environment Variables | InstallWizardEnvironVariablesSettings.md | Use in the Install Wizard Setting section, or if adding environment variables is required for configuring the app, use in the configuring the app procedure section. | +| Timezone | InstallWizardTimezoneSetting.md | | +| Network (default ports) | InstallWizardDefaultPorts.md | Details changing the default port assignment. Can use this snippet in the Before You Begin and/or Installing the App sections, but is more suited to the section explaining the Network settings. | +| Host Network | InstallWizardHostNetworkSettings.md | Details the **Host Network** setting in the Network Configuration section of the wizard. Use when the wizard includes this setting. | +| Certificate ID | InstallWizardCertificateSettings.md | Details **Certificate ID** settings, that might be optional and recommended, or required to deploy the app. Include this snippet if you used the two certificate snippets in the Before You Begin section. | +| Storage Configuration | InstallAppsStorageConfig.md | Adds the **Setting the Storage Volume Type** expand section detailing storage volume types, configuring host path storage volume ACL permissions using the **Enable ACL** and **ACL Entries** options. Does not cover specific datasets required by the app. | +| Storage Configuration | InstallAppsStorageConfig2.md | Adds the **Configuring Additional Storage Volumes** expand section detailing adding additional storage volumes, with a list of the **Additional Storage** types. | +| Storage ACL permissions | InstallWizardStorageACLConfig.md | Details on the Edit ACL and ACE Entries settings. Includes the **Configuring ACE Entries** expand detailing how to add ACE entries, default user IDs for apps, or postgres storage volumes. | +| Additional Storage SMB Option | InstallWizardStorageSMBOption.md | Details on the Additional Storage volume SMB share option. | +| Storage Temporary and tmpfs directories | InstallWizardStorageTemporaryAndTmpfs.md | Details on the **Temporary** and **Tmpfs** directory storage options that are available as primary and/or additional storage volume types, and when to use each. | +| Users and Groups | InstallWizardUserAndGroupConfig.md | Details user and group setting options. | +| Labels Configuration | InstallWizardLabelsConfiguration.md | Details on using Docker label-based configuration. | +| Resource Configuration | InstallWizardResourceConfig.md | Details CPU and memory setting options for all apps. If the app includes GPU passthrough, use with the InstallWizardGPUPassthrough.md snippet. | +| GPU Passthrough | InstallWizardGPUPassthrough.md | Details information on GPU settings if the app includes the GPU passthrough settings. Not present if the app does not detect a GPU device. | +{{< /truetable >}} +{{< /expand >}} + +### Suggesting Edits to Existing Articles +Click **Edit Article** at the top of the Documentation Hub article to suggest changes to an existing article. + +Refer to the [Content Updates]({{< relref "/Contributing/Documentation/ContentUpdate.md" >}}) article for more details. \ No newline at end of file diff --git a/static/includes/apps/InstallAppsStorageConfig.md b/static/includes/apps/InstallAppsStorageConfig.md index 4e95260d8b..593438d45b 100644 --- a/static/includes/apps/InstallAppsStorageConfig.md +++ b/static/includes/apps/InstallAppsStorageConfig.md @@ -10,6 +10,9 @@ To use an existing dataset, which is the recommended option, set **Type** to **H If the install wizard shows a **Mount Path**, either accept the default value or enter the correct mount path. For example, if the dataset name is *data*, enter */data* as the mount path. +To create a dataset while in the app installation wizard, with **Type** set to the host path option, go to the **Host Path** field, click into the pool or a dataset in the pool to activate the **Create Dataset** option. Click on **Create Dataset** to open the dialog. +Enter the name for the dataset, then click **Create**. TrueNAS creates the dataset in the location selected. + Select **Enable ACL** to define ACL permissions and to populate the **Host Path** field by either entering or browsing to and selecting the location of the dataset. Populating the **Host Path** with the dataset location and then selecting **Enable ACL** clears the values, so we recommend selecting **Enable ACL** before entering the host path.