Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update β0.35.0 #46

Merged
merged 16 commits into from
Apr 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ansible/group_vars/bastion
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
contracts_path: /var/contracts
private_chain_alis_token_address: "0x7ad8f90cfa071c8420e3f09fe0e413d0c47502e6"
private_chain_main_signer_address: "0x7ad8f90cfa071c8420e3f09fe0e413d0c47502e6"

erc20_bridge_path: /var/erc20-bridge
35 changes: 32 additions & 3 deletions ansible/roles/bastion/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
---
- name: Add apt repositories
apt_repository:
repo: 'ppa:jonathonf/python-3.6'

- name: Install packages
apt:
name: "{{ item }}"
state: present
update_cache: yes
with_items:
- build-essential
- python2.7
- python3.6
- python3.6-venv

- name: Create dirctries
file: path={{ item }} state=directory owner=root group=root mode=0755
with_items:
- "{{ contracts_path }}"
- "{{ erc20_bridge_path }}"

- name: Clone resources
git:
repo: "{{ item.src }}"
dest: "{{ item.dest }}"
version: "{{ item.version }}"
with_items:
- { src: 'https://github.com/AlisProject/private-chain-contracts.git', dest: "{{ contracts_path }}" }
- { src: 'https://github.com/riywo/ndenv', dest: "~/.ndenv" }
- { src: 'https://github.com/riywo/node-build.git', dest: "~/.ndenv/plugins/node-build" }
- { src: 'https://github.com/AlisProject/private-chain-contracts.git', dest: "{{ contracts_path }}", version: 'HEAD' }
- { src: 'https://github.com/AlisProject/erc20-bridge.git', dest: "{{ erc20_bridge_path }}", version: 'HEAD' }
- { src: 'https://github.com/riywo/ndenv', dest: "~/.ndenv", version: 'HEAD' }
- { src: 'https://github.com/riywo/node-build.git', dest: "~/.ndenv/plugins/node-build", version: 'HEAD' }
- { src: 'https://github.com/ethereum/vyper.git', dest: "~/vyper", version: 'v0.1.0-beta.7' }

- name: Add lines to .bashrc
lineinfile:
Expand All @@ -41,3 +52,21 @@
- "/root/.ndenv/shims/npm install -g yarn"
- "~/.ndenv/bin/ndenv exec yarn"
- "~/.ndenv/bin/ndenv exec yarn exec truffle -- install"

- name: Install and prepare modules for erc20-bridge
shell: "{{ item }}"
environment:
PYTHON: /usr/bin/python2.7
args:
chdir: "{{ erc20_bridge_path }}"
with_items:
- "~/.ndenv/bin/ndenv install"
- "/root/.ndenv/shims/npm install -g yarn"
- "~/.ndenv/bin/ndenv exec yarn"

- name: Install vyper for erc20-bridge
shell: "{{ item }}"
args:
chdir: "~/vyper"
with_items:
- "python3.6 setup.py install"
1 change: 1 addition & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ aws cloudformation deploy \
ParityNodesVolumeSize=${SSM_PARAMS_PREFIX}ParityNodesVolumeSize \
PrivateChainMainSigner=${SSM_PARAMS_PREFIX}PrivateChainMainSigner \
PrivateChainAlisTokenAddress=${SSM_PARAMS_PREFIX}PrivateChainAlisTokenAddress \
PrivateChainBridgeAddress=${SSM_PARAMS_PREFIX}PrivateChainBridgeAddress \
--stack-name ${ALIS_APP_ID}privatechain
Loading