# Macos

## Prerequisites

### 1. Check & Install Homebrew

Check if Homebrew is installed:

```
 brew --version
```

If not installed, run the following:

```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

Add Homebrew to your PATH:

```
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc
source ~/.zshrc
```

Verify Installation

```
 brew doctor
```

Update Homebrew (recommended):

```
brew update
```

### 2. Check & Install Lima

Check if Lima is installed:

```
 limactl --version
```

If not installed, install Lima using Homebrew:

```
brew install lima
```

Start the default virtual machine:

```
limactl start
```

### 3. Access Virtual Machine Shell

Access Lima shell with root privileges:

```
lima sudo -i
```

Register nodeCN

```sh
curl 'https://www.janction.ai/v0/node/install.sh' |  NODE_ID= bash -s install
```

If successful, the following message will be displayed:

```
Congratulations! Installation completed successfully!
 === EdgeCore Configuration Summary === 
KubeEdge Version: v1.20.0
Configuration Status:
- metaServer: enabled
- edgeMesh: disabled
- edgeStream: enabled
Backup File: /etc/kubeedge/config/edgecore.yaml.20250720_000731.bak
=======================================

=== Service Management Commands ===
To start edgecore service:
  systemctl start edgecore
To check edgecore service status:
  systemctl status edgecore
To stop edgecore service:
  systemctl stop edgecore
=======================================
    
```

### 5. Manage Lima Virtual Machine

**Do not stop the VM while the node is active.**

Stop the virtual machine:

```
limactl stop default
```

Check VM status:

```
 limactl status default
```

Delete the virtual machine:

```
 limactl delete default
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.janction.ai/gpu-marketplace/node-deployment-tutorial/macos.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
