mirror of
https://github.com/Start9Labs/documentation.git
synced 2026-03-26 02:11:55 +00:00
update dev docs titles, spacing, properties content
This commit is contained in:
@@ -36,7 +36,7 @@ This section included advanced commands for working with packages in EmbassyOS.
|
||||
|
||||
.. This is for the side navigation display
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:maxdepth: 2
|
||||
:hidden:
|
||||
|
||||
dev-tools/index
|
||||
@@ -1,19 +1,19 @@
|
||||
.. _packaging-setup:
|
||||
.. _packaging-framework:
|
||||
|
||||
==========================
|
||||
Step 1 - Context and Setup
|
||||
==========================
|
||||
==================
|
||||
Step 1 - Framework
|
||||
==================
|
||||
|
||||
What we'll build
|
||||
----------------
|
||||
|
||||
We'll create a web application that produces a hello world page. This web application will be the service we package for the Embassy. During this guide we will:
|
||||
|
||||
1. Create a simple hello world web service
|
||||
2. Create a Dockerfile
|
||||
3. Create a Package Manifest
|
||||
4. Create a hosted repository which will contain all the service components
|
||||
5. Create the packaged service file
|
||||
1. Create a simple hello world web service
|
||||
2. Create a Dockerfile
|
||||
3. Create a Package Manifest
|
||||
4. Create a hosted repository which will contain all the service components
|
||||
5. Create the packaged service file
|
||||
|
||||
You can find the `complete code <https://github.com/Start9Labs/hello-world-wrapper>`_ referenced in this guide on GitHub.
|
||||
|
||||
@@ -22,9 +22,9 @@ Download required tools
|
||||
|
||||
If necessary, download any of the system requirements:
|
||||
|
||||
- Docker
|
||||
- EmbassySDK
|
||||
- A code editor
|
||||
- Terminal
|
||||
- Docker
|
||||
- EmbassySDK
|
||||
- A code editor
|
||||
- Terminal
|
||||
|
||||
For more details and installation steps for these tools, visit the :ref:`environment setup <environment-setup>` page.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _packaging-compile-raspi:
|
||||
|
||||
===========================
|
||||
Step 3 - Build for Hardware
|
||||
===========================
|
||||
=======================
|
||||
Step 3 - Hardware Build
|
||||
=======================
|
||||
|
||||
EmbassyOS is run on the arm-v8 architecture, specifically the aarch64 state, for the RaspberryPi.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _packaging-docker-build:
|
||||
|
||||
==========================
|
||||
Step 4 - Build with Docker
|
||||
==========================
|
||||
=====================
|
||||
Step 4 - Docker Build
|
||||
=====================
|
||||
|
||||
Now that we have our code properly built/compiled, we can create a Dockerfile. This file defines how to build the Docker image for the service by declaring the environment, building stages, and copying any binaries or assets needed to run the service to the Docker image filesystem.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _packaging-create-s9pk:
|
||||
|
||||
==========================
|
||||
Step 7 - Package into s9pk
|
||||
==========================
|
||||
=======================
|
||||
Step 7 - Format Package
|
||||
=======================
|
||||
|
||||
We now have all of the necessary components to package the service into the format needed for the OS. This format is a custom filetype with an extension of ``.s9pk``, short for Start9 Package.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _packaging-create-wrapper:
|
||||
|
||||
============================
|
||||
Step 9 - Create Wrapper Repo
|
||||
============================
|
||||
=======================
|
||||
Step 9 - Create Wrapper
|
||||
=======================
|
||||
|
||||
In order for the Start9 team to review your package for submission to the Start9 Marketplace, we ask that you create a wrapper repository for the project and its components. This repo should contain everything you need to build the service.
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ Now that we have a process for iterating on producing a valid package for Embass
|
||||
|
||||
2. On an Embassy device, enter the ssh pubkey into your SSH settings:
|
||||
|
||||
#. Click on Embassy in the menu
|
||||
#. Click on SSH under SETTINGS
|
||||
#. Click on + Add new key
|
||||
#. Paste pubkey from clipboard
|
||||
1. Click on Embassy in the menu
|
||||
2. Click on SSH under SETTINGS
|
||||
3. Click on + Add new key
|
||||
4. Paste pubkey from clipboard
|
||||
|
||||
3. Copy the ``hello-world.s9pk`` to the Embassy device:
|
||||
|
||||
@@ -52,14 +52,14 @@ From here, you can play with viewing the results of your Manifest file settings,
|
||||
|
||||
In order to verify your service is functioning as expected:
|
||||
|
||||
- Ensure your service is in "Running" state
|
||||
- Make sure there are no apparent errors or warnings in the logs
|
||||
- Ensure each UI component renders as expected:
|
||||
- Instructions
|
||||
- Config
|
||||
- Properties
|
||||
- Actions
|
||||
- Interfaces
|
||||
- Marketplace listing
|
||||
- Donation
|
||||
- Launch or use your service in the intended way and make sure all aspects function
|
||||
- Ensure your service is in "Running" state
|
||||
- Make sure there are no apparent errors or warnings in the logs
|
||||
- Ensure each UI component renders as expected:
|
||||
- Instructions
|
||||
- Config
|
||||
- Properties
|
||||
- Actions
|
||||
- Interfaces
|
||||
- Marketplace listing
|
||||
- Donation
|
||||
- Launch or use your service in the intended way and make sure all aspects function
|
||||
|
||||
@@ -21,11 +21,11 @@ References
|
||||
|
||||
Below are links to working examples of more advanced configurations for current Embassy services. They might serve as a starting point or reference during your development process:
|
||||
|
||||
- Detailed ``docker_entrypoint.sh`` - `Filebrowser <https://github.com/Start9Labs/filebrowser-wrapper/blob/master/docker_entrypoint.sh>`_
|
||||
- Optional dependencies - `BTCPay Server <https://github.com/Start9Labs/btcpayserver-wrapper/blob/master/assets/compat/dependencies.yaml>`__
|
||||
- Config spec - `BTCPay Server <https://github.com/Start9Labs/btcpayserver-wrapper/blob/master/assets/compat/config_spec.yaml>`__
|
||||
- Config rules - `BTC RPC Proxy <https://github.com/Start9Labs/btc-rpc-proxy-wrapper/blob/master/assets/compat/config_rules.yaml>`__
|
||||
- Multiple dependencies - `BTCPay Server <https://github.com/Start9Labs/btcpayserver-wrapper/blob/master/manifest.yaml#L172-L187>`__
|
||||
- Actions - `BTCPay Server <https://github.com/Start9Labs/btcpayserver-wrapper/blob/master/actions/btcpay-admin.sh>`__
|
||||
- Health checks - `BTCPay Server <https://github.com/Start9Labs/btcpayserver-wrapper/blob/master/assets/utils/health_check.sh>`__
|
||||
- Alerts - `BTCPay Server <https://github.com/Start9Labs/btcpayserver-wrapper/blob/master/manifest.yaml#L207-L218>`__
|
||||
- Detailed ``docker_entrypoint.sh`` - `Filebrowser <https://github.com/Start9Labs/filebrowser-wrapper/blob/master/docker_entrypoint.sh>`_
|
||||
- Optional dependencies - `BTCPay Server <https://github.com/Start9Labs/btcpayserver-wrapper/blob/master/assets/compat/dependencies.yaml>`__
|
||||
- Config spec - `BTCPay Server <https://github.com/Start9Labs/btcpayserver-wrapper/blob/master/assets/compat/config_spec.yaml>`__
|
||||
- Config rules - `BTC RPC Proxy <https://github.com/Start9Labs/btc-rpc-proxy-wrapper/blob/master/assets/compat/config_rules.yaml>`__
|
||||
- Multiple dependencies - `BTCPay Server <https://github.com/Start9Labs/btcpayserver-wrapper/blob/master/manifest.yaml#L172-L187>`__
|
||||
- Actions - `BTCPay Server <https://github.com/Start9Labs/btcpayserver-wrapper/blob/master/actions/btcpay-admin.sh>`__
|
||||
- Health checks - `BTCPay Server <https://github.com/Start9Labs/btcpayserver-wrapper/blob/master/assets/utils/health_check.sh>`__
|
||||
- Alerts - `BTCPay Server <https://github.com/Start9Labs/btcpayserver-wrapper/blob/master/manifest.yaml#L207-L218>`__
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _environment-setup:
|
||||
|
||||
===========================
|
||||
Packaging Environment Setup
|
||||
===========================
|
||||
=================
|
||||
Environment Setup
|
||||
=================
|
||||
|
||||
To get started packaging a service for EmbassyOS, some basic knowledge of software development is required. Don't worry if you are inexperienced, we will provide enough context to get you started, and you can always reach out with questions.
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ Getting Started Overview
|
||||
:class: large-4
|
||||
:anchor: Begin
|
||||
|
||||
Quickly get started with concise packaging steps
|
||||
Quickly get started with concise steps
|
||||
|
||||
.. topic-box::
|
||||
:title: SDK
|
||||
|
||||
@@ -9,25 +9,25 @@ This guide outlines a checklist of steps to complete in order to package a servi
|
||||
Packaging
|
||||
---------
|
||||
|
||||
1. Create or select project
|
||||
2. Build project
|
||||
3. Cross compile for armv8/aarch64 if necessary
|
||||
4. Create Dockerfile and docker entrypoint file
|
||||
5. Add build steps, compiled executables, assets, etc in Dockerfile and specify run command in docker entrypoint, handling signal exiting if the service does not already do this gracefully
|
||||
6. Create Manifest file
|
||||
7. Create instructions file
|
||||
8. Create icon file
|
||||
9. Add license
|
||||
10. Package all components into s9pk using embassy-sdk
|
||||
11. Verify package components using embassy-sdk
|
||||
12. Create a wrapper repository on GitHub to host all package assets for review
|
||||
13. (Optional) Add all package build steps to a Makefile for replicability
|
||||
1. Create or select project
|
||||
2. Build project
|
||||
3. Cross compile for armv8/aarch64 if necessary
|
||||
4. Create Dockerfile and docker entrypoint file
|
||||
5. Add build steps, compiled executables, assets, etc in Dockerfile and specify run command in docker entrypoint, handling signal exiting if the service does not already do this gracefully
|
||||
6. Create Manifest file
|
||||
7. Create instructions file
|
||||
8. Create icon file
|
||||
9. Add license
|
||||
10. Package all components into s9pk using embassy-sdk
|
||||
11. Verify package components using embassy-sdk
|
||||
12. Create a wrapper repository on GitHub to host all package assets for review
|
||||
13. (Optional) Add all package build steps to a Makefile for replicability
|
||||
|
||||
Testing:
|
||||
--------
|
||||
|
||||
1. Sideload ``<package-id>.s9pk`` onto an Embassy
|
||||
2. Install package using embassy-cli
|
||||
3. Start package using embassy-cli, or in the UI
|
||||
4. Check logs to see if errors
|
||||
5. Ensure service is reachable/launchable
|
||||
1. Sideload ``<package-id>.s9pk`` onto an Embassy
|
||||
2. Install package using embassy-cli
|
||||
3. Start package using embassy-cli, or in the UI
|
||||
4. Check logs to see if errors
|
||||
5. Ensure service is reachable/launchable
|
||||
|
||||
@@ -49,10 +49,10 @@ embassy-sdk pack
|
||||
|
||||
This command takes the necessary package components and assembles them into the `s9pk` file format needed to install a service on EmbassyOS. It expects the following files to exist:
|
||||
|
||||
- Manifest
|
||||
- Instructions
|
||||
- License
|
||||
- Icon
|
||||
- Manifest
|
||||
- Instructions
|
||||
- License
|
||||
- Icon
|
||||
|
||||
If this command fails, the error response will indicate which component is missing.
|
||||
|
||||
@@ -61,11 +61,11 @@ embassy-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
|
||||
- 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_ `embassy-sdk pack` in order to verify the validity of each component.
|
||||
|
||||
@@ -83,12 +83,12 @@ This command contains several utilities for reading components once packaged int
|
||||
|
||||
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
|
||||
- docker-images
|
||||
- hash
|
||||
- icon
|
||||
- instructions
|
||||
- license
|
||||
- manifest
|
||||
|
||||
For example:
|
||||
|
||||
|
||||
@@ -16,9 +16,18 @@ Due to the fact that config variables are only available when the service is run
|
||||
|
||||
|
||||
.. code:: typescript
|
||||
|
||||
:caption: Properties Type
|
||||
|
||||
interface Properties {
|
||||
version: Enum<v1 | v2>,
|
||||
data: Data,
|
||||
}
|
||||
|
||||
interface Data {
|
||||
# The key here is an string that describes the property appropriately
|
||||
<String> : PropertiesString | PropertiesObject
|
||||
}
|
||||
|
||||
interface PropertiesString {
|
||||
type: 'string'
|
||||
name: string
|
||||
@@ -38,7 +47,7 @@ Due to the fact that config variables are only available when the service is run
|
||||
Example
|
||||
-------
|
||||
|
||||
A good example of the configurator producing the ``stats.yaml`` file can be found `here <https://github.com/Start9Labs/lnd-wrapper/blob/master/configurator/src/main.rs>`_.
|
||||
An example ``stats.yaml`` file generation can be found `here <https://github.com/Start9Labs/filebrowser-wrapper/blob/master/docker_entrypoint.sh#L15-L30>`__.
|
||||
|
||||
.. role:: raw-html(raw)
|
||||
:format: html
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
.. This is for the side navigation display
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:maxdepth: 4
|
||||
:hidden:
|
||||
|
||||
Purchase <https://store.start9.com>
|
||||
|
||||
Submodule sphinx-scylladb-theme updated: 91c190c799...8558b5f770
Reference in New Issue
Block a user