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

about automating with seqcli #355

Closed
bytejunkie opened this issue Jun 10, 2024 · 6 comments
Closed

about automating with seqcli #355

bytejunkie opened this issue Jun 10, 2024 · 6 comments
Labels
duplicate This issue or pull request already exists

Comments

@bytejunkie
Copy link

I'd like to automate the config of our new Seq instance and all further config items on it, but I think I'm missing the point with the dockerimage a little.

I was hoping to be able to run the cli image at the command line somthing like this

docker run datalust/seqcli:latest config -k connection.serverUrl -v https://192.168.1.226:80 
docker run datalust/seqcli:latest config -k connection.apiKey -v RqoggnnJc9 #not a real key
docker run datalust/seqcli:latest apikey create -t 'Test API Key' -p Environment=Test

but of course, the commands work in the container, then exit.

I've tried daisy chaining them into a multiline command but this didn't work.

Usage: seqcli <command> [<args>]
Type `seqcli help` for available commands

I'd like to use this in a pipeline to create users or apikeys automatically. I've worked out i can override the entrypoint and then run the commands manually, but i thought at this point with a few hours into it and not seeing an obvious route forwards it might be best to ask how others are using the tool in pipelines?

@liammclennan
Copy link
Contributor

Hi @bytejunkie

You can supply the serverUrl and apiKey as options (-s and a) to the apikey create command, to avoid having to run multiple commands. I need to work out why what you've done doesn't work, but I believe this should:

docker run datalust/seqcli:latest apikey create -t 'Test API Key' -p Environment=Test -s https://192.168.1.226:80  -a RqoggnnJc9

@liammclennan
Copy link
Contributor

@bytejunkie you can also set the environment variables SEQCLI_CONNECTION_SERVERURL and SEQCLI_CONNECTION_APIKEY

@bytejunkie
Copy link
Author

brilliant, ive managed to get the command you sent to create an API Key. I dont know why i didnt realise i can pass the server and key on the command, apologies I feel like I ought to have been able to find that.

I'll test the env vars too. I saw an issue about them, but I dont think I saw them in the docco.

Thanks. looking forward to automating this now.

@liammclennan
Copy link
Contributor

@bytejunkie that's great.

The environment variables are new, and were missing the documentation. It is there now. https://docs.datalust.co/docs/command-line-client#environment-variable-overrides

@nblumhardt
Copy link
Member

Sorry, looks like we have this out-of-sequence, environment variable overrides aren't in yet (see #295)

@nblumhardt nblumhardt reopened this Jun 19, 2024
@nblumhardt
Copy link
Member

We'll close this as a duplicate and track in #295

@nblumhardt nblumhardt added the duplicate This issue or pull request already exists label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants