Skip to content

Commit

Permalink
Update docs for 0.9.1-beta and installation script fix (#61)
Browse files Browse the repository at this point in the history
* chore: Fix installation script for 0.9.1-beta release, update docs for Yaci CLI distribution
  • Loading branch information
satran004 authored Aug 14, 2024
1 parent 41c0259 commit b79204a
Show file tree
Hide file tree
Showing 7 changed files with 579 additions and 490 deletions.
1 change: 1 addition & 0 deletions docs/pages/_meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"index": "Introduction",
"yaci_cli_distribution": "Yaci CLI (Non Docker Dist)",
"how_to_use": "How to use",
"about": {
"title": "About",
Expand Down
5 changes: 4 additions & 1 deletion docs/pages/about.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# About

//TODO
The Yaci DevKit offers a customizable Cardano devnet that quickly launches and resets via the Yaci CLI, enabling faster
iterations for developers. It features Yaci Store, a lightweight indexer using H2, and Yaci Viewer, a browser-based interface for viewing transactions.
It supports flexible configurations, integrates with Ogmios and Kupo, and is compatible with Blockfrost API endpoints, all easily deployable
with Docker Compose for efficient setup.
30 changes: 28 additions & 2 deletions docs/pages/index.mdx
Original file line number Diff line number Diff line change
@@ -1,28 +1,54 @@
import { Callout } from 'nextra/components'

# Introduction

The Yaci DevKit offers a customizable Cardano devnet that quickly launches and resets via the Yaci CLI, enabling faster
iterations for developers. It features Yaci Store, a lightweight indexer using H2, and Yaci Viewer, a browser-based interface
for viewing transactions. It supports flexible configurations, integrates with Ogmios and Kupo, and is compatible
with Blockfrost API endpoints, all easily deployable with Docker Compose for efficient setup.

## Distribution Types

1. **Yaci DevKit:** A Docker Compose-based distribution that includes all required components. This is the **recommended**
distribution for most users. Follow the installation instructions in the next section to install Yaci DevKit.

2. **Yaci CLI (Non-Docker):** A ZIP distribution that includes only Yaci CLI. This distribution is useful for users who
prefer to use Yaci CLI without Docker. With this distribution, you can download and manage required components like Cardano Node,
Ogmios, Kupo, and Yaci Store using Yaci CLI. For installation instructions, refer to the [Yaci CLI Installation](/yaci_cli_distribution) section.

This version improves readability and consistency in terminology.

## Yaci DevKit Installation

## Pre-requisites:
- Docker

## Installation

To install latest stable version of Yaci DevKit, run:

```bash
curl -s "https://devkit.yaci.xyz/install.sh" | bash
curl --proto '=https' --tlsv1.2 -LsSf https://devkit.yaci.xyz/install.sh | sh
```

To install a specific version of Yaci DevKit, run:

```bash
curl -s "https://devkit.yaci.xyz/install.sh" | bash -s -- <version>
curl --proto '=https' --tlsv1.2 -LsSf https://devkit.yaci.xyz/install.sh | sh -s -- <version>
```

**Note:** Replace `<version>` with the desired version number without the `v` prefix.

## Zip Installation

Download the latest zip from [release section](https://github.com/bloxbean/yaci-devkit/releases) and unzip it.
<br/>

<Callout type={"error"}>
**Important:**

In Yaci DevKit **v0.9.1-beta** and later, the Yaci CLI's native executable is the default. If you encounter issues starting DevKit,
you can switch back to the Java version by setting the **`yaci_cli_mode`** environment variable to **`java`** in the `config/env` file within
the Yaci DevKit installation directory."
</Callout>

6 changes: 6 additions & 0 deletions docs/pages/tutorials/meshjs/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { Callout } from 'nextra/components'

# Building transactions with Mesh SDK and submit to Yaci Devnet's Cardano Node

<Callout type={'info'}>
More documentation on the Mesh SDK's Yaci DevKit Integration can be found [here](https://meshjs.dev/yaci).
</Callout>

This example demonstrates how to build a transaction with the Mesh SDK and submit it to the Yaci Devnet's Cardano Node. The [Mesh SDK](https://meshjs.dev/) is a JavaScript library that provides a set of tools to interact with the Cardano blockchain.

### Yaci Provider to query and submit with Yaci instance
Expand Down
135 changes: 135 additions & 0 deletions docs/pages/yaci_cli_distribution.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
import { Callout } from 'nextra/components'

## Introduction

For users who prefer not to use Docker, there's a ZIP distribution that contains only Yaci CLI. This allows you to download
and manage necessary components like Cardano Node, Ogmios, Kupo, and Yaci Store directly through the command line.

Please note that **Yaci Viewer** is not currently supported out-of-the-box in this distribution.

### Who is this for?

- **Developers and system administrators:** Quickly set up a new custom node or multi-node networks
- **Users wanting more control:** Easily manage compatible component versions and configurations

### Key advantages of the Yaci CLI distribution:

- **Reduced Disk Space:** Requires less disk space than the Docker image, containing only the Yaci CLI binary, configuration files, and any downloaded components.
- **Version Flexibility:** Specify compatible versions of Cardano Node and other components directly in the download configuration file if the default versions don't meet your requirements.
- **Customizable Setup:** Developers can selectively enable components like Yaci Store, Ogmios, and Kupo to achieve the same functionality as the Yaci DevKit Docker image.


## Supported Platforms

Yaci CLI is currently supported on the following platforms:

1. **Linux x86:** Tested on Ubuntu 20.04, Ubuntu 22.04
2. **MacOS 14 (Arm64) or later**

## Installation

- Download the latest version of the Yaci CLI Zip file from the [releases page](https://github.com/bloxbean/yaci-devkit/releases).
- Unzip the downloaded file.
- You will find the `yaci-cli` binary in the unzipped folder, and the configuration files in the `config` folder.

## Run Yaci CLI

You can now run the `yaci-cli` binary. However, this distribution doesn't include any of the necessary components for creating a devnet.
You'll need to download these using Yaci CLI before proceeding.


## Download Components

The simplest way to download the necessary components is to use the `download` command. This will automatically download all
the required components for your specific platform, including Cardano Node, Ogmios, Kupo, Yaci Store, and JRE.

```shell
yaci-cli:> download
```

All components will be downloaded to the `$user_home/.yaci-cli` folder by default.

If you need to replace any existing components, simply use the `--overwrite` option.


```shell
yaci-cli:> download --overwrite
```

Alternatively, you can download the components individually using the `download -c <component>` command, replacing `<component>` with the specific component you want to download.

```shell
yaci-cli:> download -c node
yaci-cli:> download -c ogmios
yaci-cli:> download -c kupo
yaci-cli:> download -c yaci-store
```

<Callout type="warning">
**Note:** You can change the default `yaci-cli` home folder by setting the `yaci.cli.home` property in the `application.properties` configuration file.
</Callout>

## Create a new Devnet

Once you have downloaded the required components, you're ready to create a new devnet. You can use the `create-node` command to do this.

```shell
yaci-cli:> create-node -o --start
```

This command will create a new devnet with a single node and start it. By default, Yaci Store, Ogmios, and Kupo are disabled.
You can enable them by setting their respective `enabled` properties to `true` in the `config/application.properties` file.

Alternatively, you can use the `enable-kupomios`, `enable-yacistore`, or `enable-kupo` commands before creating/starting the devnet.

For more information on the available commands and their usage, refer to the Yaci CLI commands documentation [here](/commands).

## Configuration

You'll find three configuration files within the `config` folder:

### **application.properties :**

This is the main configuration file to manage the functionality of Yaci CLI.

#### 1. Enable/Disable Optional Components

By default, all optional components are disabled. To enable any of them, simply set their respective `enabled` property to `true`.

```properties
ogmios.enabled=true
kupo.enabled=true
yaci.store.enabled=true
```
<Callout type="warning">
**Note:** If you want to use Yaci Store for transaction building, script cost evaluation, and transaction submission via a Blockfrost-compatible API layer,
you'll need to enable both `Yaci Store` and `Ogmios`.

</Callout>

#### 2. Update Ports
You can update the default ports for the Ogmios, Kupo, and Yaci Store.

```properties
ogmios.port=1337
kupo.port=1442
yaci.store.port=8080
```

### **node.properties**

This file contains the configuration for the Cardano Node. You can update the configuration as per your requirements to modify the node's genesis configuration.

### **download.properties**

This file contains the default download versions for the various components. You can update these versions or even provide direct download URLs if needed.
This configuration helps you to download specific compatible versions of Cardano Node or other components, giving you greater control over your environment.

## Multi Node Network Setup

Since Yaci CLI is used in both Yaci DevKit and this distribution, the commands to create a multi-node network remain the same.
You can follow the instructions provided in the [Additional Nodes on Different Machines](/multi-node-setup#additional-nodes-on-different-machines) section of the multi-node setup guide.




2 changes: 1 addition & 1 deletion docs/public/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if [ -z "$1" ]; then
fi
# Fetch the latest release version from GitHub
VERSION=$(curl -s "https://api.github.com/repos/bloxbean/yaci-devkit/releases/latest" | jq -r '.tag_name' | sed 's/^v//')
ARTIFACT=$(curl -s "https://api.github.com/repos/bloxbean/yaci-devkit/releases/latest" | jq -r '.assets[0].name')
ARTIFACT="yaci-devkit-$VERSION.zip"
echo "No version specified. Fetching latest version: $VERSION"
else
VERSION=$1
Expand Down
Loading

0 comments on commit b79204a

Please sign in to comment.