Go version of the Iron.io command line tools.
curl -sSL https://cli.iron.io/install | sh
If you're concerned about the potential insecurity
of using curl | sh
, feel free to use a two-step version of our installation and examine our
installation script:
curl -f -sSL https://cli.iron.io/install -O
sh install
We'd like to explain why we're telling you to curl | sh
to install this software.
The script at https://cli.iron.io/install has some relatively simple logic to download the
right ironcli
binary for your platform. When you run that script by piping the curl
output
into sh
, you're trusting us that it's safe and won't harm your computer. We hope that you do!
But if you don't please see the section just below this one on how to download and run the binary
yourself without an install script.
Grab the latest version for your system on the Releases page.
You can either run the binary directly or add somewhere in your $PATH.
If you have Docker installed, then you don't need to install anything else to use this.
All the commands are the same, but instead of starting the command with iron
, change it to:
docker run --rm -it -v "$PWD":/app -w /app iron/cli ...
If you're using the Docker image, you either need to have your iron.json
file in the local directory (it won't pick it up from $HOME),
or set your Iron credentials in environment variables:
export IRON_TOKEN=YOURTOKEN
export IRON_PROJECT_ID=YOURPROJECT_ID
And then use -e
flags with the docker run command:
docker run --rm -it -e IRON_TOKEN -e IRON_PROJECT_ID -v "$PWD":/app -w /app iron/cli ...
Before you can use IronWorker, be sure you've created a free account with Iron.io and setup your Iron.io credentials on your system (either in a json file or using ENV variables). You only need to do that once for your machine. If you've done that, then you can continue.
See the official docs for more detailed info on using Docker for IronWorker.
iron worker --help
for list of commands, flags
iron worker COMMAND --help
for command specific help
WARNING: still in progress (only upload problematic), if running into issues: use github.com/iron-io/iron_worker_ruby_ng
iron worker queue CODENAME
iron worker queue --wait CODENAME
iron worker status TASK_ID
Hint: Acquire TASK_ID
from a previously queued task.
iron worker log TASK_ID
Hint: Acquire TASK_ID
from a previously queued task.
iron worker schedule --payload=" " --start-at="Mon Dec 25 15:04:05 -0700 2014" CODENAME
WARNING: not working without a -payload for reasons yet to be hunted down
iron worker upload [--zip hello.zip] --name NAME DOCKER_IMAGE [COMMAND]
For eg:
iron worker upload --zip myworker.zip --name myworker iron/images:ruby-2.1 ruby hello.rb
For custom images (if you have this enabled on your account):
iron worker upload --zip myworker.zip --name myworker google/ruby ruby hello.rb
iron mq list
iron mq create QUEUE_NAME
iron mq rm QUEUE_NAME
iron mq info QUEUE_NAME
iron mq clear QUEUE_NAME
iron mq push [-f file] QUEUE_NAME "MESSAGE"
You can provide a json file with a set of messages to be pushed onto the queue. The format is as follows:
{
"messages": ["msg1", "msg2",...]
}
iron mq peek [-n n] QUEUE_NAME
iron mq pop [-o output_file] [-n n] QUEUE_NAME
iron mq reserve [-o output_file] [-n n] [-t timeout] QUEUE_NAME
iron mq delete [-f file] QUEUE_NAME "MESSAGE_ID" "MESSAGE_ID2"...
For private images you should use
iron worker docker-login --repo-username USERNAME --repo-pass PASS --repo-email EMAIL
Or
iron worker docker-login --repo-auth AUTH --repo-email EMAIL
Give us a pull request!
Updated dependencies:
Until the go team standardizes on a vendoring tool, we're using something analogous to their proposed plan for 1.5, to update a dependency, see: