@axerunners/axe-network-deploy v1.0.0
AXE Network Deployment Tool
Introduction
This tool allows deploy and manage AXE networks.
There are two regular available networks: testnet and mainnet.
After deployment your AxeCore instances will join to those networks.
regtest and devnet-* are networks for testing purposes.
Devnet are like regular Axe networks (mainnet and testnet)
but easier to bootstrap and has own name. That's why it easier to have multiple in parallel.
Work in progress and in its initial state only meant to be used by Axe Core developers to assist in Axe Evolution development.
Installation
- Install Docker
Download tool:
Using
wget:wget -P /usr/local/bin https://raw.github.com/axerunners/axe-network-deploy/master/bin/axe-network && \ chmod +x /usr/local/bin/axe-networkUsing
curl:curl -fsSL -o /usr/local/bin/axe-network https://raw.github.com/axerunners/axe-network-deploy/master/bin/axe-network && \ chmod +x /usr/local/bin/axe-network
Configuration
Credentials
Configure your credentials in .env file.
Use .env.example as example.
Networks definition
Please find examples of network configurations in examples directory.
Name of files are equal to Axe network names.
Terraform configuration defined in *.tfvars files.
All available options you will find
in variables.tf file.
Ansible configuration in *.yaml files.
group_vars/all
file contains the majority of playbook options.
The rest of them defined in ansible roles.
Using git
Please don't forget to include in your .gitignore:
.env
*.inventory
*.ovpnDeployment
To deploy Axe Network use deploy command with particular network name:
axe-network deploy <network_name>You may pass --only-infrastructure or --only-provisioning option to avoid to do a particular type of work.
To destroy available Axe Network use destroy command:
axe-network destroy <network_name>You may pass --keep-infrastructure option to remove software and configuration and keep infrastructure.
List network services
axe-network list <network_name>Testing
To test network run test command with with particular network name:
axe-network test <network_name>You may pass --type option to run particular type of tests (smoke, e2e).
It possible to specify several types using comma delimiter.
Deploy Axe Evolution
Deploy your network with additional ansible variables:
evo_services: true insight_image: "<docker-image>" drive_image: "<docker-image>" dapi_image: "<docker-image>" axed_image: "<docker-image>" # uncomment if docker images stored in AWS ECR # aws_ecr_login: trueGet current block height:
docker run -ti --rm \ -v "$PWD:/networks" \ -v "$HOME/.aws:/root/.aws" \ -v "<your-public-key-path>:<your-public-key-path>" \ -v "<your-private-key-path>:<your-private-key-path>" \ -w "/usr/src/app/ansible" \ axerunners/axe-network-deploy ansible axed-wallet-2 \ -i ../networks/<network_name>.inventory \ --private-key=<your-private-key-path> \ -b -m command -a "axe-cli getblockcount"
Enable Masternode List after ten new blocks:
docker run -ti --rm \ -v "$PWD:/networks" \ -v "$HOME/.aws:/root/.aws" \ -v "<your-public-key-path>:<your-public-key-path>" \ -v "<your-private-key-path>:<your-private-key-path>" \ -w "/usr/src/app/ansible" \ axerunners/axe-network-deploy ansible axed-wallet-2 \ -i ../networks/<network_name>.inventory \ --private-key=<your-private-key-path> \ -b -m command -a "axe-cli spork SPORK_15_DETERMINISTIC_MNS_ENABLED <current_block_height+10>"Upgrade your MNs to ProTX when DIP3 is enabled (see getBlockChainInfo):
axe-network deploy -p --ansible-playbook=upgrade-to-protx <network_name>
Connect to private Axe Network services
You can use generated during deployment OpenVPN config <network_name>.ovpn to connect to private services.
Manual installation
Clone git repository:
git clone https://github.com/axerunners/axe-network-deploy.gitInstall Ansible and Terraform per instructions provided on official websites:
Ensure Python netaddr package installed locally
pip install -U netaddr- Note: You may need to run the above command with "pip2" instead of "pip" if your default Python installation is version 3 (e.g. OSX + Homebrew).
Install pre-requisite Ansible roles
ansible-galaxy install -r ansible/requirements.ymlInstall AWS Command Line Interface
Install Node.JS and dependencies:
npm installInstall OpenVPN:
On Linux:
apt-get install openvpnOn Mac:
brew install openvpn
7 years ago