---
# System prepended metadata

title: 20200826 Adding a platform to Mantle

---

# 20200826 Adding a platform to Mantle

## What does adding a new platform to mantle give us?

Adding a new platform to mantle means we can automate uploading images that
we build into that platform and also automate executing our test suite on that
platform.

## General steps for adding a new platform to mantle

Adding a new platform to mantle can depend a lot on the platform being added.
Generally it will consist of the following steps:

- Vendor golang library for platform
    - under https://github.com/coreos/coreos-assembler/tree/master/mantle/vendor
- Add low-level support code to platform/api
    - https://github.com/coreos/coreos-assembler/tree/master/mantle/platform/api
- Add any test code for low-level code to cmd/ore
    - https://github.com/coreos/coreos-assembler/tree/master/mantle/cmd/ore
- Add high-level API to platform/machine
    - platform/machine has a lot of boilerplate, so copying an existing platform is a good start
    - https://github.com/coreos/coreos-assembler/tree/master/mantle/platform/machine
- Plumb options from high-level API into cmd/kola/options.go
    - https://github.com/coreos/coreos-assembler/blob/master/mantle/cmd/kola/options.go
    

## Previous examples of adding a platform

NOTE: The mantle code base was migrated into github.com/coreos/coreos-assembler
      so code work needs to be done there. Links to PRs from the old
      github.com/coreos/mantle repo exist below, but are there for reference.
      
The last two platforms that were added are Aliyun and Azure. Use these
for inspiration:

- Aliyun
    - https://github.com/coreos/mantle/pull/1066
- Azure
    - https://github.com/coreos/mantle/pull/771