Skip to content

Conversation

@fboucquez
Copy link
Owner

@fboucquez fboucquez commented Mar 2, 2021

The first version of offline mode. This feature is targeted for exchanges and supernodes owners that don't want to enter any private key in an online machine. The node configuration will be created offline.

This PR requires the voting key native implementation to be merged #177

Changes:

  • Certificate generation uses a locally installed openssl command (offline). If openssl is not available or fails, it falls back to use docker images (online).
  • Added Offline/Online descriptions to each command.
  • Added PKG zip distributions of bootstra+nodejs so it's easier to send bootstrap to an offline machine in a pendrive.
  • Added --offline to config so it doesn't fallback to docker images, or fails when docker images are required (nemgen tool)

Future Bootstrap offline guide (@segfaultxavi ):

  1. Download zip distribution from s3

(ATM, only Linux, and Mac will work until we fix issue #1 )

  1. Copy zip into Pendrive
  2. Copy and unzip bootstrap into the offline machine. Probably add symbol-bootstrap bin into the PATH.
  3. Create and encrypt the Bootstrap custom preset specifying the keys to be used in the configuration. This will be improved with the wizard allowing the import of a paper wallet offline or the direct to encrypted form prompt of private/public keys. Wizard command #103
  4. Run bootstrap config --offline (and compose if the online node can use docker compose) in the offline machine
  5. Zip target folder with or without the addreses.yml and presets files. If you don't have those files, it's not possible to run bootstrap commands on the online machine, like --upgrade. Note that bootstrap will only request private keys when necessary, so main account should be only asked on the offline config command (if the target folder hasn't been reset)
  6. Copy target zip to a Pendrive then to the online node machine (like AWS or a cloud provider).
  7. Run the node with a) symbol-bootstrap start/run b) docker-compose up (if addresses and preset files are excluded) or c) barebone from the compiled source without using docker (for exchanges and supernodes that cannot use docker at all)

The user most likely want to use a custom preset (step 3) like described in https://github.com/nemtech/symbol-bootstrap/blob/dev/docs/presetGuides.md#never-stored-main-private-key

Note that the node admin doesn't need to compile and copy catapult C++ tools for the offline configuration. So if the node admin wants, he/she can run offline config (without docker) and online docker-compose up without even downloading catapult source code.

We will be able to remove the OpenSSL command and Linux/Mac OS requirement for the config --offline mode after implementing #1.

Fixes #170
Related to forge agent certificate #173
Related to wizard #103

@fboucquez fboucquez requested a review from Wayonb March 2, 2021 20:14
@fboucquez fboucquez changed the title Local OpenSSL certificate geneartion Bootstrap Offline Mar 3, 2021
@fboucquez fboucquez requested a review from segfaultxavi March 3, 2021 09:41
@fboucquez
Copy link
Owner Author

@Wayonb , do you have a mac right? Could you unzip and run the mac distro?

https://symbol-bootstrap.s3-eu-west-1.amazonaws.com/dist/v0.4.5/symbol-bootstrap-v0.4.5-darwin-x64.tar.gz

Is bootstrap creating the certificate using your local openssl (no warnings on config)?

@fboucquez fboucquez changed the title Bootstrap Offline Bootstrap Offline (Post-Launch) Mar 4, 2021
@fboucquez fboucquez force-pushed the dev branch 11 times, most recently from 9627f1a to 347034c Compare January 14, 2022 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants