This is the multi-page printable view of this section. Click here to print.
Users
1 - Drycc Workflow CLI
The Drycc Workflow command-line interface (CLI), or client, allows you to interact with Drycc Workflow.
Installation
Install the latest drycc
client for Linux or Mac OS X with:
$ curl -sfL https://www.drycc.cc/install-cli.sh | bash -
The installer puts drycc
in your current directory, but you should move it
somewhere in your $PATH:
$ ln -fs $PWD/drycc /usr/local/bin/drycc
Getting Help
The Drycc client comes with comprehensive documentation for every command.
Use drycc help
to explore the commands available to you:
$ drycc help
The Drycc command-line client issues API calls to a Drycc controller.
Usage: drycc <command> [<args>...]
Auth commands::
login login to a controller
logout logout from the current controller
Subcommands, use `drycc help [subcommand]` to learn more::
...
To get help on subcommands, use drycc help [subcommand]
:
$ drycc help apps
Valid commands for apps:
apps:create create a new application
apps:list list accessible applications
apps:info view info about an application
apps:open open the application in a browser
apps:logs view aggregated application logs
apps:run run a command in an ephemeral app container
apps:destroy destroy an application
apps:transfer transfer app ownership to another user
Use `drycc help [command]` to learn more
Support for Multiple Profiles
The CLI reads from the default client
profile, which is located on your
workstation at $HOME/.drycc/client.json
.
Easily switch between multiple Drycc Workflow installations or users by setting
the $DRYCC_PROFILE
environment variable or by using the -c
flag.
There are two ways to set the $DRYCC_PROFILE
option.
- Path to a json configuration file.
- Profile name. If you set profile to just a name, it will be saved alongside the default profile,
in
$HOME/.drycc/<name>.json
.
Examples:
$ DRYCC_PROFILE=production drycc login drycc.production.com
...
Opening browser to http://drycc.example.com/v2/login/drycc/?key=4ccc81ee2dce4349ad5261ceffe72c71
Waiting for login... .o.Logged in as drycc
Configuration saved to /home/testuser/.drycc/production.json
$ DRYCC_PROFILE=~/config.json drycc login drycc.example.com
...
Opening browser to http://drycc.example.com/v2/login/drycc/?key=4ccc81ee2dce4349ad5261ceffe72c71
Waiting for login... .o.Logged in as drycc
Configuration saved to /home/testuser/config.json
The configuration flag works identically to and overrides $DRYCC_PROFILE
:
$ drycc whoami -c ~/config.json
You are drycc at drycc.example.com
Proxy Support
If your workstation uses a proxy to reach the network where the cluster lies,
set the http_proxy
or https_proxy
environment variable to enable proxy support:
$ export http_proxy="http://proxyip:port"
$ export https_proxy="http://proxyip:port"
Note
Configuring a proxy is generally not necessary for local Minikube clusters.CLI Plugins
Plugins allow developers to extend the functionality of the Drycc Client, adding new commands or features.
If an unknown command is specified, the client will attempt to execute the command as a dash-separated command. In this case, drycc resource:command
will execute drycc-resource
with the argument list command
. In full form:
$ # these two are identical
$ drycc accounts list
$ drycc-accounts list
Any flags after the command will also be sent to the plugin as an argument:
$ # these two are identical
$ drycc accounts list --debug
$ drycc-accounts list --debug
But flags preceding the command will not:
$ # these two are identical
$ drycc --debug accounts list
$ drycc-accounts list
2 - Users and Registration
Workflow uses the passport component to create and authorize users. It can be configured for LDAP authentication or you can browse the passport website to register users.
Login to Workflow
If you already have an account, use drycc login
to authenticate against the Drycc Workflow API.
$ drycc login http://drycc.example.com
Opening browser to http://drycc.example.com/v2/login/drycc/?key=4ccc81ee2dce4349ad5261ceffe72c71
Waiting for login... .o.Logged in as drycc
Configuration file written to /root/.drycc/client.json
You can also login with username and password:
$ drycc login http://drycc.example.com --username=demo --password=demo
Configuration file written to /root/.drycc/client.json
Logout from Workflow
Logout of an existing controller session using drycc logout
.
$ drycc logout
Logged out as drycc
Verify Your Session
You can verify your client configuration by running drycc whoami
.
$ drycc whoami
You are drycc at http://drycc.example.com
Note
Session and client configuration is stored in the~/.drycc/client.json
file.
3 - Users and SSH Keys
For Dockerfile and Buildpack based application deploys via git push
, Drycc Workflow identifies users via SSH
keys. SSH keys are pushed to the platform and must be unique to each user. Users may have multiple SSH keys as needed.
Generate an SSH Key
If you do not already have an SSH key or would like to create a new key for Drycc Workflow, generate a new key using
ssh-keygen
:
$ ssh-keygen -f ~/.ssh/id_drycc -t rsa
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/admin/.ssh/id_drycc.
Your public key has been saved in /Users/admin/.ssh/id_drycc.pub.
The key fingerprint is:
3d:ac:1f:f4:83:f7:64:51:c1:7e:7f:80:b6:70:36:c9 admin@plinth-23437.local
The key's randomart image is:
+--[ RSA 2048]----+
| .. |
| ..|
| . o. .|
| o. E .o.|
| S == o..o|
| o +. .o|
| . o + o .|
| . o = |
| . . |
+-----------------+
$ ssh-add ~/.ssh/id_drycc
Identity added: /Users/admin/.ssh/id_drycc (/Users/admin/.ssh/id_drycc)
Adding and Removing SSH Keys
By publishing the public half of your SSH key to Drycc Workflow the component responsible for receiving git push
will be able to authenticate the user and ensure that they have access to the destination application.
$ drycc keys add ~/.ssh/id_drycc.pub
Uploading id_drycc.pub to drycc... done
You can always view the keys associated with your user as well:
$ drycc keys list
ID OWNER KEY
admin@plinth-23437.local admin ssh-rsa abc AAAAB3Nz...3437.local
admin@subgenius.local admin ssh-rsa 123 AAAAB3Nz...nius.local
Remove keys by their name:
$ drycc keys remove admin@plinth-23437.local
Removing admin@plinth-23437.local SSH Key... don