Skip to content

Commit 4e59b06

Browse files
authored
Merge pull request Start9Labs#42 from Start9Labs/versioning
Versioning
2 parents 94fc0d3 + 223866d commit 4e59b06

File tree

9 files changed

+141
-40
lines changed

9 files changed

+141
-40
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.DS_Store
22
.vscode/
33
build/
4-
build-send.sh
4+
build-send.sh
5+
utils/deploy.sh

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ brew install sphinx-doc
1919
pip3 install sphinx-autobuild
2020
pip3 install sphinx-book-theme || pip install git+https://github.com/executablebooks/sphinx-book-theme.git@master
2121
pip3 install sphinxcontrib.yt
22+
pip3 install sphinx-multiversion
2223
```
2324

2425
### Development
@@ -43,7 +44,7 @@ Click on the "Issues" tab in the top navbar. Provide a good title and describe c
4344

4445
### Submitting a pull request
4546

46-
Click on the "Pull requests" tab in the top navbar. Select the green "New pull request button" in the top right section. Select your branch for the compare dropdown, and master as the base. Provide an appropriate title and summary of the changes in the pull request description. Changes will be reviewed and merged when satisfactory.
47+
Click on the "Pull requests" tab in the top navbar. Select the green "New pull request button" in the top right section. Select your branch for the compare dropdown, and master as the base. Provide an appropriate title and summary of the changes in the pull request description. Changes will be reviewed and merged when satisfactory.
4748

4849
## Helpful Resources
4950

@@ -56,4 +57,8 @@ To update Sphinx Book Theme:
5657
- `pip install sphinx-book-theme==<tag_version>` || `pip install git+https://github.com/executablebooks/sphinx-book-theme.git@<branch_name>` eg. `pip install sphinx-book-theme==0.0.42`
5758

5859
To deploy theme update:
59-
- Build and publish according to production release process
60+
- Build and publish according to production release process
61+
62+
## Versioning
63+
- Build for versioning: `sphinx-multiversion source build/html`
64+
- To view version metadata: `sphinx-multiversion source build/html --dump-metadata`

source/_templates/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
<meta property="og:image" content="https://start9.com/images/icon.png" />
1212
<meta name="og:description"
1313
content="Documentation, guides, and FAQ for Start9 software and hardware products, as well as general information about open source technologies, Bitcoin, Lightning, and Tor.">
14-
{% endblock %}
14+
{% endblock %}

source/_templates/versioning.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{% if versions %}
2+
<h3>{{ _('Branches') }}</h3>
3+
<ul>
4+
{%- for item in versions.branches %}
5+
<li><a href="{{ item.url }}">{{ item.name }}</a></li>
6+
{%- endfor %}
7+
</ul>
8+
<h3>{{ _('Tags') }}</h3>
9+
<ul>
10+
{%- for item in versions.tags %}
11+
<li><a href="{{ item.url }}">{{ item.name }}</a></li>
12+
{%- endfor %}
13+
</ul>
14+
{% endif %}
15+
<!-- <h1>*testing versions*</h1> -->

source/conf.py

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,42 @@
2525
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2626
# ones.
2727
extensions = [
28-
'sphinxcontrib.yt'
28+
'sphinxcontrib.yt',
29+
'sphinx_multiversion'
2930
# 'sphinxcontrib.needs'
3031
]
3132

3233
# Add any paths that contain templates here, relative to this directory.
3334
templates_path = ['_templates']
3435

36+
# HTML sidebar widgets
37+
html_sidebars = {
38+
"**": ["sidebar-logo.html", "search-field.html", "versioning.html", "sbt-sidebar-nav.html", "sbt-sidebar-footer.html"]
39+
}
40+
3541
# List of patterns, relative to source directory, that match files and
3642
# directories to ignore when looking for source files.
3743
# This pattern also affects html_static_path and html_extra_path.
3844
exclude_patterns = []
3945

