Admin commands
The admin commands are used to control and manage your self-hosted version of CWCloud.
Notes:
- Those commands are only for admin users (if you're using a self-hosted version for example)
- To checkout how to install and update the
cwc
cli checkout this tutorial - For the commands accessible for all users, checkout this tutorial (you should read-it first to handle authentication)
Usersβ
Listβ
cwc admin user ls
Get user by IDβ
cwc admin user ls -u <user_id>
cwc admin user ls --user <user_id>
Deleteβ
cwc admin user delete -u <user_id>
cwc admin user delete --user <user_id>
Projectsβ
Listβ
cwc admin project ls
Search Projectβ
Search Project By IDβ
cwc admin project ls -p <project_id>
cwc admin project ls --id <project_id>
Search Project By Nameβ
cwc admin project ls -n <project_name>
cwc admin project ls --name <project_name>
Search Project By URLβ
cwc admin project ls -u <project_url>
cwc admin project ls --url <project_url>
Createβ
cwc admin project create -n <project_name>
Notes:
- If you want to create a project in another Gitlab instance you can provide the Gitlab host, the group id, your access token and your git username by adding these options:
-h
or--host
: Gitlab instance host-t
or--token
: your Gitlab access token-g
or--git
: Your Git username-n
or--namespace
: namespace or group id where the project will be created-p
or--type
: Project type (vm or k8s)
Deleteβ
Delete Project By IDβ
cwc admin project delete -p <project_id>
cwc admin project delete --id <project_id>
Delete Project By Nameβ
cwc admin project delete -n <project_name>
cwc admin project delete --name <project_name>
Delete Project By URLβ
cwc admin project delete -u <project_url>
cwc admin project delete --url <project_url>
Environmentsβ
Add environmentβ
cwc admin environment create -n <name> -r <role1>,<role2> -m <main_role> -p <path> -d <description> -s <subdomain1>,<subdomain2>
cwc admin environment create --name <name> --roles <role1>,<role2> -main-role <main_role> --path <path> --description <description> --subdomains <subdomain1>,<subdomain2>
Note: if you want to mark the environment as private use the -a
or --private
flag.
List all environmentsβ
cwc admin environment ls
Get environment by IDβ
cwc admin environment ls -e <environment_id>
cwc admin environment ls --environment <environment_id>
Instancesβ
List instancesβ
cwc admin instance ls
Get instance by IDβ
cwc admin instance ls -i <instance_id>
cwc admin instance ls --instance <instance_id>
Createβ
cwc admin instance create -n <instance_name> -e <environement> -t <instance_type> -p <project_name> -z <zone> -m <user_mail>
cwc admin instance create -n <instance_name> -e <environement> -t <instance_type> -i <project_id> -z <zone> -m <user_mail>
cwc admin instance create -n <instance_name> -e <environement> -t <instance_type> -u <project_url> -z <zone> -m <user_mail>
Notes:
- use
nova
zone for ovh and1
or2
for scaleway instance_type
corresponds to the provider instance sizing (i.e:DEV1-M
for Scaleway)- use
--dns_zone
ou-d
to choose the dns zone in which the instance will be created (you can list availble instances by runningcwc dnszones ls
)
Update statusβ
cwc admin instance update -i <instance_id> -s <action>
cwc admin instance update --instance <instance_id> --status <action>
Note: status must be poweroff
, poweron
or reboot
Deleteβ
cwc admin instance delete -i <instance_id>
cwc admin instance delete --instance <instance_id>
Refresh stateβ
cwc admin instance refresh -i <instance_id>
cwc admin instance refresh --instance <instance_id>
Buckets / object storageβ
Add bucket to a userβ
cwc admin bucket create -n <bucket_name> -t <bucket_type> -u <user_mail>
cwc admin bucket create --name <bucket_name> --type <bucket_type> --user <user_mail>
List all bucketsβ
cwc admin bucket ls
Get bucket by IDβ
cwc admin bucket ls -b <bucket_id>
cwc admin bucket ls --bucket <bucket_id>
Renew credentialsβ
cwc admin bucket renew -b <bucket_id>
cwc admin bucket renew --bucket <bucket_id>
Transfer to another userβ
cwc bucket transfer -b <bucket_id> -e <receiver_email>
cwc bucket transfer --bucket <bucket_id> --email <receiver_email>
Deleteβ
cwc admin bucket delete -b <bucket_id>
cwc admin bucket delete --bucket <bucket_id>
OCI / Docker registriesβ
Add registry to a userβ
cwc admin registry create -n <registry_name> -t <registry_type> -u <user_mail>
cwc admin registry create --name <registry_name> --type <registry_type> --user <user_mail>
Listβ
cwc admin registry ls
Get Registry by IDβ
cwc admin registry ls -r <registry_id>
cwc admin registry ls --registry <registry_id>
renew credentialsβ
cwc admin registry renew -r <registry_id>
cwc admin registry renew --registry <registry_id>
Transfer to another userβ
cwc registry transfer -r <registry_id> -e <receiver_email>
cwc registry transfer --registry <registry_id> --email <receiver_email>
Deleteβ
cwc admin registry delete -r <registry_id>
cwc admin registry delete --registry <registry_id>
Emailsβ
Send emailβ
cwc admin email -f from@provider.com -t to@provider.com -s subject -c content -m false
cwc admin email --from from@provider.com --to to@provider.com --subject subject --content content --templated false
Faas functionβ
Listβ
cwc admin faas function ls
Get owner by function IDβ
cwc admin faas function ls -f <function_id>
cwc admin faas function ls --function <function_id>
Faas invocationβ
Listβ
cwc admin faas invocation ls
Get invoker by invocation IDβ
cwc admin faas invocation ls -i <invocation_id>
cwc admin faas invocation ls --invocation <invocation_id>
Faas Triggerβ
Listβ
cwc admin faas trigger ls
Get owner by trigger IDβ
cwc admin faas trigger ls -t <trigger_id>
cwc admin faas trigger ls --trigger <trigger_id>
IoTβ
Object Typesβ
Listβ
cwc admin iot objectType ls
Get by IDβ
cwc admin iot objectType ls -i <object_type_id>
cwc admin iot objectType ls --id <object_type_id>
Createβ
cwc admin iot objectType create -n <name> -d <decoding_function> -u <user_id>
cwc admin iot objectType create --name <name> --decoding_function <decoding_function> --user_id <user_id>
Notes:
- Use
--public
flag to make the object type publicly accessible - Add triggers with
-t <trigger_id>
or--triggers <trigger_id>
(can be repeated for multiple triggers) - Use
-i
or--interactive
for interactive mode with step-by-step prompts
Updateβ
cwc admin iot objectType update -o <object_type_id> -n <new_name>
cwc admin iot objectType update --id <object_type_id> --name <new_name>
Notes:
- Use
-i
or--interactive
for interactive update mode - All creation flags are available for updates
Deleteβ
cwc admin iot objectType delete -o <object_type_id>
cwc admin iot objectType delete --objectType <object_type_id>
Devicesβ
Listβ
cwc admin iot device ls
Deleteβ
cwc admin iot device delete -d <device_id>
cwc admin iot device delete --deviceId <device_id>
Dataβ
List Numeric Dataβ
cwc admin iot data ls -n
cwc admin iot data ls --numeric
List String Dataβ
cwc admin iot data ls -s
cwc admin iot data ls --string
Notes:
- You must provide exactly one flag: either
--numeric
or--string
- All data list commands support pretty printing with
-p
or--pretty
flag
Storageβ
Key-Valueβ
Listβ
cwc admin storage kv ls
# You also can get them filtered by user id
cwc admin storage kv ls -u <user_id>
cwc admin storage kv ls --user <user_id>
Deleteβ
cwc admin storage kv delete -k <key> -u <user_id>
cwc admin storage kv delete --key <key> --user <user_id>
Kubernetesβ
Environmentβ
List all environmentsβ
cwc admin kubernetes environment ls