Blockscout
SupportWebsiteGithubDiscord
  • Blockscout Open-Source Explorer
  • 💡About BlockScout
    • Features
      • Ethereum Bytecode Database Microservice
      • Blockscout Redesign
    • Chains Using Blockscout
    • Partners & Integrations
      • RaaS Providers
      • Vera: Verifier Alliance
        • Adding your chain to the Vera database
        • Programmatic verification via the API
    • News & Media
      • Newsletter & Blog
    • Funding
      • L2 Funding Proposal
        • Aux Funding Images
    • Roadmap
  • 🙎Using Blockscout
    • Getting Started
      • Glossary of Terms
      • Main Menu
      • Blocks
      • Transaction Types
      • Beacon Chain Withdrawal Views
    • My Account
      • Watch list
      • Private tags
      • Public tags
      • API keys
      • Custom ABI
      • Verified addresses
        • Copy and Sign Message
      • For developers
    • Dappscout Apps Marketplace
      • DApp Integration
    • Swapscout
      • Earn Merits when using Swapscout
    • Revokescout
    • Autoscout Explorer Launchpad
    • CSV Exports
    • Token Support
      • ERC-1155 Support
    • Merits
      • Streak rewards
      • Activity Pass
      • Leaderboard
      • Badges
      • FAQs
  • 👩‍💻Developer Support
    • For Web3 Developers
    • Link to Blockscout
    • Blockscout APIs
      • Requests & Limits
      • REST API Endpoints
        • Stats API
        • Interpreter API
      • JSON RPC & ETH Compatible RPC Endpoints
        • Account
        • Block
        • Contract
        • Logs
        • Stats
        • Token
        • Transaction
        • ETH RPC API
      • GraphQL in Blockscout
    • Smart Contract Verification
      • Blockscout UI
      • Blockscout smart-contract verification API
      • Hardhat Verification Plugin
        • Sourcify Plugin for Hardhat
      • Foundry Verification
      • Sourcify Verification
      • OpenZeppelin Contract Verification
      • Automate verifications with Catapulta
      • Verification via thirdweb
      • Interacting with Smart Contracts
    • Blockscout SDK
    • Integrate Merits
    • Chainscout chains list
  • 🏃‍♂️Setup and Run Blockscout
    • General Overview
      • Separate Indexer, Web App, and API
      • Umbrella Project Organization
      • Indexer Architecture Overview
      • ShareLock
      • EVM Version Information
    • Requirements
      • General Backend Requirements / Blockscout Backend Prerequisites
      • Backend/Frontend Compatibility Matrix
      • Hardware & Hosting Requirements
      • Database Storage Requirements
      • Client Setting Requirements
      • Node Tracing / JSON RPC Requirements
      • L2 -> L1 JSON-RPC Method Requests
    • ☑️ENV Variables
      • Backend ENVs: Common
      • Backend ENVs: Chain-Specific
      • Backend ENVs: Integrations
      • Frontend ENVs: Common
        • ENVs
        • Deprecated ENVs
      • Deprecated Backend ENVs
        • Previous ENV Variable Home Page
    • Deployment
      • ⭐Manual Deployment Guide
        • Ubuntu Setup
        • MacOS setup
      • ⭐Docker-compose Deployment
      • ⭐Kubernetes Deployment
      • Rollup Deployment
      • 🌟Cosmos-based chains
      • 🍀Upgrade Guide (v7.0 & v8.0)
      • Frontend Migration
        • All-In-One Container
        • Separate Frontend
        • Customized Backend
        • Proxy Setup
        • FAQs
      • Manual Deployment (backend + old UI)
        • Manual cleaning an instance from the previous deployment
      • Terraform Deployment
      • Ansible Deployment (AWS Cloud)
        • Overview
        • Prerequisites
        • AWS Permissions & Settings
          • Creating a Secret Key Pair
          • Login with AWS CLI
          • Creating an AWS certificate for SSL
          • Manually Cleaning Terraform Related Instances
        • Variables
        • Deploying the Blockscout Infrastructure
        • Deploying Blockscout
        • Destroying Provisioned Infrastructure
        • Common Additional Tasks
        • Common Errors and Questions
        • AWS Marketplace (deprecated)
          • Overview
          • CloudFormation Template
          • Prerequisites & Install Parameters
          • Install from AWS Marketplace
          • AWS EC2 archive node setup with OpenEthereum (formerly Parity)
          • Updating & Redeploying in AWS
          • Customizing CSS
    • Microservices
      • Blockscout ENS (BENS) Name Service Integration
      • Smart Contract Verification
    • Configuration Options
      • Admin Panel Usage
      • Automating Restarts
      • Branding Configs
      • Circle CI Updates
      • Charts and Stats
      • CSS Configuration & Presets
      • Exchange Rates
      • Front-end Config Files
      • haproxy Settings for Blockscout.com
      • Internationalization
      • Logger Configs
      • Memory Usage
      • Metrics
      • My Account Settings
      • Sorting and Pagination
      • Tracing
      • Reown Project ID for contract Read/Write
    • Indexing
      • How do I fix indexer timeouts?
      • How do I update memory consumption to fix indexer memory errors?
    • Testing
    • DB schema
  • FAQs
    • User FAQs
    • Developer FAQs
  • 🧩Resources
    • EaaS: Hosting with Blockscout
    • Contributing to Blockscout
    • Bug Bounty Program
    • Media kit
    • Release Notes
      • v5.3.0: 10/23/23
      • v5.2.0: 6/20/23
      • v5.1.0: 2/13/23
      • v5.0.0: 1/11/23
    • Discord Channel
    • Discussion
    • GitHub Repo
Powered by GitBook
LogoLogo

Privacy and Terms

  • Privacy Notice
  • Terms and Conditions

Copyright © Blockscout Limited 2023-2024

On this page

Was this helpful?

Export as PDF
  1. Setup and Run Blockscout
  2. Deployment
  3. Ansible Deployment (AWS Cloud)

Deploying Blockscout

Last updated 3 years ago

Was this helpful?

Deployment with Terraform 12 is unstable due to these bugs: , , , . Please use TF 11.11 - 11.14 and following branch for deployment

If you are not using a Mac, skip to step 1 below.

Mac Users Only

To avoid the following error (which results in a Python crash):

TASK [main_software : Fetch environment variables] ************************************ objc[12816]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. objc[12816]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.

  1. Open terminal: nano .bash_profile

  2. Add the following line to the end of the file: export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

  3. Save, exit, close terminal and re-open the terminal. Check to see that the environment variable is now set: env

(source: );

1) Ensure all are installed with the correct version number

2) Create the AWS access key and secret access key for user with sufficient permissions;

3) Create 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.

The simplest hosts file with one BlockScout instance will look like:

[group]
host

Where [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:

cat host_vars/blockscout.yml.example host_vars/all.yml.example > host_vars/host.yml

If you have already merged 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:

cat group_vars/blockscout.yml.example group_vars/all.yml.example > group_vars/group.yml

If you have already merged 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

You can move variables between host and group vars depending on if variable should be applied to the host or to the entire group.

Also, if you need to distribute variables across all the hosts/groups, you can add these variables to the 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

6) at group_vars and host_vars.

More on variable precedence => .

12) Monitor and manage your deployment at service page at AWS Console.

🏃‍♂️
#144
#147
#148
#149
https://github.com/poanetwork/blockscout-terraform/tree/before-t12
https://stackoverflow.com/questions/50168647/multiprocessing-causes-python-to-crash-and-gives-an-error-may-have-been-in-progr
BlockScout prerequisites
Adjust the variables
Official Ansible Docs
CodeDeploy