Skip to content

Commit 7f87bdf

Browse files
committed
Indy. Ansible configuration is fixed and working.
1 parent eee2a7c commit 7f87bdf

File tree

1 file changed

+26
-21
lines changed

1 file changed

+26
-21
lines changed

lib/indy/README.md

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -85,24 +85,24 @@ When running on a Mac, set the following environment variables.
8585
##### Preparing for Ansible
8686

8787
- Create a Python virtual environment and install ansible
88-
```
89-
cd ansible
90-
python3 -m venv venv
91-
source ./venv/bin/activate
88+
```bash
89+
cd ansible
90+
python3 -m venv venv
91+
source ./venv/bin/activate
9292
```
9393

94-
```
95-
pip install -r requirements.txt
94+
```bash
95+
pip install -r requirements.txt
9696
```
9797

9898
##### Describe instance information to be built in inventory.yml
9999

100100
- Create an inventory file containing information on the EC2 instance that will build the environment. Enter the instance ID described in the CDK output results in the settings column for each node. The value of `indyNetworkStack.ansibleFileTransferBucketName` described in CDK output results is inputted to `ansible_aws_ssm_bucket_name`. When Ansible transfers files to the target host, the Amazon Simple Storage Service (Amazon S3) bucket specified here is used.
101101

102-
```
102+
```bash
103103
cd ..
104104
./configure-ansible-inventory.sh
105-
```
105+
```
106106

107107

108108
##### Ansible parameter settings
@@ -116,13 +116,13 @@ INDY_NETWORK_NAME: sample-network
116116

117117
- Use ansible's `ping` module to confirm that ansible can connect to the instance set in inventory/inventory.yml
118118

119-
```
119+
```bash
120120
cd ansible
121121
ansible -m ping all -i inventory/inventory.yml
122-
```
122+
```
123123
The response should look like this:
124124

125-
```
125+
```bash
126126
steward2 | SUCCESS => {
127127
"changed": false,
128128
"ping": "pong"
@@ -151,13 +151,16 @@ INDY_NETWORK_NAME: sample-network
151151
"changed": false,
152152
"ping": "pong"
153153
}
154-
```
154+
```
155155

156-
- Use ansible's `command` module to check the cloud-init status was done.
156+
- Before proceeding with configuring Indy, we need to make sure the initialization scripts are finished. To check their stats, use ansible's `command` module. If the check shows cloud-init is not finished wait and try again in 5-10 minutes until status was done.
157157

158-
```
159-
$ ansible -m command all -i inventory/inventory.yml -a "cloud-init status --wait"
158+
```bash
159+
ansible -m command all -i inventory/inventory.yml -a "cloud-init status --wait"
160+
```
161+
The response should look like this:
160162

163+
```bash
161164
steward4 | CHANGED | rc=0 >>
162165

163166
status: done
@@ -179,19 +182,21 @@ INDY_NETWORK_NAME: sample-network
179182
trustee3 | CHANGED | rc=0 >>
180183

181184
status: done
182-
```
185+
```
183186

184187
- Execute Hyperledger Indy environment construction for target EC2 instances defined in `inventory/inventory.yml` in ansible
185-
```
186-
$ ansible-playbook playbook/site.yml
187-
```
188+
```bash
189+
ansible-playbook playbook/site.yml
190+
```
188191

189192
## Clearing up and undeploying everything
190193

191194
1. Remove Indy's seed, nodeInfo, did on the Secrets Manager
192195

193196
```bash
194-
$ ansible-playbook playbook/999_cleanup.yml
197+
# make sure you are in 'ansible' directory
198+
cd ansible
199+
ansible-playbook playbook/999_cleanup.yml
195200
```
196201

197202
2. Undeploy Indy Nodes
@@ -205,7 +210,7 @@ $ ansible-playbook playbook/999_cleanup.yml
205210
# Make sure you are in aws-blockchain-node-runners/lib/indy
206211

207212
# Undeploy Indy Node
208-
cdk destroy --all
213+
npx cdk destroy --all
209214
```
210215

211216

0 commit comments

Comments
 (0)