Closed hd-deman closed 8 years ago
I'm trying to install like this
FROM debian:wheezy
RUN apt-get -y update && apt-get -y install curl adduser procps python2.7 libffi5 libyaml-0-2 git libpcre3 libpython2.7 libxml2 python-dev libssl-dev libffi-dev sed
RUN curl -s https://packagecloud.io/install/repositories/StackStorm/staging-stable/script.deb.sh | bash
RUN apt-get -y update && apt-get -y install st2 st2mistral
ADD ./conf/st2.conf.template /st2.conf.template
RUN md5sum /etc/st2/st2.conf > /st2.conf.orig.md5
COPY .htpasswd /etc/st2/.htpasswd
COPY docker-entrypoint.sh /entrypoint.sh
VOLUME [ "/etc/st2", "/opt/stackstorm/packs" ]
ENTRYPOINT [ "/entrypoint.sh" ]
and run multiple containers with different ST2_SERVICE
name: run stackstorm st2api container
docker:
name: "stackstorm-api"
image: registry.service.consul:5000/stackstorm
restart_policy: always
state: reloaded
net: weave
ports:
- 9101
env:
SERVICE_NAME: stackstorm-api
AMQP_URL: amqp://guest:guest@stackstorm-rabbitmq.service.consul:5672
DB_HOST: stackstorm-mongo
ST2_SERVICE: st2api
ST2_API_URL: http://stackstorm-api.service.consul:9101
ST2_AUTH_URL: http://stackstorm-auth.service.consul:9100
- name: run stackstorm auth container
docker:
name: "stackstorm-auth"
image: registry.service.consul:5000/stackstorm
restart_policy: always
state: reloaded
net: weave
ports:
- 9100
env:
SERVICE_NAME: stackstorm-auth
ST2_API_URL: http://stackstorm-api.service.consul:9101
DB_HOST: stackstorm-mongo.service.consul
ST2_SERVICE: st2auth
volumes_from:
- stackstorm-api
- name: run stackstorm containers
docker:
name: "stackstorm-{{ item }}"
image: registry.service.consul:5000/stackstorm
restart_policy: always
net: weave
state: reloaded
volumes_from:
- stackstorm-api
env:
SERVICE_NAME: "stackstorm-{{ item }}"
ST2_AUTH_URL: http://stackstorm-auth.service.consul:9100
ST2_API_URL: http://stackstorm-api.service.consul:9101
AMQP_URL: amqp://guest:guest@stackstorm-rabbitmq.service.consul:5672
DB_HOST: stackstorm-mongo.service.consul
ST2_SERVICE: st2{{ item }}
with_items:
- notifier
- resultstracker
- rulesengine
- sensorcontainer
- exporter
- actionrunner
- name: run stackstorm rabbitmq container
docker:
name: "stackstorm-rabbitmq"
image: rabbitmq:latest
restart_policy: always
state: reloaded
net: weave
env:
SERVICE_NAME: stackstorm-rabbitmq
- name: run stackstorm mongo container
docker:
name: "stackstorm-mongo"
image: mongo:latest
restart_policy: always
state: reloaded
net: weave
env:
SERVICE_NAME: stackstorm-mongo
but I always get Conflict while trying to save in DB.
2016-04-22 10:27:30,867 DEBUG [-] Open OK!
2016-04-22 10:27:30,867 DEBUG [-] using channel_id: 1
2016-04-22 10:27:30,868 DEBUG [-] Channel open
2016-04-22 10:27:30,871 DEBUG [-] registered exchange st2.execution.
2016-04-22 10:27:30,874 DEBUG [-] registered exchange st2.liveaction.
2016-04-22 10:27:30,876 DEBUG [-] registered exchange st2.trigger.
2016-04-22 10:27:30,879 DEBUG [-] registered exchange st2.trigger_instances_dispatch.
2016-04-22 10:27:30,882 DEBUG [-] registered exchange st2.sensor.
2016-04-22 10:27:30,882 DEBUG [-] Closed channel #1
2016-04-22 10:27:30,883 DEBUG [-] Registering internal trigger: st2.generic.actiontrigger
2016-04-22 10:27:43,966 INFO [-] Registered trigger: st2.generic.actiontrigger.
2016-04-22 10:27:43,977 DEBUG [-] Start from server, version: 0.9, properties: {u'information': u'Licensed under the MPL. See http://www.rabbitmq.com/', u'product': u'RabbitMQ', u'copyright': u'Copyright (C) 2007-2016 Pivotal Software, Inc.', u'capabilities': {u'exchange_exchange_bindings': True, u'connection.blocked': True, u'authentication_failure_close': True, u'direct_reply_to': True, u'basic.nack': True, u'per_consumer_qos': True, u'consumer_priorities': True, u'consumer_cancel_notify': True, u'publisher_confirms': True}, u'cluster_name': u'rabbit@8b78cf258972', u'platform': u'Erlang/OTP', u'version': u'3.6.1'}, mechanisms: [u'AMQPLAIN', u'PLAIN'], locales: [u'en_US']
2016-04-22 10:27:43,978 DEBUG [-] Open OK!
2016-04-22 10:27:43,978 DEBUG [-] using channel_id: 1
2016-04-22 10:27:43,979 DEBUG [-] Channel open
2016-04-22 10:27:43,980 DEBUG [-] Closed channel #1
2016-04-22 10:27:43,980 AUDIT [-] Trigger updated. Trigger.id=5719ef42eea6fa000bca4215 (trigger_db={'uid': u'trigger:core:st2.generic.actiontrigger:5f02f0889301fd7be1ac972c11bf3e7d', 'parameters': {}, 'ref_count': 0, 'name': u'st2.generic.actiontrigger', 'pack': u'core', 'type': u'core.st2.generic.actiontrigger', 'id': '5719ef42eea6fa000bca4215', 'description': None})
2016-04-22 10:27:43,981 AUDIT [-] Trigger created for parameter-less TriggerType. Trigger.id=5719ef42eea6fa000bca4215 (trigger_db={'uid': u'trigger:core:st2.generic.actiontrigger:5f02f0889301fd7be1ac972c11bf3e7d', 'parameters': {}, 'ref_count': 0, 'name': u'st2.generic.actiontrigger', 'pack': u'core', 'type': u'core.st2.generic.actiontrigger', 'id': '5719ef42eea6fa000bca4215', 'description': None})
2016-04-22 10:27:43,981 DEBUG [-] Registering internal trigger: st2.generic.notifytrigger
2016-04-22 10:27:43,984 INFO [-] Registered trigger: st2.generic.notifytrigger.
2016-04-22 10:27:43,988 DEBUG [-] using channel_id: 1
2016-04-22 10:27:43,988 DEBUG [-] Channel open
2016-04-22 10:27:43,989 DEBUG [-] Closed channel #1
2016-04-22 10:27:43,989 AUDIT [-] Trigger updated. Trigger.id=5719ef42eea6fa000bca4217 (trigger_db={'uid': u'trigger:core:st2.generic.notifytrigger:5f02f0889301fd7be1ac972c11bf3e7d', 'parameters': {}, 'ref_count': 0, 'name': u'st2.generic.notifytrigger', 'pack': u'core', 'type': u'core.st2.generic.notifytrigger', 'id': '5719ef42eea6fa000bca4217', 'description': None})
2016-04-22 10:27:43,990 AUDIT [-] Trigger created for parameter-less TriggerType. Trigger.id=5719ef42eea6fa000bca4217 (trigger_db={'uid': u'trigger:core:st2.generic.notifytrigger:5f02f0889301fd7be1ac972c11bf3e7d', 'parameters': {}, 'ref_count': 0, 'name': u'st2.generic.notifytrigger', 'pack': u'core', 'type': u'core.st2.generic.notifytrigger', 'id': '5719ef42eea6fa000bca4217', 'description': None})
2016-04-22 10:27:43,991 DEBUG [-] Registering internal trigger: st2.action.file_writen
2016-04-22 10:27:43,993 INFO [-] Registered trigger: st2.action.file_writen.
2016-04-22 10:27:43,997 DEBUG [-] using channel_id: 1
2016-04-22 10:27:43,997 DEBUG [-] Channel open
2016-04-22 10:27:43,998 DEBUG [-] Closed channel #1
2016-04-22 10:27:43,998 AUDIT [-] Trigger updated. Trigger.id=5719ef42eea6fa000bca4219 (trigger_db={'uid': u'trigger:core:st2.action.file_writen:5f02f0889301fd7be1ac972c11bf3e7d', 'parameters': {}, 'ref_count': 0, 'name': u'st2.action.file_writen', 'pack': u'core', 'type': u'core.st2.action.file_writen', 'id': '5719ef42eea6fa000bca4219', 'description': None})
2016-04-22 10:27:43,999 AUDIT [-] Trigger created for parameter-less TriggerType. Trigger.id=5719ef42eea6fa000bca4219 (trigger_db={'uid': u'trigger:core:st2.action.file_writen:5f02f0889301fd7be1ac972c11bf3e7d', 'parameters': {}, 'ref_count': 0, 'name': u'st2.action.file_writen', 'pack': u'core', 'type': u'core.st2.action.file_writen', 'id': '5719ef42eea6fa000bca4219', 'description': None})
2016-04-22 10:27:44,000 DEBUG [-] Registering internal trigger: st2.key_value_pair.create
2016-04-22 10:27:44,003 INFO [-] Registered trigger: st2.key_value_pair.create.
2016-04-22 10:27:44,006 DEBUG [-] using channel_id: 1
2016-04-22 10:27:44,007 DEBUG [-] Channel open
2016-04-22 10:27:44,007 DEBUG [-] Closed channel #1
2016-04-22 10:27:44,008 AUDIT [-] Trigger updated. Trigger.id=5719ef42eea6fa000bca421b (trigger_db={'uid': u'trigger:core:st2.key_value_pair.create:5f02f0889301fd7be1ac972c11bf3e7d', 'parameters': {}, 'ref_count': 0, 'name': u'st2.key_value_pair.create', 'pack': u'core', 'type': u'core.st2.key_value_pair.create', 'id': '5719ef42eea6fa000bca421b', 'description': None})
2016-04-22 10:27:44,008 AUDIT [-] Trigger created for parameter-less TriggerType. Trigger.id=5719ef42eea6fa000bca421b (trigger_db={'uid': u'trigger:core:st2.key_value_pair.create:5f02f0889301fd7be1ac972c11bf3e7d', 'parameters': {}, 'ref_count': 0, 'name': u'st2.key_value_pair.create', 'pack': u'core', 'type': u'core.st2.key_value_pair.create', 'id': '5719ef42eea6fa000bca421b', 'description': None})
2016-04-22 10:27:44,009 DEBUG [-] Registering internal trigger: st2.key_value_pair.update
2016-04-22 10:27:44,012 INFO [-] Registered trigger: st2.key_value_pair.update.
2016-04-22 10:27:44,015 DEBUG [-] using channel_id: 1
2016-04-22 10:27:44,016 DEBUG [-] Channel open
2016-04-22 10:27:44,017 DEBUG [-] Closed channel #1
2016-04-22 10:27:44,017 AUDIT [-] Trigger updated. Trigger.id=5719ef42eea6fa000bca421d (trigger_db={'uid': u'trigger:core:st2.key_value_pair.update:5f02f0889301fd7be1ac972c11bf3e7d', 'parameters': {}, 'ref_count': 0, 'name': u'st2.key_value_pair.update', 'pack': u'core', 'type': u'core.st2.key_value_pair.update', 'id': '5719ef42eea6fa000bca421d', 'description': None})
2016-04-22 10:27:44,018 AUDIT [-] Trigger created for parameter-less TriggerType. Trigger.id=5719ef42eea6fa000bca421d (trigger_db={'uid': u'trigger:core:st2.key_value_pair.update:5f02f0889301fd7be1ac972c11bf3e7d', 'parameters': {}, 'ref_count': 0, 'name': u'st2.key_value_pair.update', 'pack': u'core', 'type': u'core.st2.key_value_pair.update', 'id': '5719ef42eea6fa000bca421d', 'description': None})
2016-04-22 10:27:44,019 DEBUG [-] Registering internal trigger: st2.key_value_pair.value_change
2016-04-22 10:27:44,021 INFO [-] Registered trigger: st2.key_value_pair.value_change.
2016-04-22 10:27:44,024 DEBUG [-] using channel_id: 1
2016-04-22 10:27:44,025 DEBUG [-] Channel open
2016-04-22 10:27:44,026 DEBUG [-] Closed channel #1
2016-04-22 10:27:44,026 AUDIT [-] Trigger updated. Trigger.id=5719ef42eea6fa000bca421f (trigger_db={'uid': u'trigger:core:st2.key_value_pair.value_change:5f02f0889301fd7be1ac972c11bf3e7d', 'parameters': {}, 'ref_count': 0, 'name': u'st2.key_value_pair.value_change', 'pack': u'core', 'type': u'core.st2.key_value_pair.value_change', 'id': '5719ef42eea6fa000bca421f', 'description': None})
2016-04-22 10:27:44,027 AUDIT [-] Trigger created for parameter-less TriggerType. Trigger.id=5719ef42eea6fa000bca421f (trigger_db={'uid': u'trigger:core:st2.key_value_pair.value_change:5f02f0889301fd7be1ac972c11bf3e7d', 'parameters': {}, 'ref_count': 0, 'name': u'st2.key_value_pair.value_change', 'pack': u'core', 'type': u'core.st2.key_value_pair.value_change', 'id': '5719ef42eea6fa000bca421f', 'description': None})
2016-04-22 10:27:44,028 DEBUG [-] Registering internal trigger: st2.key_value_pair.delete
2016-04-22 10:27:44,030 INFO [-] Registered trigger: st2.key_value_pair.delete.
2016-04-22 10:27:44,033 DEBUG [-] using channel_id: 1
2016-04-22 10:27:44,034 DEBUG [-] Channel open
2016-04-22 10:27:44,035 DEBUG [-] Closed channel #1
2016-04-22 10:27:44,035 AUDIT [-] Trigger updated. Trigger.id=5719ef42eea6fa000bca4221 (trigger_db={'uid': u'trigger:core:st2.key_value_pair.delete:5f02f0889301fd7be1ac972c11bf3e7d', 'parameters': {}, 'ref_count': 0, 'name': u'st2.key_value_pair.delete', 'pack': u'core', 'type': u'core.st2.key_value_pair.delete', 'id': '5719ef42eea6fa000bca4221', 'description': None})
2016-04-22 10:27:44,036 AUDIT [-] Trigger created for parameter-less TriggerType. Trigger.id=5719ef42eea6fa000bca4221 (trigger_db={'uid': u'trigger:core:st2.key_value_pair.delete:5f02f0889301fd7be1ac972c11bf3e7d', 'parameters': {}, 'ref_count': 0, 'name': u'st2.key_value_pair.delete', 'pack': u'core', 'type': u'core.st2.key_value_pair.delete', 'id': '5719ef42eea6fa000bca4221', 'description': None})
2016-04-22 10:27:44,037 DEBUG [-] Registering internal trigger: st2.sensor.process_spawn
2016-04-22 10:27:44,039 INFO [-] Registered trigger: st2.sensor.process_spawn.
2016-04-22 10:27:44,043 DEBUG [-] using channel_id: 1
2016-04-22 10:27:44,043 DEBUG [-] Channel open
2016-04-22 10:27:44,044 DEBUG [-] Closed channel #1
2016-04-22 10:27:44,044 AUDIT [-] Trigger updated. Trigger.id=5719ef42eea6fa000bca4223 (trigger_db={'uid': u'trigger:core:st2.sensor.process_spawn:5f02f0889301fd7be1ac972c11bf3e7d', 'parameters': {}, 'ref_count': 0, 'name': u'st2.sensor.process_spawn', 'pack': u'core', 'type': u'core.st2.sensor.process_spawn', 'id': '5719ef42eea6fa000bca4223', 'description': None})
2016-04-22 10:27:44,045 AUDIT [-] Trigger created for parameter-less TriggerType. Trigger.id=5719ef42eea6fa000bca4223 (trigger_db={'uid': u'trigger:core:st2.sensor.process_spawn:5f02f0889301fd7be1ac972c11bf3e7d', 'parameters': {}, 'ref_count': 0, 'name': u'st2.sensor.process_spawn', 'pack': u'core', 'type': u'core.st2.sensor.process_spawn', 'id': '5719ef42eea6fa000bca4223', 'description': None})
2016-04-22 10:27:44,046 DEBUG [-] Registering internal trigger: st2.sensor.process_exit
2016-04-22 10:27:44,048 INFO [-] Registered trigger: st2.sensor.process_exit.
2016-04-22 10:27:44,052 DEBUG [-] using channel_id: 1
2016-04-22 10:27:44,052 DEBUG [-] Channel open
2016-04-22 10:27:44,053 DEBUG [-] Closed channel #1
2016-04-22 10:27:44,053 AUDIT [-] Trigger updated. Trigger.id=5719ef42eea6fa000bca4225 (trigger_db={'uid': u'trigger:core:st2.sensor.process_exit:5f02f0889301fd7be1ac972c11bf3e7d', 'parameters': {}, 'ref_count': 0, 'name': u'st2.sensor.process_exit', 'pack': u'core', 'type': u'core.st2.sensor.process_exit', 'id': '5719ef42eea6fa000bca4225', 'description': None})
2016-04-22 10:27:44,054 AUDIT [-] Trigger created for parameter-less TriggerType. Trigger.id=5719ef42eea6fa000bca4225 (trigger_db={'uid': u'trigger:core:st2.sensor.process_exit:5f02f0889301fd7be1ac972c11bf3e7d', 'parameters': {}, 'ref_count': 0, 'name': u'st2.sensor.process_exit', 'pack': u'core', 'type': u'core.st2.sensor.process_exit', 'id': '5719ef42eea6fa000bca4225', 'description': None})
2016-04-22 10:27:44,056 DEBUG [-] Conflict while trying to save in DB.
Traceback (most recent call last):
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/persistence/base.py", line 120, in insert
model_object = cls._get_impl().insert(model_object)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/models/db/__init__.py", line 170, in insert
instance = self.model.objects.insert(instance)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/mongoengine/queryset/base.py", line 307, in insert
raise NotUniqueError(message % unicode(err))
NotUniqueError: Could not save document (E11000 duplicate key error collection: st2.role_d_b index: name_1 dup key: { : "admin" })
2016-04-22 10:27:44,057 DEBUG [-] Conflict while trying to save in DB.
Traceback (most recent call last):
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/persistence/base.py", line 120, in insert
model_object = cls._get_impl().insert(model_object)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/models/db/__init__.py", line 170, in insert
instance = self.model.objects.insert(instance)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/mongoengine/queryset/base.py", line 307, in insert
raise NotUniqueError(message % unicode(err))
NotUniqueError: Could not save document (E11000 duplicate key error collection: st2.role_d_b index: name_1 dup key: { : "observer" })
2016-04-22 10:27:44,058 DEBUG [-] Conflict while trying to save in DB.
Traceback (most recent call last):
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/persistence/base.py", line 120, in insert
model_object = cls._get_impl().insert(model_object)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/models/db/__init__.py", line 170, in insert
instance = self.model.objects.insert(instance)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/mongoengine/queryset/base.py", line 307, in insert
raise NotUniqueError(message % unicode(err))
NotUniqueError: Could not save document (E11000 duplicate key error collection: st2.role_d_b index: name_1 dup key: { : "system_admin" })
2016-04-22 10:27:44,059 INFO [-] (PID=11) ST2 API is serving on http://0.0.0.0:9101.
2016-04-22 10:27:44,059 INFO [-] Creating st2api: StackStorm v1.4.0 as Pecan app.
2016-04-22 10:27:44,183 WARNING [-] Coordination backend is not configured. Code paths which use coordination service will use best effort approach and race conditions are possible.
2016-04-22 10:27:44,200 INFO [-] st2api.app app created.
2016-04-22 10:27:44,200 ERROR [-] (11) wsgi starting up on http://0.0.0.0:9101
It looks like it actually works as intended - the message is logged under the debug level and not critical and those operations are idempotent so this message is expected.
/cc @manasdk @lakshmi-kannan et. al. I really think we should get rid of the traceback for this log message since it's still causing confusion (I think just the message under debug level without the traceback would be better)
OK, but it's still not working. were to dig?
❯ docker exec -it stackstorm-api sh -c 'ST2_AUTH_TOKEN=648da68d329b4a6182e17a9507ad8ead st2 --debug --config-file /etc/st2/st2.conf run action list'
# -------- begin 43944336 request ----------
curl -X GET -H 'Connection: keep-alive' -H 'User-Agent: python-requests/2.9.1' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'X-Auth-Token: 648da68d329b4a6182e17a9507ad8ead' http://stackstorm-api.service.consul:9101/actions/action
# -------- begin 43944336 response ----------
{
"faultstring": "Resource with a reference or id \"action\" not found"
}
# -------- end 43944336 response ------------
ERROR: Resource with id or reference "action" doesn't exist.
CLI settings:
----------------
Config file path: /etc/st2/st2.conf
Client settings:
----------------
ST2_BASE_URL: http://127.0.0.1
ST2_AUTH_URL: http://stackstorm-auth.service.consul:9100
ST2_API_URL: http://stackstorm-api.service.consul:9101
ST2_AUTH_TOKEN: 648da68d329b4a6182e17a9507ad8ead
Proxy settings:
---------------
HTTP_PROXY:
HTTPS_PROXY:
Traceback (most recent call last):
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/shell.py", line 365, in run
args.func(args)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/commands/resource.py", line 41, in decorate
return func(*args, **kwargs)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/commands/action.py", line 254, in run_and_print
execution = self.run(args, **kwargs)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/commands/resource.py", line 41, in decorate
return func(*args, **kwargs)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/commands/action.py", line 833, in run
action = self.get_resource(args.ref_or_id, **kwargs)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/commands/action.py", line 247, in get_resource
return self.get_resource_by_ref_or_id(ref_or_id=ref_or_id, **kwargs)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/commands/resource.py", line 187, in get_resource_by_ref_or_id
raise ResourceNotFoundError(message)
ResourceNotFoundError: Resource with id or reference "action" doesn't exist.
The command to list the available actions is just st2 action list
(no run
, you use run
when you want to run an action).
Thanks. but I have no actions:
❯ docker exec -it stackstorm-api sh -c 'ST2_AUTH_TOKEN=648da68d329b4a6182e17a9507ad8ead st2 --debug --config-file /etc/st2/st2.conf action list'
# -------- begin 33401232 request ----------
curl -X GET -H 'Connection: keep-alive' -H 'User-Agent: python-requests/2.9.1' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'X-Auth-Token: 648da68d329b4a6182e17a9507ad8ead' http://stackstorm-api.service.consul:9101/actions
# -------- begin 33401232 response ----------
[]
# -------- end 33401232 response ------------
No matching items found
Is it ok? and I can't run packs actions:
❯ docker exec -it stackstorm-api sh -c 'ST2_AUTH_TOKEN=648da68d329b4a6182e17a9507ad8ead st2 --debug --config-file /etc/st2/st2.conf run packs.install packs=hubot,ansible register=all
'
# -------- begin 33126800 request ----------
curl -X GET -H 'Connection: keep-alive' -H 'User-Agent: python-requests/2.9.1' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'X-Auth-Token: 648da68d329b4a6182e17a9507ad8ead' http://stackstorm-api.service.consul:9101/actions/packs.install
# -------- begin 33126800 response ----------
{
"faultstring": "Resource with a reference or id \"packs.install\" not found"
}
# -------- end 33126800 response ------------
ERROR: Resource with id or reference "packs.install" doesn't exist.
CLI settings:
----------------
Config file path: /etc/st2/st2.conf
Client settings:
----------------
ST2_BASE_URL: http://127.0.0.1
ST2_AUTH_URL: http://stackstorm-auth.service.consul:9100
ST2_API_URL: http://stackstorm-api.service.consul:9101
ST2_AUTH_TOKEN: 648da68d329b4a6182e17a9507ad8ead
Proxy settings:
---------------
HTTP_PROXY:
HTTPS_PROXY:
Traceback (most recent call last):
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/shell.py", line 365, in run
args.func(args)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/commands/resource.py", line 41, in decorate
return func(*args, **kwargs)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/commands/action.py", line 254, in run_and_print
execution = self.run(args, **kwargs)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/commands/resource.py", line 41, in decorate
return func(*args, **kwargs)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/commands/action.py", line 833, in run
action = self.get_resource(args.ref_or_id, **kwargs)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/commands/action.py", line 247, in get_resource
return self.get_resource_by_ref_or_id(ref_or_id=ref_or_id, **kwargs)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/commands/resource.py", line 187, in get_resource_by_ref_or_id
raise ResourceNotFoundError(message)
ResourceNotFoundError: Resource with id or reference "packs.install" doesn't exist.
You need to run st2ctl reload
inside the container - this will run the script which will register all the packs and corresponding resources inside /opt/stackstorm/packs
.
I setup content section as follow:
[content]
# Path to the directory which contains system packs.
system_packs_base_path = /opt/stackstorm/packs
# Paths which will be searched for integration packs.
packs_base_paths = None
and share this dirs as volume.
/tmp deploy@goro
❯ docker exec -it stackstorm-api ls -l /opt/stackstorm/packs
total 16
drwxrwxr-x 4 root st2packs 4096 Apr 22 09:17 chatops
drwxrwxr-x 4 root st2packs 4096 Apr 22 09:17 core
drwxrwxr-x 4 root st2packs 4096 Apr 22 09:17 linux
drwxrwxr-x 5 root st2packs 4096 Apr 22 09:17 packs
Oh. many thanks.
Do I need to run it on all containers?
In case you share the /opt/stackstorm/packs
and /opt/stackstorm/virtualenvs
directory you only need to run it in a single container.
Closing this issue since it looks like the problem has been resolved.
yep 👍 tnx
Sadly we don't provide official Docker containers / images for v1.4 right now, but you could use the new packages and build them yourself.
Our main goal is to only provide a single officially supported installation method in the near term (packages). This way we will be able to spend more time and focus on the core platform features instead of spending tons of time supporting many different platforms and installation methods (we would love to, but we simply don't have the bandwidth to do it).