46+
# Multiversion settings
47+
# Whitelist pattern for tags (set to None to ignore all tags)
48+
smv_tag_whitelist = r'^v\d+\.\d+$' # Include tags like "v2.1"
49+
50+
# Whitelist pattern for branches (set to None to ignore all branches)
51+
smv_branch_whitelist = r'^.*$'
52+
53+
# Whitelist pattern for remotes (set to None to use local branches only)
54+
smv_remote_whitelist = r'^(origin)$'
55+
56+
# Pattern for released versions
57+
smv_released_pattern = r'^tags/.*$'
58+
59+
# Format for versioned output directories inside the build directory
60+
smv_outputdir_format = 'versions/{ref.name}'
61+
62+
# Determines whether remote or local git branches/tags are preferred if their output dirs conflict
63+
smv_prefer_remote_refs = True
4064

4165
# -- Options for HTML output -------------------------------------------------
4266

@@ -56,12 +80,13 @@
5680
# "theme_dev_mode": True,
5781
"path_to_docs": "source",
5882
"repository_url": "https://github.com/Start9Labs/documentation",
83+
"repository_branch": "master",
5984
"use_edit_page_button": True,
6085
"use_issues_button": True,
6186
"use_repository_button": True,
6287
"extra_navbar": "Powered by <a href=\"https://start9.com\">Start9</a>", # Will be displayed underneath the left navbar"
6388
"show_navbar_depth": 1,
64-
"use_download_button": False,
89+
"use_download_button": True,
6590
"use_edit_page_button": True,
6691
"launch_buttons": {
6792
"main_site": "https://start9.com",
@@ -75,4 +100,4 @@
75100
]
76101
html_cs_files = [
77102
'default.css'
78-
]
103+
]

source/getting-started/diy.rst

Lines changed: 77 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ DIY Guide
1212

1313
By popular demand, we are pleased to present this "Do it Yourself" (DIY) guide for the Start9 Embassy personal server!
1414

15-
.. warning:: This DIY guide is for EmbassyOS version 0.2.13. A substantive change will be made to this guide for EmbassyOS v0.3.0 scheduled for release in Q3 2021. When 0.3.0 launches it will REQUIRE hardware updates, which you can find `here <https://start9.com/eos-0.3.0>`__.
16-
15+
.. warning:: This DIY guide has directions for EmbassyOS versions 0.2.x and versions 0.3.x. When 0.3.0 launches it will REQUIRE hardware updates, which you can find `here <https://start9.com/eos-0.3.0>`__. Please keep in mind that version 0.3.x is not yet available for purchase!! Please stay tuned to our community channels for updates.
1716

1817

1918
Motivation
@@ -31,26 +30,24 @@ There are four reasons you might prefer to build your own Embassy instead of pur
3130

3231
#. You just like building things.
3332

34-
Hardware
35-
========
36-
37-
Components (EmbassyOS versions 0.2.x)
38-
-------------------------------------
33+
Building EmbassyOS Versions 0.2.x
34+
=================================
3935

40-
.. note:: For newer versions of EmbassyOS (0.3.0 and above), please see the new hardware requirements `here <https://start9.com/eos-0.3.0>`__. These pieces are *in addition* to the hardware below.
36+
Hardware: Components
37+
--------------------
4138

4239
#. `Raspberry Pi 4B (8GB) <https://raspberrypi.org/products/raspberry-pi-4-model-b/?variant=raspberry-pi-4-model-b-8gb>`_
4340
#. `Power supply for Raspberry Pi 4B <https://raspberrypi.org/products/type-c-power-supply/>`_
4441
#. Case for Raspberry Pi 4B (`passive cooling recommended <https://www.amazon.com/Geekworm-Raspberry-Aluminum-Passive-Heatsink/dp/B07Z6FYHCH/>`_ `*`)
4542
#. `High endurance microSD <https://amazon.com/SanDisk-Endurance-microSDXC-Adapter-Monitoring/dp/B07NY23WBG/>`_ (recommended 128GB or more)
46-
#. `GPIO mini speaker/buzzer <https://www.amazon.com/Corporate-Computer-Motherboard-Internal-Speaker/dp/B01527H4W2/ref=sr_1_5?keywords=pc+internal+speaker&qid=1638200450&qsid=134-2367895-4553613&sr=8-5&sres=B07FCHT22L%2CB01DM56TFY%2CB01527H4W2%2CB07VZV7GHL%2CB097B53J39%2CB01MR1A4NV%2CB08QRYTPGH%2CB088CSDZQM%2CB08GKLQWZZ%2CB09B1W6MLL%2CB08777GG4P%2CB084TSLMC6%2CB086JXJ1LF%2CB08C4P78DK%2CB07Q81VG54%2CB07B2WLS17&srpt=SPEAKERS>`_ (These often sell out, please let us know if this link needs to be refreshed)
43+
#. `GPIO mini speaker/buzzer <https://www.amazon.com/Corporate-Computer-Motherboard-Internal-Speaker/dp/B01527H4W2/>`_ (These often sell out, please let us know if this link needs to be refreshed)
4744
#. Ethernet cable
48-
#. MicroSD → USB adapter (if no microSD port on your computer)
45+
#. MicroSD → USB adapter (or you may have a microSD port on your computer)
4946

