Эх сурвалжийг харах

devops infrastructure: rename some files, update comments

Mokhtar Naamani 3 жил өмнө
parent
commit
438d54c79e

+ 2 - 2
devops/infrastructure/README.md

@@ -26,10 +26,10 @@ On Mac run the command:
 Follow [the official installation guide](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) for your system.
 
 # How to run
-Edit the file `bash-config.cfg` and update parameters like AWS_KEY_PAIR_NAME, KEY_PATH
+Copy and edit the file `deploy-config.sample.cfg` and update parameters like AWS_KEY_PAIR_NAME, KEY_PATH
 Run the `deploy-infra.sh` script to deploy the infrastructure
 
 ```
 cd devops/infrastructure
-./deploy-infra.sh
+./deploy-infra.sh your-deploy-config.cfg
 ```

+ 1 - 1
devops/infrastructure/bash-config.sample.cfg → devops/infrastructure/deploy-config.sample.cfg

@@ -10,7 +10,7 @@ VALIDATOR_EC2_INSTANCE_TYPE=t2.micro
 BUILD_EC2_INSTANCE_TYPE=t2.xlarge
 RPC_EC2_INSTANCE_TYPE=t2.micro
 
-# Set a prebuilt AMI if required
+# prebuilt AMI with joystream-node, chain-spec and subkey already built
 EC2_AMI_ID="ami-08ffec5991ca99db9"
 
 ACCOUNT_ID=$(aws sts get-caller-identity --profile $CLI_PROFILE --query Account --output text)

+ 4 - 5
devops/infrastructure/deploy-infra.sh

@@ -73,16 +73,15 @@ if [ $? -eq 0 ]; then
 
   if [ -z "$EC2_AMI_ID" ]
   then
-    echo -e "\n\n=========== compile joystream-node on build server ==========="
+    echo -e "\n\n=========== Compile joystream-node on build server ==========="
     ansible-playbook -i $INVENTORY_PATH --private-key $KEY_PATH build-code.yml \
       --extra-vars "branch_name=$BRANCH_NAME git_repo=$GIT_REPO build_local_code=$BUILD_LOCAL_CODE data_path=data-$NEW_STACK_NAME"
 
-    echo -e "\n\n=========== Configuring the Build server ==========="
-    ansible-playbook -i $INVENTORY_PATH --private-key $KEY_PATH setup-admin.yml \
-      --extra-vars "local_dir=$LOCAL_CODE_PATH build_local_code=$BUILD_LOCAL_CODE"
+    echo -e "\n\n=========== Install additional utils on build server ==========="
+    ansible-playbook -i $INVENTORY_PATH --private-key $KEY_PATH setup-admin.yml
   fi
 
-  echo -e "\n\n=========== Create chain-spec file and Pioneer app ==========="
+  echo -e "\n\n=========== Configure and start new validators, rpc node and pioneer ==========="
   ansible-playbook -i $INVENTORY_PATH --private-key $KEY_PATH chain-spec-pioneer.yml \
     --extra-vars "local_dir=$LOCAL_CODE_PATH network_suffix=$NETWORK_SUFFIX
                   data_path=data-$NEW_STACK_NAME bucket_name=$BUCKET_NAME number_of_validators=$NUMBER_OF_VALIDATORS"

+ 4 - 4
devops/infrastructure/deploy-single-node.sh

@@ -6,7 +6,7 @@ source common.sh
 
 if [ -z "$1" ]; then
   echo "ERROR: Configuration file not passed"
-  echo "Please use ./deploy-infra.sh PATH/TO/CONFIG to run this script"
+  echo "Please use ./deploy-single-node.sh PATH/TO/CONFIG to run this script"
   exit 1
 else
   echo "Using $1 file for config"
@@ -24,7 +24,7 @@ if [ ! -f "$KEY_PATH" ]; then
 fi
 
 # # Deploy the CloudFormation template
-echo -e "\n\n=========== Deploying single instance ==========="
+echo -e "\n\n=========== Deploying single node ==========="
 aws cloudformation deploy \
   --region $REGION \
   --profile $CLI_PROFILE \
@@ -45,7 +45,7 @@ if [ $? -eq 0 ]; then
 
   echo -e "New Node Public IP: $SERVER_IP"
 
-  echo -e "\n\n=========== Configuring the chain spec file and Pioneer app ==========="
-  ansible-playbook -i $SERVER_IP, --private-key $KEY_PATH new-node-playbook.yml \
+  echo -e "\n\n=========== Configuring node ==========="
+  ansible-playbook -i $SERVER_IP, --private-key $KEY_PATH single-node-playbook.yml \
     --extra-vars "binary_file=$BINARY_FILE chain_spec_file=$CHAIN_SPEC_FILE"
 fi

+ 0 - 0
devops/infrastructure/new-node-playbook.yml → devops/infrastructure/single-node-playbook.yml