Skip to content

Data Collection CLI tool for reporting data from disconnected clusters.

License

Notifications You must be signed in to change notification settings

akhi1616/datactl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data Collection CLI (datactl)

Table of Contents

Installation

The tool is available via prebuilt executables on the latest release. To install the tool to your local system, download the targz file and extract it to a folder on your path.

Usage

As an OC Plugin

If the oc-datactl file is installed to your path. The oc command will recognize it as a plugin. You may call oc datactl

As a standalone tool

Datactl tool can be used standalone. Just move oc-datactl to your path and use oc-datactl directly.

Getting started

  1. Get your Red Hat Marketplace Pull Secret.

  2. Log in to your cluster.

  3. Setup your configuration.

    oc datactl config init

    This will create the default configuration on your home directory. ~/.datactl/config

  4. Add the role-binding to the default service account on operator-namespace.

    Install the role and role binding for the default service account for the openshift-redhat-marketplace namespace. The datactl tool will use these by default.

    oc apply -f resources/service-account-role.yaml // file found in release
  5. Now you're configured. You can start using the export commands.

Export

Recommended approach is to run the commands in this order:

// Must be logged in to the cluster
oc datactl export pull

// If you're in a connect
oc datactl export push

// If no errors from push.
oc datactl export commit

Let's break down what each one is doing.

oc datactl export pull

  • Pulls files from data service and stores them in a tar file under your ~/.datactl/data folder.
  • Writes the status of the files found in ~/.datactl/config

oc datactl export push

  • Pushes the files pulled to Red Hat Marketplace.
  • If this process errors, do not commit. Retry the export push or open a support ticket.

oc datactl export commit

  • Commits the files to the dataservice.
  • At this point you're telling the data service that you've retrieved these files and have or will submit them to Red Hat Marketplace.
  • After some time, the files in dataservice will be cleaned up to save space.

If you want to transfer it somewhere else, you can find the tar file under your ~/.datactl/data/ directory.

About

Data Collection CLI tool for reporting data from disconnected clusters.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.5%
  • Makefile 0.5%