restructure docs

This commit is contained in:
Matt Hill
2023-11-06 12:34:37 -07:00
parent 80651a6609
commit fe79d71e7c
150 changed files with 404 additions and 1866 deletions

View File

@@ -0,0 +1,50 @@
.. _embassy-cli:
==============================
StartOS Command Line Interface
==============================
.. warning:: This is for advanced users only!! Anything you do while SSH'd into StartOS is NOT SUPPORTED, unless under the guidance of a Start9 technician.
When interacting with StartOS directly, you will invariably want to use ``start-cli``. start-cli can control StartOS in many of the same ways that the UI can, but with finer controls and deeper insights.
In order to use start-cli, you will first need to authorize yourself with the following command...
.. code-block:: bash
start-cli auth login
and enter your StartOS Master Password at the prompt.
You can enter ``start-cli help`` or ``start-cli <option> help`` to get an overview of capabilities:
.. code-block:: bash
StartOS-CLI
USAGE:
start-cli [OPTIONS] <SUBCOMMAND>
OPTIONS:
-c, --config <config>
-h, --host <host>
--help Prints help information
-p, --proxy <proxy>
-V, --version Prints version information
SUBCOMMANDS:
auth Login/logout and manage sessions
backup Manage backups
db Interact with the Database
disk Information on the external drive
echo Echoes
git-info Print the current git hash
help Prints this message or the help of the given subcommand(s)
inspect Details on services and their components
net Network information
notification Control UI notifications
package Interact with packages
server StartOS operations and information
ssh Manage SSH keys
wifi Manage WiFi networks

View File

@@ -0,0 +1,114 @@
.. _embassy-sdk:
=========
Start SDK
=========
The StartOS embedded Software Development Kit (SDK), is a CLI (Command Line Interface) tool that aids in building and packaging services you wish to deploy to StartOS.
It helps validate that the necessary components of the package exist, and package all of those components into a special file type (``s9pk``) that is understood by StartOS.
Installation
============
You can install this component on any system, without needing to run StartOS, by running the following command:
.. code-block::
git clone -b latest --recursive https://github.com/Start9Labs/start-os.git && cd start-os/backend && ./install-sdk.sh
Next, initialize the SDK and verify the installation was successful:
.. code-block::
start-sdk init
start-sdk --version
Commands
========
To see a list of all available commands provided, run the following from an terminal window:
.. code:: bash
start-sdk --help
start-sdk init
----------------
Initialize the developer key for interacting with the SDK.
By default, this creates the developer key at `/etc/embassy`. You might need to change ownership of this folder depending on your system permissions.
.. code:: bash
chown <user> /etc/embassy
Alternatively, you can write a config file with your desired developer location, it simply needs the following format:
.. code:: yaml
developer-key-path: /desired/path/to/key
And load it by running:
.. code:: bash
start-sdk -c /path/to/config init
start-sdk pack
----------------
This command takes the necessary package components and assembles them into the `s9pk` file format needed to install a service on StartOS. It expects the following files to exist:
- Manifest
- Instructions
- License
- Icon
- Dockerfile
If this command fails, the error response will indicate which component is missing.
start-sdk verify
-------------------
This command verifies aspects about the components assembled into the `s9pk`, such as:
- Ensures that all mounts are real volumes in the manifest
- Ensures all cert volumes point to real interfaces in the manifest
- Ensures all actions refer to real images in the manifest
- Ensures all images are tagged correctly in the manifest
- Ensures the icon is less than 100KB
It should be run _after_ `start-sdk pack` in order to verify the validity of each component.
If this command fails, the error message will indicate the mismatched details.
start-sdk git-info
--------------------
This command outputs the git commit hash of the SDK version installed on your platform.
start-sdk inspect
-------------------
This command contains several utilities for reading components once packaged into the `s9pk`. In development, it can be helpful to determine if each component is successfully included in the `s9pk` package.
It contains the following subcommands, and requires the path to the `<pacakge-id>.s9pk` file as the last argument:
- docker-images
- hash
- icon
- instructions
- license
- manifest
For example:
.. code:: bash
start-sdk inspect instructions /path/to/<package-id>.s9pk

View File

@@ -0,0 +1,21 @@
.. _embassyd:
==============
StartOS Daemon
==============
.. warning:: This is for advanced users only!! Anything you do while SSH'd into StartOS is NOT SUPPORTED, unless under the guidance of a Start9 technician.
``startd`` is the daemon that runs everything that could be considered StartOS.
When SSH'd into your Start9 server, you may see the status of ``startd`` with the following:
.. code-block:: bash
systemctl status startd
If you need to restart the daemon for some reason, you can do so with:
.. code-block:: bash
systemctl restart startd

View File

@@ -0,0 +1,15 @@
.. _dev-tools:
=========
Dev Tools
=========
Brief overviews of Developer Tools that will come in handy when :ref:`packaging a service<developer-docs>`, or interacting directly with the OS to learn or contribute to the project.
.. toctree::
:maxdepth: 2
embassyd
embassy-cli
embassy-sdk
service-container

View File

@@ -0,0 +1,19 @@
.. _exec-service-container:
==================
Service Containers
==================
For simplicity, StartOS is designed to be completely operated through its GUI, however, your device belongs to you and if you want to "lift the hood" and access the internals of the software, you may do so. This guide will show you how to enter a Service's Docker container in order to directly interface with it and issue commands.
.. warning:: The following guide is for those that have advanced command line skills, or those who are being guided by a Start9 support technician. Nothing you do inside a container is supported unless under the direction of Start9. Here be dragons!!
This guide assumes you already have :ref:`SSH Access<ssh>` setup on your machine.
Open a terminal, ssh into your device, and enter the following command, replacing ``<package-id>`` with the name of the service you are trying to access. You can list the services with ``embassy-cli package list`` (you will need to be logged in under ``embassy-cli`` for this). You will need to either be ``root`` or use ``sudo``.
.. code-block:: bash
docker exec -it <package-id>.embassy sh
This will give you a shell within the container. Reminder that nothing you do in here is supported, please be careful!