-
Notifications
You must be signed in to change notification settings - Fork 45
Skybian User Guide
At the current time, it is recommended to install an armbian image which is sutiable for your board, and then install skywire instead of using a skybian image
The Skybian version 1.0.0 image for the official Skyminer makes use of the Skywire package and has configured in it's software sources the Skycoin APT repo which provides updated packages as they are released;
Skycoin APT repo: http://deb.skywire.skycoin.com
Automatic updates to the system packages excluding Skywire are preconfigured in the Skybian image using unattended-upgrades.
The Skybian & Skyraspbian images no longer use the Skyimager.
The Skywire config generation and any static IP configuration happens automatically on the first boot of the image; Skywire is then started with hypervisor running locally or with remote hypervisor. Thus, a single image can now be used for every board in the official Skyminer with the procedure outlined in this guide.
A variant of the Skybian image for the orange pi prime with autopeering is provided. All other images do not have the autopeering.
The non-autopeering images will start as a hypervisor using dhcp instead of a static IP address.
The steps of the guides outlined below will always reflect the current version of the images. The steps are anticipated to change in subtle ways as the images are improved with new functionality - such as the ability for visors to dynamically re-peer to a hypervisor running at the designated static IP address, or to re-peer to a new hypervisor if the hypervisor image is re-flashed.
Please revisit this guide in the future and always follow the procedure as currently outlined.
Note that updates to the images (specifically the skybian package) may introduce new functionality which will be reflected in the documentation here.
For faster flashing and better performance, the maintainer suggests upgrading the microSD cards used in the Skyminer to these minimum specifications
If flashing the image to the microSD takes more than 1 minute per card for you, consider upgrading your hardware
A usb3.0 (or sata) microSD card reader / writer is required
A flaw or oversight in the design of the power bus bar / switch boards of the official miner can subject a board which is booted and running to enough voltage drop that it becomes unresponsive over the network at the moment an adjacent board on the same switch bar is turned on - without actually shutting down and with little visible indication otherwise that this has happened.
The original skybian images comprised a set of preconfigured images that the user would generate from a base image. With the second iteration of skybian image autopeering system, the first boot was a critical juncture for achieving a correct configuration; by consequence the first implementation of the auto-peering system was more sensitive to the existing hardware defect.
With the revision to the skybian autopeering system introduced in v1.1.0, visors should connect and then reconnect to a hypervisor running at a designated static ip address automatically or on restart of the process / board.
Some steps you can take to mitigate this issue
- (As a cautionary note: Always Be Observant Of The Correct Polarity and be careful of electrostatic discharge when directly handling the pi boards)
- Check the voltage coming from the power supply with a volt meter.
- Making sure any connected boards are switched off first carefully adjust the voltage to between 5.25 and 5.3 volts
- MAKING SURE THE SUPPLY IS NOW UNPLUGGED Disconnect and reconnect the wires to the power supply output, to ensure the best connection with the least voltage drop.
- Similarly, disconnect and reconnect the power connection for the router.
- Do not accidentally reverse the polarity of the wires Red is Positive (+) Black is Negative (-)
- Clean any connections which are visibly dirty or corroded. A smooth shiny surface will allow for the lowest resistance connection.
- Make sure the screws are very secure on the connections, but do not over tighten.
- Disconnect and reconnect all the wires that hook to the switch bars. Be careful not to damage any of the connectors. Ensure a tight and secure connection.
- Unplug the cannon plugs from the PIs and plug them back in. Be sure the connector is snug. Rotate it back and forth gently to polish the internal elements of the connectors against each other.
As an alternative, a separate power supply can be dedicated to the hypervisor; meaning that it will no longer be affected by the voltage drop of adjacent boards being switched on.
The currently recommended strategy is to make sure that you are only booting additional visors (freshly flashed cards) for the first time on the bus / switch board opposite the one the designated hypervisor is connected to.
Designate an easily accessible board as the hypervisor. In the event that the hypervisor user interface goes down or the board loses it's static IP configuration, you can access the system directly via keyboard and HDMI monitor.
The first image will attempt to assign itself the .2 IP address on the current subnet (i.e. 192.168.0.2).
Make sure that the .2 IP address on the LAN provided by the skyminer router is not occupied.
This IP is not usually occupied by default.
A separate power supply for the hypervisor is recommended
Due to voltage drop which occurs when adjacent boards are booted sequentially
running boards can be knocked offline when a board next to it is turned on.
The board will set itself with a static ip address which is in conflict with your existing hypervisor.
If this happens for you, there is no faster or more efficient way of dealing with it than reflashing the card, restarting the hypervisor, and booting the card again in a different pi. If it happens consistently, consider using the non autopeering image and manually setting the hypervisor key.
With the revisions to the autopeering system, it now becomes possible for visors to re-peer to a new hypervisor (public key) if the existing hypervisor is replaced or reflashed. This should happen automatically when the new hypervisor comes online at the pre-determined static IP address.
In practice, it is still necessary to turn the visors on and off, or otherwise restart the skywire.service for the visors to peer to a new hypervisor running on the same static ip address
-
1)
Download the Skybian image archive-
Windows and Mac users should download the .zip archive
-
Linux users can download the .tar.xz or .tar.zst
-
-
2)
Extract the image archive using your preferred utility- Windows users can extract the .zip archive with 7zip
the .tar archives are not extracted correctly on windows by any tool
- Linux, use:
tar -xf /path/to/archive.tar.xz
-
3)
Flash the image to a microSD card- Windows and MacOS users are advised to use Balena Etcher
if etcher indicates the image is corrupt, please reach out to us on telegram or file an issue
Failure to write or i/o errors indicate the drive writing the image has errors. These errors are common on internal microSD card slots for desktops and laptops. Try using a microSD to usb adapter (usb3.0)- Linux users may use the dd command
-
4)
Power off every board in the Skyminer with the individual switches -
5)
Insert the card into the (next) board and power on that board.The first board should be the one you have designated as hypervisor
- The designated hypervisor should not be connected to the same power distribution board as a card which is booting for the first time
- The designated hypervisor can alternatively use a separate power supply (5VDC, 3 amps) if one is available.
-
6)
Wait two minutes after the hypervisor interface appears- Check for the hypervisor interface at the IP address of the Skyminer router on port :8000 (assumes port forwarding was set up).
Don't log in yet! Any password set right now will be lost.
The hypervisor may restart after it starts initially. This is because the package is being updated.
Wait a few minutes, and if the hypervisor interface or the board itself does not restart, reboot the board.
Again, the interface will start initially and then restart. After you observe this, log in.
The hypervisor password must be re-set after every package update currently. - Check for the hypervisor interface at the IP address of the Skyminer router on port :8000 (assumes port forwarding was set up).
-
7)
Copy the public key of the designated hypervisor to a text file or otherwise save it externally -
8)
Repeat step 3 and 5 with another microSD card and board -
9)
Wait until the visor appears in the hypervisor user interface.look for that visor to appear and then go offline, before coming back online again, similarly to the hypervisor
if you do not observe this behavior, reboot the board -
10)
If all the visors suddenly seem to go offline when you boot another cardDon't worry!
Turn off that board and the designated hypervisor
Then turn on the designated hypervisor again everything should be back to how it was
reflash the card and boot it in a different board. -
11)
Repeat steps 8 and 9 for every node in the skyminer
After you have your cluster set up, turn the power off and on for the whole miner
Access the hypervisor once more to be sure that all the visors appear as expected
Don't forget to whitelist your public keys!
If you prefer instead to use a different computer as the hypervisor of your cluster and have the nodes peer to the hypervisor on that machine (assumes familiarity with Linux and a Linux machine):
- Connect that machine to the skyminer router and assign it the .2 IP address.
- Install and start skywire
- run
skywire-cli hv pk -w
S - start visors one at a time which have the new Skybian image freshly flashed on their cards (not previously booted) and wait for them to appear in the hypervior
- once you have all the nodes peered to your hypervisor, stop the srvpk service and connect your computer back to its original router.
The hypervisor can be changed at any time; refer to the Skywire Package Installation guide or the steps below in the skyraspbian setup guide.
If the hypervisor interface goes down or becomes unresponsive, first reboot (power cycle) that board
If the user interface still does not start, first make sure you are using the correct IP address.
Attempt to reach the hypervisor board via ssh (i.e. ssh [email protected]
) or the skyminer router's LAN IP address on the subnet it is connected to - requires that you have set up port forwarding and are using a machine connected to the same subnet or that you are connected directly to the Skyminer's router.
Once you have reached the hypervisor board via ssh:
- check the status of the skywire service
systemctl status skywire
- running
skywire-autoconfig
should bring it back online.
If you are still unable to reach the board via SSH, it's recommended to access that board directly via HDMI monitor and keyboard
If you were forced to use the direct connection, somehow the static IP configuration was lost; it can be regenerated with the following steps:
- first, make sure you have really accessed the hypervisor by running:
skywire-cli visor hvpk
the output for hypervisor should be []
any remote hypervisors which are configured are shown from that command
- Check the ip address of the board with
ip a
orifconfig
If the ip address is in the dhcp range (ex. 192.168.0.100) then the board has lost it's static ip setting - attempt once more to reach the expected hypervisor via ssh from that board
- if no connection is made, it's safe to re-generate the static IP configuration with:
skymanager
skymanager
The first invocation of the command removes any previously generated static IP configuration. The second invocation will produce visible output, and re-generate the static ip config
- username:
root
- password:
skybian
- username:
pi
- password:
raspberry
The procedure for using the Skyraspbian image is very similar to the Skybian image. The notable difference is that a static IP is not set for the hypervisor.
Every board will start a hypervisor instance, which may be manually configured to point at a remote / one hypervisor if desired.
-
1)
Download the Skyraspbian image archive-
Windows users should download the .zip archive
-
Linux users can download the .tar.xz or .tar.zst
-
-
2)
Extract the image archive using your preferred utility- Windows users can extract the .zip archive with 7zip
the .tar archives are not extracted correctly on windows by any tool
- Linux, use:
tar -xf /path/to/archive.tar.xz
-
3)
Flash the image to a microSD card- Windows and MacOS users are advised to use Balena Etcher
if etcher indicates the image is corrupt, please reach out to us on telegram or file an issue
- Linux users may use the dd command
-
4)
Insert the card into the (next) board and power on that board.The first board should be the one you have designated as hypervisor
-
5)
Wait two minutes after the hypervisor interface appears- Check for the hypervisor interface at the DHCP IP address assigned by the router to the board.
Don't log in yet! Any password set right now will be lost.
The hypervisor may restart after it starts initially. This is because the package is being updated.
Wait a few minutes, and if the hypervisor interface or the board itself does not restart, reboot the board.
Again, the interface will start initially and then restart. After you observe this, log in.
The hypervisor password must be re-set after every package update currently. - Check for the hypervisor interface at the DHCP IP address assigned by the router to the board.
-
6)
repeat steps 3-5 with the next board.
This procedure is detailed in the Skywire Package Installation article.
-
1)
Access the hypervisor UI that you want the other boards to use as their hypervisor and copy the public key -
2)
Access the next board (via ssh) and runskywire-autoconfig <pk>
replacing<pk>
with the public key you copied from the hypervisor -
3)
Check the designated hypervisor to see that the additional visor appears in the list -
4)
Repeat the previous two steps for each additional board
After you have your cluster set up, turn the power off and on for the whole miner
Access the hypervisor once more to be sure that all the visors appear as expected
Don't forget to whitelist your public keys!
See the Skywire Package Installation article for further details about updating and troubleshooting.
please contact support via telegram @skywire
for rewards and technical support