Architecture - acntech/vagrant-repository GitHub Wiki

This page describes the architecture of the Vagrant Repository.

Components

The diagram shows an coarse grained overview of the components that make up the Vagrant Repository.

Component Diagram

Description

The Vagrant Repository is composed of three main parts. The Repository Manager GUI, the Repository Manager API (containing the Repository Metadata Store) and the Repository File Store (containing the web server for serving files).

Repository Manager GUI

This is a frontend application that make up the user interface for the Repository Manager. The application is a ReactJS Single Page Application (SPA) that communicates with the Repository Manager API using REST in order to retrieve data about hosted Vagrant boxes.

The application is developed using React, Redux, Typescript, Semantic UI and WebPack.

Repository Manager API

This is a backend application that makes up the API and the metadata store for the Repository Manager. The application is a Spring Boot web application that exposes REST-endpoints. The application communicates with the Repository Metadata Store to store, fetch and update data about hosted Vagrant boxes. The application also has logic for storing and updating Vagrant box image files in the Repository File Store.

Repository File Store

This is a file store for holding hosted Vagrant box image files. The contents of the file store is exposed through a web server in order to allow downloads of boxes over HTTP.

API

GUI API

This API is used by the GUI frontend application to fetch metadata about hosted Vagrant boxes, and to store new boxes.

Repository API

This API is used by Vagrant clients to retrieve metadata about hosted Vagrant boxes, versions, and download URL.

The API exposes an endpoint that has the following JSON schema:

{
    "name": "acntech/ubuntu",
    "description": "Vagrant box with Ubuntu 18.04",
    "versions": [
        {
            "version": "1.0.0",
            "providers": [
                {
                    "name": "virtualbox",
                    "url": "http://repo.private.com/vagrant/boxes/acntech/ubuntu/1.0.0/image.box",
                    "checksum_type": "sha1",
                    "checksum": "70e043fd8d636a6e9aa9b1946d8bb089a53560b2"
                }
            ]
        },
        {
            "version": "0.1.0",
            "providers": [
                {
                "name": "virtualbox",
                "url": "http://repo.private.com/vagrant/boxes/acntech/ubuntu/0.1.0/image.box",
                "checksum_type": "sha1",
                "checksum": "645658b4a105fcf264bd28c5e406b82293368763"
                }
            ]
        }
    ]
}

GUI

The Repository Manager GUI is comprised of a set of pages that allow users to manage their hosted Vagrant boxes.

  • User login page
  • User create/edit page
  • Boxes overview page
  • Box details page
  • Box create/edit page