-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: simplify context creation (#80)
- Loading branch information
1 parent
ef0151a
commit d2afee3
Showing
7 changed files
with
104 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
## Create a context using the Admin Dashboard | ||
|
||
1. Navigate to the "Contexts" tab and click the "Start New Context" button. | ||
2. Use the "Browse" button to select an application from the list. | ||
3. Choose application. | ||
4. Press "Start" to initiate the context creation process with the selected | ||
application. | ||
|
||
Visit [Admin Dashboard Page](../../developer-tools/apps/admin-dashboard) to view | ||
detailed instructions with images. | ||
|
||
After the context is created, you will be redirected to the context dashboard. | ||
Keep this page open as you will need the Context ID later. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
```bash title="Terminal" | ||
meroctl --node-name node1 context create --watch <application_path> | ||
``` | ||
|
||
:::tip | ||
|
||
`--watch` flag enables watching for changes of wasm files and updating context | ||
with the new version. | ||
|
||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
### Install the Application | ||
|
||
Run the following command to install the application: | ||
|
||
```bash title="Node Terminal" | ||
application install url {url} {metadata} | ||
``` | ||
|
||
:::note metadata example: | ||
|
||
```bash | ||
'{"contractAppId": "<application_id>"}' | ||
``` | ||
|
||
::: | ||
|
||
### Create a New Context | ||
|
||
```bash title="Node Terminal" | ||
context create {applicationId} | ||
``` | ||
|
||
```bash title="Output" | ||
context create Ahe2vLWLgswJARv5LsafXp7uJyb2Ba9GjzUSeLc71gUF | ||
2024-10-07T11:55:36.658396Z INFO calimero_context: Subscribed to context context_id=567C5Gg4mxHMPKy2wLJ4uvb3DHsbcpVDYUsuAWgTPgXn | ||
Created context 567C5Gg4mxHMPKy2wLJ4uvb3DHsbcpVDYUsuAWgTPgXn with | ||
identity DaSkad6DK7f6fUhjz1CvNW7L4TkWZmWqAcwysZHG3Xs5 | ||
``` | ||
|
||
![Create context](/cli/2-create-context.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
```bash title="Terminal" | ||
merod --node-name node1 run | ||
``` | ||
|
||
Wait for a few moments and node logs should appear. | ||
|
||
![Node running](/setup/node-running.png) | ||
|
||
When you see something like this that means that node is now ready for use. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
```bash title="Terminal" | ||
cargo run -p merod -- --node-name node1 run | ||
``` | ||
|
||
Wait for a few moments and node logs should appear. | ||
|
||
![Node running](/setup/node-running.png) | ||
|
||
When you see something like this that means that node is now ready for use. |