torero "Hello, Server" Example

torero is designed for a Client/Server model. This example will walk through a quickstart on getting a server up and running and authenticating to it from a client.

--- title: Single Server/Client --- flowchart LR A(torero client)<-->B(torero server)

torero Server Setup

To setup a torero Server, a basic torero.conf file is provided below:

[application]
mode             = server
#working_dir      = ~/.torero.d

[server]
listen_address     = 0.0.0.0
#port               = 50051
use_tls            = false

Note: TLS is highly recommended and encouraged for a production deployment. However, it is beyond the scope of this document.

There's a whole slew of options available that can be referred to in the variables list under TORERO_SERVER_* variables in Configuration Variables.

Save this file in the working directory. In this example that is ~/.torero.d/torero.conf. Since this is a single server instance, no etcd database will be configured. That is a more advanced scenario covered in Resilient Design.

Steps for torero Server

  • Install torero bin on server host
  • Accept EULA (Either via CLI or .conf file)
  • Create the torero.conf file (or apply the correct env variables)
cat << EOF > ~/.torero.d/torero.conf

[application]
mode             = server
#working_dir      = ~/.torero.d

[server]
listen_address     = 0.0.0.0
#port               = 50051
use_tls            = false
EOF

(Optional) Validate Server Mode

torero version
version: v1.1.0
commit: bd0290d
executable: /home/ec2-user
mode: server
  • Run torero
torero server

Note: This will run in the foreground, so to not stop the app, the session must be left open. In a real deployment, setting up a start/stop service is recommended.

Now, the torero server will provide an admin user/pass for the first time login. Copy that down to use as a login from the client.

torero Client Setup

To setup a torero Client, a basic torero.conf file is provided below:

[application]
mode             = client
#working_dir      = ~/.torero.d

[client]
host             = some.torero-server.domain
#port             = 50051
#private_key_file =
use_tls          = false
Note: TLS is highly recommended and encouraged for a production deployment. However, it is beyond the scope of this document.

Save this file in the working directory. In this example that is ~/.torero.d/torero.conf.

Steps for running the torero Client

  • Install torero bin on local/client host
  • Accept EULA (Either via CLI or .conf file)
  • Create the torero.conf file (or apply the correct env variables)
cat << EOF > ~/.torero.d/torero.conf

[application]
mode             = client
#working_dir      = ~/.torero.d

[client]
host             = some.torero-server.domain
#port             = 50051
#private_key_file =
use_tls          = false
EOF
  • Login to the server
torero login admin

First time login must go through a password reset

Enter password for user:
Password must be changed.
Enter your NEW password to login:
Re-enter your NEW password for verification:
Password verified successfully!


Password was successfully reset!
Please login with the new password you just set.

Enter the NEW password for user:
Successfully logged in!

That's it. Now, any command run on the client is run on the server.

Once done, the next step will be logging in as a user from the client to the server.