3scale-archive / 3scale-cli

DEPRECATED Beta of 3scale CLI, manage your 3scale installation directly from terminal (community supported)
https://www.3scale.net
MIT License
9 stars 21 forks source link

Support for on-prem #49

Closed kasriniv closed 6 years ago

kasriniv commented 7 years ago

Hello The current version of 3scale-cli does not seem to support on-prem. Can you please confirm? If so, are you planning to support it soon please? Thanks

picsoung commented 7 years ago

Hi @kasriniv

The current version of the cli works for on-prem. When you launch the config command it will ask for your access_token, id, and wildcard domain.

Let me know if you find any issues after configuring it.

kasriniv commented 7 years ago

@picsoung I just noticed that and was going to update this..thank you- will try and let know

kasriniv commented 7 years ago

@picsoung is there a way to test if the configuration was successful? 3scale-cli services list for on-prem returns nothing (after config) for me while the command works for the 3scale.net domain.

picsoung commented 7 years ago

Actually I should add something to test credentials, thats a good feedback.

Otherwise you can run a simple command like 3scale-cli services list to list your services. If it returns an error, than something is wrong in the config.

kasriniv commented 7 years ago

3scale-cli services list returns nothing for the on-prem version..anything I can do to check credentials, connection etc?

picsoung commented 7 years ago

There is no command to test at the moment :(

Do you have services on your on-prem instance? If nothing is shown it's most likely the configuration that's not working.

We can troubleshoot by email ngrenie@redhat.com Sorry about the inconvenience

kasriniv commented 7 years ago

@picsoung no worries..will catch up with you on the redhat mail id : mine is kasriniv@redhat.com

lucamaf commented 7 years ago

for me swagger import on onprem is not working. I configured the cli tool like this:

[ 3scale-cli ] Please answer the following questions to configure 3scale cli. 
? 3scale access token     6dc17e812ce7c3ab4013e16aadba21bb58a95b285ac9ff093e201a
804a749a95
? 3scale id acme
? 3scale wildcard domain app.test.openshift.es

but then when I execute the command to import it, I just get this and no further output:

3scale-cli import swagger -f json_vcc.json 
[ 3scale-cli ] Loading Profiles API22 swagger definition. 
picsoung commented 7 years ago

@lucamaf is a plain API call works? meaning: is the URL available to the machine where CLI is installed.

try curl -X GET https://{ID}-admin.{WILDCARD_DOMAIN}/admin/api/service.json?access_token={ACCESS_TOKEN}

lucamaf commented 7 years ago

I think the endpoint you are referring to is /services.json In this case I get a certificate error from CURL because it is self-signed which I could overcome by using --insecure

picsoung commented 7 years ago

@lucamaf could that be related to #46 ?

if you run the command like this: NODE_TLS_REJECT_UNAUTHORIZED=0 3scale-cli it should work fine.

lucamaf commented 6 years ago

working! sorry for the late feedback