Skip to content

Commit

Permalink
updated README / WIP input P2P_ANNOUNCE_ADDRESSES variable
Browse files Browse the repository at this point in the history
  • Loading branch information
md00ux committed Aug 19, 2024
1 parent 5f898a5 commit 90f214a
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 9 deletions.
11 changes: 5 additions & 6 deletions deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ bash create_ocean_node_docker_compose_config.sh
c) provide the necessary information interactively (example)

```shell
$ bash create_ocean_node_docker_compose_config.sh
Do you have your private key for running the Ocean Node [ y/n ]: n
Do you want me to create a private key for you [ y/n ]: y
Generating Private Key, please wait...
Generated Private Key: << redacted >>
Generated Private Key: << redacted >>
Please provide the wallet address to be added as Ocean Node admin account: << redacted >>
Provide the HTTP_API_PORT value or accept the default (press Enter) [8000]:
Provide the P2P_ipV4BindTcpPort or accept the default (press Enter) [9000]:
Provide the P2P_ipV4BindWsPort or accept the default (press Enter) [9001]:
Provide the P2P_ipV6BindTcpPort or accept the default (press Enter) [9002]:
Provide the P2P_ipV6BindWsPort or accept the default (press Enter) [9003]:
Provide the public IPv4/IPv6 address or FQDN where this node will be accessible: << redacted >>
Docker Compose file has been generated successfully.
You are now ready to start your Ocean Node.
Expand Down Expand Up @@ -84,7 +84,7 @@ services:
- "9002:9002"
- "9003:9003"
environment:
PRIVATE_KEY: '<< redacted >>'
PRIVATE_KEY: '<<redacted>>'
RPCS: '{"1":{"rpc":"https://ethereum-rpc.publicnode.com","fallbackRPCs":["https://rpc.ankr.com/eth","https://1rpc.io/eth","https://eth.api.onfinality.io/public"],"chainId":1,"network":"mainnet","chunkSize":100},"10":{"rpc":"https://mainnet.optimism.io","fallbackRPCs":["https://optimism-mainnet.public.blastapi.io","https://rpc.ankr.com/optimism","https://optimism-rpc.publicnode.com"],"chainId":10,"network":"optimism","chunkSize":100},"137":{"rpc":"https://polygon-rpc.com/","fallbackRPCs":["https://polygon-mainnet.public.blastapi.io","https://1rpc.io/matic","https://rpc.ankr.com/polygon"],"chainId":137,"network":"polygon","chunkSize":100},"23294":{"rpc":"https://sapphire.oasis.io","fallbackRPCs":["https://1rpc.io/oasis/sapphire"],"chainId":23294,"network":"sapphire","chunkSize":100},"23295":{"rpc":"https://testnet.sapphire.oasis.io","chainId":23295,"network":"sapphire-testnet","chunkSize":100},"11155111":{"rpc":"https://eth-sepolia.public.blastapi.io","fallbackRPCs":["https://1rpc.io/sepolia","https://eth-sepolia.g.alchemy.com/v2/demo"],"chainId":11155111,"network":"sepolia","chunkSize":100},"11155420":{"rpc":"https://sepolia.optimism.io","fallbackRPCs":["https://endpoints.omniatech.io/v1/op/sepolia/public","https://optimism-sepolia.blockpi.network/v1/rpc/public"],"chainId":11155420,"network":"optimism-sepolia","chunkSize":100}}'
DB_URL: 'http://typesense:8108/?apiKey=xyz'
IPFS_GATEWAY: 'https://ipfs.io/'
Expand All @@ -99,7 +99,7 @@ services:
INTERFACES: ''
ALLOWED_VALIDATORS: ''
INDEXER_NETWORKS: '[]'
ALLOWED_ADMINS: '["<< redacted >>"]'
ALLOWED_ADMINS: '["<<redacted>>"]'
INDEXER_INTERVAL: ''
DASHBOARD: 'true'
RATE_DENY_LIST: ''
Expand All @@ -115,7 +115,7 @@ services:
P2P_ipV6BindAddress: ''
P2P_ipV6BindTcpPort: '9002'
P2P_ipV6BindWsPort: '9003'
P2P_ANNOUNCE_ADDRESSES: ''
P2P_ANNOUNCE_ADDRESSES: '["/dns4/<<redacted>>/tcp/9000/p2p/", "/dns4/<<redacted>>/ws/tcp/9001", "/dns6/<<redacted>>/tcp/9002/p2p/", "/dns6/<<redacted>>/ws/tcp/9003"]'
P2P_ANNOUNCE_PRIVATE: ''
P2P_pubsubPeerDiscoveryInterval: ''
P2P_dhtMaxInboundStreams: ''
Expand Down Expand Up @@ -153,4 +153,3 @@ networks:
ocean_network:
driver: bridge
```
6 changes: 3 additions & 3 deletions deployment/create_ocean_node_docker_compose_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ if [ -n "$P2P_ANNOUNCE_ADDRESS" ]; then

