2 ##############################################################################
3 # Copyright 2017 Parker Berberian and Others #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ##############################################################################
20 apt update && apt -y upgrade
21 apt -y install libvirt-dev curl gcc libsas12-dev python-dev libldap2-dev libssl-dev
24 yum -y install curl libvirt-devel gcc python-devel openldap-devel
26 echo "Can only run on ubuntu or centos. exiting"
29 #run their install script
30 curl -sSL https://stackstorm.com/packages/install.sh | bash -s -- --user=st2admin --password='admin'
31 #change ssh user to root
32 sed -i 's/user = stanley/user = root/' /etc/st2/st2.conf
33 sed -i 's/ssh_key_file = \/home\/stanley\/.ssh\/stanley_rsa/ssh_key_file = \/root\/.ssh\/id_rsa/' /etc/st2/st2.conf
35 mv pharoslab/ /opt/stackstorm/packs/
36 cp /opt/stackstorm/packs/pharoslab/pharoslab.yaml.example /opt/stackstorm/configs
38 echo "stackstorm should now be installed. Please edit /opt/stackstorm/configs/pharoslab.yaml and /opt/stackstorm/packs/pharoslab/hosts.json appropriately and run the setup script"