Skip to content
An Ethereum PoA private-chain environment on AWS.
Branch: master
Clone or download
Latest commit 44bf2d8 Jan 21, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
ansible fix keys_path Sep 9, 2018
packer fix keys_path Sep 9, 2018
.ec2ssh edit .ec2ssh Jan 21, 2019
.gitignore edit Jan 21, 2019 add Jan 11, 2019 rename script and fix May 15, 2018
logo.png edit Jun 5, 2018
private_chain.yml add resources for connection. Mar 26, 2018
template.yaml Fix schema of tip Sep 5, 2018

An Ethereum private-chain environment for the ALIS that using Parity PoA.


  • aws-cli
  • packer
  • ansible
  • jq
  • direnv

Environment valuables

# Create .envrc to suit your environment.
cp -pr .envrc.sample .envrc
direnv edit



Build an AMI that the nodes of Parity PoA.

Parity resources

You have to change ETH account keys when you use this in production.

  • ./packer/ansible/roles/parity/templates/PCParityPoA*_key.j2

Also spec.json.

  • ./packer/ansible/roles/parity/templates/spec.json.j2


cd ./packer/
packer build ./parity-poa.json

Create EC2 KeyPair

aws ec2 create-key-pair --key-name private-chain

Create EIP


Set SSM valuables

You have to specify SSM valuables as can as possible.
Such as IAM and EIP information you created above.




Fix API settings via a script

# Get API ID
aws apigateway get-rest-apis | jq -r --arg ALIS_API_NAME "${ALIS_APP_ID}api" '.items[] | select(.name==$ALIS_API_NAME).id'

direnv edit


After deployment

Connect Instances via Bastion

cp -p .ec2ssh ~/
vi ~/.ec2ssh

Fix some point for your environment.
Then execute ec2ssh update.

echo -e \\nHost PC*\\n  ProxyCommand ssh -W %h:%p Bastion >> ~/.ssh/config 
ec2ssh update

Now you can connect:

ssh PCParityPoA2a

Also you can use tmuxinator.

cp -p ./private_chain.yml ~/.tmuxinator/
mux private_chain

Configure servers.

# You have to edit HostNames.
vi ./ansible/roles/common/files/config

# Also you have to specify your hosts.
cd ansible
cp -p hosts.sample hosts
vi hosts

# Run ansible
ansible-galaxy install -p ./roles -r requirements.yml
ansible-playbook -i hosts site.yml

Connect Parity nodes each other

You can use [parity dir]/

Migrate private chain contracts from Bastion server

See: Private chain contracts

Fix template.yaml's FIXME: tags and deploy again

Such as IAM Policies, and others.

Set SSM valuables again

You can’t perform that action at this time.