- 
                Notifications
    You must be signed in to change notification settings 
- Fork 29
Getting started container only #864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
65ca60b
              3088cff
              5177853
              a3cddab
              f61e69d
              211acf8
              188b5b5
              17bc5d3
              c98458e
              24b22d5
              5066cde
              b78a496
              c1b99dc
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| Choosing Your CI Solution | ||
| ========================= | ||
|  | ||
| FoundriesFactories supports two different modes for building Targets. | ||
|  | ||
| FoundriesFactory Managed | ||
| ------------------------ | ||
|  | ||
| Every Factory includes a ``containers.git`` hosted at ``source.foundries.io``. | ||
| This works out of the box and changes pushed here will be built automatically by our CI system and produce Targets that can be deployed to your device(s). | ||
| Check warning on line 10 in source/getting-started/ci-selection.rst 
     | ||
|  | ||
| To get started with the Foundries.io managed solution you will need to: | ||
| Check warning on line 12 in source/getting-started/ci-selection.rst 
     | ||
|  | ||
| - :ref:`Install Fioctl <gs-install-fioctl>` in order to work with ``source.foundries.io``. | ||
| Check warning on line 14 in source/getting-started/ci-selection.rst 
     | ||
| - :ref:`Build and deploy <gs-building-deploying-app>` your first application. | ||
|  | ||
| Self-Hosted | ||
| ----------- | ||
|  | ||
| The self-hosted option works well for people wanting more control of their workflows. | ||
| It works great with products like GitHub. | ||
| There is a one-time setup that takes about 30 minutes. | ||
|  | ||
| To get started with the self-hosted option, follow the steps outlined in the :ref:`Custom CI <ug-custom-ci-for-apps>` guide. | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| Registering Your Device with Fioup | ||
| ================================== | ||
|  | ||
| Fioup_ is an OTA update client that peforms container-only management on devices. | ||
| It supports both Arm64 and x86 systems. | ||
|  | ||
| Please follow the complete instructions for setting up Fioup. | ||
| They include steps for installing_, registering_, and updating_ your device. | ||
|  | ||
| .. _Fioup: https://github.com/foundriesio/fioup/blob/main/docs/README.md | ||
| .. _installing: https://github.com/foundriesio/fioup/blob/main/docs/install.md | ||
| .. _registering: https://github.com/foundriesio/fioup/blob/main/docs/register-device.md | ||
| .. _updating: https://github.com/foundriesio/fioup/blob/main/docs/update-device.md | ||
|  | 
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| .. _ref-gs-container-only: | ||
|  | ||
| Getting Started With Container-Only Factories | ||
| ============================================= | ||
|  | ||
| Container-only Factories lets you experience a Factory without having to run the Linux microPlatform on your device. | ||
| Check warning on line 6 in source/getting-started/gs-container-only.rst 
     | ||
| Container-only Factories can be done on any Arm64 or x86 platform. | ||
| A Debian package archive_ is included with statically linked binaries for Debian/Ubuntu users. | ||
| There are few differences between the Container-only Factory and the LmP-based Factory: | ||
|  | ||
| - OS updates are not built into the offering. | ||
| It is possible, but not integrated the same way OSTree updates are built into LmP based Factories. | ||
| - The Fioup_ update agent is used instead of :ref:`Aktualizr-Lite <ref-aktualizr-lite>`. | ||
| They share the same configuration format and files, but Fioup is focused on container-only updates. | ||
| - No TUF_ validation. The Factory includes TUF signed metadata, | ||
| Check warning on line 15 in source/getting-started/gs-container-only.rst 
     | ||
