├── .gitignore ├── assets ├── ps.png ├── tree.png ├── ps_id.png ├── connect.png └── launch-corewave.png └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_store -------------------------------------------------------------------------------- /assets/ps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubewave/corewave/HEAD/assets/ps.png -------------------------------------------------------------------------------- /assets/tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubewave/corewave/HEAD/assets/tree.png -------------------------------------------------------------------------------- /assets/ps_id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubewave/corewave/HEAD/assets/ps_id.png -------------------------------------------------------------------------------- /assets/connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubewave/corewave/HEAD/assets/connect.png -------------------------------------------------------------------------------- /assets/launch-corewave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubewave/corewave/HEAD/assets/launch-corewave.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Corewave 3 | 4 | 5 | [![made-with-Go](https://img.shields.io/badge/Made%20with-Go-1f425f.svg)](https://go.dev/) 6 | [![Website shields.io](https://img.shields.io/website-up-down-green-red/http/shields.io.svg)](http://cubewave.dev/) 7 | 8 | [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow)](https://twitter.com/cubewave_dev) 9 | [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/dEFaa5uf6g) 10 | 11 | ## What is Cubewave? 12 | Cubewave serves as the Heroku for AI agents, allowing easy deployment of your LLM in a secure cloud environment from tools like Rivet, langflow... 13 | 14 | Cubewave is providing tools to make deploying microVMs through Firecracker simpler, minimizing the complexities entailed in the process. 15 | 16 | - **Corewave** operates as the equivalent of "docker-compose" for microVMs, enabling the configuration and creation of microVMs through a YAML file. 17 | 18 | 19 | ## Community and Updates 20 | 21 | To keep updated on our progress, join our discord [server](https://discord.gg/dEFaa5uf6g) and follow us on [Twitter](https://twitter.com/cubewave_dev)! 22 | 23 | ## Requirements: 24 | 25 | ### KVM requirements: 26 | 27 | In order to create micro vm, you need to make sure KVM is enabled on your machine 28 | 29 | ```lsmod | grep kvm``` 30 | 31 | The output should be something like this: 32 | ``` 33 | kvm_intel 342150 0 34 | kvm 960692 1 kvm_intel 35 | irqbypass 15324 1 kvm 36 | ``` 37 | ### OS requirements: 38 | 39 | Cubewave currently runs on Linux Ubuntu and you also need to have at least 5GB of available storage 40 | 41 | # Corewave: 42 | ## Installation 43 | 44 | ``` 45 | wget --quiet -O - https://repo.cubewave.dev/cubewave-pubkey.asc | sudo tee /etc/apt/keyrings/cubewave-pubkey.asc 46 | echo "deb [signed-by=/etc/apt/keyrings/cubewave-pubkey.asc arch=$( dpkg --print-architecture )] https://repo.cubewave.dev $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/apt-cubewave.list 47 | apt update 48 | apt install corewave 49 | ``` 50 | 51 | To verify that corewave is successfully installed run `corewave version` 52 | 53 | you should get something like this: ```corewave v.0.1``` 54 | 55 | 56 | ## Running your first MicroVM 57 | 58 | ### YAML file structure: 59 | 60 | Corewave requires a YAML files that defines the configuration of the MicroVM(s) you want to deploy, below is how the file should be structured: 61 | ```yaml 62 | version: "1" 63 | specs: 64 | MyApp1: 65 | logsPath: "FC_MyApp.log" 66 | CPU: 1 67 | RAM: 1024 68 | image: "sample_app" 69 | 70 | MyApp2: 71 | ... 72 | 73 | MyApp3: 74 | ... 75 | ``` 76 | 77 | `version`: Configuration version 78 | 79 | `spec`: Specs block, within we specify the configuration of all our MicroVMs 80 | 81 | `MyApp1`: Name of the MicroVM to provision (you can name it whatever you want) 82 | 83 | `logsPath`: Path of the Firecracker log file 84 | 85 | `CPU`: Number of host CPUs to allocate to the MicroVM 86 | 87 | `RAM`: Amount of RAM to allocate to the MicroVM (in MB) 88 | 89 | `Image`(optional): Absolute path to any executable you want to run as a daemon in the MicroVm. 90 | 91 | 92 | ### Running Corewave 93 | 94 | Once your YAML file is ready you run Corewave and pass it the configuration file using the `-f` flag: 95 | 96 | ``` 97 | sudo corewave -f config.yml 98 | ``` 99 | ![Corewave-launch](assets/launch-corewave.png) 100 | 101 | Corewave will then generate the necessary infrastructure components on your host VM and run firecracker with the required configuration to provision your MicroVMs. 102 | 103 | **Note:** For now Corewave needs to run with privileged permissions so please make sure you are either root or using sudo when running Corewave 104 | 105 | /!\ **After each new executing of Corewave to provision new MicroVMs, the previous set of MicroVMs and data will be deleted. This will be changed in the upcoming release.** /!\ 106 | 107 | # Working with MicroVm: 108 | 109 | Once your MicroVMs are up and running, Corewave provides a set of commands to easily monitor and interact with your MicroVMs: 110 | 111 | ## MicroVM data and configuration files: 112 | 113 | Corewave stores all data and configuration related to each MicroVM in the default `$HOME` directory under `.cubewave` 114 | 115 | ![Corewave-conf](assets/tree.png) 116 | 117 | ## Listing MicroVM: 118 | 119 | Use `corewave ps` to get the list of currently running MicroVMs 120 | 121 | ![Corewave-ps](assets/ps.png) 122 | 123 | You can also use the ps argument to get information about a specific MicroVM only, by providing its id using corewave ps {id} 124 | 125 | ![Corewave-ps-id](assets/ps_id.png) 126 | 127 | 128 | ## Connecting to a MicroVM: 129 | 130 | You can simply use `ssh` to connect to a MicroVM, authentication is based on an ssh key that located in the config directory of every MicroVM under `$HOME/.cubewave/{ID}/fs/ubuntu-22.04.id_rsa` 131 | 132 | `{ID}` is ID of the MicroVM you want to connect to. 133 | 134 | ![Corewave-connect](assets/connect.png) 135 | --------------------------------------------------------------------------------