Skip to content

Commit

Permalink
Merge pull request #119 from andkononykhin/testnet-launch-preparation
Browse files Browse the repository at this point in the history
adds better automation for deployment routine
  • Loading branch information
ashcherbakov committed Dec 6, 2021
2 parents 8efba1a + 65094af commit 6a78538
Show file tree
Hide file tree
Showing 15 changed files with 725 additions and 55 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea
.vscode
build
localnet
localnet
.localnet
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
settings.json
.idea
localnet
.localnet
rest-server.out
.DS_Store
.vscode
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=DcLedger \
BUILD_FLAGS := -ldflags '$(ldflags)'
OUTPUT_DIR ?= build

LOCALNET_DIR ?= localnet
LOCALNET_DIR ?= .localnet

LICENSE_TYPE = "apache"
COPYRIGHT_YEAR = "2020"
Expand Down Expand Up @@ -57,7 +57,7 @@ localnet_init:
/bin/bash ./genlocalnetconfig.sh

localnet_start:
@if [ -d "localnet/observer0" ]; then\
@if [ -d "${LOCALNET_DIR}/observer0" ]; then\
docker-compose --profile observers up -d;\
else\
docker-compose up -d;\
Expand All @@ -71,7 +71,7 @@ localnet_export: localnet_stop
docker-compose run node1 dcld export --for-zero-height >genesis.export.node1.json
docker-compose run node2 dcld export --for-zero-height >genesis.export.node2.json
docker-compose run node3 dcld export --for-zero-height >genesis.export.node3.json
@if [ -d "localnet/observer0" ]; then\
@if [ -d "${LOCALNET_DIR}/observer0" ]; then\
docker-compose run observer0 dcld export --for-zero-height >genesis.export.observer0.json;\
fi

Expand All @@ -81,7 +81,7 @@ localnet_reset: localnet_stop
docker-compose run node1 dcld unsafe-reset-all
docker-compose run node2 dcld unsafe-reset-all
docker-compose run node3 dcld unsafe-reset-all
@if [ -d "localnet/observer0" ]; then\
@if [ -d "${LOCALNET_DIR}/observer0" ]; then\
docker-compose run observer0 dcld unsafe-reset-all;\
fi

Expand Down
2 changes: 1 addition & 1 deletion README-DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ This will start a local pool of 4 validator nodes in Docker. The nodes will expo

If you need to start a new clean network then do the following steps prior to executing `make localnet_start`:
- Remove `.dclcli` and `.dcld` directories from your user home directory (`~`)
- Remove `localnet` directory from the root directory of the cloned project
- Remove `.localnet` directory from the root directory of the cloned project
- Initialize the new network data using `make localnet_init`
## Run CLI
Start a local pool as described above, and then just execute
Expand Down
4 changes: 2 additions & 2 deletions deployment/ansible/client/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
state: absent
- name: Copy config
copy:
src: "./../../../localnet/client/"
src: "./../../../.localnet/client/"
dest: "/home/ubuntu/.dclcli/"
owner: "ubuntu"
group: "ubuntu"
group: "ubuntu"
2 changes: 1 addition & 1 deletion deployment/ansible/nodes/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
- name: Copy config
when: inventory_hostname == 'node' ~ item
copy:
src: "./../../localnet/node{{item}}/"
src: "./../../.localnet/node{{item}}/"
dest: "/home/ubuntu/.dcld/"
owner: "ubuntu"
group: "ubuntu"
Expand Down
Loading

0 comments on commit 6a78538

Please sign in to comment.