This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Eucalyptus Administration Commands

Eucalyptus Administration Commands

Eucalyptus offers commands for common administration tasks and inquiries. This section provides a reference for these commands.

1 - euctl

Syntax

euctl [-Anr] [-d | -s] NAME ...
euctl [-nq] NAME=VALUE ...
euctl [-nq] NAME=@FILE ...
euctl --dump [--format {raw,json,yaml}] NAME
euctl --edit [--format {raw,json,yaml}] NAME

Positional Arguments

ArgumentDescription
NAMEOutput a variable’s value.
NAME=VALUESet a variable to the specified value and then output it.
NAME=@FILESet a variable to that of the specified file’s contents, then output it.

Options

OptionDescriptionRequired
-A, –all-typesList all the known variable names, including structures. Those with string or integer values will be output as usual; for the structured values, the methods of retrieving them are given.No
-dOutput variables’ default values rather than their current values. Note that not all variables have default values.No
-sShow variables’ descriptions instead of their current values.No
-nSuppress output of the variable name. This is useful for setting shell variables.No
-qSuppress all output when setting a variable. This option overrides the behavior of the -n parameter.No
-r, –resetReset the given variables to their default values.No
–dumpOutput the value of a structured variable in its entirety. The value will be formatted in the manner specified by the –format option.No
–editEdit the value of a structure variable interactively. The value will be formatted in the manner specified by the –format option. Only one variable may be edited per invocation. When looking for an editor, the program will first try the environment variable VISUAL, then the environment variable EDITOR, and finally the default editor, vi.No
–format {raw,json,yaml}Use the specified format when displaying a structured variable.Valid values: rawjson

Examples

When retrieving a variable, a subset of the MIB name may be specified to retrieve a list of variables in that subset. For example, to list all the dns variables:

euctl dns

This replaces euca-describe-properties .

When setting a variable, the MIB name should be followed by an equal sign and the new value:

euctl dns.enabled=true

This replaces euca-modify-property -p .

To write variables using the contents of the files as their new values rather than typing them into the command line, follow them with =@ and those file names:

euctl cloud.network.network_configuration=@/etc/eucalyptus/network.yaml

This replaces euca-modify-property -f .

Specify a filename to read the values from a file:

myproperty=@myvaluefile

It is possible to read or write more than one variable in a single invocation of euctl . Just separate them with spaces:

euctl one=1 two=2 three four=@4.txt five

In all of these cases, euctl will generally output each variable named on its command line, along with its current (and potentially just-changed) value. For example, the output of the command above could be:

one = 1 
two = 2
three = 3
four = 4
five = 5

To reset a variable to its default value, specify the -r option:

euctl -r dns.enabled

The information available from euctl consists of integers, strings, and structures. The structured information can only be retrieved by specialized programs and, in some cases, this program’s --edit and --dump options.

2 - euserv-deregister-service

Syntax

euserv-deregister-service [-U URL] [--region USER@REGION] [-I KEY_ID]

       [-S KEY] [--security-token TOKEN] [--debug]
              [--debugger] [--version] [-h] SVCINSTANCE

Positional Arguments

ArgumentDescription
SVCINSTANCEName of the service instance to de-register.

Output

Eucalyptus returns a message stating that service instance was successfully de-registered.

Example

To de-register the dns service named “API_10.111.1.44.dns”:

euserv-deregister-service API_10.111.1.44.dns

3 - euserv-describe-events

Syntax

euserv-describe-events [-s] [-f FORMAT]

Description

Events come in the form of a list, where each event contains one or more of the following tags:

TagDescription
idA unique ID for the event.
messageA free-form text description of the event.
severityThe message’s severity (FATAL, URGENT, ERROR, WARNING, INFO, DEBUG, TRACE).
stack-traceThe stack trace, if any, corresponding to the event. The -s option is required to make this appear.
subject-arnThe Eucalyptus ARN of the service affected by the event.
subject-nameThe name of the service affected by the event.
subject-typeThe type of service affected by the event.
timestampThe date and time of the event’s creation.

Environment

EnvironmentDescription
AWS_ACCESS_KEY_IDThe access key ID to use when authenticating web service requests. This takes precedence over and euca2ools.ini, but not -I.
AWS_SECRET_ACCESS_KEYThe secret key to use when authenticating web service requests. This takes precedence over –region and euca2ools.ini(5), but not -S.
EUCA_BOOTSTRAP_URLThe URL of the service to contact. This takes precedence over –region and euca2ools.ini, but not -U.

