Dev docs edits

This commit is contained in:
kn0wmad
2022-02-14 07:56:36 -07:00
committed by Lucy Cifferello
parent 10a5bcac98
commit 5829ed2fa5
10 changed files with 54 additions and 46 deletions

6
poetry.lock generated
View File

@@ -564,7 +564,7 @@ python-versions = ">= 3.5"
[[package]]
name = "typing-extensions"
version = "4.1.0"
version = "4.1.1"
description = "Backported and Experimental Type Hints for Python 3.6+"
category = "dev"
optional = false
@@ -945,8 +945,8 @@ tornado = [
{file = "tornado-6.1.tar.gz", hash = "sha256:33c6e81d7bd55b468d2e793517c909b139960b6c790a60b7991b9b6b76fb9791"},
]
typing-extensions = [
{file = "typing_extensions-4.1.0-py3-none-any.whl", hash = "sha256:c13180fbaa7cd97065a4915ceba012bdb31dc34743e63ddee16360161d358414"},
{file = "typing_extensions-4.1.0.tar.gz", hash = "sha256:ba97c5143e5bb067b57793c726dd857b1671d4b02ced273ca0538e71ff009095"},
{file = "typing_extensions-4.1.1-py3-none-any.whl", hash = "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"},
{file = "typing_extensions-4.1.1.tar.gz", hash = "sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42"},
]
urllib3 = [
{file = "urllib3-1.26.8-py2.py3-none-any.whl", hash = "sha256:000ca7f471a233c2251c6c7023ee85305721bfdf18621ebff4fd17a8653427ed"},

View File

@@ -13,9 +13,11 @@
- OS guides for CIFS
- Local
- Restore from backup
- Mission / values
- Synology
- EMVER, Deps Dev Docs
# BLOCKED:
- Mission / values
- Possible sounds in troubleshooting (and walkthrough?)
- Alt Market Build Guide
- Launch versioned site/docs to start9.com
@@ -25,4 +27,11 @@
- Create badges for device guide topic boxes <connectivity, performance, resilience and/or tuning>
- Close all relevant issues (some await new processes in order to test)
- Migrate from other server projects / nodes (currently punted)
- Breakout Bitcoin / Lightning integrations into their own individual pages
- Breakout Bitcoin / Lightning integrations into their own individual pages
Go to the Synology UI > Control Panel > Shared Folder > select the folder you want to use > Permissions tab > make sure that you have read/write permissions for the user you're going to be logging in as (probably unnecessary but I made a separate user for this to keep things segregated) > Save
Then go to the Synology UI > Control Panel > File Services > SMB Tab > Click the SMB drop down button if it isn't already selected > Ensure that "Enable SMB service" is checked.
Under Advanced Settings on the same dropdown I have "Min SMB protocol" set to SMB2 and "Max SMB protocol set to SMB3", I got the impression somewhere that it might be important but I don't know if those are default values or if they actually matter).
On the same dropdown, under "Note" will be "PC (Windows Explorer): \". This DeviceAddressName is the "Hostname" within the Embassy New Shared Folder dialog, and note that it is case sensitive and that the \ have been removed.
Go to Synology UI > File Station > navigate so that you can see the the desired destination folder > right click on it > Properties > General Tab, next to Location: will be an folder location of the format ///, the / portion (so without the volume label) is the "Path" within the Embassy New Shared Folder dialog.
Fill in the Username and Password appropriately for the previously checked user.

View File

@@ -40,4 +40,4 @@ You can enter ``embassy-sdk help`` or ``embassy-sdk <option> help`` to get an ov
verify Verify a .s9pk is valid
Please visit https://github.com/Start9Labs/embassy-os/tree/master/backend for more details
Please visit the `EmbassyOS backend <https://github.com/Start9Labs/embassy-os/tree/master/backend>`_ for more details

View File

@@ -6,7 +6,7 @@ Embassy Daemon
.. warning:: This is for advanced users only!! Anything you do while SSH'd into your Embassy is NOT SUPPORTED, unless under the guidance of a Start9 technician.
`embassyd`` is the daemon that runs everything that could be considered EmbassyOS.
``embassyd`` is the daemon that runs everything that could be considered EmbassyOS.
When SSH'd into your Embassy, you may see the status of EmbassyD with the following:
@@ -19,4 +19,3 @@ If you need to restart the daemon for some reason, you can do so with:
.. code-block:: bash
systemctl restart embassyd

View File

@@ -4,7 +4,7 @@
Step 4 - Build with Docker
==========================
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.
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.
In other words, the Dockerfile serves as a recipe for creating a Docker image, from which Docker containers are spun up. This is ultimately what runs an instance of your service on the Embassy.
@@ -15,7 +15,7 @@ In other words, the Dockerfile serves as a recipe for creating a Docker image, f
touch Dockerfile
touch docker_entrypoint.sh
2. We start by importing a base image, in this case Alpine, as recommended.
2. We'll start editing the ``Dockerfile`` by importing a base image, in this case Alpine, as recommended.
.. code:: docker
@@ -26,7 +26,7 @@ In other words, the Dockerfile serves as a recipe for creating a Docker image, f
.. code:: docker
RUN apk update
RUN apk add tini
RUN apk add tini curl
4. Next, we add the cross-compiled binary of ``hello-world`` to ``/usr/local/bin/`` and add the ``docker_entrypoint.sh`` file from the project root. Then, we set permissions for ``docker_entrypoint.sh``.
@@ -74,4 +74,4 @@ In other words, the Dockerfile serves as a recipe for creating a Docker image, f
exec tini hello-world
This is a script that defines how the service starts, and often acts as an init system. It will need to complete any environment setup (such as folder substructure), set any environment variables, and execute the run command. It's also PID 1 in the Docker container, so should do all of the signal handling for container exits.
This is a script that defines how the service starts, and often acts as an init system. It will need to complete any environment setup (such as folder substructure), set any environment variables, and execute the run command. It's also PID 1 in the Docker container, so should do all of the signal handling for container exits.

View File

@@ -6,13 +6,13 @@ Step 9 - Create Wrapper Repo
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. Let's do that for our hello-world service.
For a quick start convenience, Start9 has made the finalized version of the `hello-world-wrapper <https://github.com/Start9Labs/hello-world-wrapper>`_ available as a *GitHub template*. Clicking "Use this template" in that repository will clone the entire contents to a specified location. Each file will still have to be manually edited to reflect the changes necessary for your service.
For a quick start convenience, Start9 has made the finalized version of the `hello-world-wrapper <https://github.com/Start9Labs/hello-world-wrapper>`_ available as a *GitHub template*. Clicking "Use this template" in that repository will clone the entire contents to a specified location. Each file will still have to be manually edited to reflect the changes necessary for your service.
If you want to proceed from scratch, follow these steps:
1. In GitHub, create a new public repository with the name "hello-world-wrapper" under your user profile. Go ahead and select the options to include a README file and a .gitignore file. You can always add these files later too.
2. Once the hosted repository is created, select the "Code" dropdown to copy the https or ssh URL for the repository. If you do not have git setup locally, follow the :ref:`setup steps <environment-setup-git>` first.
2. Once the hosted repository is created, select the "Code" dropdown to copy the https or ssh URL for the repository. If you do not have git setup locally, follow the :ref:`setup steps <environment-setup-git>` first.
.. code:: bash
@@ -33,7 +33,7 @@ If you want to proceed from scratch, follow these steps:
hello-world.s9pk
image.tar
5. Move the Dockerfile, docker_entrypoint.sh, LICENSE, icon, and Manifest to the root of the wrapper repository. At the end, your project structure should look similar to this:
5. Move the ``Dockerfile``, ``docker_entrypoint.sh``, ``LICENSE``, ``icon``, and ``Manifest`` to the root of the wrapper repository. At the end, your project structure should look similar to this:
.. code:: bash

View File

@@ -62,7 +62,7 @@ This guide will take you through the fundamentals of packaging a service for Emb
.. topic-box::
:title: Step 7
:link: environment-setup
:link: 07_create-s9pk
:class: large-4
:anchor: View
@@ -119,4 +119,4 @@ This guide will take you through the fundamentals of packaging a service for Emb
08_create-makefile
09_create-wrapper
10_install-package
resources
resources

View File

@@ -6,28 +6,28 @@ Packaging 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.
If you are already an experienced developer, `jump ahead <quick-start>`
If you are already an experienced developer, :ref:`jump ahead <quick-start>`.
The only system requirements are `Docker <https://docs.docker.com/get-docker>`_ and `Cargo <https://doc.rust-lang.org/cargo/>`_ (Rust package manager).
The only system requirements are `Docker <https://docs.docker.com/get-docker>`_ and `Cargo <https://doc.rust-lang.org/cargo/>`_ (Rust package manager).
Of course, there are additional recommendations that would streamline your development experience, but they are not required.
Code Editor
===========
-----------
A code editor is recommended since you will, after all, be writing code! We are fans of `Visual Studio Code <https://code.visualstudio.com/>`_ . Visual Studio Code is a free, batteries-included text editor made by Microsoft.
Terminal / CLI
==============
--------------
We recommend using the build in terminal as a command line interface (CLI) for your operating system. For Windows users, we recommend the built-in command line (cmd) *Command Prompt* or the Powershell CLI, running in Administrator mode. For macOS and Linux, the native *Terminal* is recommended, but virtually any terminal will work.
We recommend using your computer's built-in terminal as a command line interface (CLI) for your operating system. For Windows users, we recommend the built-in command line (cmd) *Command Prompt* or the Powershell CLI, running in Administrator mode. For macOS and Linux, the native *Terminal* is recommended, but virtually any terminal will work.
If you are new to the command line, Ionic has published this awesome `guide <https://ionicframework.com/blog/new-to-the-command-line/>`_ to get you started.
.. _environment-setup-git:
Git
===
---
Although not required, the version control system Git is highly recommended.
@@ -36,11 +36,11 @@ Git is often accompanied by a Git Host, such as `GitHub <https://github.com/>`_,
To verify the installation, open a new terminal window and run:
.. code:: bash
git --version
Docker
======
------
`Docker <https://docs.docker.com/get-docker>`_ must be installed to your computer platform. It is needed to build an image for your package, which will be used to create the running instance of your package on EmbassyOS. In essence, it declares the necessary environment and building stages for your package to run.
@@ -48,9 +48,9 @@ We also recommend installing and using `Docker buildx <https://docs.docker.com/b
Cargo
=====
-----
Cargo is the package management solution for the Rust programming language. It will install Rust to your system, and provide the required environment to build the Embassy SDK for packaging your service into the required format needed by EmbassyOS.
Cargo is the package management solution for the Rust programming language. It will install Rust to your system, and provide the required environment to build the Embassy SDK for packaging your service into the required format needed by EmbassyOS.
Installation instructions for Cargo can be found `here <https://doc.rust-lang.org/cargo/getting-started/installation.html>`__.
@@ -61,14 +61,14 @@ To verify the installation, open a terminal window and run:
cargo --version
SDK
====
---
EmbassyOS provides a :ref:`software development kit <sdk>` embedded in its environment. You do not need a running instance of EmbassyOS to use this component, it can be installed on any computer platform.
To install the SDK:
.. code:: bash
git clone https://github.com/Start9Labs/embassy-os.git
cd backend
./install-sdk.sh
@@ -76,22 +76,22 @@ To install the SDK:
To verify the installation, open a terminal window and run:
.. code:: bash
embassy-sdk --version
EmbassyOS
=========
---------
While not strictly necessary, having a running instance of EmbassyOS is recommended to test installing, running, configuring, and using your package. Without this component, you will have to coordinate with Start9's internal development team to test. ... TODO add more
While not strictly necessary, having a running instance of EmbassyOS is recommended to test installing, running, configuring, and using your package. Without this component, you will have to coordinate with Start9's internal development team to test.
You can acquire EmbassyOS by :ref:`purchasing <purchasing>` or following the :ref:`DIY guide <diy>`.
You can acquire EmbassyOS by :ref:`purchasing <purchasing>` or following the :ref:`DIY guide <diy>`.
.. _quick-start:
Quick Start Environment Setup
=============================
- `Docker <https://docs.docker.com/get-docker>`_
-----------------------------
- `Docker <https://docs.docker.com/get-docker>`_
- `Docker buildx <https://docs.docker.com/buildx/working-with-buildx/>`_
- `Cargo <https://doc.rust-lang.org/cargo/getting-started/installation.html>`__
- `EmbassyOS <https://github.com/Start9Labs/embassy-os>`_
- `Embassy SDK <https://github.com/Start9Labs/embassy-os/blob/master/backend/install-sdk.sh>`_
- `Embassy SDK <https://github.com/Start9Labs/embassy-os/blob/master/backend/install-sdk.sh>`_

View File

@@ -1,4 +1,4 @@
.. _packaging-quick-start:
.. _quick-start:
=====================
Packaging Quick Start
@@ -21,7 +21,7 @@ Packaging
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
13. (Optional) Add all package build steps to a Makefile for replicability
Testing:
--------
@@ -30,4 +30,4 @@ Testing:
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
5. Ensure service is reachable/launchable

View File

@@ -23,7 +23,7 @@ To see a list of all available commands provided, run the following from an term
embassy-sdk init
----------------
Initialized the developer key for interacting with the SDK
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.
@@ -54,7 +54,7 @@ This command takes the necessary package components and assembles them into the
- License
- Icon
If this command fails, the error response will indicate which component is missing.
If this command fails, the error response will indicate which component is missing.
embassy-sdk verify
-------------------
@@ -84,14 +84,14 @@ 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
- hash
- icon
- instructions
- license
- manifest
For example:
.. code:: bash
embassy-sdk inspect instructions /path/to/<package-id>.s9pk
embassy-sdk inspect instructions /path/to/<package-id>.s9pk