Compare commits
10 Commits
Author | SHA1 | Date |
---|---|---|
santic-zombie | b505ad5d5a | 6 months ago |
santic-zombie | 16e9a65fb1 | 2 years ago |
santic-zombie | 01b098ee80 | 2 years ago |
santic-zombie | 6a940d30c9 | 2 years ago |
santic-zombie | 6e372a5d4e | 2 years ago |
santic-zombie | c6e95bcc08 | 2 years ago |
santic-zombie | d6437fcf63 | 2 years ago |
santic-zombie | 38c26d3580 | 2 years ago |
santic-zombie | 12c741a477 | 2 years ago |
santic-zombie | 0182e0adf3 | 2 years ago |
@ -1,46 +0,0 @@ |
||||
#!/sbin/openrc-run |
||||
|
||||
name=$RC_SVCNAME |
||||
description="OpenNebula management" |
||||
command="/usr/bin/oned" |
||||
command_args="-f" |
||||
command_user="oneadmin:cloud" |
||||
pidfile="/run/one/${RC_SVCNAME}.pid" |
||||
supervisor="supervise-daemon" |
||||
|
||||
depend() { |
||||
need mariadb |
||||
after syslog networking localmount netmount |
||||
want opennebula-scheduler opennebula-hem opennebula-ssh-agent |
||||
} |
||||
|
||||
start_pre() { |
||||
/bin/mkdir -p /var/log/one |
||||
/bin/mkdir -p /var/lock/one |
||||
/bin/mkdir -p /run/one |
||||
/bin/chown $command_user -R /var/log/one /run/one /var/lock/one |
||||
/usr/sbin/logrotate -s /tmp/logrotate.state -f /etc/logrotate.d/opennebula.logrotate |
||||
} |
||||
|
||||
start() { |
||||
ebegin "Starting $RC_SVCNAME" |
||||
start-stop-daemon --background \ |
||||
--exec $command \ |
||||
--make-pidfile --pidfile $pidfile --user $command_user \ |
||||
--start -- $command_args |
||||
eend $? |
||||
} |
||||
|
||||
stop() { |
||||
ebegin "Stopping $RC_SVCNAME" |
||||
start-stop-daemon --stop \ |
||||
--retry TERM/10/KILL/10 \ |
||||
--exec $command \ |
||||
--pidfile $pidfile --user $command_user |
||||
eend $? |
||||
} |
||||
|
||||
stop_post() { |
||||
/bin/rm -f /var/lock/one/one |
||||
/usr/share/one/follower_cleanup |
||||
} |
@ -1,36 +0,0 @@ |
||||
#!/sbin/openrc-run |
||||
|
||||
name=$RC_SVCNAME |
||||
description="OpenNebula Flow Service" |
||||
command="/usr/bin/ruby /usr/lib/one/oneflow/oneflow-server.rb" |
||||
command_user="oneadmin:cloud" |
||||
pidfile="/run/one/${RC_SVCNAME}.pid" |
||||
supervisor="supervise-daemon" |
||||
|
||||
depend() { |
||||
after syslog networking netmount opennebula |
||||
} |
||||
|
||||
start_pre() { |
||||
/bin/mkdir -p /var/log/one |
||||
/bin/mkdir -p /var/lock/one |
||||
/bin/mkdir -p /run/one |
||||
/bin/chown $command_user -R /var/log/one /run/one /var/lock/one |
||||
} |
||||
|
||||
start() { |
||||
ebegin "Starting $RC_SVCNAME" |
||||
start-stop-daemon --background \ |
||||
--exec $command \ |
||||
--make-pidfile --pidfile $pidfile --user $command_user \ |
||||
--start |
||||
eend $? |
||||
} |
||||
|
||||
stop() { |
||||
ebegin "Stopping $RC_SVCNAME" |
||||
start-stop-daemon --stop \ |
||||
--exec $command \ |
||||
--pidfile $pidfile --user $command_user |
||||
eend $? |
||||
} |
@ -1,36 +0,0 @@ |
||||
#!/sbin/openrc-run |
||||
|
||||
name=$RC_SVCNAME |
||||
description="OpenNebula Gate Daemon" |
||||
command="/usr/bin/ruby /usr/lib/one/onegate/onegate-server.rb" |
||||
command_user="oneadmin:cloud" |
||||
pidfile="/run/one/${RC_SVCNAME}.pid" |
||||
supervisor="supervise-daemon" |
||||
|
||||
depend() { |
||||
after syslog networking netmount opennebula |
||||
} |
||||
|
||||
start_pre() { |
||||
/bin/mkdir -p /var/log/one |
||||
/bin/mkdir -p /var/lock/one |
||||
/bin/mkdir -p /run/one |
||||
/bin/chown $command_user -R /var/log/one /run/one /var/lock/one |
||||
} |
||||
|
||||
start() { |
||||
ebegin "Starting $RC_SVCNAME" |
||||
start-stop-daemon --background \ |
||||
--exec $command \ |
||||
--make-pidfile --pidfile $pidfile --user $command_user \ |
||||
--start |
||||
eend $? |
||||
} |
||||
|
||||
stop() { |
||||
ebegin "Stopping $RC_SVCNAME" |
||||
start-stop-daemon --stop \ |
||||
--exec $command \ |
||||
--pidfile $pidfile --user $command_user |
||||
eend $? |
||||
} |
@ -1,36 +0,0 @@ |
||||
#!/sbin/openrc-run |
||||
|
||||
name=$RC_SVCNAME |
||||
description="OpenNebula Hook Execution Service" |
||||
command="/usr/bin/ruby /usr/lib/one/onehem/onehem-server.rb" |
||||
command_user="oneadmin:cloud" |
||||
pidfile="/run/one/${RC_SVCNAME}.pid" |
||||
supervisor="supervise-daemon" |
||||
|
||||
depend() { |
||||
after syslog networking netmount opennebula |
||||
} |
||||
|
||||
start_pre() { |
||||
/bin/mkdir -p /var/log/one |
||||
/bin/mkdir -p /var/lock/one |
||||
/bin/mkdir -p /run/one |
||||
/bin/chown $command_user -R /var/log/one /run/one /var/lock/one |
||||
} |
||||
|
||||
start() { |
||||
ebegin "Starting $RC_SVCNAME" |
||||
start-stop-daemon --background \ |
||||
--exec $command \ |
||||
--make-pidfile --pidfile $pidfile --user $command_user \ |
||||
--start |
||||
eend $? |
||||
} |
||||
|
||||
stop() { |
||||
ebegin "Stopping $RC_SVCNAME" |
||||
start-stop-daemon --stop \ |
||||
--exec $command \ |
||||
--pidfile $pidfile --user $command_user |
||||
eend $? |
||||
} |
@ -1,28 +0,0 @@ |
||||
#!/sbin/openrc-run |
||||
|
||||
name=$RC_SVCNAME |
||||
description="OpenNebula noVNC Server" |
||||
command="/usr/bin/novnc-server" |
||||
command_user="oneadmin:cloud" |
||||
supervisor="supervise-daemon" |
||||
|
||||
depend() { |
||||
before opennebula-sunstone |
||||
after syslog networking netmount |
||||
} |
||||
|
||||
start() { |
||||
ebegin "Starting $RC_SVCNAME" |
||||
start-stop-daemon \ |
||||
--exec $command \ |
||||
--user $command_user \ |
||||
--start -- start |
||||
eend $? |
||||
} |
||||
|
||||
stop() { |
||||
ebegin "Stopping $RC_SVCNAME" |
||||
$command stop |
||||
/bin/rm -f /var/lock/one/.novnc.lock |
||||
eend $? |
||||
} |
@ -0,0 +1,57 @@ |
||||
# Contributor: Santic <email@santic-zombie.ru> |
||||
# Maintainer: Santic <email@santic-zombie.ru> |
||||
pkgname=opennebula-rubygems |
||||
pkgver=6.4.0 |
||||
pkgrel=1 |
||||
pkgdesc="Ruby dependencies for OpenNebula (Community Edition)" |
||||
url="https://opennebula.io/" |
||||
arch="x86_64" |
||||
options="!check" |
||||
license="Apache" |
||||
depends="augeas |
||||
augeas-libs |
||||
libcurl |
||||
libffi |
||||
libgcc |
||||
libpq |
||||
libssl1.1 |
||||
libstdc++ |
||||
libxslt |
||||
opennebula |
||||
ruby |
||||
ruby-augeas |
||||
ruby-libs |
||||
ruby-pg |
||||
ruby-rake |
||||
sqlite-libs |
||||
libxml2" |
||||
makedepends="augeas-dev |
||||
curl-dev |
||||
g++ |
||||
gcc |
||||
libffi-dev |
||||
libpq-dev |
||||
libxml2-dev |
||||
libxslt-dev |
||||
make |
||||
mariadb-dev |
||||
openssl-dev |
||||
patch |
||||
ruby-dev |
||||
sqlite-dev |
||||
sudo" |
||||
|
||||
source="" |
||||
|
||||
builddir="$srcdir/" |
||||
|
||||
build() { |
||||
cd "opennebula-rubygems-${pkgver}" |
||||
bundle config set --local path "$srcdir/gems" |
||||
bundle install --gemfile /usr/share/one/Gemfile |
||||
} |
||||
|
||||
package() { |
||||
cd "opennebula-rubygems-${pkgver}" |
||||
install -D -m755 "${srcdir}/opennebula" "${pkgdir}/etc/init.d/opennebula" |
||||
} |
@ -1,36 +0,0 @@ |
||||
#!/sbin/openrc-run |
||||
|
||||
name=$RC_SVCNAME |
||||
description="OpenNebula Cloud Scheduler Daemon" |
||||
command="/usr/bin/mm_sched" |
||||
command_user="oneadmin:cloud" |
||||
pidfile="/run/one/${RC_SVCNAME}.pid" |
||||
supervisor="supervise-daemon" |
||||
|
||||
depend() { |
||||
after syslog networking netmount opennebula |
||||
} |
||||
|
||||
start_pre() { |
||||
/bin/mkdir -p /var/log/one |
||||
/bin/mkdir -p /var/lock/one |
||||
/bin/mkdir -p /run/one |
||||
/bin/chown $command_user -R /var/log/one /run/one /var/lock/one |
||||
} |
||||
|
||||
start() { |
||||
ebegin "Starting $RC_SVCNAME" |
||||
start-stop-daemon --background \ |
||||
--exec $command \ |
||||
--make-pidfile --pidfile $pidfile --user $command_user \ |
||||
--start |
||||
eend $? |
||||
} |
||||
|
||||
stop() { |
||||
ebegin "Stopping $RC_SVCNAME" |
||||
start-stop-daemon --stop \ |
||||
--exec $command \ |
||||
--pidfile $pidfile --user $command_user |
||||
eend $? |
||||
} |
@ -1,30 +0,0 @@ |
||||
#!/sbin/openrc-run |
||||
|
||||
name=$RC_SVCNAME |
||||
description="OpenNebula Web UI Server" |
||||
command="/usr/bin/ruby /usr/lib/one/sunstone/sunstone-server.rb" |
||||
command_user="oneadmin:cloud" |
||||
pidfile="/run/one/${RC_SVCNAME}.pid" |
||||
supervisor="supervise-daemon" |
||||
|
||||
depend() { |
||||
after syslog networking netmount opennebula |
||||
want opennebula-novnc |
||||
} |
||||
|
||||
start() { |
||||
ebegin "Starting $RC_SVCNAME" |
||||
start-stop-daemon --background \ |
||||
--exec $command \ |
||||
--make-pidfile --pidfile $pidfile --user $command_user \ |
||||
--start |
||||
eend $? |
||||
} |
||||
|
||||
stop() { |
||||
ebegin "Stopping $RC_SVCNAME" |
||||
start-stop-daemon --stop \ |
||||
--exec $command \ |
||||
--pidfile $pidfile --user $command_user |
||||
eend $? |
||||
} |
@ -0,0 +1,22 @@ |
||||
Index: src/sunstone/public/Gruntfile.js
|
||||
--- src/sunstone/public/Gruntfile.js
|
||||
+++ src/sunstone/public/Gruntfile.js
|
||||
@@ -14,6 +14,8 @@
|
||||
/* limitations under the License. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
+const sass = require('node-sass');
|
||||
+
|
||||
module.exports = function(grunt) {
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON("package.json"),
|
||||
@@ -24,7 +26,8 @@
|
||||
},
|
||||
dist: {
|
||||
options: {
|
||||
- outputStyle: "compressed"
|
||||
+ outputStyle: "compressed",
|
||||
+ implementation: sass
|
||||
},
|
||||
files: {
|
||||
"css/app.css": "scss/app.scss"
|
@ -0,0 +1,48 @@ |
||||
#!/sbin/openrc-run |
||||
|
||||
name=$RC_SVCNAME |
||||
description="OpenNebula management" |
||||
command="/usr/bin/oned" |
||||
command_args="-f" |
||||
command_user="oneadmin:cloud" |
||||
pidfile="/run/one/${RC_SVCNAME}.pid" |
||||
supervisor="supervise-daemon" |
||||
|
||||
depend() { |
||||
need mariadb |
||||
after syslog networking localmount netmount |
||||
before opennebula-scheduler opennebula-hem opennebula-sunstone \ |
||||
opennebula-flow opennebula-gate |
||||
# opennebula-ssh-agent |
||||
} |
||||
|
||||
start_pre() { |
||||
/bin/mkdir -p /var/log/one |
||||
/bin/mkdir -p /var/lock/one |
||||
/bin/mkdir -p /run/one |
||||
/bin/chown $command_user -R /var/log/one /run/one /var/lock/one |
||||
/usr/sbin/logrotate -s /tmp/logrotate.state -f /etc/logrotate.d/opennebula.logrotate |
||||
} |
||||
|
||||
start() { |
||||
ebegin "Starting $RC_SVCNAME" |
||||
start-stop-daemon --background \ |
||||
--exec $command \ |
||||
--make-pidfile --pidfile $pidfile --user $command_user \ |
||||
--start -- $command_args |
||||
eend $? |
||||
} |
||||
|
||||
stop() { |
||||
ebegin "Stopping $RC_SVCNAME" |
||||
start-stop-daemon --stop \ |
||||
--retry TERM/10/KILL/10 \ |
||||
--exec $command \ |
||||
--pidfile $pidfile --user $command_user |
||||
eend $? |
||||
} |
||||
|
||||
stop_post() { |
||||
/bin/rm -f /var/lock/one/one |
||||
/usr/share/one/follower_cleanup |
||||
} |
@ -0,0 +1,30 @@ |
||||
#!/sbin/openrc-run |
||||
|
||||
name=$RC_SVCNAME |
||||
description="OpenNebula Flow Service" |
||||
command="/usr/bin/ruby /usr/lib/one/oneflow/oneflow-server.rb" |
||||
command_user="oneadmin:cloud" |
||||
pidfile="/run/one/${RC_SVCNAME}.pid" |
||||
supervisor="supervise-daemon" |
||||
|
||||
depend() { |
||||
need opennebula |
||||
after syslog networking netmount |
||||
} |
||||
|
||||
start() { |
||||
ebegin "Starting $RC_SVCNAME" |
||||
start-stop-daemon --background \ |
||||
--exec $command \ |
||||
--make-pidfile --pidfile $pidfile --user $command_user \ |
||||
--start |
||||
eend $? |
||||
} |
||||
|
||||
stop() { |
||||
ebegin "Stopping $RC_SVCNAME" |
||||
start-stop-daemon --stop \ |
||||
--exec $command \ |
||||
--pidfile $pidfile --user $command_user |
||||
eend $? |
||||
} |
@ -0,0 +1,30 @@ |
||||
#!/sbin/openrc-run |
||||
|
||||
name=$RC_SVCNAME |
||||
description="OpenNebula Gate Daemon" |
||||
command="/usr/bin/ruby /usr/lib/one/onegate/onegate-server.rb" |
||||
command_user="oneadmin:cloud" |
||||
pidfile="/run/one/${RC_SVCNAME}.pid" |
||||
supervisor="supervise-daemon" |
||||
|
||||
depend() { |
||||
need opennebula |
||||
after syslog networking netmount |
||||
} |
||||
|
||||
start() { |
||||
ebegin "Starting $RC_SVCNAME" |
||||
start-stop-daemon --background \ |
||||
--exec $command \ |
||||
--make-pidfile --pidfile $pidfile --user $command_user \ |
||||
--start |
||||
eend $? |
||||
} |
||||
|
||||
stop() { |
||||
ebegin "Stopping $RC_SVCNAME" |
||||
start-stop-daemon --stop \ |
||||
--exec $command \ |
||||
--pidfile $pidfile --user $command_user |
||||
eend $? |
||||
} |
@ -0,0 +1,30 @@ |
||||
#!/sbin/openrc-run |
||||
|
||||
name=$RC_SVCNAME |
||||
description="OpenNebula Hook Execution Service" |
||||
command="/usr/bin/ruby /usr/lib/one/onehem/onehem-server.rb" |
||||
command_user="oneadmin:cloud" |
||||
pidfile="/run/one/${RC_SVCNAME}.pid" |
||||
supervisor="supervise-daemon" |
||||
|
||||
depend() { |
||||
need opennebula |
||||
after syslog networking netmount |
||||
} |
||||
|
||||
start() { |
||||
ebegin "Starting $RC_SVCNAME" |
||||
start-stop-daemon --background \ |
||||
--exec $command \ |
||||
--make-pidfile --pidfile $pidfile --user $command_user \ |
||||
--start |
||||
eend $? |
||||
} |
||||
|
||||
stop() { |
||||
ebegin "Stopping $RC_SVCNAME" |
||||
start-stop-daemon --stop \ |
||||
--exec $command \ |
||||
--pidfile $pidfile --user $command_user |
||||
eend $? |
||||
} |
@ -0,0 +1,28 @@ |
||||
#!/sbin/openrc-run |
||||
|
||||
name=$RC_SVCNAME |
||||
description="OpenNebula noVNC Server" |
||||
command="/usr/bin/novnc-server" |
||||
command_user="oneadmin:cloud" |
||||
supervisor="supervise-daemon" |
||||
|
||||
depend() { |
||||
before opennebula-sunstone |
||||
after syslog networking netmount |
||||
} |
||||
|
||||
start() { |
||||
ebegin "Starting $RC_SVCNAME" |
||||
start-stop-daemon \ |
||||
--exec $command \ |
||||
--user $command_user \ |
||||
--start -- start |
||||
eend $? |
||||
} |
||||
|
||||
stop() { |
||||
ebegin "Stopping $RC_SVCNAME" |
||||
$command stop |
||||
/bin/rm -f /var/lock/one/.novnc.lock |
||||
eend $? |
||||
} |
@ -0,0 +1,30 @@ |
||||
#!/sbin/openrc-run |
||||
|
||||
name=$RC_SVCNAME |
||||
description="OpenNebula Cloud Scheduler Daemon" |
||||
command="/usr/bin/mm_sched" |
||||
command_user="oneadmin:cloud" |
||||
pidfile="/run/one/${RC_SVCNAME}.pid" |
||||
supervisor="supervise-daemon" |
||||
|
||||
depend() { |
||||
need opennebula |
||||
after syslog networking netmount |
||||
} |
||||
|
||||
start() { |
||||
ebegin "Starting $RC_SVCNAME" |
||||
start-stop-daemon --background \ |
||||
--exec $command \ |
||||
--make-pidfile --pidfile $pidfile --user $command_user \ |
||||
--start |
||||
eend $? |
||||
} |
||||
|
||||
stop() { |
||||
ebegin "Stopping $RC_SVCNAME" |
||||
start-stop-daemon --stop \ |
||||
--exec $command \ |
||||
--pidfile $pidfile --user $command_user |
||||
eend $? |
||||
} |
@ -0,0 +1,31 @@ |
||||
#!/sbin/openrc-run |
||||
|
||||
name=$RC_SVCNAME |
||||
description="OpenNebula Web UI Server" |
||||
command="/usr/bin/ruby /usr/lib/one/sunstone/sunstone-server.rb" |
||||
command_user="oneadmin:cloud" |
||||
pidfile="/run/one/${RC_SVCNAME}.pid" |
||||
supervisor="supervise-daemon" |
||||
|
||||
depend() { |
||||
need opennebula |
||||
after syslog networking netmount |
||||
want opennebula-novnc |
||||
} |
||||
|
||||
start() { |
||||
ebegin "Starting $RC_SVCNAME" |
||||
start-stop-daemon --background \ |
||||
--exec $command \ |
||||
--make-pidfile --pidfile $pidfile --user $command_user \ |
||||
--start |
||||
eend $? |
||||
} |
||||
|
||||
stop() { |
||||
ebegin "Stopping $RC_SVCNAME" |
||||
start-stop-daemon --stop \ |
||||
--exec $command \ |
||||
--pidfile $pidfile --user $command_user |
||||
eend $? |
||||
} |
@ -0,0 +1,13 @@ |
||||
Index: src/sunstone/public/package.json
|
||||
--- src/sunstone/public/package.json
|
||||
+++ src/sunstone/public/package.json
|
||||
@@ -6,7 +6,7 @@
|
||||
"grunt-cli": "1.3.2",
|
||||
"grunt-contrib-requirejs": "1.0.0",
|
||||
"grunt-contrib-watch": "1.1.0",
|
||||
- "grunt-sass": "2.1.0",
|
||||
- "node-sass": "4.14.1"
|
||||
+ "grunt-sass": "3.1.0",
|
||||
+ "node-sass": "7.0.1"
|
||||
}
|
||||
}
|
@ -0,0 +1,82 @@ |
||||
Some notes |
||||
|
||||
``` |
||||
adduser oneadmin |
||||
|
||||
apk add libvncserver-dev libvncserver \ |
||||
gnutls gnutls-dev libnsl libnsl-dev \ |
||||
alpine-sdk linux-headers openssl-dev \ |
||||
make npm ronn sqlite-dev czmq-dev \ |
||||
mariadb-dev mariadb-server-utils mariadb-client \ |
||||
ruby-dev libxml2 libxml2-dev libxml2 libxml2-dev \ |
||||
xmlrpc-c xmlrpc-c-dev g++ scons bash |
||||
|
||||
apk add python2 ruby-nokogiri ruby-rexml \ |
||||
ruby-xmlrpc ruby-bundler ruby-pg ruby-augeas augeas-dev \ |
||||
libpg_query curl-dev libpq-dev |
||||
|
||||
|
||||
git clone https://github.com/OpenNebula/one.git |
||||
cd one |
||||
|
||||
vim src/svncterm_server/genfont.c |
||||
|
||||
``` |
||||
#include <stdint.h> |
||||
|
||||
typedef uint16_t u_int16_t; |
||||
|
||||
``` |
||||
|
||||
#scons -j2 sqlite=no mysql=yes systemd=no svncterm=yes |
||||
npm config set python python2.7 |
||||
npm install bower grunt -g |
||||
CXXFLAGS="--std=c++14" scons -j2 new_xmlrpc=yes mysql=yes sqlite=yes sunstone=yes systemd=no |
||||
|
||||
cd /root/one/share/man/ |
||||
./build.sh |
||||
|
||||
cd ~/one/src/fireedge/ |
||||
./build.sh |
||||
|
||||
cd ~/one |
||||
./install.sh -u oneadmin -g oneadmin |
||||
|
||||
# from local user |
||||
bundler install --gemfile /usr/share/one/Gemfile |
||||
|
||||
|
||||
|
||||
apk add shadow |
||||
|
||||
usermod -m -d /var/lib/one oneadmin |
||||
|
||||
mkdir -p /var/lib/one/.one/ |
||||
echo 'oneadmin:oneadm1n' >> /var/lib/one/.one/one_auth |
||||
|
||||
chown oneadmin:oneadmin -R /var/log/one /var/lib/one /run/one /run/lock/one |
||||
|
||||
|
||||
|
||||
########################################### |
||||
|
||||
|
||||
|
||||
!!! apt install libczmq-dev !!! |
||||
|
||||
|
||||
apk add python2 |
||||
npm config set python python2.7 |
||||
cd /usr/lib/one/sunstone/public |
||||
CXXFLAGS="--std=c++14" npm install |
||||
# не обязательно(?) |
||||
npm audit fix --force |
||||
|
||||
|
||||
./build |
||||
|
||||
|
||||
|
||||
echo 'oneadmin:black' > /var/lib/one/.one/one_auth |
||||
|
||||
``` |
Loading…
Reference in new issue