Options

OptionDescriptionRequired
-f, –format formatPrint events in a given format, where format can be: yaml or oneline, and format:string. See for details about each format. When omitted, the format defaults to yaml.No
-s, –show-stack-tracesInclude the stack-trace tag in events’ data. This is omitted by default due to its length.No

Output

There are several built-in formats, and you can define additional formats using a format: string , as described below. Here are the details of the built-in formats:

yaml This outputs block-style YAML designed to be easily readable. Tags that are empty or not defined do not appear in this output at all.

events:
            - timestamp: {timestamp}
            severity: {severity}
            id: {id}
            subject-type: {subject-type}
            subject-name: {subject-name}
            subject-host: {subject-host}
            subject-arn: {subject-arn}
            message: |-
            {message}
            stack-trace: |-
            {stack-trace}

oneline This output is designed to be as compact as possible.

{timestamp} {severity} {subject-type} {subject-name} {message}

format:string The format: string format allows you to specify which information you want to show using placeholders enclosed in curly braces to indicate where to show the tags for each event. For example:

euserv-describe-events -f "format:{timestamp} {subject-name} {message}"

Example

To output a list of service-affecting events in the oneline format:

euserv-describe-events --format oneline
2016-06-20 16:16:08 INFO node 10.111.1.15 the node is operating normally\nFound service status for 10.111.1.15: ENABLED
2016-06-27 17:37:57 ERROR node 10.111.5.50 Error occurred in transport
2016-06-28 07:00:17 ERROR node 10.111.5.50

4 - euserv-describe-node-controllers

Syntax

euserv-describe-node-controllers [--ec2-url URL] [--show-headers]

   [--show-empty-fields] [-U URL]
          [--region USER@REGION] [-I KEY_ID]  [-S  KEY]  [--security-token
          TOKEN] [--debug] [--debugger] [--version] [-h]

Options

OptionDescriptionRequired
–ec2-url urlThe compute service’s endpoint URL.No
–show-headersShow column headers.No

Output

Eucalyptus returns information about the node controller and its instances, for example:

NODE  one  10.111.1.53  enabled    
INSTANCE  i-162a8f09      
INSTANCE  i-2b6cdd10      
NODE  one  10.111.5.132  enabled    
INSTANCE  i-ba9307d7

Example

euserv-describe-node-controllers --region localhost

5 - euserv-describe-service-types

Syntax

euserv-describe-service-types [-a] [--show-headers]

[--show-empty-fields] [-U URL]
   [--region  USER@REGION]  [-I  KEY_ID]  [-S  KEY] [--security-token TOKEN]
   [--debug] [--debugger] [--version] [-h]

Options

OptionDescriptionRequired
-a, –allShow all service types regardless of their properties.No
–show-headersShow column headers.No

Output

Eucalyptus returns a list of service types.

Example

euserv-describe-service-types 
SVCTYPE  arbitrator                The Arbitrator service                                      
SVCTYPE  autoscaling     user-api  Auto Scaling API service                                    
SVCTYPE  cloudformation  user-api  Cloudformation API service                                  
SVCTYPE  cloudwatch      user-api  CloudWatch API service                                      
SVCTYPE  cluster                   The Cluster Controller service                              
SVCTYPE  compute         user-api  the Eucalyptus EC2 API service                              
SVCTYPE  dns             user-api  Eucalyptus DNS server                                       
SVCTYPE  euare           user-api  IAM API service                                             
SVCTYPE  eucalyptus                eucalyptus service implementation                           
SVCTYPE  identity        user-api  Eucalyptus identity service                                 
SVCTYPE  imaging         user-api  Eucalyptus imaging service                                  
SVCTYPE  loadbalancing   user-api  ELB API service                                             
SVCTYPE  objectstorage   user-api  S3 API service                                              
SVCTYPE  simpleworkflow  user-api  Simple Workflow API service                                 
SVCTYPE  storage                   The Storage Controller service                              
SVCTYPE  tokens          user-api  STS API service                                             
SVCTYPE  user-api                  The service group of all user-facing API endpoint services  
SVCTYPE  walrusbackend             The legacy Walrus Backend service

