Creating Roles
You can create roles on an existing cloud by POSTing to
/api/clouds/XXXXX/roles
RestClient.post("https://manage.scalarium.com/api/clouds/XXXXX/roles",
JSON.dump(:role_type => 'nodejs-app',
:custom_recipes_setup => ['my::setup', 'my::cronjob'],
:custom_recipes_configure => ['my::configure'],
:custom_recipes_deploy => ['my::deploy'],
:custom_recipes_undeploy => ['my::undeploy']),
headers)
Accepted attributes in the POST body (encoded as JSON hash) are:
Role Basics
- role_type: Must be one of the following:
- 'lb' for 'Load Balancer',
- 'rails-app' for 'Rails Application Server',
- 'php-app' for 'PHP Application Server',
- 'nodejs-app' for 'node.js Application Server',
- 'db-master' for 'MySQL Master',
- 'web' for 'Web Server',
- 'mq' for 'Queue Server',
- 'custom' for 'Custom Role',
- 'memcached' for 'Memcached Server',
- 'monitoring-master' for 'Ganglia Monitoring Master'
if you choose the 'custom' role you have to specify
- name: The name that is show in the UI for this role.
- shortname: The name that is used by Chef recipes and internally.
Custom recipes
- custom_recipes_setup: Chef recipes that get executed during the setup - e.g. ['my::setup', 'my::cronjob']
- custom_recipes_configure: Recipes that get executed if a configure event is triggered.
- custom_recipes_deploy: Recipes that get executed during a deployment.
- custom_recipes_undeploy: Recipes that get executed during an undeploy of an application.
If validation fails, the API will return HTTP status code 412 with the errors included in the body, like so:
{
"errors": ["Name can't be blank"]
}
If the application was successfully created, the response will include the HTTP location of the new application and its ID in the response body:
{
"id":"jd75dfgh23s4hjbgsdf6598rhg8wat4ecg83h4fv"
}
-
FAQ
-
Applications
-
Basics
-
Custom Instance Setup
-
Deployment
-
Security
-
Auto Healing
-
Tutorials
- Tutorial: Customizing your Scalarium Cloud using Chef
- Customizing your Scalarium Cloud using Chef: The Scalarium Lifecycle System
- Customizing your Scalarium Cloud using Chef: Cooking with Chef
- Customizing your Scalarium Cloud using Chef: Writing a Cookbook to set up Redis
- Customizing your Scalarium Cloud using Chef: Configuring Custom Cookbooks
- View all (4 more)
-
Load Based Auto Scaling
-
Time Based Auto Scaling
-
API