Skip to content

Skybian User Guide

Moses Narrow edited this page Jul 14, 2022 · 31 revisions

Skybian User Guide


Introduction

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 static IP configuration and Skywire config generation happen 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.

The Skyraspbian image does not have the same auto-peering or auto-update functionality as the Skybian image currently.
The skyraspbian image will start as a hypervisor using dhcp instead of a static IP address.


Skyminer setup - Skybian

Supported Boards:

  • Orange Pi Prime & 3

Skybian login:

  • username: root
  • password: skybian

Prerequisite

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.

Recommendation

Hardware

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

Hypervisor

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.

Procedure

  • 1) Download the Skybian 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

    .tar.zst extracts much faster

  • 3) Flash the image to a microSD card

    if etcher indicates the image is corrupt, please reach out to us on telegram or file an issue

  • 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

  • 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.

  • 7) Repeat step 3 and 5 with another microSD card and board

  • 8) 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

  • 9) Repeat steps 7 and 8 for every node in the skyminer

Finishing up

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!

Using Desktop as Hypervisor

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
  • Download and start this systemd service to provide the http endpoint for the public key
  • 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.

Troubleshooting

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 root@192.168.0.2) 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 or ifconfig 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
ssh root@192.168.0.2
  • 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


Skyminer setup - Skyraspbian

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.

Supported Boards:

  • Raspberry Pi 1, 2, 3 and 4

Raspbian login:

  • username: pi
  • password: raspberry

Procedure

  • 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

    .tar.zst extracts much faster

  • 3) Flash the image to a microSD card

    if etcher indicates the image is corrupt, please reach out to us on telegram or file an issue

  • 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.

  • 6) repeat steps 3-5 with the next board.

Set Remote Hypervisor

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 run skywire-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

Finishing up

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!


Updates & Troubleshooting

See the Skywire Package Installation article for further details about updating and troubleshooting.

Clone this wiki locally