AppFog CLI Tool Manual

AF Tool

The af gem is based on CloudFoundry's vmc gem but includes features specific to AppFog and has the default target set to AppFog's service. Check out the GitHub repo.

Installation

The af command line tool is written in Ruby and installed as a gem.

Linux

The gems can be installed manually, with Bundler, or alongside RVM. Click the link above for more detailed instructions.

Mac OS X

Ostensibly, you should only have to use gem install af to install the gem on stock OS X. However, some users may need to use RVM to accomplish this. Please click on the link above for the detailed instructions.

Windows

There was a program created to handle the installation of Ruby. It comes with RubyGems built-in, with which you can install the af gem. Click the link above more detailed instructions.

General

target [url] Reports current target or sets a new target
login [email] [--email, --passwd] Login
info System and account information

Apps

apps List deployed applications

Creation

push [appname] Create, push, map, and start a new application.
push [appname] --infra Push application to specificed infrastructure.
push [appname] --path Push application from specified path.
push [appname] --url Set the url for the application.
push [appname] --instances <N> Set the expected number <N> of instances.
push [appname] --mem M Set the memory reservation for the application.
push [appname] --runtime RUNTIME Set the runtime to use for the application.
push [appname] --no-start Do not auto-start the application.
push [appname] --no-resources Do not check for existing resources. Useful workaround for 5XX errors during a push.

Operations

start <appname> Start the application
stop <appname> Stop the application
restart <appname> Restart the application
delete <appname> Delete the application
clone <src-app> <dest-app> [infra] Clone the application and services

Updates

update <appname> [--path] [--no-resources]
Update the application bits. For the "--no-resources" flag, see the push command above.
mem <appname> [memsize] Update the memory reservation for an application
map <appname> <url> Register the application to the url
unmap <appname> <url> Unregister the application from the url
instances <appname> <num|delta> Scale the application instances up or down

Information

crashes <appname> List recent application crashes
crashlogs <appname> Display log information for crashed applications
logs <appname> [--all] Display log information for the application
files <appname> [path] [--all] Display directory listing or file download for path
stats <appname> Display resource usage for the application
instances <appname> List application instances

Download

pull <appname> [path] Downloads last pushed source to <appname> or [path]
download <appname> [path] Downloads last pushed source to zipfile

Environment

env <appname> List application environment variables
env-add <appname> <variable[=]value> Add an environment variable to an application
env-del <appname> <variable> Delete an environment variable to an application

Services

services Lists of services available and provisioned
create-service <service> [--name,--bind] Create a provisioned service
create-service <service> --infra Create a provisioned service on a specified infrastructure
create-service <service> <name> Create a provisioned service and assign it <name>
create-service <service> <name> <app> Create a provisioned service and assign it <name>, and bind to <app>
delete-service [servicename] Delete a provisioned service
bind-service <servicename> <appname> Bind a service to an application
unbind-service <servicename> <appname> Unbind service from the application
clone-services <src-app> <dest-app> Clone service bindings from <src-app> application to <dest-app>
export-service <service> Export data from a specified service
import-service <service> <url> Import data to a specified service
tunnel <servicename> [--port] Create a local tunnel to a remote service
tunnel <servicename> <clientcmd> Create a local tunnel to a remote service and start a local client

Administration

user Display user account information
passwd Change the password for the current user
logout Logs current user out of the target system
add-user [--email, --passwd] Register a new user (requires admin privileges)
delete-user <user> Delete a user and all apps and services (requires admin privileges)

System

runtimes Display the supported runtimes of the target system
frameworks Display the recognized frameworks of the target system
infras Display the available infrastructures

Misc

aliases List aliases
alias <alias[=]command> Create an alias for a command
unalias <alias> Remove an alias
targets List known targets and associated authorization tokens

Help

help [command] Get general help or help on a specific command
help options Get help on available options

Troubleshooting

I am having trouble updating my application.
Push, Pull, and Update Commands

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.