- Google Cloud Platform Account
- Create a project and link your billing account
- Get your accessKey, secretKey, and project ID
{% hint style="info" %} Note: Buckets are also available in Amazon Web Services (AWS) {% endhint %}
- Docker
- Check to see if you have it installed from your terminal:
docker --version && docker-compose --version
- For mirror node versions 0.35.0 and higher you will need docker v3.3.3+
- Check to see if you have it installed from your terminal:
- Git
- Hedera Mirror Node Repository
- You will be prompted to download the repo in the following steps.
- PostgreSQL
- Download PostgreSQL to be able to access the database.
You will need to grab the secret key, access key, and project ID from your Google Cloud Platform account
- From the left navigation bar, select STORAGE > SETTINGS
- Click on the Interoperability tab and scroll down to the User account HMAC section
- Set your default project
- Click create keys to generate access keys for your account
- You should see the access key and secret columns populate on the table
- You will use these keys to populate the application.yml configuration file in a later step
- Open your terminal
- Clone the
hedera-mirror-node
repository
git clone https://github.com/hashgraph/hedera-mirror-node
- CD to the
hedera-mirror-node
folder
cd hedera-mirror-node
- Open the application.yml file found in the root directory with a text editor of your choice
- Input the following information and uncomment each line
- Buckets are preconfigured for each network
Item | Description |
---|---|
accessKey | Your project access key from your Google Cloud Platform account |
cloudProvider | GCP |
secretKey | Your secret key from your Google Cloud Platform account |
gcpProjectId | Your Google Cloud Platform project ID |
network | Enter the network you would to run your mirror node for |
{% tabs %} {% tab title="Sample application.yml file" %}
hedera:
mirror:
importer:
downloader:
accessKey: GOOG....
cloudProvider: "GCP"
secretKey: h+....
gcpProjectId: ENTER GCP PROJECT ID HERE
network: PREVIEWNET/TESTNET/MAINNET #Pick one network
{% endtab %} {% endtabs %}
- From the
hedera-mirror-node
directory, run the following command in your terminal:
docker-compose up
To access the mirror node data now available to you, access the hedera-mirror-node_db_1
container.
- Open a new terminal
- To view the
hedera-mirror-node_db_1
container ID, enter the following command:
docker ps
- Enter the following command to access the docker container
docker exec -it <containerId> bash
- Enter the following command to access the database
psql "dbname=mirror_node host=localhost user=mirror_node password=mirror_node_pass port=5432"
- Enter the following command to view the complete list of tables
\dt
{% hint style="success" %} You have successfully deployed a Hedera mirror node 🥳 ! {% endhint %}