https://github.com/ClusterLabs/hawk
apt -y install build-essential git ruby golang libpam0g-dev pkgconf libglib2.0-dev libxml2-dev libcib-dev liblrmd-dev gem bundler libssl1.0-dev ruby-execjs libxslt1-dev corosync-dev libcrmcommon-dev libcrmservice-dev
gem install rails
gem install rails -v 4.2.0
gem install puma
gem install puma -v 2.11
gem install sass-rails
gem install hashie -v 3.4.6
gem install virtus
gem install js-routes
gem install tilt -v 1.4.1
gem install fast_gettext
gem install gettext_i18n_rails_js
gem install gettext_i18n_rails
gem install haml-rails
gem install kramdown
gem install web-console
gem install web-console -v 2.3.0
gem install spring
gem install spring -v 1.7.2
gem install uglifier
cd /opt
git clone https://github.com/ClusterLabs/hawk.git
cd /opt/hawk
sed -i 's/^INIT_STYLE.*/INIT_STYLE = service/' /opt/hawk/Makefile
sed -i 's#\ bin/rake\ # /usr/bin/rake #' /opt/hawk/Makefile
Adapter la valeur de l’option -j selon le nombre de
processeurs.
Nombre de processeurs +1
Ici 2, donc 2+1=3 => -j3
make -j3
#sed -i 's#/etc/sysconfig/#/etc/default/#' /opt/hawk/scripts/hawk-backend.service.in
#sed -i 's#/etc/sysconfig/#/etc/default/#' /opt/hawk/scripts/hawk.service.in
sed -i 's#/etc/sysconfig/#/etc/default/#' /opt/hawk/scripts/hawk.service
sed -i 's#/etc/sysconfig/#/etc/default/#' /opt/hawk/scripts/hawk-backend.service
make install
cp /opt/hawk/rpm/sysconfig.hawk /etc/default/hawk
chown -R hacluster:haclient /usr/share/hawk
ln -s /usr/local/bin/puma /usr/bin/puma
ln -s /usr/local/bin/pumactl /usr/bin/pumactl
passwd hacluster
mkdir /opt/go
export GOPATH=/opt/go
go get -u github.com/krig/hawk-apiserver
cd /opt/go/src/github.com/krig/hawk-apiserver
go build
go test
grep -R 'git@' /opt/go/src/github.com
ln -s /opt/go/bin/hawk-apiserver /usr/sbin/hawk-apiserver
cd /etc/hawk
SSLGEN_KEY=hawk.key SSLGEN_CERT=hawk.pem /opt/go/src/github.com/krig/hawk-apiserver/tools/generate-ssl-cert
chown hacluster:haclient /etc/hawk/hawk.pem /etc/hawk/hawk.key
chown -R hacluster:haclient /etc/hawk/
chown hacluster:haclient /var/lib/pacemaker
systemctl daemon-reload
systemctl enable hawk.service
systemctl start hawk-backend.service
systemctl start hawk.service
gem list '^hashie$' --remote --all
crm configure property enable-acl=true
crm configure role administrator write xpath:"/cib"
crm configure acl_target hacluster administrator
crm configure role admin_config write xpath:"//crm_config"
crm configure acl_target hacluster admin_config