Skip to content

Commit

Permalink
docs: add instructions for installing using lima (#31)
Browse files Browse the repository at this point in the history
* docs: add instructions for installing using lima

---------

Signed-off-by: Nianyu Shen <[email protected]>
  • Loading branch information
nianyush authored Oct 17, 2024
1 parent 35152be commit 1c2b7f0
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 5 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,8 @@ Refer to [Palette Agent Parameters Documentation](https://docs.spectrocloud.com/

Here are some examples of how to use the install script on different platforms.

### MAAS

Use [maas.yml](examples/maas.yml) as cloudinit to provision your machine.

> **Note:** You might need to modify the cloudinit with your own userdata.
- [MAAS](examples/maas/README.md)
- [Lima](examples/lima/README.md)

## Development

Expand Down
24 changes: 24 additions & 0 deletions examples/lima/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Deploying agent-mode on a Lima VM

1. Ensure you have `lima` installed. If not, follow the instructions [here](https://lima-vm.io/docs/installation/)
2. Install `socket_vmnet`. Follow the instructions [here](https://lima-vm.io/docs/config/network/#socket_vmnet)
3. Download [lima.yaml](lima.yaml) and modify this line to your userdata path. It can be an URL or a file path.

```bash
export USERDATA=<path-to-your-userdata>
```

> **Note:** Check more about lima configuration [here](https://lima-vm.io/docs/config/)
4. Create and start the VM

```bash
limactl create --name spectro-agent-mode lima.yaml
limactl start spectro-agent-mode
```

5. That's it! You can now shell into the VM

```bash
limactl shell spectro-agent-mode
```
40 changes: 40 additions & 0 deletions examples/lima/lima.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This template requires Lima v0.7.0 or later.
images:
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-amd64.img"
arch: "x86_64"
digest: "sha256:0e25ca6ee9f08ec5d4f9910054b66ae7163c6152e81a3e67689d89bd6e4dfa69"
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-arm64.img"
arch: "aarch64"
digest: "sha256:5ecac6447be66a164626744a87a27fd4e6c6606dc683e0a233870af63df4276a"
# Fallback to the latest release image.
# Hint: run `limactl prune` to invalidate the cache
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-amd64.img"
arch: "x86_64"
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-arm64.img"
arch: "aarch64"

vmType: "vz"
memory: 8GiB
hostResolver:
enabled: false
dns:
- 1.1.1.1
- 1.0.0.1
networks:
- lima: bridged
interface: en0

mounts:
- location: "/tmp/lima"
writable: true

provision:
- mode: system
script: |
#!/bin/sh
DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y conntrack jq zstd rsync curl systemd
export USERDATA=<path-to-your-userdata>
curl -Ls https://github.com/spectrocloud/agent-mode/releases/latest/download/palette-agent-install.sh | bash
5 changes: 5 additions & 0 deletions examples/maas/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Deploying agent-mode on MAAS

Use [maas.yml](maas.yml) as cloudinit to provision your machine.

> **Note:** You might need to modify the cloudinit with your own userdata.
File renamed without changes.

0 comments on commit 1c2b7f0

Please sign in to comment.