Skip to content

About

This project is a sample implementation demonstrating how to interact with the Flintlock microVM manager using a Go application. Flintlock is a powerful tool for orchestrating Firecracker microVMs via an HTTP API, enabling you to create, manage, and delete microVMs programmatically from your Go code.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flintlock Sample Project

This project is a sample implementation demonstrating how to interact with the Flintlock microVM manager using a Go application. Flintlock is a powerful tool for orchestrating Firecracker microVMs via an HTTP API, enabling you to create, manage, and delete microVMs programmatically from your Go code.

Project Structure

The project is organized as follows:

flintlock-sample
├── src
│   ├── main.go                # Entry point of the application
│   ├── network
│   │   └── tap.go             # Go script to create a TAP device (Linux only)
│   └── config
│       └── flintlock.yaml     # Go app configuration file
│       └── flintlockd.yaml    # Flintlock service configuration (for containerd, etc.)
├── scripts
│   └── setup_network.sh       # Shell script to configure tap device and networking (Linux only)
├── docs
│   └── usage.md               # Documentation on how to use Flintlock
├── go.mod                     # Go module definition
├── go.sum                     # Go module checksums
└── README.md                  # Project overview and setup instructions

Getting Started

To get started with this project, follow these steps:

  1. Clone the Repository

    git clone https://github.com/yourusername/flintlock-sample.git
    cd flintlock-sample
  2. Install Dependencies Make sure you have Go installed on your machine. Then, run the following command to install the necessary dependencies:

    go mod tidy
  3. Configure Flintlock Edit the src/config/flintlock.yaml file to set your desired configuration parameters, such as server port and database connection details.

  4. Run the Application You can run the application using the following command:

    go run src/main.go

MicroVM Networking Setup

To enable networking for your microVMs, you need to create and configure a tap device on your host:

  1. Run the Go script to create a tap device:

    go run src/network/tap.go
  2. Configure networking and iptables:

    bash scripts/setup_network.sh

This will create a tap0 device, assign it an IP, enable IP forwarding, and set up NAT so your microVMs can access external networks.

Note: These steps require root privileges.

Usage

For detailed usage instructions and examples of how to utilize the Flintlock library, please refer to the docs/usage.md file.

Contributing

Contributions are welcome! If you have suggestions for improvements or new features, feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Author

Alex Mercado

Article

Read the full article here:
Flintlock: Effortlessly Create and Manage MicroVMs with containerd Integration

About

This project is a sample implementation demonstrating how to interact with the Flintlock microVM manager using a Go application. Flintlock is a powerful tool for orchestrating Firecracker microVMs via an HTTP API, enabling you to create, manage, and delete microVMs programmatically from your Go code.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages