golemfactory / concent-deployment

Scripts and configuration for Concent deployment
5 stars 8 forks source link

Concent VM: a single configuration file #278

Open cameel opened 5 years ago

cameel commented 5 years ago

Currently setting up the virtual machine requires creating two configuration files (extra_settings.py and signing-service-env.sh) and a shell variable (CONCENT_DEPLOYMENT_VERSION). There will be more as we make the machine more versatile (e.g. app_cfg.ini) for Golem. The goal of this task is replace it all with a single configuration file.

1) The configuration file should be called config.yml.

Example of configuration file and generated configuration

config.yml

concent_deployment_version: dev

concent_local_settings:
  USE_SIGNING_SERVICE:          true
  ADDITIONAL_VERIFICATION_COST: 1
  MIDDLEMAN_ADDRESS:            middleman.default.svc.cluster.local
  MIDDLEMAN_PORT:               9054

signing_service_env:
  ETHEREUM_PRIVATE_KEY:        "ZjIwODU2ZmFhN2YxOTQzN2E0MGIwODAxYjdlNDc1Y2U0ZWZhNTkzMmVkYmFhYmMyMjFiODQ5N2VlMGM1YzRiNSAgLQo="
  SIGNING_SERVICE_PRIVATE_KEY: "OTYyNmMxYzJhZmJlYzVjMmM5NGNlYmRjMzE4N2M5MjcgIC0K"

extra_settings.py

The generated file should contain only the following:

USE_SIGNING_SERVICE = True
ADDITIONAL_VERIFICATION_COST = 1
MIDDLEMAN_ADDRESS = 'middleman.default.svc.cluster.local'
MIDDLEMAN_PORT = 9054

signing_service-env.sh

The generated file should contain only the following:

export ETHEREUM_PRIVATE_KEY="ZjIwODU2ZmFhN2YxOTQzN2E0MGIwODAxYjdlNDc1Y2U0ZWZhNTkzMmVkYmFhYmMyMjFiODQ5N2VlMGM1YzRiNSAgLQo="
export SIGNING_SERVICE_PRIVATE_KEY="OTYyNmMxYzJhZmJlYzVjMmM5NGNlYmRjMzE4N2M5MjcgIC0K"
PaweuB commented 5 years ago

Pivotal: https://www.pivotaltracker.com/story/show/162576688