Skip to content

StackStorm-Exchange/stackstorm-openstack

Repository files navigation

OpenStack Integration Pack

StackStorm pack for OpenStack integration.

Configuration

Copy the example configuration in openstack.yaml.example to /opt/stackstorm/configs/openstack.yaml and edit as required.

Note : When modifying the configuration in /opt/stackstorm/configs/ please remember to tell StackStorm to load these new values by running st2ctl reload --register-configs

Pack configuration requires URLs of the OpenStack APIs and an authentication mechanism. There are two way to supply this information:

Token based

Supply an already acquired token and a URL pointing to the service API. Both of these need to be acquired from the service catalog.

To acquire a token:

curl -s -X POST $OS_AUTH_URL/tokens -H "Content-Type: application/json" -d '{"auth": {"tenantName": "'"$OS_PROJECT_NAME"'", "passwordCredentials": {"username": "'"$OS_USERNAME"'", "password": "'"$OS_PASSWORD"'"}}}' | python -m json.tool

See the OpenStack manual for more information.

---
token:
    OS_TOKEN: "xxxxxxxxxxxxxxxxxxxx"
    OS_URL: "http://{API_IP}:{API_PORT}/v2/{PROJECT_ID}"

Password based

Tokens are ephemeral and typical expiry is short; in those cases it might be preferred to use the password based approach.

---
password:
  OS_AUTH_URL: # authentication url
  OS_PROJECT_ID: # id of the tenant
  OS_PROJECT_NAME: # name of the tenant
  OS_USERNAME: # username
  OS_PASSWORD: # password
  OS_IDENTITY_API_VERSION: # keystone version - default 3
  OS_PROJECT_DOMAIN_ID: # project domain id - default 3
  OS_USER_DOMAIN_ID: # user domain id = defeault 3
  OS_REGION_NAME: # region name

Actions

Autogenerated actions

All actions in this pack are auto-generated. This is done using the autogen Python script.

usage: autogen.py [-h] [--ns NAMESPACE] [--path BASE_PATH] [--debug]

optional arguments:
  -h, --help            show this help message and exit
  --ns NAMESPACE, -n NAMESPACE
  --path BASE_PATH, -p BASE_PATH
  --debug, -d
  • NAMESPACE - namespace of the command to generate e.g. 'server' or 'server create'
  • BASE_PATH - the location where to write the action metadata
  • debug - will spit out extra debug information

Sensors

This pack contains a sensor for monitoring the Zaqar messaging service.

This is the relevant openstack.yaml configuration section:

messaging:
    # The value for service type depends on how the zaqar service is
    # registered under Keystone. Please refer to Keystone for the
    # actual value for the service type.
    service_type: 'messaging'
    claim_ttl: 60
    claim_grace: 60
    queues: []

This will dispatch a trigger when it sees messages in the configured queues.

Attention

Some actions in the pack have almost identical name, such as:

address.scope.create and neutron.address.scope.create

These neutron prefix actions exist in the consequence of introducing neutronclient which has some APIs haven't been included in openstackclient, If there isn't a specific prefix of OpenStack service, that means this action uses openstackclient. In contrast, the latter action belongs to neturonclient. In such cases, use non-neutron prefix actions first.

About

OpenStack integration pack

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 16

Languages