| however, it is not verfied by Fioup in the Community Edition. | ||
| This can be enabled for paid versions of the product as you get ready to move from evaluation to production. | ||
|  | ||
| .. _archive: https://github.com/foundriesio/fioup/blob/main/docs/install.md | ||
| .. _Fioup: https://github.com/foundriesio/fioup/blob/main/docs/README.md | ||
| .. _TUF: https://theupdateframework.com/ | ||
|  | ||
|  | ||
| .. toctree:: | ||
|  | ||
| signup-container-only/index | ||
| ci-selection | ||
| fioup-registration/index | ||
|  | ||
| Additional Resources | ||
| -------------------- | ||
| - :ref:`ref-container-only-arch` architecture | ||
| - :ref:`ref-compose-apps` | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| .. _ref-gs-lmp: | ||
|  | ||
| Getting Started with the LmP | ||
| ============================ | ||
|  | ||
| LmP based Factories are available if you want to use the Yocto Project and OSTree. | ||
| These Factories produce immutable OS images as well as all the features of a container-only Factory. | ||
| A paid subscription allows you to customize the base image and perform other advanced operations such as firmware updates and secure boot tooling. | ||
|  | ||
| .. toctree:: | ||
|  | ||
| signup-lmp/index | ||
| flash-device/index | ||
| register-device/index | ||
| install-fioctl/index | ||
| building-deploying-app/index | 
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,11 +1,13 @@ | ||
| Getting Started | ||
| =============== | ||
|  | ||
| FoundriesFactory includes two ways of getting started. | ||
| Check warning on line 4 in source/getting-started/index.rst 
     | ||
| Most people, such as :ref:`gs-arduino-uno-q` users, will be using a container-only Factory and can follow the steps outlined in the :ref:`ref-gs-container-only` guide. | ||
| Other users will be creating a Factory based on the Linux microPlatform and call follow the steps outlined in the :ref:`ref-gs-lmp` guide. | ||
|  | ||
| .. toctree:: | ||
| :maxdepth: 1 | ||
|  | ||
| signup/index | ||
| flash-device/index | ||
| register-device/index | ||
| install-fioctl/index | ||
| building-deploying-app/index | ||
| arduino-uno-q/index | ||
| gs-container-only | ||
| gs-lmp | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| .. _gs-signup-co: | ||
|  | ||
| Signing Up | ||
| ========== | ||
|  | ||
| To begin using the FoundriesFactory™ Platform, start with `creating an account <signup_>`_ with us. | ||
|  | ||
| .. figure:: /_static/getting-started/signup/signup.png | ||
| :width: 380 | ||
| :align: center | ||
| :target: signup_ | ||
| :alt: signup form | ||
|  | ||
| This is the beginning of your journey. | ||
|  | ||
| .. _signup: https://app.foundries.io/signup | ||
|  | ||
| Once the signup process is complete, you can proceed with creating a Factory. | ||
|  | ||
| Creating Your Factory | ||
| ===================== | ||
|  | ||
| :ref:`ref-factory` is the start of your embedded OS, tailored specifically for your product. | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's a gap where someone is going to signup and then get stalled out by our user review policies for hours. I think we probably need a pointer to where they will start this process again after that delay. NOTE: we mention "start of your embedded OS" here which won't be true for the container-only solution. Maybe something like: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried to add something here: 24b22d5 Its not what you said, but I don't think giving a link to "create factory" is a good idea here, if they haven't yet read the paragraph below that says what to do. | ||
| When your account is created, it is not associated with any factories. | ||
| Create one by clicking :guilabel:`New Factory`. | ||
|  | ||
| .. figure:: /_static/getting-started/signup/no-factories.png | ||
| :width: 900 | ||
| :align: center | ||
| :alt: no Factories screen | ||
|  | ||
| Your journey begins empty handed | ||
|  | ||
| .. _gs-select-platform-co: | ||
|  | ||
| Selecting Your Container-Only Platform | ||
| ###################################### | ||
|  | ||
| Choose a hardware platform from the dropdown menu in the **Create Factory** wizard and continue. | ||
| Click :guilabel:`Create Factory` once your details are entered. | ||
|  | ||
| .. warning:: | ||
|  | ||
| Once a Factory is created, the chosen platform/machine and Factory name cannot be changed. | ||
| Create a new Factory or `contact support <https://support.foundries.io>`_ if a mistake is made. | ||
|  | ||
| The dropdown menu includes a range of choices. You must choose one of these options to create a container-only Factory: | ||
|  | ||
| - Community Edition Arm64 | ||
| - Community Edition x86 | ||
| - Arduino UNO Q | ||
|  | ||
| The Initial Target | ||
| ################## | ||
|  | ||
| Factory creation takes 30-60 seconds to complete. | ||
| Check failure on line 56 in source/getting-started/signup-container-only/index.rst 
     | ||
