Table of Contents
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.
If the oc-datactl file is installed to your path. The oc command will recognize it as a plugin. You may
call oc datactl
Datactl tool can be used standalone. Just move oc-datactl to your path and use oc-datactl
directly.
-
Get your Red Hat Marketplace Pull Secret.
-
Log in to your cluster.
-
Setup your configuration.
oc datactl config init
This will create the default configuration on your home directory.
~/.datactl/config
-
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
-
Now you're configured. You can start using the export commands.
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.