# Starting the HoloPortOS VM ## 1. Checkout holo-nixpkg - using branch 201908/demo ``` holoportos-shell demo ``` ## 2. Initialize - See /var/lib/holochain-conductor ``` holoport-initialize ``` # Post init holo steps ## 1. Create the HoloFuel hApp, registering name & DNA - Eventually, this would also include the UI bundle - For now, it needs to be placed in the correct location ``` $ holo happ create holofuel https://holo-host.github.io/holofuel/releases/download/0.9.7-alpha1/holofuel.dna.json QmcqAKFLP6WrjWghWVzrgnoa72EWu211C7Fu2F1FwRMU1k { "Ok": "QmT9sisxtTXKGinCjcxp5nd1JhnbZDPru4sYJYXNSpM8U4" } ``` - To discover this hash later (or other hApp info), run ``` $ holo happ list { "Ok": [ { "address": "QmT9sisxtTXKGinCjcxp5nd1JhnbZDPru4sYJYXNSpM8U4", "appEntry": { "title": "holofuel", "author": "Host Agent", "description": "", "thumbnailUrl": "", "homepageUrl": "", "dnas": [ { "location": "https://holo-host.github.io/holofuel/releases/download/0.9.7-alpha1/holofuel.dna.json", "hash": "QmcqAKFLP6WrjWghWVzrgnoa72EWu211C7Fu2F1FwRMU1k", "handle": null } ], "ui": null }, "upvotes": 0, "upvotedByMe": false } ] } ``` ## 2. Register as a Holo provider ``` $ holo provider register sam.rose@holo.host { "Ok": "QmcbaToRnAZVb3Z2JGvGDRsJxuwxUrWWZ8adDAc9sBCXDd" } ``` ## 3. As a Holo provider, register a hApp you want to provide - This will produce a hash ``` $ holo provider register-app QmT9sisxtTXKGinCjcxp5nd1JhnbZDPru4sYJYXNSpM8U4 holofuel-demo.holohost.net { "Ok": "QmYF8vySWg1UEmDP2zLHBbCg5VZgMe1KcmDAgTiFNmmspJ" } ``` ## 4. Register as a Host ``` holo host register sam.rose@holo.host { "Ok": "QmbHczonxrXLDAsF64wMTiga1gN2LJWxF6QthqWCxT3sYk" } ``` ## 5. Enable the Happ you want to host using the 'provided hApp' hash from above ``` holo host enable QmYF8vySWg1UEmDP2zLHBbCg5VZgMe1KcmDAgTiFNmmspJ { "Ok": null } ``` ## 6. Add DNA(s) to conductor Install the DNAs listed for this hApp in the hApp Store. ``` $ holo admin install QmT9sisxtTXKGinCjcxp5nd1JhnbZDPru4sYJYXNSpM8U4 --directory /var/lib/holo-envoy/.holochain/holo/dnas [ { "success": true, "dna_hash": "QmcqAKFLP6WrjWghWVzrgnoa72EWu211C7Fu2F1FwRMU1k" } ] ``` - Observe the DNAs available in conductor: ``` holo admin dna [ { "id": "happ-store", "hash": "Qmd6pArbijQ3ija5FnyrMaZirXJL83afbj8DJGuAENAdM9" }, { "id": "holo-hosting-app", "hash": "QmbTLCyz5qEELA16vHuiWGvZK269GSeRxbWttKbz24EmyV" }, { "id": "holofuel", "hash": "QmcqAKFLP6WrjWghWVzrgnoa72EWu211C7Fu2F1FwRMU1k" }, { "id": "servicelogger", "hash": "QmVjnU4fsHLCywS1RnTzsL99LYZcxgmnJKJdNM5syAAie7" }, { "id": "QmcqAKFLP6WrjWghWVzrgnoa72EWu211C7Fu2F1FwRMU1k", "hash": "QmcqAKFLP6WrjWghWVzrgnoa72EWu211C7Fu2F1FwRMU1k" } ] ``` ## 7. Create a "service logger" instance for each newly added DNA ``` holo admin init QmT9sisxtTXKGinCjcxp5nd1JhnbZDPru4sYJYXNSpM8U4 --service-logger servicelogger [ { "success": true } ] ``` - Observe the instances running: ``` holo admin instance [ { "id": "happ-store", "dna": "happ-store", "agent": "host-agent" }, { "id": "holo-hosting-app", "dna": "holo-hosting-app", "agent": "host-agent" }, { "id": "holofuel", "dna": "holofuel", "agent": "host-agent" }, { "id": "servicelogger", "dna": "servicelogger", "agent": "host-agent" }, { "id": "servicelogger-QmcqAKFLP6WrjWghWVzrgnoa72EWu211C7Fu2F1FwRMU1k", "dna": "servicelogger", "agent": "host-agent" } ] ``` - See that holochain started it: ``` $ journalctl -u holochain-conductor.service --follow -- Logs begin at Wed 2019-08-28 18:33:08 UTC. -- Aug 30 14:56:40 holoportos holochain[645]: @@@@ [Object: null prototype] { type: 'connection', id: 'wss:in:6.8d3ryk3c4f' } Aug 30 14:56:40 holoportos holochain[645]: (@realmode@) [w] (SciP)HcScIbN4QeCyfnpj8ix9Y3BWFfYcyns3hJ3FUXYe88cSsq45k3abNf943P9tVji already tracking QmVjnU4fsHLCywS1RnTzsL99LYZcxgmnJKJdNM5syAAie7 Aug 30 14:56:40 holoportos holochain[645]: Reading DNA from /nix/store/7p0a494m753dq48haavnzgkf9bqg8fv7-happ-store/happ-store.dna.json Aug 30 14:56:40 holoportos holochain[645]: Reading DNA from /nix/store/kvpj3ifpi34x2jrkq80z7zghsfb2277h-holo-hosting-app/holo-hosting-app.dna.json Aug 30 14:56:40 holoportos holochain[645]: Reading DNA from /nix/store/0p6hd2j5v9izvdyjsnkcn3dkvqiq4z1k-holofuel/holofuel.dna.json Aug 30 14:56:40 holoportos holochain[645]: Reading DNA from /nix/store/8kwhxfs8hrrfy8sr9l3hwcqwqplma25b-servicelogger/servicelogger.dna.json Aug 30 14:56:40 holoportos holochain[645]: Reading DNA from /nix/store/8kwhxfs8hrrfy8sr9l3hwcqwqplma25b-servicelogger/servicelogger.dna.json Aug 30 14:56:40 holoportos holochain[645]: Stopping interface internal-interface Aug 30 14:56:41 holoportos holochain[645]: Starting interface 'internal-interface'. Aug 30 14:56:41 holoportos holochain[645]: Starting instance "servicelogger-QmcqAKFLP6WrjWghWVzrgnoa72EWu211C7Fu2F1FwRMU1k"... ``` - The available network interfaces: ``` holo admin interface [ { "id": "master-interface", "driver": { "type": "websocket", "port": 1111 }, "admin": true, "instances": [ { "id": "happ-store" }, { "id": "holo-hosting-app" }, { "id": "holofuel" }, { "id": "servicelogger" } ] }, { "id": "internal-interface", "driver": { "type": "websocket", "port": 2222 }, "admin": false, "instances": [ { "id": "servicelogger-QmcqAKFLP6WrjWghWVzrgnoa72EWu211C7Fu2F1FwRMU1k" } ] }, { "id": "public-interface", "driver": { "type": "websocket", "port": 3333 }, "admin": false, "instances": [] } ] ``` ###### tags: `Holo`