| Once created, your Factory will show an initial "Target" and you will receive an email. | ||
|  | ||
| .. figure:: /_static/getting-started/signup/build.png | ||
| :width: 900 | ||
| :align: center | ||
| :alt: Targets view showing prebuilt target | ||
|  | ||
| FoundriesFactory Targets | ||
|  | ||
| A Target is a reference to the specific version of applications. | ||
| When developers push code, FoundriesFactory produces a new :term:`Target`. | ||
| Registered devices then update and install Targets. | ||
| The initial Target for a new Factory does not include any applications. | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| .. _ref-container-only-arch: | ||
|  | ||
| Container-Only Factories | ||
| ======================== | ||
|  | ||
| Container-only Factories provide a way for you to manage fleets of Arm64 or x86 devices that do not run the LmP. | ||
|  | ||
| Components | ||
| ---------- | ||
|  | ||
| 1. **App Developer**: An individual or team that creates and maintains containerized applications using Docker Compose. | ||
| 2. **containers.git**: The Foundries.io provided Git repository where application developers push their Docker Compose files and related resources. | ||
| 3. **CI Job**: The Foundries.io provided CI job that is triggered when changes are pushed to the ``containers.git`` repository. | ||
| This job builds the container images, packages the application, and publishes it to the Container Registry and OTA Service. | ||
| 4. **Container Registry**: A storage service where built container images are stored and made available for devices to download. | ||
| 5. **OTA Service**: The Over-The-Air service that manages application metadata, including available versions and update information. | ||
| It interacts with devices to facilitate updates. | ||
| 6. **Database**: A storage system used by the OTA Service to persist application metadata and device status information. | ||
| 7. **Device Gateway**: A communication endpoint that devices use to check for updates and report their status. | ||
| It acts as an intermediary between devices and the OTA Service. | ||
| 8. **fioup**: The OTA update client running on the device. | ||
| It checks for updates, downloads necessary container images from the Container Registry, and uses ``composeapp`` to manage the application lifecycle on the device. | ||
|  | ||
| App Creation And Publishing Flow | ||
| -------------------------------- | ||
| .. mermaid:: | ||
|  | ||
| flowchart LR | ||
| n1("App developer") -- push --> n2["contaners.git"] | ||
| n2 -- trigger --> n3["CI Job"] | ||
| n3 -- publish app and its images --> n4["Container Registry"] | ||
| n3 -- publish metadata about app --> n5["OTA Service"] | ||
| n5 -- store app metadata --> n6[("Database")] | ||
|  | ||
| 1. An application developer pushes a new compose app to the ``containers.git`` repository. | ||
| 2. This triggers the Foundries.io CI job that builds app's container images, packages the app, and publishes them to Container Registry. | ||
| 3. The CI job also generates and publishes metadata about the built and published app to the OTA Service. | ||
| 4. The OTA Service stores the app metadata in its database. | ||
|  | ||
| Device Update Flow | ||
| ------------------ | ||
| .. mermaid:: | ||
|  | ||
| flowchart LR | ||
| n1("fioup<br><device>") <-- check for updates<br>upload device status --> n2["Device Gateway"] | ||
| n1 <-- fetch app blobs --> n3["Container Registry"] | ||
| n2 <-- get list of available apps</br>persist device status --> n4["OTA Service"] | ||
|  | ||
| 1. The ``fioup`` client on the device checks for updates by communicating with the Device Gateway. | ||
| 2. If there are updates available, ``fioup`` can start updating apps to the specified version. | ||
| 3. The app update involves fetching the necessary container images from the Container Registry, and then using ``composeapp`` to orchestrate the update process. | ||
| 4. Once the update is complete, ``fioup`` uploads the device status back to the Device Gateway, which in turn persists this information in the OTA Service. | ||
|  | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can move
Signing Upinto it's own section at the top ofGetting Started. This avoids duplication.The next page should probably be the "container-only" vs. "LmP" choice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this but it screws up the navigation in confusing ways. The last part of the page has the "next" button. Depending on how things are ordered, you can be in the "lmp" signup and "next" actually takes you to container-only creation instructions. You can change order, but then the container-only "next" is wrong. It would be an easy trap for users to fall in.
The signup text is 18 lines, so duplication is probably worth it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@doanac FYI, we can always customize
prev-next, including a conditional for a single page, such as if we want it to go somewhere else. Not sure that would be helpful here, but wanted to mention it!