Vimana is an orchestration client that enables developers to build and deploy networks in the Vistara ecosystem. It simplifies network orchestration by abstracting the complexities of network management and providing a simple interface for developers to build and deploy networks in the Vistara ecosystem.
The goal of Vimana is to focus on efficiency and ease of use, enabling developers to quickly build and deploy networks without having to worry about the underlying infrastructure. By leveraging the power of open-source development, Vimana can drive adoption and participation in networks that were previously only accessible through managed SaaS products or a team of network engineers.
Vimana is designed to be a fun, functional, and easy way to build and deploy distributed networks. It is extremely flexible and can be used by developers of all skill levels to create and deploy networks in the Vistara ecosystem. With Vimana, developers can quickly build and deploy networks with just one command.
Vimana means “flying machine” in Sanskrit, and it is a fitting name for an orchestration client in the Vistara ecosystem. Just as the Vimana was a flying machine that enabled ancient civilizations to explore and discover new worlds, Vimana enables developers to explore and discover new networks that scale and grow with their needs.
plugins/proto/sc.proto
.Additional features include:
vimana
.Open terminal and run:
curl -L https://vistara-labs.github.io/vimana/install.sh | bash && vimana init
vimana run celestia light-node
Install Binary:
curl -L https://vistara-labs.github.io/vimana/install.sh | bash
Install from Source: make build
## Spacecore Development
Spacecore is a programming plugin that enables developers to build and deploy their networks on Vistara. Vimana simplifies the process of building and deploying Spacecores by providing ready-to-go templates and tools that make it easy for developers to get started.
The Spacecore development is a key part of the Vistara ecosystem. It implements Hashicorp's go-plugin for enabling plugin architecture. Developers can implement the plugin interface in the `plugins/proto/sc.proto` file to create their own Spacecores. Vimana provides lifecycle management of Spacecores, including starting, stopping, checking status, and viewing logs.
This makes it super easy for developers to focus on the business logic of how the Spacecore should work, without having to worry about the underlying infrastructure or network management.
To start, developers can `scaffold` a new Spacecore using Vimana. This creates a new Spacecore with a programming plugin that can be deployed anywhere. Developers can then use Vimana to manage the lifecycle of the Spacecore, including starting, stopping, checking status, and viewing logs.
You can build a Spacecore in any modern programming language. Currently, scaffold command bootstraps a new Spacecore as a Go project. It clones the Spacecore template from https://github.com/vistara-labs/spacecore-template and customizes it with your environment.
Scalfolding a new Spacecore:
```sh
vimana scaffold
# ? Enter the spacecore name: [aiops-spacecore]
The structure of the Spacecore template is as follows:
.
├── README.md
├── bin
│ └── aiopsd # generated Spacecore plugin binary
├── buf.gen.yaml # buf configuration to generate protobuf files
├── go.mod
├── go.sum
├── grpc.go # grpc server implementation
├── helper.go
├── main.go # main entry point
├── plugin.go # this is where the plugin interface needs to be implemented
└── proto
├── sc.pb.go # generated protobuf file
├── sc.proto # spacecore plugin .proto interface
└── sc_grpc.pb.go # grpc generated file
Once the Spacecore is scaffolded, developers can implement the plugin interface in the plugin.go
file. This is where the core functionality of the Spacecore operations is implemented. Most of the boilerplate code is already generated by scaffolding, so developers only implement the lifecycle methods of the Spacecore.
Interface methods that need to be implemented:
type SpacecorePlugin interface {
Start(ctx context.Context, req *StartRequest) (*StartResponse, error)
Stop(ctx context.Context, req *StopRequest) (*StopResponse, error)
Status(ctx context.Context, req *StatusRequest) (*StatusResponse, error)
Logs(ctx context.Context, req *LogsRequest) (*LogsResponse, error)
}
This means that spacecores can be developed by anyone with some programming experience, and they can be deployed and managed easily using Vimana. The go-plugin can communicate several ways like gRPC, RPC, etc. The aiops-spacecore can be used as a reference to build your own Spacecore.
Developers just have to implement the SpacecorePlugin interface expressing the behavior of the Spacecore like starting, stopping, checking status, and viewing logs.
Then just build the spacecore binary and run it using Vimana.
go build -o bin/aiopsd .
./bin/aiopsd
# will give an error which is expected as it is a plugin that exposes a gRPC server so it needs to be called from a gRPC client
To run the Spacecore:
./bin/vimana plugin $PWD/bin/aiopsd start
This will start the Spacecore and you can check the status and logs using Vimana.
Vimana also provides a plugin
command to manage Spacecore plugins. Developers can add new plugins as Spacecore, where the plugin code is in a separate repository. This makes the development process more modular and flexible, enabling developers to extend the functionality of their network and add new features.
Vimana leverages Hashicorp’s Nomad for scheduling and running Spacecores. This ensures that Spacecores are deployed and managed efficiently, with the ability to scale and grow as needed. By using Nomad, Vimana can provide a reliable and scalable platform for developers to build and deploy networks in the Vistara ecosystem.
Nomad by Hashicorp is a flexible and highly scalable workload orchestrator that can deploy and manage containers, non-containerized applications, and virtualized workloads across a variety of infrastructure environments. It is designed to be simple to use and operate, with a focus on ease of use and flexibility.
Integrating Nomad with Vimana can enhance the orchestration and management capabilities of the Vistara network. Here are some ways in which Vimana can be used to orchestrate networks with Nomad:
vimana status [tinygpu-spacecore]
vimana stop [tinygpu-spacecore]
vimana logs [tinygpu-spacecore]
- **plugin**: Manage Spacecore plugins.
```sh
vimana plugin [subcommand] [plugin_name]
Let’s explore each module of Vimana:
##
Additional commands:
vimana registry [search|list]
vimana init
vimana
.
vimana repo add [repo_name] [repo_url]
vimana run celestia light-node
We welcome all contributions to Vimana! Create an issue or open a pull request to get started.