DCL2_Lab3.1_CLI CLI Installation

Hi!

 

I’m working my way through the Dev2 Labs, and I’m having some difficulty locating the profile file in the CLI installer files. I see two folders within the expanded vantiq-1.33.17 folder: lib and bin. Neither contains the profile text file, at least as far as I can see, and I can’t navigate to it using . Is this file hidden or am I thinking about this wrong?

 

I’ve also tried running vantiq.bat install which throws an error that the JAVA_HOME variable is not set properly – I got the java .exe location directly from control panel so I’m not sure what’s going on here either. Do you have any examples?

 

I have added the vantiq install location to my System environmental variables.

Thanks,

Sarah

Posted: May 24, 2022 at 4:59 pm
Replies: 4
May 24, 2022
Posted by Lisa Ackerman

Hi Sarah!

You actually write your own profile text file from scratch.  There are examples in the docs and class; you’ll need your own tokens/passwords/namespace names, etc

As for setting JAVA_HOME, try setting it to the directory above the lib & bin.

Thanks for reaching out, and please let me know if you’re still stuck

–lisa

 

May 24, 2022
Posted by Patrick Burma

On Windows you will have to create the profile file manually. From a prompt you can do a:

>cd %USERPROFILE%

>mkdir .vantiq

>cd .vantiq

>notepad profile

An entry for a profile looks like this:

dev_pbDemo
{
url = ‘https://dev.vantiq.com’
token = ‘<your token>’
}

<weird escaping issue, the url should be https://dev.vantiq.com wrapped in single quotes>

The syntax isn’t proper JSON formatting just so you know.

For the JAVA_HOME thing you can set this on the prompt or you can go into the Windows System and do a search for Advanced System Settings. When that window pops up you can use Environmental Variables to add a new user variable called JAVA_HOME that points to the root of your jdk folder, something like: C:\Program Files\Java\jdk1.8.0_251\

Or you can do this in the dos prompt:

set JAVA_HOME=”C:\Program Files\Java\jdk1.8.0_251\”

To confirm it took correct run “set” by itself. This will be temporary, whenever you start a new dos prompt you will have to re-run that set command. So the system settings approach is better.

Once the setup is done you can now run the Vantiq CLI with the -s flag. Where I put the dev_pbDemo is the name of the profile to use: “vanitq -s dev_pbDemo”

May 24, 2022
Posted by Sarah Rappaport

Thanks, this is helpful! I was able to connect to dev.vantiq.com

A couple things that might be worth making explicit (that I at least didn’t catch in the docs, etc.):

* base is a required identity in the profile (in video but not in docs)

* filepath to the location of the vantiq.bat file can’t be too long or you get character limited (solved this by moving my install location up a few folders, but it wasn’t that long to begin with)

*it seems like the profile file is auto-created from the documents, might be worth saying that you have to create it (as you mentioned above)

*I was able to connect only with a token, and not with a username/password (I used srappaport as my username and the password I use to log in as my password). I connected with an oauth1 profile set up the same as the one in the docs example, but with my personal token.

May 24, 2022
Posted by Sarah Rappaport

One other question – does CLI support wildcard searches? I.e.  is there anyway to, for instance, list only types with a certain set of characters (‘pump’, eg.)?

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
© Vantiq 2024 All rights reserved  •  Vantiq Corporation’s Privacy Policy and Cookie Policy