{"id":25703465,"url":"https://github.com/dashpay/dash-network-deploy","last_synced_at":"2025-02-25T05:29:48.442Z","repository":{"id":37103225,"uuid":"114283813","full_name":"dashpay/dash-network-deploy","owner":"dashpay","description":"Tools for Dash networks deployment and testing","archived":false,"fork":false,"pushed_at":"2024-04-11T12:37:58.000Z","size":2064,"stargazers_count":20,"open_issues_count":9,"forks_count":21,"subscribers_count":19,"default_branch":"v1.0-dev","last_synced_at":"2024-04-14T20:00:49.796Z","etag":null,"topics":["platform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dashpay.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-12-14T18:34:07.000Z","updated_at":"2024-04-23T17:46:43.117Z","dependencies_parsed_at":"2023-09-23T13:54:12.202Z","dependency_job_id":"a3cc490e-009e-4aa7-82d3-9c2e277360bc","html_url":"https://github.com/dashpay/dash-network-deploy","commit_stats":null,"previous_names":[],"tags_count":68,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpay%2Fdash-network-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpay%2Fdash-network-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpay%2Fdash-network-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpay%2Fdash-network-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dashpay","download_url":"https://codeload.github.com/dashpay/dash-network-deploy/tar.gz/refs/heads/v1.0-dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240610886,"owners_count":19828886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["platform"],"created_at":"2025-02-25T05:29:47.585Z","updated_at":"2025-02-25T05:29:48.408Z","avatar_url":"https://github.com/dashpay.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dash Network Deployment Tool\n\n[![Latest Release](https://img.shields.io/github/v/release/dashevo/dash-network-deploy)](https://github.com/dashevo/dash-network-deploy/releases/latest)\n[![Build Status](https://github.com/dashevo/dash-network-deploy/actions/workflows/release.yml/badge.svg)](https://github.com/dashevo/dash-network-deploy/actions/workflows/release.yml)\n[![Release Date](https://img.shields.io/github/release-date/dashevo/dash-network-deploy)](https://img.shields.io/github/release-date/dashevo/dash-network-deploy)\n[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen)](https://github.com/RichardLitt/standard-readme)\n\n## Introduction\n\nThis tool assists in deploying and managing Dash networks.\n\nThere are two regular available networks: `testnet` and `mainnet`.\nAfter deployment your DashCore instances will join those networks.\n\n`regtest` and `devnet-*` networks are for testing purposes.\nDevnets are like regular Dash networks (`mainnet` and `testnet`)\nbut easier to bootstrap and with unique names. This supports maintaining multiple in parallel.\n\nThis is work in progress and in its initial state only meant to be used by\nDash Core developers to assist in Dash Platform development.\n\n## Installation\n\n1. [Install Docker](https://docs.docker.com/install/)\n2. Download tool:\n\n    Using `wget`:\n\n    ```bash\n    wget -P /usr/local/bin https://raw.github.com/dashpay/dash-network-deploy/master/bin/dash-network \u0026\u0026 \\\n    chmod +x /usr/local/bin/dash-network\n    ```\n\n    Using `curl`:\n\n    ```bash\n    curl -fsSL -o /usr/local/bin/dash-network https://raw.github.com/dashpay/dash-network-deploy/master/bin/dash-network \u0026\u0026 \\\n    chmod +x /usr/local/bin/dash-network\n    ```\n\n\n## Configuration\n\n### Networks definition\n\nYou can use the `generate` command to generate configs for your network:\n\n```bash\ndash-network generate \u003cnetwork_name\u003e \u003cmasternodes_amd_count\u003e \u003cmasternodes_arm_count\u003e \u003chp_masternodes_amd_count\u003e \u003chp_masternodes_arm_count\u003e\n``` \n\nTerraform configuration is defined in the `*.tfvars` files.\nSee [variables.tf](https://github.com/dashpay/dash-network-deploy/blob/master/terraform/aws/variables.tf) for all available options.\n\nAnsible configuration is stored in the `*.yml` file. The \n[group_vars/all](https://github.com/dashpay/dash-network-deploy/blob/master/ansible/group_vars/all)\nfile contains the majority of playbook options.\nThe rest are defined in [ansible roles](https://github.com/dashpay/dash-network-deploy/tree/master/ansible/roles).\n\nConfigure your credentials in the `.env` file.\n\n### Using git\n\nPlease don't forget to include the following in your `.gitignore`:\n```\n.env\n*.inventory\n*.ovpn\n```\n\n## Deployment\n\nTo deploy a Dash Network, use the `deploy` command with a particular network name:\n\n```bash\ndash-network deploy \u003cnetwork_name\u003e\n```\n\nYou may pass the `--only-infrastructure` or `--only-provisioning` option to target either infrastructure or software provisioning workflows.\n\nTo destroy an available Dash Network, use the `destroy` command:\n\n```bash\ndash-network destroy -t=\u003ctarget\u003e \u003cnetwork_name\u003e\n```\n\nYou can use the `-t` flag to choose which logical network components you want to destroy. It takes one of three values:\n* all (infrastructure with software)\n* network (L2+L1)\n* platform (L2 only)\n\nDestroying only the network with `-t=network` allows you to redeploy the network in almost the same state by passing the `-p` option to the `deploy` command to skip infrastructure provisioning.\n\nDestroying only the L2 platform components with `-t=platform` means you must comment out everything except roles which target masternodes and seed nodes in the `deploy.yml` playbook, and run the deployment again with the `-p` option.\n\n## List network services\n\n```bash\ndash-network list \u003cnetwork_name\u003e\n```\n\n## Testing\n\nTo test the network, run the `test` command with with particular network name:\n\n```bash\ndash-network test \u003cnetwork_name\u003e\n```\n\nYou may pass the `--type` option to run only particular tests (`smoke`, `e2e`).\nIt is possible to specify several types using a comma delimiter.\n\n## Debugging\n\nThere are two commands that can be useful for debugging:\n\n- Show service logs: `dash-network logs \u003cnetwork_name\u003e \u003chost\u003e [docker logs options] \u003cservice_name\u003e`\n  - See [Docker log options](https://docs.docker.com/engine/reference/commandline/logs/) for details\n  - Example: `dash-network logs devnet-example node-1 --since 3h dashd`\n- Execute Dash Core RPC command: `dash-network dash-cli \u003cnetwork_name\u003e \u003chostname\u003e \u003crpc_command\u003e`\n\n## Deploy Dash Platform\n\nIn order to deploy platform services, use the ansible variable:\n\n    ```yaml\n    evo_services: true\n    ```\n\n## Connect to private Dash Network services\n\nYou can use the OpenVPN config generated during deployment (`\u003cnetwork_name\u003e.ovpn`) to connect to private services.\n\n## Manual installation\n\n1. Clone git repository:\n\n    ```bash\n    git clone https://github.com/dashpay/dash-network-deploy.git\n    ```\n\n2. Install Ansible (v2.11.4+) and Terraform (v1.4.4+) per instructions provided on the official websites:\n\n    * [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)\n    * [Terraform](https://www.terraform.io/intro/getting-started/install.html)\n\n3. Ensure Python dependencies are installed locally\n\n    ```bash\n    pip install -U netaddr jmespath ansible-lint boto3 botocore\n    ```\n\n4. Install pre-requisite Ansible roles\n\n    ```bash\n    ansible-galaxy install -r ansible/requirements.yml\n    ```\n\n5. Install [AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/installing.html)\n\n\n6. Install [Node.JS](https://nodejs.org/en/download/) and dependencies:\n\n    ```bash\n    npm install\n    ```\n\n7. Install OpenVPN:\n\n    On Linux:\n    ```bash\n    apt-get install openvpn\n    ```\n\n    On Mac:\n    ```bash\n    brew install openvpn\n    ```\n\n## New AWS account setup\n\nIf you are running this tool for the first time in a new AWS account, some initial setup needs to be done one time:\n\nnote: Please ensure you have the correct REGION and PROFILE setup in your AWS CLI configuration (`aws configure`) or use the --region and --profile flags with the AWS commands below.\n\n1. Create Terraform state S3 bucket manually:\n\n```sh\naws s3 mb s3://bucket-name-here\n```\n\n2. Create Terraform state dynamodb lock table manually\n\n```sh\naws dynamodb create-table \\\n  --attribute-definitions AttributeName=LockID,AttributeType=S \\\n  --table-name tf-lock-table-test \\\n  --key-schema AttributeName=LockID,KeyType=HASH \\\n  --billing-mode PROVISIONED \\\n  --provisioned-throughput ReadCapacityUnits=2,WriteCapacityUnits=2 \\\n  --table-class STANDARD\n```\n\n3. Route53 domain creation / delegation\n\n```sh\naws route53 create-hosted-zone --name networks.domain.tld --caller-reference 1234567\n```\n\nPlease note the values of these, as they will be needed in the network config files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashpay%2Fdash-network-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdashpay%2Fdash-network-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashpay%2Fdash-network-deploy/lists"}