Files
odo/docs/website/versioned_docs/version-3.0.0/command-reference/catalog.md
Charlie Drage 55e4f9554e Version the documentation (#5502)
<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Developer-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/PR-Review

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Contributing-to-Docs
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind feature
/kind cleanup
/kind tests

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->
/kind documentation

**What does this PR do / why we need it:**

This versions the documentation in order to display both 2.5.0 and 3.0.0
alpha1

In this PR we:

* Update the package dependencies, as there was a small bug with
  docusaurus displaying versioning
* Moves all documentation for 3.0.0-alpha1 into it's own folder
* Makes the old 2.5.0 documentation as the most current docs

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

Fixes https://github.com/redhat-developer/odo/issues/5377

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**
2022-03-01 01:23:18 -05:00

5.6 KiB

title, sidebar_position
title sidebar_position
odo catalog 2

odo uses different catalogs to deploy components and services.

Components

odo uses the portable devfile format to describe the components. It can connect to various devfile registries to download devfiles for different languages and frameworks. See odo registry for more information.

Listing components

You can list all the devfiles available on the different registries with the command:

odo catalog list components

Example:

$ odo catalog list components
Odo Devfile Components:
NAME             DESCRIPTION                          REGISTRY
go               Stack with the latest Go version     DefaultDevfileRegistry
java-maven       Upstream Maven and OpenJDK 11        DefaultDevfileRegistry
nodejs           Stack with Node.js 14                DefaultDevfileRegistry
php-laravel      Stack with Laravel 8                 DefaultDevfileRegistry
python           Python Stack with Python 3.7         DefaultDevfileRegistry
[...]

Getting information about a component

You can get more information about a specific component with the command:

odo catalog describe component

Example:

$ odo catalog describe component nodejs
* Registry: DefaultDevfileRegistry

Starter Projects:
---
name: nodejs-starter
attributes: {}
description: ""
subdir: ""
projectsource:
  sourcetype: ""
  git:
    gitlikeprojectsource:
      commonprojectsource: {}
      checkoutfrom: null
      remotes:
        origin: https://github.com/odo-devfiles/nodejs-ex.git
  zip: null
  custom: null

Registry is the registry from which the devfile is retrieved.

Starter projects are sample projects in the same language and framework of the devfile, that can help you start a new project. See odo create for more information on creating a project from a starter project.

Services

odo can deploy services with the help of operators.

Only operators deployed with the help of the Operator Lifecycle Manager are supported by odo. See Installing the Operator Lifecycle Manager (OLM) for more information.

Listing services

You can get the list of available operators and their associated services with the command:

odo catalog list services

Example:

$ odo catalog list services
Services available through Operators
NAME                                 CRDs
postgresql-operator.v0.1.1           Backup, Database
redis-operator.v0.8.0                RedisCluster, Redis

In this example, you can see that two operators are installed in the cluster. The postgresql-operator.v0.1.1 operator can deploy services related to PostgreSQL: Backup and Database. The redis-operator.v0.8.0 operator can deploy services related to Redis: RedisCluster and Redis.

Note: To get a list of all the available operators, odo fetches the ClusterServiceVersion (CSV) resources of the current namespace that are in a Succeeded phase. For operators that support cluster-wide access, when a new namespace is created, these resources are automatically added to it, but it may take some time before they are in the Succeeded phase, and odo may return an empty list until the resources are ready.

Searching services

You can search for a specific service by a keyword with the command:

odo catalog search service

Example:

$ odo catalog search service postgre
Services available through Operators
NAME                           CRDs
postgresql-operator.v0.1.1     Backup, Database

You may see a similar list that contains only the relevant operators, whose name contains the searched keyword.

Getting information about a service

You can get more information about a specific service with the command:

odo catalog describe service

Example:

$ odo catalog describe service postgresql-operator.v0.1.1/Database
KIND:    Database
VERSION: v1alpha1

DESCRIPTION:
     Database is the Schema for the the Database Database API

FIELDS:
   awsAccessKeyId (string)   
     AWS S3 accessKey/token ID

     Key ID of AWS S3 storage. Default Value: nil Required to create the Secret
     with the data to allow send the backup files to AWS S3 storage.
[...]

A service is represented in the cluster by a CustomResourceDefinition (commonly named CRD). This command will display the details about this CRD such as kind, version, and the list of fields available to define an instance of this custom resource.

The list of fields is extracted from the OpenAPI schema included in the CRD. This information is optional in a CRD, and if it is not present, it is extracted from the ClusterServiceVersion (CSV) representing the service instead.

It is also possible to request description of operator backed service without providing crd type information. Let us say you want to describe redis operator on cluster without CRD, you can do

odo catalog describe service redis-operator.v0.8.0
NAME:	redis-operator.v0.8.0
DESCRIPTION:

	A Golang based redis operator that will make/oversee Redis
	standalone/cluster mode setup on top of the Kubernetes. It can create a
	redis cluster setup with best practices on Cloud as well as the Bare metal
	environment. Also, it provides an in-built monitoring capability using

... (cut short for beverity)
	
	Logging Operator is licensed under [Apache License, Version
	2.0](https://github.com/OT-CONTAINER-KIT/redis-operator/blob/master/LICENSE)
	

CRDs:
	NAME           DESCRIPTION
	RedisCluster   Redis Cluster
	Redis          Redis