golemfactory / golem-js

TypeScript + NodeJS API for Golem
https://docs.golem.network/docs/creators/javascript
GNU Lesser General Public License v3.0
30 stars 18 forks source link

Golem instalation tool #511

Open Braunmann opened 1 year ago

Braunmann commented 1 year ago

Simplified Installation of Yagna and GFTP Libraries Using a Boilerplate Installer

The purpose of this task is to create a simplified installer for the Yagna and GFTP libraries. This task requires developing an installer that simplifies the installation process for end users.

The installer should have the following features:

  1. Simple Installation Process: The installation of the libraries should be as simple as typing the command npm i @golem-sdk/yagna -g into the terminal.

  2. Support for Different Operating Systems: The installer should support MacOS, Windows, and UNX operating systems, allowing users on different platforms to easily install the libraries.

  3. Yagna Version Selection During Installation: Users should be able to select a specific version of the libraries to install.

  4. Yagna Version Management: The installer should allow users to change the version of the already installed libraries, which includes downgrade and upgrade operations.

  5. Wallet Key Support: The installer should allow for the input of the user's current keys.

  6. Key Generation and Configuration: In the absence of a key, the installer should be able to generate a new key and set it in the system parameters.

  7. Adding and Managing Keys: Users should be able to add more keys and specify whether the key is for a production or testing environment.

It is important that the installer is as user-friendly and intuitive as possible, allowing even less technically advanced users to easily manage the Yagna and GFTP libraries. All functionalities should be thoroughly tested for correctness and compatibility with different operating systems.

Consideration a golem-cli tool

Additionally, consider building a CLI installer npm i -g golem-cli, and extend it with more functions such as generating a new predefined boilerplate project, e.g., Vue + Express. Then, key and version management, etc., can be maintained through the CLI. For example:

This would give us the possibility to develop one tool instead of multiplying different tools.

Braunmann commented 1 year ago

Upon further discussion, it has been determined that the application should be as simple as possible, facilitating the quick start process. The application should perform the following actions:

  1. For the first run:

    • [ ] Install the appropriate Yagna and GFTP binaries in the system.
    • [ ] Generate a key.
    • [ ] Export the key.
    • [ ] Request funds on the testnet.
    • [ ] Start Yagna and GFTP services running in the system.
  2. For next runs:

    • [ ] Check if the Yagna version is the latest; if not, display a message.
    • [ ] Start Yagna and GFTP services running in the system.

Useful libs: https://www.npmjs.com/package/inquirer