{"action":"created","issue":{"url":"https://api.github.com/repos/StackStorm/st2/issues/3191","repository_url":"https://api.github.com/repos/StackStorm/st2","labels_url":"https://api.github.com/repos/StackStorm/st2/issues/3191/labels{/name}","comments_url":"https://api.github.com/repos/StackStorm/st2/issues/3191/comments","events_url":"https://api.github.com/repos/StackStorm/st2/issues/3191/events","html_url":"https://github.com/StackStorm/st2/issues/3191","id":205903806,"number":3191,"title":"st2 pack install/register is not usable in a HA setup","user":{"login":"pietervogelaar","id":1067483,"avatar_url":"https://avatars.githubusercontent.com/u/1067483?v=3","gravatar_id":"","url":"https://api.github.com/users/pietervogelaar","html_url":"https://github.com/pietervogelaar","followers_url":"https://api.github.com/users/pietervogelaar/followers","following_url":"https://api.github.com/users/pietervogelaar/following{/other_user}","gists_url":"https://api.github.com/users/pietervogelaar/gists{/gist_id}","starred_url":"https://api.github.com/users/pietervogelaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pietervogelaar/subscriptions","organizations_url":"https://api.github.com/users/pietervogelaar/orgs","repos_url":"https://api.github.com/users/pietervogelaar/repos","events_url":"https://api.github.com/users/pietervogelaar/events{/privacy}","received_events_url":"https://api.github.com/users/pietervogelaar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-07T14:29:35Z","updated_at":"2017-02-07T14:38:25Z","closed_at":null,"body":"I have StackStorm running with a custom Puppet module in a High Available setup. Two identical nodes with all API's, packs etc.\r\n\r\nHowever the st2 pack command is completely useless for this setup. What the command does is register some settings in the database and installs the pack on the disk of one of the nodes. And not even the node on which the command is run, but can happen on the OTHER node. Completely weird behaviour.\r\n\r\nAt the moment I have the following steps to workaround this:\r\n\r\n```\r\nvcsrepo { \"${stackstorm_pack_dir}/${pack_name}\":\r\n  ensure   => $pack_ensure,\r\n  provider => $pack_source_type,\r\n  source   => \"${pack_source}\",\r\n  revision => $pack_source_repo_revision,\r\n  user     => $pack_directory_owner,\r\n  group    => $pack_directory_group,\r\n  notify   => Exec[\"st2 pack register ${pack_name}\"],\r\n}\r\n\r\nexec { \"st2 pack register ${pack_name}\":\r\n  path        => '/bin',\r\n  command     => \"st2 pack register ${pack_name} --api-key ${api_key}\",\r\n  logoutput   => on_failure,\r\n  refreshonly => true,\r\n  notify      => Exec[\"create virtualenv for pack ${pack_name}\"],\r\n}\r\n\r\nexec { \"create virtualenv for pack ${pack_name}\":\r\n  path        => '/bin',\r\n  command     => \"${home_dir}/st2/bin/virtualenv -p ${home_dir}/st2/bin/python ${home_dir}/virtualenvs/${pack_name}\",\r\n  refreshonly => true,\r\n  unless      => \"test -d ${home_dir}/virtualenvs/${pack_name}\",\r\n}\r\n\r\n# TODO: PIP install if a requirements file exists\r\n```\r\n\r\nIt would be ideal if Puppet could run st2 pack install on each node and that each node would contain all the files that way."},"comment":{"url":"https://api.github.com/repos/StackStorm/st2/issues/comments/278018051","html_url":"https://github.com/StackStorm/st2/issues/3191#issuecomment-278018051","issue_url":"https://api.github.com/repos/StackStorm/st2/issues/3191","id":278018051,"user":{"login":"pietervogelaar","id":1067483,"avatar_url":"https://avatars.githubusercontent.com/u/1067483?v=3","gravatar_id":"","url":"https://api.github.com/users/pietervogelaar","html_url":"https://github.com/pietervogelaar","followers_url":"https://api.github.com/users/pietervogelaar/followers","following_url":"https://api.github.com/users/pietervogelaar/following{/other_user}","gists_url":"https://api.github.com/users/pietervogelaar/gists{/gist_id}","starred_url":"https://api.github.com/users/pietervogelaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pietervogelaar/subscriptions","organizations_url":"https://api.github.com/users/pietervogelaar/orgs","repos_url":"https://api.github.com/users/pietervogelaar/repos","events_url":"https://api.github.com/users/pietervogelaar/events{/privacy}","received_events_url":"https://api.github.com/users/pietervogelaar/received_events","type":"User","site_admin":false},"created_at":"2017-02-07T14:38:25Z","updated_at":"2017-02-07T14:38:25Z","body":"Does \"sudo st2ctl --register-setup-virtualenvs\" also do a st2 pack register? That does not seems the case if I read st2ctl --help => \"Create Python virtual environments for all the registered packs.\"\r\n\r\nI assume it also doesn't install pip dependencies?"}}
{"actor":{"display_login":"pietervogelaar"}}