if [[ "$P2P_ANNOUNCE_ADDRESS" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
# IPv4
P2P_ANNOUNCE_ADDRESSES='["/ip4/'$P2P_ANNOUNCE_ADDRESS'/tcp/'$P2P_ipV4BindTcpPort'", "/ip4/'$P2P_ANNOUNCE_ADDRESS'/tcp/'$P2P_ipV4BindWsPort'"]'
P2P_ANNOUNCE_ADDRESSES='["/ip4/'$P2P_ANNOUNCE_ADDRESS'/tcp/'$P2P_ipV4BindTcpPort'/p2p/", "/ip4/'$P2P_ANNOUNCE_ADDRESS'/ws/tcp/'$P2P_ipV4BindWsPort'"]'
elif [[ "$P2P_ANNOUNCE_ADDRESS" =~ ^[a-fA-F0-9:]+$ ]]; then
# IPv6
P2P_ANNOUNCE_ADDRESSES='["/ip6/'$P2P_ANNOUNCE_ADDRESS'/tcp/'$P2P_ipV6BindTcpPort'", "/ip6/'$P2P_ANNOUNCE_ADDRESS'/tcp/'$P2P_ipV6BindWsPort'"]'
P2P_ANNOUNCE_ADDRESSES='["/ip6/'$P2P_ANNOUNCE_ADDRESS'/tcp/'$P2P_ipV6BindTcpPort'/p2p/", "/ip6/'$P2P_ANNOUNCE_ADDRESS'/ws/tcp/'$P2P_ipV6BindWsPort'"]'
elif [[ "$P2P_ANNOUNCE_ADDRESS" =~ ^[a-zA-Z0-9.-]+$ ]]; then
# FQDN
P2P_ANNOUNCE_ADDRESSES='["/dns4/'$P2P_ANNOUNCE_ADDRESS'/tcp/'$P2P_ipV4BindTcpPort'", "/dns4/'$P2P_ANNOUNCE_ADDRESS'/tcp/'$P2P_ipV4BindWsPort'", "/dns6/'$P2P_ANNOUNCE_ADDRESS'/tcp/'$P2P_ipV6BindTcpPort'", "/dns6/'$P2P_ANNOUNCE_ADDRESS'/tcp/'$P2P_ipV6BindWsPort'"]'
P2P_ANNOUNCE_ADDRESSES='["/dns4/'$P2P_ANNOUNCE_ADDRESS'/tcp/'$P2P_ipV4BindTcpPort'/p2p/", "/dns4/'$P2P_ANNOUNCE_ADDRESS'/ws/tcp/'$P2P_ipV4BindWsPort'", "/dns6/'$P2P_ANNOUNCE_ADDRESS'/tcp/'$P2P_ipV6BindTcpPort'/p2p/", "/dns6/'$P2P_ANNOUNCE_ADDRESS'/ws/tcp/'$P2P_ipV6BindWsPort'"]'
fi
else
P2P_ANNOUNCE_ADDRESSES=''
Expand Down
81 changes: 81 additions & 0 deletions deployment/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
services:
ocean-node:
image: oceanprotocol/ocean-node:latest
pull_policy: always
container_name: ocean-node
restart: on-failure
ports:
- "8000:8000"
- "9000:9000"
- "9001:9001"
- "9002:9002"
- "9003:9003"
environment:
PRIVATE_KEY: '0x099e7dd538ad9ab61cce54a98465e5371e36d381ba92de4284d856d5a7185620'
RPCS: '{"1":{"rpc":"https://ethereum-rpc.publicnode.com","fallbackRPCs":["https://rpc.ankr.com/eth","https://1rpc.io/eth","https://eth.api.onfinality.io/public"],"chainId":1,"network":"mainnet","chunkSize":100},"10":{"rpc":"https://mainnet.optimism.io","fallbackRPCs":["https://optimism-mainnet.public.blastapi.io","https://rpc.ankr.com/optimism","https://optimism-rpc.publicnode.com"],"chainId":10,"network":"optimism","chunkSize":100},"137":{"rpc":"https://polygon-rpc.com/","fallbackRPCs":["https://polygon-mainnet.public.blastapi.io","https://1rpc.io/matic","https://rpc.ankr.com/polygon"],"chainId":137,"network":"polygon","chunkSize":100},"23294":{"rpc":"https://sapphire.oasis.io","fallbackRPCs":["https://1rpc.io/oasis/sapphire"],"chainId":23294,"network":"sapphire","chunkSize":100},"23295":{"rpc":"https://testnet.sapphire.oasis.io","chainId":23295,"network":"sapphire-testnet","chunkSize":100},"11155111":{"rpc":"https://eth-sepolia.public.blastapi.io","fallbackRPCs":["https://1rpc.io/sepolia","https://eth-sepolia.g.alchemy.com/v2/demo"],"chainId":11155111,"network":"sepolia","chunkSize":100},"11155420":{"rpc":"https://sepolia.optimism.io","fallbackRPCs":["https://endpoints.omniatech.io/v1/op/sepolia/public","https://optimism-sepolia.blockpi.network/v1/rpc/public"],"chainId":11155420,"network":"optimism-sepolia","chunkSize":100}}'
DB_URL: 'http://typesense:8108/?apiKey=xyz'
IPFS_GATEWAY: 'https://ipfs.io/'
ARWEAVE_GATEWAY: 'https://arweave.net/'
LOAD_INITIAL_DDOS: ''
FEE_TOKENS: ''
FEE_AMOUNT: ''
ADDRESS_FILE: ''
NODE_ENV: ''
AUTHORIZED_DECRYPTERS: ''
OPERATOR_SERVICE_URL: ''
INTERFACES: ''
ALLOWED_VALIDATORS: ''
INDEXER_NETWORKS: '[]'
ALLOWED_ADMINS: '["0xb18db3cF46eC9c079566404C712C1c51D2FaE5dF"]'
INDEXER_INTERVAL: ''
DASHBOARD: 'true'
RATE_DENY_LIST: ''
MAX_REQ_PER_SECOND: ''
MAX_CHECKSUM_LENGTH: ''
LOG_LEVEL: ''
HTTP_API_PORT: '8000'
P2P_ENABLE_IPV4: ''
P2P_ENABLE_IPV6: ''
P2P_ipV4BindAddress: ''
P2P_ipV4BindTcpPort: '9000'
P2P_ipV4BindWsPort: '9001'
P2P_ipV6BindAddress: ''
P2P_ipV6BindTcpPort: '9002'
P2P_ipV6BindWsPort: '9003'
P2P_ANNOUNCE_ADDRESSES: '["/dns4/myoceannode.com/tcp/9000/p2p/", "/dns4/myoceannode.com/ws/tcp/9001", "/dns6/myoceannode.com/tcp/9002/p2p/", "/dns6/myoceannode.com/ws/tcp/9003"]'
P2P_ANNOUNCE_PRIVATE: ''
P2P_pubsubPeerDiscoveryInterval: ''
P2P_dhtMaxInboundStreams: ''
P2P_dhtMaxOutboundStreams: ''
P2P_mDNSInterval: ''
P2P_connectionsMaxParallelDials: ''
P2P_connectionsDialTimeout: ''
P2P_ENABLE_UPNP: ''
P2P_ENABLE_AUTONAT: ''
P2P_ENABLE_CIRCUIT_RELAY_SERVER: ''
P2P_ENABLE_CIRCUIT_RELAY_CLIENT: ''
P2P_BOOTSTRAP_NODES: ''
P2P_FILTER_ANNOUNCED_ADDRESSES: ''
networks:
- ocean_network
depends_on:
- typesense

typesense:
image: typesense/typesense:26.0
container_name: typesense
ports:
- "8108:8108"
networks:
- ocean_network
volumes:
- typesense-data:/data
command: '--data-dir /data --api-key=xyz'

volumes:
typesense-data:
driver: local

networks:
ocean_network:
driver: bridge

0 comments on commit 90f214a

Please sign in to comment.