Image Search API Guide. How to use POST /ns/{nsId}/resources/searchImage #2021
seokho-son
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
CB-Tumblebug: Image Search API Guide
Overview
CB-Tumblebug provides a REST API for searching VM images available across multiple cloud providers and regions. This guide explains how to use the
RestSearchImageAPI to find compatible images for your workload, and how to use theRestSearchImageOptionsAPI to explore available search parameters.Image Search API Overview
The image search API enables:
aws+ap-northeast-2+t2.small)x86_64,arm64, etc.)Search Request Structure
API Endpoint
Request Body
The request body is a JSON object where all fields are optional.
You may use any combination of the following fields:
{ "detailSearchKeys": ["tensorflow", "2.17"], "includeDeprecatedImage": false, "isGPUImage": false, "isKubernetesImage": false, "isRegisteredByAsset": false, "osArchitecture": "x86_64", "osType": "ubuntu 22.04", "providerName": "aws", "regionName": "us-east-1" }Field Descriptions
providerNameaws,azure, etc.)regionNameap-northeast-2,us-east-1, etc.)osType"ubuntu 22.04")osArchitecturex86_64,arm64, etc.)isGPUImageisKubernetesImageisRegisteredByAssetincludeDeprecatedImagedetailSearchKeysUsage Examples
Quick and Easy Search Example with additional validation among spec and image pairs
POST /tumblebug/ns/system/resources/searchImageRequest Body
{ "osType": "ubuntu 22.04", "matchedSpecId": "aws+ap-northeast-2+t2.small" }Basic Filter Search Example
POST /tumblebug/ns/system/resources/searchImageRequest Body
{ "osArchitecture": "x86_64", "osType": "ubuntu 22.04", "providerName": "aws", "regionName": "ap-northeast-2" }Advanced Search Example
POST /tumblebug/ns/system/resources/searchImageRequest Body
{ "detailSearchKeys": ["tensorflow", "2.17"], "includeDeprecatedImage": false, "isGPUImage": false, "isKubernetesImage": false, "isRegisteredByAsset": false, "osArchitecture": "x86_64", "osType": "ubuntu 22.04", "providerName": "aws", "regionName": "us-east-1" }Response Example
{ "imageCount": 42, "imageList": [ { "providerName": "aws", "id": "aws+ami-0fa30a83d31fe23b7", "name": "aws+ami-0fa30a83d31fe23b7", "regionList": ["ap-northeast-2"], "osType": "Ubuntu 22.04", "osArchitecture": "x86_64", "isGPUImage": true, "osDistribution": "Deep Learning Base OSS Nvidia Driver GPU AMI (Ubuntu 22.04) 20240610", "imageStatus": "Available", "creationDate": "2024-06-10T18:39:56.000Z", "description": "Supported EC2 instances: G4dn, G5, P4d, etc.", "details": [ { "key": "ImageId", "value": "ami-0fa30a83d31fe23b7" }, { "key": "BootMode", "value": "uefi-preferred" }, { "key": "PlatformDetails", "value": "Linux/UNIX" } // ... ] } // ... additional image objects ] }Search Options API
Search Options API Endpoint
Use this API to retrieve valid option values for image search filters based on the system's current dataset.
Example: Search Options Request
Example: Search Options Response
{ "providerName": ["alibaba", "aws", "azure", "gcp", "ibm", "ncpvpc", "nhncloud", "tencent"], "regionName": ["ap-northeast-2", "us-east-1", "eu-west-1", "..."], "osType": [ "Ubuntu 20.04", "Ubuntu 22.04", "Amazon Linux 2", "CentOS 7", "Debian 11", "Windows 2019", "Red Hat Enterprise Linux 9", "Fedora 39", "Rocky Linux 9", "..." ], "osArchitecture": ["x86_64", "arm64", "x86_32", "na"], "isGPUImage": [true, false], "isKubernetesImage": [true, false], "isRegisteredByAsset": [true, false], "includeDeprecatedImage": [true, false], "detailSearchKeys": [ ["tensorflow", "2.17"], ["sql", "2022"], ["This is just an example", "omit this option if not needed"] ] }Key Features and Usage Tips
"system"for all{nsId}values.{}) returns the entire image list.detailsfor deep inspection of block devices, boot modes, kernel, and more.Beta Was this translation helpful? Give feedback.
All reactions