Procházet zdrojové kódy

Merge branch 'master' into test-merge-giza

Mokhtar Naamani před 3 roky
rodič
revize
d9c135d442

+ 2 - 2
devops/aws/deploy-infra.sh

@@ -75,7 +75,7 @@ if [ $? -eq 0 ]; then
   then
     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"
+      --extra-vars "branch_name=$BRANCH_NAME git_repo=$GIT_REPO build_local_code=$BUILD_LOCAL_CODE data_path=$DATA_PATH"
 
     echo -e "\n\n=========== Install additional utils on build server ==========="
     ansible-playbook -i $INVENTORY_PATH --private-key $KEY_PATH setup-admin.yml
@@ -84,7 +84,7 @@ if [ $? -eq 0 ]; then
   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
+                  data_path=$DATA_PATH bucket_name=$BUCKET_NAME number_of_validators=$NUMBER_OF_VALIDATORS
                   deployment_type=$DEPLOYMENT_TYPE initial_balances_file=$INITIAL_BALANCES_PATH initial_members_file=$INITIAL_MEMBERS_PATH"
 
   echo -e "\n\n Pioneer URL: https://$DOMAIN_NAME"

+ 4 - 3
devops/aws/group_vars/all

@@ -9,9 +9,10 @@ local_dir: ~/Joystream/joystream
 # Generates random number between 1000..9999
 network_suffix: "{{ 10000 | random(1000) }}"
 
-data_path: ./data
-chain_spec_path: "{{ data_path }}/chainspec.json"
-raw_chain_spec_path: "{{ data_path }}/chainspec-raw.json"
+remote_data_path: ./data
+chain_spec_path: "{{ remote_data_path }}/chainspec.json"
+raw_chain_spec_path: "{{ remote_data_path }}/chainspec-raw.json"
+local_raw_chain_spec_path: "{{ data_path }}/chainspec-raw.json"
 remote_code_path: "/home/ubuntu/joystream"
 remote_chain_spec_path: "{{ remote_code_path }}/chainspec.json"
 run_on_admin_server: true

+ 5 - 5
devops/aws/roles/common/tasks/chain-spec-node-keys.yml

@@ -3,7 +3,7 @@
 
 - name: Debug to test variable
   debug:
-    msg: 'Data path: {{ data_path }}, Chain Spec path: {{ chain_spec_path }}'
+    msg: 'Remote Data path: {{ remote_data_path }}, Local Data path: {{ data_path }}, Chain Spec path: {{ chain_spec_path }}'
   run_once: true
 
 - name: Copying initial members file to the server
@@ -24,7 +24,7 @@
   shell: >
     {{ admin_code_dir }}/target/release/chain-spec-builder generate -a {{ number_of_validators }}
     --chain-spec-path {{ chain_spec_path }}
-    --endowed 1 --keystore-path {{ data_path }}
+    --endowed 1 --keystore-path {{ remote_data_path }}
     {% if deployment_type is defined and deployment_type|length > 0 %}--deployment {{ deployment_type }}{% endif %}
     {% if initial_members_file is defined and initial_members_file|length > 0 %}--initial-balances-path {{ admin_code_dir }}/initial-balances.json{% endif %}
     {% if initial_balances_file is defined and initial_balances_file|length > 0 %}--initial-members-path {{ admin_code_dir }}/initial-members.json{% endif %}
@@ -50,7 +50,7 @@
 - name: Save output of chain spec to local file
   copy:
     content: '{{ chain_spec_output.stdout | regex_replace("\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]", "") }}'
-    dest: '{{ data_path }}/chain_spec_output.txt'
+    dest: '{{ remote_data_path }}/chain_spec_output.txt'
   delegate_to: '{{ local_or_admin }}'
   run_once: true
 
@@ -75,7 +75,7 @@
 
 - name: Copying chain spec files to localhost
   synchronize:
-    src: '/home/ubuntu/{{ data_path }}/'
+    src: '/home/ubuntu/{{ remote_data_path }}/'
     dest: '{{ data_path }}'
     mode: pull
   run_once: true
@@ -92,5 +92,5 @@
 
 - name: Copying raw chain spec file to all servers
   copy:
-    src: '{{ raw_chain_spec_path }}'
+    src: '{{ local_raw_chain_spec_path }}'
     dest: '{{ remote_chain_spec_path }}'

+ 1 - 0
devops/aws/roles/rpc/tasks/main.yml

@@ -19,6 +19,7 @@
   service:
     name: joystream-node
     state: started
+    enabled: yes
   become: yes
 
 - name: Set websocket and http endpoint variables

+ 1 - 0
devops/aws/roles/validators/tasks/main.yml

@@ -42,4 +42,5 @@
   service:
     name: joystream-node
     state: started
+    enabled: yes
   become: yes