6 - euserv-describe-services

Syntax

euserv-describe-services [-a]

       [--group-by-type | --group-by-zone | --group-by-host | --expert]
         [--show-headers]   [--show-empty-fields]   [-U   URL]  [--region
         USER@REGION]  [-I  KEY_ID]  [-S  KEY]  [--security-token  TOKEN]
         [--filter  NAME=VALUE]  [--debug]  [--debugger] [--version] [-h]
         [SVCINSTANCE [SVCINSTANCE ...]]

Positional Arguments

ArgumentDescription
SVCINSTANCELimit results to specific instances of services.

Options

OptionDescriptionRequired
-a, –allShow all services regardless of type.No
–group-by-typeCollate services by service type (default).No
–group-by-zoneCollate services by availability zone.No
–group-by-hostCollate services by host.No
–expertShow advanced information, including service accounts.No
–show-headersShow column headers.No
–filter name=valueRestrict results to those that meet criteria. Allowed filter names: availability-zone. The service’s availability zone.host. The machine running the service.internal. Whether the service is used only internally (true or false).public. Whether the service is public (true or false).service-group. Whether the service is a member of a specific service group.service-group-member. Whether the service is a member of any service group (true or false).service-type. The type of service.state. The service’s state.No

Output

Eucalyptus returns information about the services you specified.

Example

Verify that you are looking at the cloud controllers view of the service state by explicitly running against that host:

euserv-describe-services --filter service-type=storage -U http://localhost:8773/services/Empyrean
SERVICE  storage  one  one-sc-1  enabled

7 - euserv-migrate-instances

Syntax

euserv-migrate-instances (-s HOST | -i INSTANCE)

  [--include-dest HOST | --exclude-dest HOST]
  [-U URL] [--region USER@REGION] [-I KEY_ID]  [-S  KEY]  [--security-token
  TOKEN] [--debug] [--debugger] [--version] [-h]

Options

OptionDescriptionRequired
-s, –source hostRemove all instances from a specific host.No
-i, –instance instanceRemove one instance from its current host.No
–include-dest hostAllow migration to only a specific host (may be used more than once).No
–exclude-dest hostAllow migration to any host except a specific one (may be used more than once).No

Output

Unless requested, no output is given. You can run the euserv-describe-* command to verify that the migration activity completed successfully, as shown in the example following.

Example

To migrate an instance from its current host:

euserv-migrate-instances -i i-8eacd211 
euserv-describe-node-controllers 
NODE  zone-555  10.104.1.200  enabled    

NODE  zone-555  10.104.1.201  enabled    
INSTANCE  i-8eacd211      

8 - euserv-modify-service

Syntax

euserv-modify-service -s STATE [-U URL] [--region USER@REGION]

   [-I KEY_ID] [-S KEY] [--security-token TOKEN]
   [--debug] [--debugger] [--version] [-h] SVCINSTANCE

Positional Arguments

ArgumentDescription
SVCINSTANCEThe name of the service instance to modify.

Options

OptionDescriptionRequired
-s, –state stateThe state to change to.Yes

Output

No output is given. You can run the euserv-describe-services command to verify that the modification completed successfully, as shown in the example following.

Example

To modify the state of a storage controller service named “two-sc-1” to stopped:

euserv-modify-service -s stopped two-sc-1
euserv-describe-services two-sc-1
SERVICE  storage  two  two-sc-1  stopped  

9 - euserv-register-service

Syntax

euserv-register-service -t TYPE -h IP [--port PORT] [-z ZONE] [-U URL]

       [--region USER@REGION] [-I KEY_ID] [-S KEY]
           [--security-token   TOKEN]  [--debug]  [--debugger]  [--version]
           [--help] SVCINSTANCE

Positional Arguments

ArgumentDescription
SVCINSTANCEThe name of the new service instance to register.

Options

OptionDescriptionRequired
-t, –type typeThe new service instance’s type.Yes
-h, –host IPThe host on which the new instance of the service runs.Yes
–port portThe port on which the new instance of the service runs (default for cluster: 8774, otherwise: 8773).No
-z, –availability-zone zoneThe availability zone in which to register the new service instance. This is required only for services of certain types.Conditional

Output

No output is given when it succeeds.

Example

To register the ufs service named “user-api-5”:

euserv-register-service -t user-api -h 10.0.0.15 user-api-5