Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ysoftdevs/otc-cli

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OTC CLI

A command-line interface (CLI) tool for Open Telekom Cloud (OTC) services.

Features

  • 🔐 Authentication: Browser-based SSO login with credential management
  • ☁️ Multi-cloud Support: Manage multiple cloud configurations via clouds.yaml
  • 🖥️ ECS Management: List and manage Elastic Cloud Servers
  • 🐳 CCE Operations: List clusters and manage CCE (Cloud Container Engine) configurations
  • 🌍 Multi-region: Support for different regions and projects
  • 📁 SFS Operations: List of Scalable file systems (the Turbo variant)
  • ⚖️ ELB Operations: List of load balancers and their values

Installation

From Source

git clone https://github.com/ysoftdevs/otc-cli.git
cd otc-cli
go build -o otc .

Pre-built Binaries

Download the latest release for your platform from the Releases page.

Configuration

clouds.yaml

Create a clouds.yaml file in your home directory (~/.config/openstack/clouds.yaml):

clouds:
  my-cloud:
    region: eu-de
    auth:
      auth_url: https://iam.eu-de.otc.t-systems.com/v3
      domain_id: your-domain-id
    sso:
      protocol: saml
      idp: your-idp
      base_url: https://auth.otc.t-systems.com/authui/federation/websso
      expiration: 3600

Environment Variables

You can override configuration using environment variables with the OTC_ prefix:

  • OTC_CLOUD: Cloud name from clouds.yaml
  • OTC_REGION: Region to use
  • OTC_PROJECT: Project name

Usage

Authentication

Login using browser-based SSO:

otc login

With specific cloud configuration:

otc login --cloud my-cloud --domain-id YOUR_DOMAIN_ID

Custom authentication parameters:

otc login \
  --url https://auth.otc.t-systems.com/authui/federation/websso \
  --auth-url https://iam.eu-de.otc.t-systems.com/v3 \
  --domain-id YOUR_DOMAIN_ID \
  --idp YOUR_IDP \
  --protocol saml \
  --expiration 3600

ECS (Elastic Cloud Server)

List ECS instances from cloud and region specified in config files:

otc ecs list
otc ecs show <name> 

With specific cloud and region:

otc ecs list --cloud my-cloud --region eu-de

SFC (Scalable File Service)

otc sfs list

ELB (Elastic Load Balancer)

otc elb list
otc elb show <name>

CCE (Cloud Container Engine)

List CCE clusters:

otc cce list

Get kubeconfig for a cluster:

otc cce config CLUSTER_NAME

Save kubeconfig to file:

otc cce config CLUSTER_NAME --output kubeconfig.yaml

Global Flags

These flags are available for all commands:

  • -c, --cloud: Name of the cloud from clouds.yaml to use
  • -r, --region: Region to use for the cloud
  • -p, --project: Project name to use for authentication
  • -f, --format: Changes output style, possible options: yaml, json, table, value. Defaults to table.

Development

Prerequisites

  • Go 1.21 or higher

Building

go build -v ./...

Running Tests

go test -v ./...

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

CLI for OpenTelecom Cloud

Resources

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.