Stackato Komodo IDE only
Stackato is a cloud application platform which is based on, and fully compatible with, Cloud Foundry. Stackato sets up virtual servers and deploys applications to them, automatically provisioning everything your application requires to run (language interpreter, web framework, modules, databases, and other services).Komodo works in conjunction with the Stackato client to provide an interface to Stackato and Cloud Foundry-based services. More information on stackato can be found at: www.activestate.com/cloud
To enable Stackato support in Komodo:
- Download the client
- Rename and/or
chmodthe file as necessary (see Stackato Client Setup)
- Set the location of the client under Preferences|Stackato
Once the client is installed and configured, the Tools|Stackato interface will be usable.
To connect to a Stackato API endpoint (e.g. 'https://api.stackato.local') enter the URL in the Target field and click Target.
Note: By default, Stackato servers will accept connections only over HTTPS.
Once the API endpoint is targeted, enter the username (an email address) and password, then click Login....
Details of the targeted Stackato system can be seen using the buttons under the User field:
- Show Target Info: Shows the server and client versions, and the usage quotas for the logged-in user.
- Show Runtimes: Lists the available language runtimes.
- Show Frameworks: Lists the supported frameworks.
- Show Services: Shows which services are available (and lists provisioned services).
The Applications pane shows applications belonging to the current user that have been deployed to the target. It shows their current status, the number of instances running, what services are bound to each, and the application URL(s).
The Provisioned Services pane (collapsible) shows the services that have been provisioned for the current user, whether or not they are bound to applications.
The Stackato Output pane (collapsible) show the console output of the various Stackato commands as they run.
New applications can be created by either right-clicking on an empty row in the Applications table and selecting "Add...", or pressing the "Add a new app" button in the toolbar above the Applications table (it's the one with the blue right-pointing arrow). This will bring up the New Stackato App Wizard, where you can set the properties on the application. Most of the properties should be straightforward:
- Application Name
- The name of the application. This should consist of only letters and digits, as the URL the form suggests is generated from the name. However the URL can be edited. Once it's edited, changing the application name no longer modifies the suggested URL.
- The path to the root folder containing the application to push.
- The URL of the application.
The remaining options, except debugging, should be straightforward. Note that on the next step of the wizard, you are given an opportunity to bind a service to the new application.
- Selecting No moves the wizard to the final confirmation page.
- Selecting Use an existing provisioned service moves the wizard to the service-selection page.
- Selecting Define a new provisioned service moves the wizard to the service-definition page. When a service is added on that page, the next move will go to the service-selection page.
Stackato (versions 1.26 and higher) supports debugging of Rails, Sinatra, Django, and PHP applications remotely via Komodo. These applications can be debugged remotely in Komodo by checking the Debug App box on the first page of the New Application wizard, and filling in the host Komodo is running on, and the port it's watching. Normally Komodo can figure out what these values should be, but if you have a different scenario in mind, such as creating the Stackato app on one machine, but debugging it from another, you'll need to adjust these fields accordingly.
You can also switch an app into debug or non-debug mode by right-clicking its row in the main table, and pressing the Configure Debugger... menu item. This brings up a small dialog box which you can check the Debug Application and modify the host and/or port Komodo will listen on for debugging sessions. As with the application description wizard, the interface will get the port number from Komodo, but may not be able to determine the hostname. This is because the hostname field should contain the name or IP address the debugging machine is known to the Stackato VM.
Note that changing an application's debugging settings will cause the Stackato client to restage it, which might cause a delay on some systems.
Each type of app is debugged in a slightly different way:
- Debugging PHP Stackato applications is no different from debugging other PHP programs remotely. Simply put XDEBUG_SESSION_START=1 at the end of the address bar, prepending it with a "?" if it's the only parameter, or a "&" if there are others. You can end debugging by either pressing Komodo's Detach button, or with the URL parameter XDEBUG_SESSION_STOP=1.
- Rails, Sinatra, and Django applications are debugged by appending a STACKATO_DEBUG=1 parameter to a request URI in the address bar, prepending it with either "?" or "&" similar to triggering a debugger session with PHP. In this case, once you start debugging an application, the application will remain in debug mode until it's restarted.
For all supported languages, debugging sessions work better if the preference Debugger | Debugger/Editor Integration | Try to find files on the local system when remote debugging is checked. If you make changes to locally found files while debugging, you can save your changes and push the changes to the server.