blocknetdx / exrproxy-env

erp-ethserver
7 stars 10 forks source link

Incomplete requirements.txt for builder.py, and more #146

Closed walkjivefly closed 2 years ago

walkjivefly commented 2 years ago

Using branch dev-autobuilder-pom

blockops@ops1:~/src/exrproxy-env$ pip3 install -r requirements.txt
Requirement already satisfied: jinja2 in /home/blockops/.local/lib/python3.8/site-packages (from -r requirements.txt (line 1)) (3.0.2)
...
blockops@ops1:~/src/exrproxy-env$ ./builder.py --help
Traceback (most recent call last):
  File "./builder.py", line 2, in <module>
    from autobuild.utils import *
  File "/home/blockops/src/exrproxy-env/autobuild/utils/__init__.py", line 4, in <module>
    from PyInquirer import style_from_dict, Token, prompt, Separator
ModuleNotFoundError: No module named 'PyInquirer'

After installing it, builder.py next failed with

blockops@ops1:~/src/exrproxy-env$ ./builder.py

- EXRPROXY-ENV - BUILDER

Loading File: autobuild/sources.yaml
? Press enter for 35USD tier1 amount or type a new price:  
? Press enter for 200USD tier2 amount or type a new price:  
? Press enter for 20% aBlock discount or type a new discount:  
? Press enter for 20% aaBlock discount or type a new discount:  
? What chains do you wish to support?  [SYS]
? What EVM chains do you wish to support?  [AVAX]
? Press enter to use AVAX internally or type external IP Address:  
? Do you wish to configure HYDRA?  Yes
? Select EVM chains to attach HYDRA to:  [AVAX]
? Do you wish to configure XQUERY?  Yes
? Select EVM chains to attach XQUERY to:  [AVAX]
? Select which indices you want for AVAX:  [PANGOLIN]
? Press enter to save config as 14-02-2022-15:36 or enter name:  
Traceback (most recent call last):
  File "./builder.py", line 104, in <module>
    print(write_yaml_file(f'inputs_yaml/{now}.yaml',input_template))
  File "/home/blockops/src/exrproxy-env/autobuild/utils/autoconfig.py", line 19, in write_yaml_file
    with open(filename, 'w') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'inputs_yaml/14-02-2022-15:36.yaml'
walkjivefly commented 2 years ago

builder.py has execute permission set, so that's good. But still got the same "File not found" error at the end of the interview stage:

blockops@ops1:~/src$ cd exrpom
blockops@ops1:~/src/exrpom$ git checkout dev-autobuilder-pom
Branch 'dev-autobuilder-pom' set up to track remote branch 'dev-autobuilder-pom' from 'origin'.
Switched to a new branch 'dev-autobuilder-pom'
blockops@ops1:~/src/exrpom$ ls
autobuild  auto_test  builder.py  deploy.sh  installdocker.sh  plugins  README.md  requirements.txt  scripts  xquery
blockops@ops1:~/src/exrpom$ ./builder.py

- EXRPROXY-ENV - BUILDER

Loading File: autobuild/sources.yaml
? Press enter for 35USD tier1 amount or type a new price:  
? Press enter for 200USD tier2 amount or type a new price:  
? Press enter for 20% aBlock discount or type a new discount:  
? Press enter for 20% aaBlock discount or type a new discount:  
? What chains do you wish to support?  [MUE]
? What EVM chains do you wish to support?  [AVAX]
? Press enter to use AVAX internally or type external IP Address:  
? Do you wish to configure HYDRA?  Yes
? Select EVM chains to attach HYDRA to:  [AVAX]
? Do you wish to configure XQUERY?  Yes
? Select EVM chains to attach XQUERY to:  [AVAX]
? Select which indices you want for AVAX:  [PANGOLIN]
? Press enter to save config as 14-02-2022-17:29 or enter name:  
Traceback (most recent call last):
  File "./builder.py", line 104, in <module>
    print(write_yaml_file(f'inputs_yaml/{now}.yaml',input_template))
  File "/home/blockops/src/exrpom/autobuild/utils/autoconfig.py", line 19, in write_yaml_file
    with open(filename, 'w') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'inputs_yaml/14-02-2022-17:29.yaml'

Also, since beautifying is one of the immediate objectives, the prompt texts don't wrap to the window width, eg: image

walkjivefly commented 2 years ago

The "File not found" is fixed by

blockops@ops1:~/src/exrpom$ find . -name inputs_yaml -print
blockops@ops1:~/src/exrpom$ mkdir inputs_yaml
blockops@ops1:~/src/exrpom$ ./builder.py

- EXRPROXY-ENV - BUILDER

Loading File: autobuild/sources.yaml
? Press enter for 35USD tier1 amount or type a new price:  
? Press enter for 200USD tier2 amount or type a new price:  
? Press enter for 20% aBlock discount or type a new discount:  
? Press enter for 20% aaBlock discount or type a new discount:  
? What chains do you wish to support?  done (2 selections)
? What EVM chains do you wish to support?  [AVAX]
? Press enter to use AVAX internally or type external IP Address:  
? Do you wish to configure HYDRA?  Yes
? Select EVM chains to attach HYDRA to:  [AVAX]
? Do you wish to configure XQUERY?  Yes
? Select EVM chains to attach XQUERY to:  [AVAX]
? Select which indices you want for AVAX:  [PANGOLIN]
? Press enter to save config as 14-02-2022-17:40 or enter name:  
Wrote inputs_yaml/14-02-2022-17:40.yaml
Processing custom input...
fetch template for SYS from raw.git
fetch template for MUE from raw.git
Using internal avax
HYDRA exists
HYDRA - AVAX
XQUERY exists
Wrote xquery.yaml
Creating File: ./docker-compose.yml
Creating File: ./scripts/entrypoints/start-syscoin.sh
Creating File: ./scripts/entrypoints/start-monetaryunit.sh
Add Xbridge: SYS
Add Xbridge: MUE