Deploy st2client on laptop

40 views
Skip to first unread message

cax...@gmail.com

unread,
Apr 24, 2017, 6:24:53 AM4/24/17
to StackStorm
Hello,
I was trying to run st2client on my laptop, all looks smooth- The only problem I met is how can I run st2auth/st2api/st2stream on 0.0.0.0
I updated the scripts and configs that I can find on system-wider, but still got no luck to run these services on 0.0.0.0. It always listen on 127.0.0.1.

Any one can give me a hand please?

ar...@stackstorm.com

unread,
Apr 24, 2017, 9:49:37 AM4/24/17
to StackStorm

Hi,

Port definitions for st2api, st2auth, st2stream are located in init files (systemd, upstart, SysV) depending on your system.

BTW the same question was asked recently in our Slack community (https://stackstorm.com/community-signup). There are some examples shared by users here:
https://github.com/StackStorm/st2/issues/3356
https://github.com/StackStorm/st2/issues/2676

If that doesn't help, - let us know your st2 OS.

Joseph Chen

unread,
Apr 24, 2017, 10:22:14 PM4/24/17
to StackStorm, ar...@stackstorm.com
Thanks for the input. I've checked these links, and they don't make any sense.

I'm running the latest st2-2.2.1 , and CentOS-7.3.1611

ar...@stackstorm.com

unread,
Apr 25, 2017, 7:43:21 PM4/25/17
to StackStorm, ar...@stackstorm.com
Alright,
there are 2 options:

1) If you installed StackStorm with our installer, st2api st2auth and st2stream are handled by nginx as a reverse proxy.
So you can edit existing nginx config /etc/nginx/conf.d/st2.conf deployed by our installer to work on specific host and use these API/AUTH endpoints in your st2client.
This is recommended and production-friendly method so the stackstorm will be exposed to internet via nginx.
Here is related answer: https://github.com/StackStorm/st2/issues/3346#issuecomment-293599993 with instructions to configure st2client.


2) Alternatively, you can edit both st2.conf and init files so the st2 services will listen on 0.0.0.0
For CentOS7 your init is systemd. Edit the following files, replace 127.0.0.1 -> 0.0.0.0:
/usr/lib/systemd/system/st2api.service
/usr/lib/systemd/system/st2api.socket

/usr/lib/systemd/system/st2auth.service
/usr/lib/systemd/system/st2auth.socket

/usr/lib/systemd/system/st2stream.service
/usr/lib/systemd/system/st2stream.socket

Joseph Chen

unread,
Apr 25, 2017, 10:24:03 PM4/25/17
to ar...@stackstorm.com, StackStorm
It works well finally after a recent service restart.
There must be something improper on my system, since it did not take effect yesterday.  Many thanks!

The st2client on my Macbook works well. Anyone wanna to set up st2client like me, please refer to https://stackos.cn/article/19 (never mind its in chinese)

--
You received this message because you are subscribed to a topic in the Google Groups "StackStorm" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stackstorm/jCwX1ZqgEgU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stackstorm+unsubscribe@googlegroups.com.
To post to this group, send email to stack...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/stackstorm/58e6a38a-e8bb-4716-9e6a-d846168f3257%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

ar...@stackstorm.com

unread,
Apr 26, 2017, 6:44:04 PM4/26/17
to StackStorm, ar...@stackstorm.com
Glad it worked and thanks for sharing your experience via blog post!
To unsubscribe from this group and all its topics, send an email to stackstorm+...@googlegroups.com.

To post to this group, send email to stack...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages