Skip to content

Commit

Permalink
PLT-3026 Updated images and separated docker instructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
bwbush committed Mar 23, 2023
1 parent ebde16f commit 069fa7f
Show file tree
Hide file tree
Showing 12 changed files with 1,065 additions and 833 deletions.
112 changes: 90 additions & 22 deletions 00-preliminaries-with-demeter.ipynb → 00-preliminaries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"id": "4f3e8ba1-d2d2-4393-8c9e-8d324d444230",
"metadata": {},
"source": [
"# Preliminaries for Using Marlowe with Demeter.Run\n",
"# Preliminaries for Using the Marlowe Starter Kit\n",
"\n",
"The [demeter.run](https://demeter.run/) web3 development platform provides an extension *Cardano Marlowe Runtime* that has Marlowe tools installed and makes available the Marlowe Runtime backend services and a Cardano node. No setting of environment variables or installation of tools or running of backend services is needed when using Demeter Run's Cardano Marlowe Runtime extension.\n",
"The [demeter.run](https://demeter.run/) web3 development platform provides an extension *Cardano Marlowe Runtime* that has Marlowe tools installed and makes available the Marlowe Runtime backend services and a Cardano node. If you are not using [demeter.run](https://demeter.run/), then see [docker.ipynb](docker.ipynb) for instructions on deploying Marlowe Runtime using docker.\n",
"\n",
"This notebook provides instructions on setting up one's environment for running the Marlowe examples in this starter kit. It covers the following information:\n",
"This notebook provides instructions on setting up signing keys and addresses for this starter kit. It covers the following information:\n",
"\n",
"- Marlowe tools\n",
"- Creating addresses and signing keys\n",
Expand Down Expand Up @@ -39,6 +39,71 @@
"![Tools for Running and Querying Marlowe Contracts](images/marlowe-tools.png)"
]
},
{
"cell_type": "markdown",
"id": "1d04e564-9695-43f2-b465-74fab8f21f5b",
"metadata": {},
"source": [
"### Access to Cardano node and Marlowe Runtime\n",
"\n",
"If we're using [demeter.run](https://demeter.run/)'s Cardano Marlowe Runtime extension, then we already have access to Cardano Node and Marlowe Runtime. The followind commands will set the required environment variables to use a local docker deployment on the default ports. It will also set some supplementary environment variables."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "37eac541-8c51-47ba-b50e-10d70ad321e0",
"metadata": {
"tags": [],
"vscode": {
"languageId": "shellscript"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CARDANO_NODE_SOCKET_PATH = /home/bbush/.local/share/containers/storage/volumes/marlowe-compose_shared/_data/node.socket\n",
"CARDANO_TESTNET_MAGIC = 1\n",
"MARLOWE_RT_HOST = 127.0.0.1\n",
"MARLOWE_RT_PORT = 3700\n"
]
}
],
"source": [
"if [[ -z \"$MARLOWE_RT_PORT\" ]]\n",
"then\n",
"\n",
" if command -v podman > /dev/null\n",
" then\n",
" DOCKER_CLI=podman\n",
" else\n",
" DOCKER_CLI=docker\n",
" fi\n",
" \n",
" # Only required for `marlowe-cli` and `cardano-cli`.\n",
" export CARDANO_NODE_SOCKET_PATH=\"$($DOCKER_CLI volume inspect marlowe-compose_shared | jq -r '.[0].Mountpoint')/node.socket\"\n",
" export CARDANO_TESTNET_MAGIC=1 # Note that preprod=1 and preview=2. Do not set this variable if using mainnet.\n",
"\n",
"fi\n",
"\n",
"# FIXME: This should have been inherited from the parent environment.\n",
"if [[ -z \"$CARDANO_NODE_SOCKET_PATH\" ]]\n",
"then\n",
" export CARDANO_NODE_SOCKET_PATH=/ipc/node.socket\n",
"fi\n",
"\n",
"# FIXME: This should have been set in the parent environment.\n",
"if [[ -z \"$CARDANO_TESTNET_MAGIC\" ]]\n",
"then\n",
" export CARDANO_TESTNET_MAGIC=$CARDANO_NODE_MAGIC\n",
"fi\n",
"\n",
"echo \"CARDANO_NODE_SOCKET_PATH = $CARDANO_NODE_SOCKET_PATH\"\n",
"echo \"CARDANO_TESTNET_MAGIC = $CARDANO_TESTNET_MAGIC\""
]
},
{
"cell_type": "markdown",
"id": "59a66d6d-383b-43f3-ac65-b062027fa5fc",
Expand All @@ -51,10 +116,13 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"id": "bf4c8f7b-19b3-44f6-b3c5-5f762a33c2a2",
"metadata": {"vscode": {"languageId" : "shellscript"},
"tags": []
"metadata": {
"tags": [],
"vscode": {
"languageId": "shellscript"
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -107,7 +175,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"id": "8bb867d3-f099-4ce9-8411-af904024e729",
"metadata": {
"tags": [],
Expand All @@ -131,7 +199,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"id": "d3b8e993-a6c8-4307-a8f7-772b15d37731",
"metadata": {
"tags": [],
Expand Down Expand Up @@ -159,7 +227,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"id": "1f8ede90-4c8d-4c97-a449-36e7a37aca42",
"metadata": {
"tags": [],
Expand Down Expand Up @@ -197,7 +265,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"id": "c66c378f-34f8-484f-acc7-200a40fb2468",
"metadata": {
"tags": [],
Expand All @@ -221,7 +289,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"id": "e0be461f-2399-4b28-a0c6-21966383bafd",
"metadata": {
"tags": [],
Expand Down Expand Up @@ -249,7 +317,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 8,
"id": "67e73e10-0d09-4c8f-b4d0-07ccc34f11cb",
"metadata": {
"tags": [],
Expand Down Expand Up @@ -287,7 +355,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 9,
"id": "7a4cfdc0-0150-428d-b242-b463dea5a0c7",
"metadata": {
"tags": [],
Expand All @@ -311,7 +379,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 10,
"id": "540e6045-d92c-49da-af39-cd339a5963b0",
"metadata": {
"tags": [],
Expand Down Expand Up @@ -339,7 +407,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 11,
"id": "6ed6137d-b9fe-4a87-b0a4-f2b802fa96e4",
"metadata": {
"tags": [],
Expand Down Expand Up @@ -377,7 +445,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 12,
"id": "89967b6a-01a0-42a6-ba70-258f67a2ddba",
"metadata": {
"tags": [],
Expand All @@ -401,7 +469,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 13,
"id": "81238600-8ae9-43fd-881f-5bb1ab85688d",
"metadata": {
"tags": [],
Expand Down Expand Up @@ -429,7 +497,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 14,
"id": "16cd8dd9-153c-4abc-903e-a91e742044ca",
"metadata": {
"tags": [],
Expand Down Expand Up @@ -471,7 +539,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 15,
"id": "73e739b1-9d2f-4f36-b1ce-24e9e6c88f4b",
"metadata": {
"tags": [],
Expand Down Expand Up @@ -504,7 +572,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 16,
"id": "7c2069be-6817-4193-90bf-fd2a5fb26de7",
"metadata": {
"tags": [],
Expand Down Expand Up @@ -553,7 +621,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 17,
"id": "5bcf4056-963b-41e1-b963-6af2c09498b5",
"metadata": {
"tags": [],
Expand Down Expand Up @@ -598,7 +666,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 18,
"id": "d4f822da-45bf-4222-95fa-5ce6a912869b",
"metadata": {
"tags": [],
Expand Down
4 changes: 2 additions & 2 deletions 00-preliminaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

The [demeter.run](https://demeter.run/) web3 development platform provides an extension *Cardano Marlowe Runtime* that has Marlowe tools installed and makes available the Marlowe Runtime backend services and a Cardano node. No setting of environment variables or installation of tools or running of backend services is needed when using Demeter Run's Cardano Marlowe Runtime extension.

- If you are using this starter kit with the *Cardano Marlowe Runtime* extension for [demeter.run](https://demeter.run/), then visit [00-preliminaries-with-demeter.ipynb](00-preliminaries-with-demeter.ipynb) to set up wallets.
- If you are **not** using [demeter.run](https://demeter.run/) and need to start your own instance of Marlowe Runtimme, then visit [00-preliminaries-without-demeter.ipynb](00-preliminaries-without-demeter.ipynb) to set up Marlowe Runtime and wallets.
- If you are using this starter kit with the *Cardano Marlowe Runtime* extension for [demeter.run](https://demeter.run/), then visit [00-preliminaries.ipynb](00-preliminaries.ipynb) to set up wallets.
- If you are **not** using [demeter.run](https://demeter.run/) and need to start your own instance of Marlowe Runtimme, first visit [docker.ipynb](docker.ipynb) to set up Marlowe Runtime and then visit [00-preliminaries.ipynb](00-preliminaries.ipynb) to set up wallets.
Loading

0 comments on commit 069fa7f

Please sign in to comment.