From ae8d45d4bb3e532a14b4b122a6f7524b603f87e1 Mon Sep 17 00:00:00 2001 From: ArseniiPetrovich Date: Thu, 28 Mar 2019 12:32:15 +0300 Subject: [PATCH] Updated variables distribution --- README.md | 9 ++++----- group_vars/all.yml.example | 10 +++++++++- group_vars/infrastructure.yml.example | 8 -------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index dc81219..85faaab 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,10 @@ The single point of configuration in this script is a `group_vars/all.yml` file. - `backend` variable defines whether deployer should keep state files remote or locally. Set `backend` variable to `true` if you want to save state file to the remote S3 bucket; - `upload_config_to_s3` - set to `true` if you want to upload config`all.yml` file to the S3 bucket automatically during deployment. Will not work if `backend` is set to false; - `bucket` represents a globally unique name of the bucket where your configs and state will be stored. It will be created automatically during the deployment; +- `prefix` - is a unique tag to use for provisioned resources (5 alphanumeric chars or less); +- `chains` - maps chains to the URLs of HTTP RPC endpoints, an ordinary blockchain node can be used; + +*Note*: a chain name shouldn't be more than 5 characters. Otherwise, it causing the error, because the aws load balancer name should not be greater than 32 characters. ## Infrastructure related variables @@ -80,7 +84,6 @@ The single point of configuration in this script is a `group_vars/all.yml` file. `db_subnet_cidr`: "10.0.1.0/16" Real networks: 10.0.1.0/24 and 10.0.2.0/24 - An internal DNS zone with`dns_zone_name` name will be created to take care of BlockScout internal communications; -- `prefix` - is a unique tag to use for provisioned resources (5 alphanumeric chars or less); - The name of a IAM key pair to use for EC2 instances, if you provide a name which already exists it will be used, otherwise it will be generated for you; @@ -92,10 +95,6 @@ The single point of configuration in this script is a `group_vars/all.yml` file. - `secret_key_base` is a random password used for BlockScout internally. It is highly recommended to gernerate your own `secret_key_base` before the deployment. For instance, you can do it via `openssl rand -base64 64 | tr -d '\n'` command; - `new_relic_app_name` and `new_relic_license_key` should usually stay empty unless you want and know how to configure New Relic integration; - `elixir_version` - is an Elixir version used in BlockScout release; -- `chains` - maps chains to the URLs of HTTP RPC endpoints, an ordinary blockchain node can be used; - -*Note*: a chain name shouldn't be more than 5 characters. Otherwise, it causing the error, because the aws load balancer name should not be greater than 32 characters. - - `chain_trace_endpoint` - maps chains to the URLs of HTTP RPC endpoints, which represents a node where state pruning is disabled (archive node) and tracing is enabled. If you don't have a trace endpoint, you can simply copy values from `chains` variable; - `chain_ws_endpoint` - maps chains to the URLs of HTTP RPCs that supports websockets. This is required to get the real-time updates. Can be the same as `chains` if websocket is enabled there (but make sure to use`ws(s)` instead of `htpp(s)` protocol); - `chain_jsonrpc_variant` - a client used to connect to the network. Can be `parity`, `geth`, etc; diff --git a/group_vars/all.yml.example b/group_vars/all.yml.example index 4f91a48..cbf44e7 100644 --- a/group_vars/all.yml.example +++ b/group_vars/all.yml.example @@ -11,4 +11,12 @@ upload_config_to_s3: true ## The bucket and dynamodb_table variables will be used only when backend variable is set to true ## Name of the bucket where TF state files will be stored -bucket: "poa-terraform-state" \ No newline at end of file +bucket: "poa-terraform-state" + +## All resources will be prefixed with this one +prefix: "sokol" + +## This variable represents network RPC endpoint: +chains: + core: "http://10.10.10.10:8545" + sokol: "https://192.168.0.1:8545" diff --git a/group_vars/infrastructure.yml.example b/group_vars/infrastructure.yml.example index dab7828..265c63e 100644 --- a/group_vars/infrastructure.yml.example +++ b/group_vars/infrastructure.yml.example @@ -21,9 +21,6 @@ db_subnet_cidr: "10.0.1.0/16" ## Internal DNS zone will looks like: dns_zone_name: "poa.internal" -## All resources will be prefixed with this one -prefix: "sokol" - ## The following settngs are related to SSL of Application Load Balancer that will be deployed to AWS. If use_ssl is set to false, alb_* variables can be omitted use_ssl: "false" alb_ssl_policy: "ELBSecurityPolicy-2016-08" @@ -47,11 +44,6 @@ new_relic_license_key: "" # Network related variables -## This variable represents network RPC endpoint: -chains: - core: "http://10.10.10.10:8545" - sokol: "https://192.168.0.1:8545" - ## This variable represents network RPC endpoint in trace mode. Can be the same as the previous variable: chain_trace_endpoint: core: "http://10.10.10.11:8545"