Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Graydon
slapos
Commits
7a385617
Commit
7a385617
authored
Dec 17, 2019
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proview: configure user environment
parent
225863e2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
138 additions
and
29 deletions
+138
-29
software/proviewR/instance-proview-r.cfg.jinja2.in
software/proviewR/instance-proview-r.cfg.jinja2.in
+62
-19
software/proviewR/instance.cfg
software/proviewR/instance.cfg
+8
-4
software/proviewR/pwrp_profile.in
software/proviewR/pwrp_profile.in
+50
-0
software/proviewR/software.cfg
software/proviewR/software.cfg
+18
-6
No files found.
software/proviewR/instance-proview-r.cfg.jinja2.in
View file @
7a385617
{% set publish_dict = {} -%}
{% set part_list = [] -%}
{% set ipv6 = (ipv6 | list)[0] -%}
{% set ipv4 = (ipv4 | list)[0] -%}
[directory]
recipe = slapos.cookbook:mkdirectory
...
...
@@ -9,13 +9,16 @@ etc = ${buildout:directory}/etc
bin = ${buildout:directory}/bin
srv = ${buildout:directory}/srv
var = ${buildout:directory}/var
var
= ${buildout:directory}/tmp
tmp
= ${buildout:directory}/tmp
log = ${:var}/log
scripts = ${:etc}/run
services = ${:etc}/service
ssl = ${:etc}/ssl
auth = ${:tmp}/auth
pwr = ${:pwr}
pwrp = ${buildout:directory}/pwrp
ca-dir = ${:srv}/ssl
novnc-conf = ${:etc}/novnc
prerm = ${:etc}/prerm
[certificate-authority]
recipe = slapos.cookbook:certificate_authority
...
...
@@ -85,46 +88,82 @@ config-port = ${novnc-instance:port}
[x11vnc]
recipe = slapos.cookbook:wrapper
command-line = {{ x11vnc_bin }} -forever -display ${xserver:display} -ncache 10
\
-autoport 5901 -no6 -reopen -o ${directory:log}/x11vnc.log
\
command-line = {{ x11vnc_bin }} -forever -display ${xserver:display} -ncache 10
-autoport 5901 -no6 -reopen -o ${directory:log}/x11vnc.log
-listen {{ ipv4 }} -flag ${proview-prepare:pwr-flag} -xkb
-auth ${directory:auth}.Xauthority
wrapper-path = ${directory:services}/x11vnc
hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
[xserver]
recipe = slapos.cookbook:wrapper
command-line = {{ xvfb_bin }}
Xvfb ${:display} -screen 0 1280x1024x24 \
-cc 4 -nolisten tcp -auth ${directory:auth} -fp {{ xorg_font_util}}/share/fonts/X11/Type1
command-line = {{ xvfb_bin }}
${:display} -screen 0 1280x1024x24
-cc 4 -nolisten tcp -auth ${directory:auth}
.Xauthority
-fp {{ xorg_font_util}}/share/fonts/X11/Type1
wrapper-path = ${directory:services}/xserver
hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
display = :98
[proview-prepare]
recipe = plone.recipe.command
pwr-db = ${directory:pwr}/db
pwr-flag = ${directory:pwr}/flag
pwr-db = ${directory:pwr
p
}/db
pwr-flag = ${directory:pwr
p
}/flag
command =
cp -r {{ proview_directory }}/local/adm/db/ ${:pwr-db}
cp -r {{ proview_directory }}/local/adm/db/ ${:pwr-db}
echo PORT=5901 > ${:pwr-flag}
update-command =
stop-on-error = true
[proview-
wrapper
]
[proview-
environment
]
recipe = collective.recipe.template
input = inline:#!/bin/bash
export export pwra_db=${proview-prepare:pwr-db}
source ${pwrp-profile:rendered}
export pwra_db=${proview-prepare:pwr-db}
source $pwra_db/pwr_setup.sh
source export PWR_BUS_ID=999
export PWR_BUS_ID=999
export DISPLAY=${xserver:display}
export LD_LIBRARY_PATH={{ ld_library_path }}
# start pwra
if [ "$PS1" ]; then
eval `dircolors -b`
alias ls='ls --color=auto'
# set a fancy prompt
PS1='\u@\h:\w\$ '
fi
# Set Base (XXX - hard coded version)
pwrp set base V5.6.0
DISPLAY=${xserver:display} pwra
output = ${
directory:bin}/pwr
mode =
7
00
output = ${
buildout:directory}/.bashrc
mode =
6
00
[bash-profile]
recipe = collective.recipe.template
input = inline:#!/bin/bash
umask 022
# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
output = ${buildout:directory}/.bashrc
mode = 600
[pwrp-profile]
recipe = slapos.recipe.template:jinja2
rendered = ${directory:etc}/pwrp_profile
extensions = jinja2.ext.do
mode = 0744
template = {{ pwrp_profile }}
context =
key pwra_db proview-prepare:pwr-db
key base_directory buildout:directory
raw pwr_exp_dir {{ proview_compile_dir }}/rls/os_linux/hw_x86_64/exp
raw pwr_bus_id 999
raw java_location {{ java_location }}
[request-slave-frontend]
recipe = slapos.cookbook:requestoptional
...
...
@@ -162,11 +201,15 @@ parts =
publish-connection-information
x11vnc
xserver
proview-wrapper
websockify-sighandler
websockify-sighandler-service
novnc-promise
proview-environment
bash-profile
# Complete parts with sections
{{ part_list | join('\n ') }}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
\ No newline at end of file
offline = true
software/proviewR/instance.cfg
View file @
7a385617
...
...
@@ -29,16 +29,20 @@ context =
[instance-proview-r]
<= template-base
template = ${template-
kvm-cluster:rendered
}
template = ${template-
proview-r:location}/${template-proview-r:filename
}
rendered = $${buildout:directory}/template-proview-r.cfg
extensions = jinja2.ext.do
extra-context =
key novnc_location noVNC:location
raw novnc_location ${noVNC:location}
raw x11vnc_bin ${x11vnc:location}/bin/x11vnc
raw websockify_executable_location ${buildout:directory}/bin/websockify
raw xorg_font_util ${xorg-font-util:location}
raw xvfb_bin ${xserver:location}/bin/Xvfb
raw proview_directory ${pwd:location}
raw ld_library_path ${pwd:ld-library-path}
raw java_location ${java-jdk:location}
raw proview_directory ${pwr:location}
raw proview_compile_dir ${pwr:location}__compile__/pwr
raw ld_library_path ${pwr:ld-library-path}
raw pwrp_profile ${template-pwrp-profile:location}/${template-pwrp-profile:filename}
mode = 0644
[slap-configuration]
...
...
software/proviewR/pwrp_profile.in
0 → 100644
View file @
7a385617
bus_id="{{ pwr_bus_id }}"
if [ -e /etc/proview.cnf ]; then
bus_id=`eval cat /etc/proview.cnf | grep "\\bqcomBusId\\b" | awk '{print $2}'`
fi
if [ -e /etc/proview.cnf ]; then
web_dir=`eval cat /etc/proview.cnf | grep "\\bwebDirectory\\b" | awk '{print $2}'`
fi
export PWR_BUS_ID=$bus_id
export pwrb_root={{ pwr_exp_dir }}
export pwrp_root={{ base_directory }}/pwrp
export pwr_exe=$pwrb_root/exe
export pwr_lib=$pwrb_root/lib
export pwr_obj=$pwrb_root/obj
export pwr_inc=$pwrb_root/inc
export pwr_load=$pwrb_root/load
export pwr_lis=$pwrb_root/lis
export pwr_doc=$pwrb_root/doc
export pwrp_exe=$pwrp_root/x86_64_linux/exe
export pwrp_lib=$pwrp_root/x86_64_linux/lib
export pwrp_obj=$pwrp_root/x86_64_linux/obj
export pwrp_lis=$pwrp_root/x86_64_linux/lis
export pwrp_inc=$pwrp_root/common/inc
export pwrp_load=$pwrp_root/common/load
export pwrp_log=$pwrp_root/common/log
export pwrp_db=$pwrp_root/common/db
export pwrp_web=$web_dir
export pwra_db={{ pwra_db }}
export jdk={{ java_location }}
export JAVA_HOME={{ java_location }}
export jdk_home={{ java_location }}/bin
PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
#symbols to define start/stop commands for PWR
alias pwr_stop='/etc/init.d/pwr stop'
alias pwr_stop.sh="/etc/init.d/pwr stop"
alias pwr_start="/etc/init.d/pwr start"
alias pwr="/etc/init.d/pwr"
alias boot="/usr/bin/sudo /sbin/reboot"
if [ -e $pwrp_exe/profile ]; then
source $pwrp_exe/profile
fi
software/proviewR/software.cfg
View file @
7a385617
...
...
@@ -5,11 +5,13 @@ extends =
../../component/proviewR/buildout.cfg
../../component/open62541/buildout.cfg
../../component/noVNC/buildout.cfg
../../component/shellinabox/buildout.cfg
../../stack/monitor/buildout.cfg
../../stack/slapos.cfg
parts +=
slapos-cookbook
eggs
open62541
pwr
x11vnc
...
...
@@ -17,6 +19,7 @@ parts +=
xorg-font-adobe-100dpi
xorg-font-type1
template
allow-picked-versions = true
[eggs]
recipe = zc.recipe.egg
...
...
@@ -31,15 +34,24 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
mode = 0644
md5sum = a27a900ce349068a15a42255f81ba0f0
#
md5sum = a27a900ce349068a15a42255f81ba0f0
[download-base]
recipe =
slapos.recipe.template
recipe =
hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
download-only = true
mode = 0644
[template-
kvm-cluste
r]
[template-
proview-
r]
<= download-base
on-update = true
md5sum = db9b805eeeb2f89abca375c1425812b7
filename = instance-proview-r.cfg.jinja2.in
\ No newline at end of file
md5sum = 7811559de2118066e3da524e43bd5182
filename = instance-proview-r.cfg.jinja2.in
[template-pwrp-profile]
<= download-base
md5sum = 34b0c503d786fc59317a761175ddfc3f
filename = pwrp_profile.in
[versions]
numpy = 1.16.4
#websockify = 0.6.1
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment