hosts file from hosts.example (mv hosts.example hosts) and adjust to your needs. Each host should represent each BlockScout instance you want to deploy.
Each host name should belong exactly to one group. Also, as per Ansible requirements, hosts and group names should be unique.
hosts file with one BlockScout instance will look like:
[group] is a group name, which will be interpreted as a prefix for all created resources and host is a name of BlockScout instance.
4) For each host merge blockscout.yml.example and all.yml.example config template files in host_vars folder into single config file with the same name as in hosts file:
infrastructure.yml.example and all.yml while deploying the BlockScout infrastructure, you can simply add the blockscout.yml.example to the merged file: cat host_vars/blockscout.yml.example >> host_vars/host.yml
5) For each group merge blockscout.yml.example and all.yml.example config template files in group_vars folder into single config file with the same name as group name in hosts file:
infrastructure.yml.example and all.yml while deploying the BlockScout infrastructure, you can simply add the blockscout.yml.example to the merged file: cat group_vars/blockscout.yml.example >> group_vars/host.yml
6) Adjust the variables at group_vars and host_vars.
You can move variables between host and group vars depending on if variable should be applied to the host or to the entire group.
group_vars/all.yml file.
7) Run ansible-playbook deploy_software.yml
8) When the prompt appears, check that server is running and there is no visual artifacts. The server will be launched at port 4000 at the same machine where you run the Ansible playbooks. If you face any errors you can either fix it or cancel the deployment by pressing Ctrl+C and then pressing A when additionally prompted.
9) When the server is ready to be deployed simply press enter and deployer will upload Blockscout to the appropriate S3.
10) Two other prompts will appear to ensure your will on updating the Parameter Store variables and deploying the BlockScout through the CodeDeploy. Both yes and true will be interpreted as the confirmation.
11) (optional) If the deployment fails, you can use the following tags to repeat the particular steps of the deployment:
- build
- update_vars
- deploy