読者です 読者をやめる 読者になる 読者になる

AKAI TSUKI

System development or Technical something

Start Services of StackStorm.

Configure SSH and SUDO

[root@stackstorm ~]# mkdir -p /home/stanley/.ssh
[root@stackstorm ~]# chmod 0700 /home/stanley/.ssh
[root@stackstorm ~]# ssh-keygen -f /home/stanley/.ssh/stanley_rsa -P ""
Generating public/private rsa key pair.
Your identification has been saved in /home/stanley/.ssh/stanley_rsa.
Your public key has been saved in /home/stanley/.ssh/stanley_rsa.pub.
The key fingerprint is:
52:9f:eb:4e:f5:3a:99:99:c6:cb:67:d3:53:57:36:88 root@stackstorm
The key's randomart image is:
+--[ RSA 2048]----+

 省略

+-----------------+
[root@stackstorm ~]# sh -c 'cat /home/stanley/.ssh/stanley_rsa.pub >> /home/stanley/.ssh/authorized_keys'
[root@stackstorm ~]# chown -R stanley:stanley /home/stanley/.ssh
[root@stackstorm ~]# sh -c 'echo "stanley    ALL=(ALL)       NOPASSWD: SETENV: ALL" >> /etc/sudoers.d/st2'
[root@stackstorm ~]# chmod 0440 /etc/sudoers.d/st2
[root@stackstorm ~]# sed -i -r "s/^Defaults\s+\+requiretty/# Defaults +requiretty/g" /etc/sudoers
[root@stackstorm ~]# vi /etc/st2/st2.conf

Register sensors, rules and actions

Faile出た。trigger作れないとか言われた。

[root@stackstorm ~]# st2ctl reload
Registering content...[flags = --register-actions --register-aliases --register-sensors --register-triggers --register-configs --register-rules]
2016-09-23 02:15:01,048 INFO [-] Connecting to database "st2" @ "0.0.0.0:27017" as user "None".
2016-09-23 02:15:01,809 INFO [-] =========================================================
2016-09-23 02:15:01,810 INFO [-] ############## Registering triggers #####################
2016-09-23 02:15:01,810 INFO [-] =========================================================
2016-09-23 02:15:01,829 INFO [-] Registered 0 triggers.
2016-09-23 02:15:01,830 INFO [-] =========================================================
2016-09-23 02:15:01,830 INFO [-] ############## Registering sensors ######################
2016-09-23 02:15:01,830 INFO [-] =========================================================
2016-09-23 02:15:01,918 INFO [-] Registered 1 sensors.
2016-09-23 02:15:01,918 INFO [-] =========================================================
2016-09-23 02:15:01,918 INFO [-] ############## Registering actions ######################
2016-09-23 02:15:01,918 INFO [-] =========================================================
2016-09-23 02:15:02,722 INFO [-] Registered 45 actions.
2016-09-23 02:15:02,722 INFO [-] =========================================================
2016-09-23 02:15:02,722 INFO [-] ############## Registering rules ########################
2016-09-23 02:15:02,722 INFO [-] =========================================================
2016-09-23 02:15:02,750 WARNING [-] Failed to register rules: A simple trigger should have been created when registering triggertype. Cannot create trigger: {'type': 'core.st2.generic.notifytrigger', 'parameters': {}, 'pack': 'core'}.
Traceback (most recent call last):
  File "/usr/bin/st2-register-content", line 22, in <module>
    sys.exit(content_loader.main(sys.argv[1:]))
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/content/bootstrap.py", line 354, in main
    register_content()
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/content/bootstrap.py", line 329, in register_content
    register_rules()
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/content/bootstrap.py", line 224, in register_rules
    raise e
st2common.exceptions.triggers.TriggerDoesNotExistException: A simple trigger should have been created when registering triggertype. Cannot create trigger: {'type': 'core.st2.generic.notifytrigger', 'parameters': {}, 'pack': 'core'}.
##### st2 components status #####
st2actionrunner is not running.
st2api is not running.
st2stream is not running.
st2auth is not running.
st2garbagecollector is not running.
st2notifier is not running.
st2resultstracker is not running.
st2rulesengine is not running.
st2sensorcontainer is not running.
st2chatops is not running.
mistral-server is not running.
mistral-api is not running.
[root@stackstorm ~]#

そして、componentsが軒並み、not runningだぞ。

どうすればいいの、これ?