The SDK provides command line tools for your workstation to make use of the CloudBees Platform fast and light. Download here.
Java 6 or greater must be installed and the java command must be available on the PATH (verify by running: java -version)
Download the CloudBees SDK and unzip it into a directory on your machine (we'll refer to as BEES_HOME from now on)
To run the CloudBees command line tools, you need to set the BEES_HOME environment variable, and add BEES_HOME to your PATH environment variable.
The first time you run the bees command, you will be prompted to enter your CloudBees email address and password, your API keys will then be cached in your USER_HOME/.bees/bees.config file so that you won't need to enter them for any of the commands.
Open a command-line console (launch the Terminal application on OSX) and then download SDK zip file and install unzip it into a directory.
Add the bees variables to your OS-X/linux command line environment by adding the following lines to your /.bash_profile or /.profile file (you may need to create this file)
Refresh your terminal's bash session by executing
If you have the homebrew package manager, then simply run
On Windows, you can open a predefined Bees Console window by double clicking on the BEES_HOME\Bees Console icon. Please avoid a path with spaces in it in your installation directory ! (eg don't use Program Files if you can avoid it).
If you are running the SDK commands on a machine that is behind a proxy, you may receive "Connection timed out" errors. The SDK supports a full set of proxy parameters:
You can also put those in your USER_HOME/.bees/bees.config file:
The maven plugin also supports similar parameters:
Verify this is running properly by executing the "bees help" command
The CloudBees SDK includes a set of commands for managing the RUN@Cloud Application Service and can be used to perform most operations that you can do via the web console. Having these commands available in the SDK makes it easier to integrate CloudBees operations into your local development workflow and any build automation for your web application projects.
All of the application commands can be invoked using the following syntax.
Deploy a new version of an application using a WAR archive file
[parameters] are defined as name=value pairs.
For example to set the JVM MaxPermSize add the parameter: jvmPermSize=size where size is in MB (see JVM PermGen Space).
NOTE: config parameters will be available to the application as system properties in Tomcat and JBoss containers.
When deploying WAR files, you will need to place any CloudBees-specific configuration rules in WEB-INF/cloudbees-web.xml file. Here is a rough example of a cloudbees-web.xml file that declares a Managed MySQL datasource.
Delete an application
Returns the basic information about an application (such as its URLs and active/sleeping state)
Returns the list of applications available to your account
Restarts all deployed instances of an application
Establishes a persistent connection to an application log so that you can see new messages as they are written to the logs. This is provides a "cloud-friendly" replacement for the ubiquitous "tail" command many developers use to monitor/debug application log files.
Update an application parameters and restart the application
Parameters:
containerType : tomcat or jboss
jvmPermSize : jvmPermSize in MB (see JVM PermGen Space article)
securityMode : set to "private" to enable basic authentication access to the application, set to "public" to
disable basic authentication
stickySession : true or false (see Session AffinitySession Affinity)
To list resources in your account (all apps, databases, session stores, SSL details etc)
bees app:resource:list -a ACCOUNT
The SDK includes a set of commands for managing the MySQL Database Service.
Create a new MySQL database
Delete a MySQL database
Returns information about connecting to a database
Returns a list of all the databases associated with your account
Change your database password
List database snapshots
Create a database snapshot
Delete a database snapshot
Deploy a database snapshot
CloudBees project commands are only available for applications generated using the Bees wizard (on the web), built using the CloudBees SDK style.
Create a new web application using one of the predefined CloudBees application templates
Launch a local version of the CloudBees environment to run your application (runs on port 8080)
If you'd like to attach to your running application with a debugger (such as Eclipse), you can use the beesd command instead, which will initialize the JVM process to support remote debuggers.
Alternatively, if you have an existing WAR file created via your own build process, you can use the app:run command to launch a local CloudBees server to run the WAR.
Deploy the web application to the cloud
If the specified appid does not exist, a new application environment will be created using this ID. If the appid already exists, and you have permission to update the application, the new application package will be published, and the existing application environment will be re-deployed to use the new package.
Note: If you accidentally overwrite an existing application or just want to rollback to the previous version, you can use the deployment history panel in the web-based application console to re-deploy a previous version of the application
Removes all files generated by the compile and package commands
Compiles all application source files
Downloads the remote application and installs it to run locally. This command is only valid if the deployed application has a source package associated with it.
External configuration parameters can be defined for application and account with the bees:set|unset|update commands.
See the Configuration Parameters article for a complete list of commands.