Clever Tools 3.5.2 is available with cURL, KV, Tasks and more!
Clever Tools 3.5 is now available, and this branch brings lots of new important features. First, clever curl
is now public and listed as an official command. It helps you to send cURL requests with the auth context of your Clever Tools configuration. Thus, you can use Clever Cloud API v2 or v4..
JSON format is supported for more commands, the --since
option now supports a duration value. For example if you want to get logs since 2 hours ago, you can use clever logs --since 2h
. This command documentation is available there.
Clever Tasks can now be directly created and configured from Clever Tools. They’re applications which can be run on demand, not awaiting any HTTP request on the 8080
port, but needing a CC_RUN_COMMAND
to execute. Once it’s done, the application stops. You’re just billed for the execution time. It can help you to make some checks, compilation, file conversions, etc.
To create a Clever Task using Python for example:
# We create a Python App and its Git repository
mkdir pythonTask && cd pythonTask
echo 'print("Hello, from a Clever Cloud Task!")' > task.py
git init && git add . && git commit -m "Initial commit"
# We deploy this app as a Task
clever create -t python --task 'python task.py'
clever deploy
If you want to check if an application will deploy as a TASK
or the REGULAR
way, use clever status
. Change the executed command using an environment variable. Set another value, for example with a bash script:
clever env set CC_RUN_COMMAND "bash a_bash_script.sh"
Clever Tasks will evolve with enhancements planed over the coming months. Feel free to tell us about your needs or ideas on this subject!
Last but not least, we’re introducing the access to Materia KV. Those granted with alpha access can now create a serverless, synchronously-replicated (over our 3 datacenters in Paris) key-value add-on. You’ll be able to use it with multiples kind of clients. First to be supported is Redis API. Thus, you can run:
clever addon create kv myKV
source <(clever addon env addon_myKV_id -F shell)
redis-cli -h $KV_HOST -p $KV_PORT --tls PING
To upgrade Clever Tools, use your favorite package manager. For example with npm
:
npm update -g clever-tools
clever version