building proper

This commit is contained in:
Lucy Cifferello
2021-02-08 08:32:12 -07:00
parent a099290fc7
commit 1f5d7be961
7 changed files with 19 additions and 43 deletions

View File

@@ -1,13 +0,0 @@
***************
Adding Services
***************
We are finalizing the OS infrastructure requirements to ensure a smooth process for developer contribution. This includes wrapping everything up into a software development kit for developing services on the EmbassyOS platform.
If you are interested in developing a service, keep the following in mind:
Marketplace services need to provide a "service manifest" and a "config spec", which the SDK will facilitate. The service manifest is for the store listing. The config spec is a detailed mapping of configuration options with acceptable values, defaults, and relational rule-sets. For example, if the user chooses config option A, then config option B must be between 5 and 10. That way, users can enjoy a simple GUI configuration experience, complete with validations and protections, and not have to worry about screwing up a .conf file in some unknown way.
The config spec will also denote any dependencies. Many services depend on other libraries and services on the Embassy (such as Bitcoin), sometimes even a particular version of those services, which need to be specified by the developers so that EmbassyOS can handle installing these dependencies under the hood.
Check back soon for more details!

View File

@@ -17,6 +17,7 @@ These files contain a detailed mapping of configuration options with acceptable
For example, if the user chooses config option A, then config option B must be between 5 and 10. This enables a simple GUI configuration experience, complete with validations and protections, for users. They do not have to worry about the consequences of a wrong value in a ``.conf`` file.
.. _config_spec:
Config Spec
===========
@@ -84,6 +85,7 @@ The following section contains implementation specifications for the ``config_sp
- Change warning text displays when the value is altered
.. _boolean:
Boolean
^^^^^^^
@@ -110,6 +112,7 @@ Example:
default: true
.. _enum:
Enum
^^^^
@@ -140,6 +143,7 @@ ValueSpec Type:
default: NIGHT
.. _list:
List
^^^^
@@ -190,6 +194,7 @@ Example:
.. _number:
Number
^^^^^^
@@ -223,6 +228,7 @@ Example:
default: 30
.. _object:
Object Type
^^^^^^^^^^^
@@ -290,6 +296,7 @@ Example:
default: 1
.. _string:
String
^^^^^^
@@ -348,6 +355,7 @@ Examples:
len: 22
.. _pointer:
Pointer
^^^^^^^
@@ -383,6 +391,7 @@ Example:
index: "rpc.username"
.. _union:
Union
^^^^^
This type describes a necessary dependency. Multiple variants can be expressed to enable the user the option to connect to another service (internal dependency) or outside source (external dependency).
@@ -416,6 +425,7 @@ Tag Type:
description: Option<String>
variant-names: Map<String, String>
.. _example_config_spec:
Example:
@@ -489,6 +499,7 @@ Example:
.. _config_rules:
Config Rules
============

View File

@@ -1,27 +0,0 @@
.. _service_sdk:
***********************
Service Packaging Guide
***********************
This technical guide covers the necessary steps to package up a service for deployment to an Embassy. To start, you will need to acquire :ref:`EmbassyOS <purchasing>` for testing the packaged service.
While you are waiting to assemble a device, you can begin the process of building your project in the format necessary to run on the Embassy. The sections below outline these steps in detail.
For reference, the `Hello world <https://github.com/Start9Labs/hello-world-wrapper>`_ repository should be used as an example. A project template can be cloned using the "Use this template" button in GitHub.
.. toctree::
:maxdepth: 2
Overview <overview>
Wrapper <wrapper>
Docker <docker>
Manifest <manifest>
Config <config>
Properties <properties>
Docs <docs>
Submission process
------------------
When you have built and tested your project for EmbassyOS, please send us a submission with the project repository to ``dev@start9labs.com``. Reach out with questions in the Matrix community `dev channel <https://matrix.to/#/#community-dev:matrix.start9labs.com>`_.

View File

@@ -80,9 +80,12 @@ Example
dependencies: Dependencies
.. _dependencies:
Dependencies
------------
Many services depend on other libraries and services on EmbassyOS (such as Bitcoin), sometimes even a particular version of those services, which need to be specified by the developers so that EmbassyOS can handle installing these dependencies under the hood.
The key of each field in the dependencies object is the lowercase, kebab-case app ID of the service that is depended on. Each dependency contains a set of rules that need to be fulfilled as true if the dependency is to be properly installed. The interface should provide suggestions for the behavior if the denoted rule cannot be met with previous configurations.
Let's take this snippet for example:
@@ -107,6 +110,7 @@ Let's take this snippet for example:
.. role:: raw-html(raw)
:format: html
:raw-html:`<br />`
The service ``btc-rpc-proxy`` is a dependency of the service ``c-lightning``. ``c-lightning`` requires it to be installed at a version >=0.1.0 <0.2.0. There exists a rule that states the config option ``user.name`` must be equal to "c-lightning". If this value does not exist for ``user.name`` when accessed, ``PUSH`` the value "c-lighting" to the field.
@@ -158,6 +162,7 @@ Types for ``manifest.yaml`` fields:
.. role:: raw-html(raw)
:format: html
:raw-html:`<br />`
----

View File

@@ -15,7 +15,7 @@ The volume directory (for seeding data into the volume) is typically: ``/root/vo
A service is mounted to the EmbassyOS image. Each service application gets a volume allocated to it by EmbassyOS. Within the Docker container that encompasses the service image, a path is specified as to where it should mount on EmbassyOS. This path is specified in the :ref:`manifest <service_manifest>`.
The config spec, config rules, and manifest get bundled into the ``.s9pk`` package when built using `appmgr <https://github.com/Start9Labs/appmgr>`_. Each new version release should include the updated version of these files re-bundled into a new binary.
The config spec, config rules, and manifest get bundled into the ``.s9pk`` package, `built using appmgr <https://github.com/Start9Labs/appmgr>`_. Each new version release should include the updated version of these files re-bundled into a new binary.
.. note::
Due to tech debt, code in appmgr may reference ``app-id`` instead of ``service-id``.

View File

@@ -35,7 +35,7 @@ Here you will find guidance and information about the Start9 Embassy personal se
:maxdepth: 2
:caption: Contributing
contributing/adding-services
contributing/index
.. toctree::
:maxdepth: 2

View File

@@ -11,7 +11,7 @@ Once Tor is setup on your system, you will need to edit your phone's private DNS
Navigate to `Network & Internet > Advanced > Private DNS` and toggle Private DNS Mode "off".
.. figure:: /_static/images/private_dns.png
.. figure:: /_static/images/tor/private_dns_off.png
:width: 50%
:alt: Private DNS toggle