Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update endpoints to swc domain #48

Merged
merged 2 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ Datactl tool can be used standalone. Just move oc-datactl to your path and use `

## Getting started

1. Get your Red Hat Marketplace Pull Secret.
1. Get your Pull Secret.

2. Log in to your cluster.

3. Setup your configuration. When prompted, provide the [pull secret token](https://marketplace.redhat.com/) as the `Upload API Secret`.
3. Setup your configuration. When prompted, provide the [pull secret token](https://swc.saas.ibm.com/en-us/account/keys) as the `Upload API Secret`.

```sh
oc datactl config init
Expand Down Expand Up @@ -92,13 +92,13 @@ Let's break down what each one is doing.

`oc datactl export push`

- Files pulled by the previous command are pushed to Red Hat Marketplace.
- Files pulled by the previous command are pushed to IBM Software Central.
- 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.
- At this point you're telling the data service that you've retrieved these files and have or will submit them to IBM Software Central.
- 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.
Expand All @@ -119,7 +119,7 @@ To pull data from ILMT, execute command

First time you will be asked to provide start date. Next time last synchronization date is stored in config file and will be updated to pull data from last synchronization date.

To push data to Red Hat Marketplace execute command
To push data to IBM Software Central execute command

`datactl export push`

Expand All @@ -132,12 +132,12 @@ A containerized FIPS enabled version of datactl is provided, built with Red Hat'
```
mkdir -p $HOME/.datactl
```
2. Setup your configuration, binding the `.datactl` and `.kube` directories, and providing the marketplace api endpoint and [pull secret token](https://marketplace.redhat.com/en-us/account/keys)
2. Setup your configuration, binding the `.datactl` and `.kube` directories, and providing the api endpoint and [pull secret token](https://swc.saas.ibm.com/en-us/account/keys)
```
docker run --rm \
--mount type=bind,source=$HOME/.datactl,target=/root/.datactl \
--mount type=bind,source=$HOME/.kube,target=/root/.kube \
quay.io/rh-marketplace/datactl:latest config init --api marketplace.redhat.com --token ${TOKEN}
quay.io/rh-marketplace/datactl:latest config init --api swc.saas.ibm.com --token ${TOKEN}
```
3. Add a data source, such as `dataservice` from your current OpenShift cluster context
```
Expand All @@ -154,7 +154,7 @@ A containerized FIPS enabled version of datactl is provided, built with Red Hat'
--mount type=bind,source=$HOME/.kube,target=/root/.kube \
quay.io/rh-marketplace/datactl:latest export pull
```
5. Push data to Red Hat Marketplace
5. Push data to IBM Software Central
```
docker run --rm \
--name datactl \
Expand Down
4 changes: 2 additions & 2 deletions cmd/datactl/app/config/config_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var (
{{ .cmd }} config init

# Initialize the config and preset upload URL and secret. Will not prompt.
{{ .cmd }} config init --api marketplace.redhat.com --token MY_TOKEN
{{ .cmd }} config init --api swc.saas.ibm.com --token MY_TOKEN
`))
)

Expand Down Expand Up @@ -110,7 +110,7 @@ func (init *configInitOptions) runAPIEndpointPrompt() error {
prompt := promptui.Prompt{
Label: "Upload API Endpoint",
Validate: validate,
Default: "marketplace.redhat.com",
Default: "swc.saas.ibm.com",
Stdin: io.NopCloser(init.In),
Stdout: NopWCloser(init.Out),
}
Expand Down
2 changes: 1 addition & 1 deletion docs/datactl_config_init.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ datactl config init
datactl config init

# Initialize the config and preset upload URL and secret. Will not prompt.
datactl config init --api marketplace.redhat.com --token MY_TOKEN
datactl config init --api swc.saas.ibm.com --token MY_TOKEN
```

### Options
Expand Down
4 changes: 2 additions & 2 deletions pkg/datactl/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ type UploadAPI struct {
// +k8s:conversion-gen=false
LocationOfOrigin string

// Host is the url of the marketplace i.e. marketplace.redhat.com
// Host is the url of the marketplace i.e. swc.saas.ibm.com
Host string `json:"host"`

// +optional
Expand Down Expand Up @@ -179,7 +179,7 @@ func NewConfig() *Config {
}

const (
marketplaceProductionUrl = "https://marketplace.redhat.come"
marketplaceProductionUrl = "https://swc.saas.ibm.com"
)

func NewDefaultConfig(kube *genericclioptions.ConfigFlags) (*Config, error) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/datactl/api/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (s *Source) String() string {
}

type UploadAPI struct {
// Host is the url of the marketplace i.e. marketplace.redhat.com
// Host is the url of the marketplace i.e. swc.saas.ibm.com
Host string `json:"host"`

// +optional
Expand Down
Loading