5047
`*` If you use a fan, **DO NOT** use the official Raspberry Pi fan, as it requires the same GPIO pins as the audio speaker. Instead, we recommend `this fan <https://www.amazon.com/Raspberry-iUniker-30x30x7mm-Brushless-RetroFlag/dp/B076H3TKBP/>`_.
5148

52-
Assembly Instructions
53-
---------------------
49+
Hardware: Assembly Instructions
50+
-------------------------------
5451

5552
#. Insert mini speaker/buzzer into GPIO pins 6/8/10/12 with the word "speaker" facing out, `away from the board`.
5653

@@ -60,18 +57,15 @@ Assembly Instructions
6057

6158
That's it. Place the Raspberry Pi 4 board (with speaker attached), into its case.
6259

63-
Getting EmbassyOS
64-
=================
65-
66-
Purchasing
67-
----------
60+
Getting EmbassyOS: Purchasing
61+
-----------------------------
6862

6963
You can purchase EmbassyOS `here <https://store.start9.com/collections/embassy/products/embassyos-software-download>`_. This is by far the easiest path to get up and running.
7064

7165
Depending on your Internet speed, the download should take between 5 and 30 minutes.
7266

73-
Building from Source
74-
--------------------
67+
Getting EmbassyOS: Building from Source
68+
---------------------------------------
7569

7670
If you have the proper tooling and are comfortable using the command line, you can build EmbassyOS from `source <https://github.com/Start9Labs/embassy-os>`_, which is made available under the `Start9 Personal Use License <https://start9.com/license>`_.
7771

@@ -81,7 +75,69 @@ Thanks to our community members who have kindly put together these guides!
8175
* A technically focused guide by `t0mmysm1th <https://github.com/t0mmysm1th/embassy-os/blob/master/BuildGuide.md>`_
8276

