Command-line
Setup the CLI and run your first Task
#
Requirements- Run this command to check if you have Nodejs installed. The result should be v11 or higher. If you don't have Node installed or it's in an old version, check this guide.
#
Setup#
Install#
Run a test command#
Run your first TaskAfter setting up the CLI, it's time to start using it. Runops Tasks represent the scripts and commands you need to run against a live resource (Target).
#
Pick the TargetThe only thing you need to run a Task is a valid Target. If your company is using Runops, you already have a set of Targets available. To see the Targets available you can use the list Targets command in the CLI.
The result will look like this:
This command will show a list of the Targets you can use to run Tasks. Pick the one you need and take a note of the type, this will define the type of scripts you will use in the Task. Also, check the review mode to understand the workflow of the Target.
#
Run the TaskOk, now that we have a Target, let's create our Task. The simplest possible way to create a Task is by providing the Target name and the script.
This Task has a SQL script, as the Target type of Postgres based on the Targets list command. The message is optional, but it's a good practice to add some context to what you are doing. This Target requires reviews and the message will help reviewers speed things up.
You have just learned the basics of Runops and ran your first script.
Anything unclear or buggy in this tutorial? Please report it in the chat at the bottom right.
#
Kill a TaskIf the command is taking to long, it's possible to kill an existent task in a running
state, however, it is not guaranteed that it will succeed.
Then, issue a get task to see if the task changed its state to killed
: