changed 6 years ago
Linked with GitHub

Holochain Container Configuration

Agent section

In Holo, agents need to be distinguished as either belonging to the Host or being outside hosted agents

If hosted Clients are expected to use a single Agent across all DNAs, then Client == Agent. Else, we need a separate notion of a Client/User.

[[agents]]
id = "peter"
key_file = /home/peter/.config/Holochain/peter_id.priv
[agents.storage]
type = file
path = /home/peter/.config/Holochain/instances/Qmasdf23590hwaer
    
[[agents]]
id = "paul"
key_file = /home/paul/.config/Holochain/paul_id.priv

[[agents]]
id = "blog-indexer"
key_file = /home/blog-indexer/.config/Holochain/id.priv
    
[[agents]]
id = "michael-for-mary"
key_file = "lakjsdflkj.json"
host_for = "mary"
[agents.storage]
type = mongodb
username = michael-on-behalf-of-mary
password = xxxx
url = ...

DNAs

[[dnas]]
id = "clutter"
file = /usr/local/holochain/DNAs/clutter_dna.json
hash = "Qmasafasdf 32324sd9sd9d"

[[dnas]]
id = "blog"
file = /usr/local/holochain/DNAs/blog_dna.json
hash = "Qmasdf23590hwaer"

[[dnas]]
id = "blog-indexer"
file = /usr/local/holochain/DNAs/blog_indexer_dna.json
hash = "Qmas9asdfjk9sd9ksd9"

[[dnas]]
id = "dpki"
file = /usr/local/holochain/DNAs/dpki_dna.json
hash = "Qmasfksd98373ksd9df"    

Instances

Holo Hosts may need to transfer hosted chains to other hosts

[[instances]]
id = "mary's blog"
DNA = "blog"
agent = "michael-for-mary"
[instances.logger]
type = simple
file = /var/log/holochain/marys-blog.log

[[instances]]
id = "mary's clutter"
DNA = "clutter"
agent = "michael-for-mary"
[instances.logger]
type = simple
file = /var/log/holochain/marys-clutter.log

[[instances]]
id = "peter's blog"
DNA = "blog"
agent = "peter"
[instanceslogger]
type = simple
file = /var/log/holochain/blog-peter.log
[instancesstorage]
type = file
path = /home/peter/.config/Holochain/instances/Qmasdf23590hwaer

[[instances]]
id = "paul's blog"
DNA = "blog"
agent = "paul"
[instances.logger]
type = simple
file = /var/log/holochain/blog-paul.log
[instances.storage]
type = mongodb
username = paul
password = xxxx
url = ...

[[instances]]
id = "blog indexer"
DNA = "blog-indexer"
agent = "indexer-agent"
[instances.logger]
type = simple
file = /var/log/holochain/blog-indexer.log
[instances.storage]
type = mongodb
username = indexer-agent
password = xxxx
url = ...

Bridges section

In Holo case, bridging can only occur between instances of the same "client"

[[bridges]]
caller = "paul's blog"
callee = "dpki"

[[bridges]]
from = "paul's blog"
to = "blog indexer"

[[bridges]]
from = "peters's blog"
to = "blog indexer"

Blog app manifest.json:

{
    "bridges": {
        "required": {
            "dpki": "Qmasdht8w4yr98w34r"   
        },
        "optional": {
            "indexer": {
                "trait": "hc-indexer"
            }
        }
    }
}

Interfaces

[[interfaces]]
type = "websocket"
port = 8888
[interfaces.authorization]
type = pubkey
keys = "87isayrkuwgasiuawhoiw4ehartawer=="
[[interfaces.instances]]
id = "peter's blog"
[[interfaces.instances]]
id = "paul's blog"

[[interfaces]]
type = "domainsocket"
file = /home/peter/.config/Holochain/container.socket
admin = true
[interfaces.authorization]
type = pubkey
keys = "87isayrkuwgasiuawhoiw4ehartawer=="

    
        
        
Select a repo