8377
Installing EmbassyOS
84-
====================
78+
--------------------
79+
80+
Whether you purchase EmbassyOS from us or build it yourself, you need to flash it onto a microSD card.
81+
82+
#. Download `balenaEtcher <https://www.balena.io/etcher/>`_ onto your Mac, Windows, or Linux computer.
83+
#. Insert the microSD card into your computer, either directly or using an adapter.
84+
#. Open balenaEtcher.
85+
#. Click `Select Image`, then find and select your copy of EmbassyOS.
86+
#. Click `Select Target`, then find and select your micro SD card.
87+
#. Click `Flash!` You may be asked to (1) approve the unusually large disk target or (2) enter your password. Both are normal.
88+
89+
.. figure:: /_static/images/diy/balena.png
90+
:width: 60%
91+
:alt: Balena Etcher Dashboard
92+
93+
#. Once the image is flashed and verified, you may remove the micro SD, insert it into your Embassy, and power up the device.
94+
#. The Embassy is now ready for use, and you may following the normal :ref:`setup <initial-setup>` instructions. ``*``
95+
96+
``*`` The first time you power it on, your Embassy will make more noises than future attempts, and it may take several minutes to finally complete.
97+
98+
Building EmbassyOS Versions 0.3.x
99+
=================================
100+
101+
Hardware: Components
102+
--------------------
103+
104+
#. `Raspberry Pi 4B (8GB) <https://raspberrypi.org/products/raspberry-pi-4-model-b/?variant=raspberry-pi-4-model-b-8gb>`_
105+
#. `Power supply for Raspberry Pi 4B <https://raspberrypi.org/products/type-c-power-supply/>`_ Make sure this is at minimum 15w and 3.5a.
106+
#. Case for Raspberry Pi 4B (`passive cooling recommended <https://www.amazon.com/Geekworm-Raspberry-Aluminum-Passive-Heatsink/dp/B07Z6FYHCH/>`_ `*`)
107+
#. A `16GB microSD card <https://amazon.com/SanDisk-Endurance-microSDXC-Adapter-Monitoring/dp/B07NY23WBG/>`_ (no need for bigger). If you have ABSOLUTELY NO data to migrate, you may choose to re-use the card already in your Embassy.
108+
#. `GPIO mini speaker/buzzer <https://www.amazon.com/Corporate-Computer-Motherboard-Internal-Speaker/dp/B01527H4W2/>`_ (These often sell out, please let us know if this link needs to be refreshed)
109+
#. Ethernet cable
110+
#. MicroSD → USB adapter (or you may have a microSD port on your computer)
111+
#. An external drive (1TB minimum, 2TB SSD recommended), or an `internal drive <https://www.amazon.com/Crucial-MX500-NAND-SATA-Internal/dp/B078211KBB>`_ with an `USB enclosure <https://www.amazon.com/gp/product/B07T9D8F6C>`_, as sold with our upgrade kits. MUST CONNECT OVER USB 3.0
112+
113+
`*` If you use a fan, **DO NOT** use the official Raspberry Pi fan, as it requires the same GPIO pins as the audio speaker. Instead, we recommend `this fan <https://www.amazon.com/Raspberry-iUniker-30x30x7mm-Brushless-RetroFlag/dp/B076H3TKBP/>`_.
114+
115+
Hardware: Assembly Instructions
116+
-------------------------------
117+
118+
#. Insert mini speaker/buzzer into GPIO pins 6/8/10/12 with the word "speaker" facing out, `away from the board`.
119+
120+
.. figure:: /_static/images/diy/pins.png
121+
:width: 60%
122+
:alt: Speaker board spec
123+
124+
#. Place the Raspberry Pi 4 board (with speaker attached), into its case.
125+
#. Plug in the external drive to one of the USB 3.0 (blue) slots
126+
127+
Getting EmbassyOS: Purchasing
128+
-----------------------------
129+
130+
You can purchase EmbassyOS `here <https://store.start9.com/collections/embassy/products/embassyos-software-download>`_. This is by far the easiest path to get up and running.
131+
132+
Depending on your Internet speed, the download should take between 5 and 30 minutes.
133+
134+
Getting EmbassyOS: Building from Source
135+
---------------------------------------
136+
137+
A detailed build guide will be available around the time of the v0.3.0 release (or now, if you snoop around our GitHub long enough).
138+
139+
Installing EmbassyOS
140+
--------------------
85141

86142
Whether you purchase EmbassyOS from us or build it yourself, you need to flash it onto a microSD card.
87143

@@ -96,7 +152,7 @@ Whether you purchase EmbassyOS from us or build it yourself, you need to flash i
96152
:width: 60%
97153
:alt: Balena Etcher Dashboard
98154

99-
#. Once the image is flashed and verified, you may remove the micro SD and insert it into your Embassy.
155+
#. Once the image is flashed and verified, you may remove the micro SD, insert it into your Embassy, and power up the device.
100156
#. The Embassy is now ready for use, and you may following the normal :ref:`setup <initial-setup>` instructions. ``*``
101157

102158
``*`` The first time you power it on, your Embassy will make more noises than future attempts, and it may take several minutes to finally complete.

source/support/FAQ/030-faq.rst

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,25 @@ If you are unsure what drive type is best for you, get an external SSD with a US
3434

3535
3 - For the SD card, any type will work, and 16GB is recommended. A larger card will not offer any benefit. These are $5-10USD. EmbassyOS will be stored on this card.
3636

37-
4 - For the powered USB hub, any kind will work as long as it has it's own power supply and is USB 3.0 capable.
38-
3937
What size drive do I need?
4038
--------------------------
4139
This will depend on how you want to use your Embassy. We recommend a minimum of 1TB if you intend to run a pruned Bitcoin node, or no Bitcoin node at all, and a 2TB minimum if you intend to run a full archival node, which will add a lot more functionality.
4240

4341
If you intend to run your own "cloud", then consider the amount of data you are storing. If you have lots of video files, for example, you may start filling up the disk fairly quickly. Any service you are currently using should have a simple way for you to view your data usage. Make sure to leave plenty of room for expansion.
4442

45-
Finally, remember that you can always expand to a larger drive in the future. EOS will also be adding the ability to store on multiple drives, and other advanced storage features, in the near future.
43+
Finally, remember that you can always expand to a larger drive in the future. EOS will also be adding additional advanced storage features in the near future.
4644

4745
I want to add an HDD later, in addition to my SSD, what are the performance consequences of doing this?
4846
-------------------------------------------------------------------------------------------------------
49-
After additional drive support is added (v0.3.x, no current ETA), we will recommend using uniform drives, but it will not be required. If you choose to add a lower performance HDD to an existing SSD in order to increase storage capacity, the reads and writes to the HDD will obviously be slower, but otherwise there will not be any issues.
50-
51-
The reason we will recommend uniform drives is because we will be adding the ability to create redundancy (drive mirroring, as an advanced feature), if you are interested. This will only be necessary if uptime is very important to you, such as when running a Lightning routing node, or serving a popular .onion site. Most users will find that a single drive, adding drives as space is needed, will suit their needs just fine.
47+
At this time, we recommend against this as the Raspberry Pi cannot deliver enough power. We will be revisiting in future, but a powered usb hub would be a minimum requirement for this setup.
5248

5349
Can I use an internal SSD with a USB 3 enclosure? I've heard these may have issues?
5450
------------------------------------------------------------------------------------
5551
Yes, you may, and our original upgrade kits come with this style of drive. We have addressed the known issues in software, and in the rare event of hardware failure, we are here to help.
5652

5753
Does my external drive need its own power supply?
5854
-------------------------------------------------
59-
We are recommending the use of a powered USB hub to connect drives with (and power the Pi if it has USB-C). However, you may use powered disk drives if you prefer.
55+
You may use powered disk drives if you prefer, but if only connecting one SSD, it is not necessary.
6056

6157
Can I re-use the SD Card from my Embassy for the new version?
6258
-------------------------------------------------------------

source/support/FAQ/dev-faq.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,15 @@ What considerations go into selecting an application to package?
1717
With sufficient effort, most any software with the ability to be self-hosted could make its way onto EmbassyOS. That being said, the following features will make service packaging much easier:
1818

1919
- Already built with self-hosting in mind
20-
- Active development
21-
- Built-in tor support
20+
- Active development / community
21+
- Native proxy/tor support
2222
- Already 'dockerized'
2323

2424
Which possible formats can I use to write the :code:`manifest`, :code:`config_spec`, and :code:`config_rules` files?
25-
---------------------------------------------------------------------------------------------------------------------
25+
--------------------------------------------------------------------------------------------------------------------
2626
JSON, TOML, or YAML are valid options.
2727

2828
I'm getting errors on the `embassy-sdk pack` step. What's going on?
2929
--------------------------------------------------------------------
3030
There is something either missing or incorrect in regard to one of the :code:`manifest`, :code:`configs`, :code:`instructions`, or :code:`icon` files.
3131

32-

source/support/FAQ/setup-faq.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,8 @@ This has been fixed in newer updates. Please first make sure to update to the l
5858

5959
Is it true that iOS has some limited functionality in regard to the Embassy?
6060
----------------------------------------------------------------------------
61-
The short answer is yes, but not much. Unfortunately, Apple does not allow any ability for Tor to run in the background (everything on the Embassy runs over Tor). Most of your Embassy services can be run with Tor-native apps, inside Consulate, or with another Tor browser, with the exception of RTL, Spark, and Matrix. Zap and Zeus wallets can be used in place of RTL/Spark, and we hope a Tor-native Element client will be available soon to allow for the use of Matrix.
61+
The short answer is yes, but not much. Unfortunately, Apple does not allow any ability for Tor to run in the background (everything on the Embassy runs over Tor). Most of your Embassy services can be run with Tor-native apps, inside Consulate, or with another Tor browser, with the exception of RTL, Spark, and Matrix. Zap and Zeus wallets can be used in place of RTL/Spark, and we hope a Tor-native Element client will be available soon to allow for the use of Matrix.
62+
63+
I'm having trouble using Firefox for Tor addresses on Lineage, what can I do?
64+
-----------------------------------------------------------------------------
65+
Unfortunately, there seems to be a bug in Lineage that makes using Firefox over Tor currently unusable. Currently, this feature works fine on Calyx and Graphene.

0 commit comments

Comments
 (0)