Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
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
Kasra Jamshidi
slapos.package
Commits
5be3ada3
Commit
5be3ada3
authored
Jul 01, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix script couldn't repreat run in the user-guide
Fix web runner title is fixed in different computer
parent
2a8f0fbf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
16 deletions
+18
-16
windows/docs/using-slapos-in-windows.xml
windows/docs/using-slapos-in-windows.xml
+4
-4
windows/scripts/slapos-configure.sh
windows/scripts/slapos-configure.sh
+11
-9
windows/scripts/slapos-node.sh
windows/scripts/slapos-node.sh
+3
-3
No files found.
windows/docs/using-slapos-in-windows.xml
View file @
5be3ada3
...
...
@@ -196,7 +196,7 @@ cd /opt
wget http://www.dashingsoft.com/products/slapos/slapos-patches.tar.gz
tar xzf slapos-patches.tar.gz --no-same-owner
cd /opt/slapos/eggs/slapos.core-0.35-py2.7.egg
patch -p1
<
/opt/patches/slapos-core-format.patch
patch -
-dry-run -p1
<
/opt/patches/slapos-core-format.patch
&&
patch -
p1
<
/opt/patches/slapos-core-format.patch
</programlisting>
It seems netifaces.dll need to rebase,
<programlisting>
...
...
@@ -213,8 +213,8 @@ After exit cygwin, double click autorebase.bat in the Windows explorer. If the c
<programlisting>
mkdir /opt/git
cd /opt/git
git clone -b cygwin http://git.erp5.org/repos/slapos.core.git
git clone -b cygwin http://git.erp5.org/repos/slapos.package.git
git
pull || git
clone -b cygwin http://git.erp5.org/repos/slapos.core.git
git
pull || git
clone -b cygwin http://git.erp5.org/repos/slapos.package.git
cp /opt/git/slapos.package/windows/scripts/* /usr/local/bin
</programlisting>
Then build babeld and openvpn for cygwin, we need use the sources in the slapos.package.git, they are patched for cygwin:
...
...
@@ -251,7 +251,7 @@ wget http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.8.tar.gz -O min
Get re6stnet for cygwin
<programlisting>
cd /opt/git
git clone -b cygwin http://git.erp5.org/repos/re6stnet.git
git
pull || git
clone -b cygwin http://git.erp5.org/repos/re6stnet.git
cd re6stnet
python setup.py sdist
</programlisting>
...
...
windows/scripts/slapos-configure.sh
View file @
5be3ada3
...
...
@@ -155,8 +155,6 @@ ipv4_local_network=10.201.67.0/24
slapos_runner_file
=
/etc/slapos/scripts/slap-runner.html
slaprunner_cfg
=
'http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/heads/cygwin-0:/software/slaprunner/software.cfg'
# slaprunner_title="SlapOS-Node-Runner-In-Windows"
slaprunner_title
=
"Node Runner"
#-------------------------------------------------
# Create paths
...
...
@@ -279,11 +277,11 @@ fi
interface_guid
=
$(
connection2guid
$slapos_ifname
)
||
\
show_error_exit
"Failed to get guid of interface:
$slapos_ifname
."
echo
Computer configuration information:
echo
\t\t
interface name:
$slapos_ifname
echo
\t\t
GUID:
$interface_guid
echo
\t\t
ipv4_local_network:
$ipv4_local_network
echo
\t\t
computer_id:
$computer_id
echo
"Computer configuration information:"
echo
" interface name:
$slapos_ifname
"
echo
" GUID:
$interface_guid
"
echo
" ipv4_local_network:
$ipv4_local_network
"
echo
" computer_id:
$computer_id
"
# generate /etc/slapos/slapos.cfg
sed
-i
-e
"s%^
\\
s*interface_name.*
$%
interface_name =
$interface_guid
%"
\
-e
"s%^#
\?\\
s*ipv6_interface.*
$%
# ipv6_interface =%g"
\
...
...
@@ -467,6 +465,9 @@ done
#-------------------------------------------------
# Create instance of Web Runner
#-------------------------------------------------
slaprunner_title
=
"SlapOS-Node-Runner-In-
$computer_id
"
grep
-q
"window.location.href"
$slapos_runner_file
if
((
$?
))
;
then
echo
...
...
@@ -490,7 +491,7 @@ if (( $? )) ; then
/opt/slapos/bin/slapos node software
--verbose
/opt/slapos/bin/slapos node instance
--verbose
/opt/slapos/bin/slapos node report
--verbose
/opt/slapos/bin/slapos request
$client_config_file
"Node Runner"
$slaprunner_cfg
--node
computer_guid
=
$computer_id
&&
break
/opt/slapos/bin/slapos request
$client_config_file
$slaprunner_title
$slaprunner_cfg
--node
computer_guid
=
$computer_id
&&
break
sleep
5
done
# Connection parameters of instance are:
...
...
@@ -499,11 +500,12 @@ if (( $? )) ; then
# 'password_recovery_code': 'e2d01c14',
# 'ssh_command': 'ssh 2001:67c:1254:45::c5d5 -p 2222',
# 'url': 'http://softinst39090.host.vifib.net/'}
slaprunner_url
=
$(
/opt/slapos/bin/slapos request
$client_config_file
"Node Runner"
$slaprunner_cfg
--node
computer_guid
=
$computer_id
|
\
slaprunner_url
=
$(
/opt/slapos/bin/slapos request
$client_config_file
$slaprunner_title
$slaprunner_cfg
--node
computer_guid
=
$computer_id
|
\
grep
backend_url |
sed
-e
"s/^.*': '//g"
-e
"s/',.*
$/
/g"
)
echo
Got node runner url:
$slaprunner_url
[[
-z
$slaprunner_url
]]
&&
show_error_exit
"Failed to create instance of SlapOS Web Runner."
cp
$slapos_runner_file
{
.html, .html.orig
}
cat
<<
EOF
>
$slapos_runner_file
<html>
<head><title>SlapOS Web Runner</title>
...
...
windows/scripts/slapos-node.sh
View file @
5be3ada3
...
...
@@ -26,9 +26,8 @@ function check_cygwin_service()
service_state
=
$(
cygrunsrv
--query
$service_name
|
sed
-n
-e
's/^Current State[ :]*//p'
)
if
[[
!
x
$service_state
==
"xRunning"
]]
;
then
echo
Cygwin service
$1
currnt state is
$service_state
, try to use
echo
\t\t
cygrunsrv
--start
$1
echo
to start this service
echo
"Cygwin service
$1
currnt state is
$service_state
, try to use"
echo
" cygrunsrv --start
$1
to start this service"
cygrunsrv
--start
$1
||
show_error_exit
"Failed to start service
$1
"
echo
Cygwin
$1
service is running.
fi
...
...
@@ -75,6 +74,7 @@ if (( $? )) ; then
echo
"Start re6stnet ..."
# It need root rights to install tap-driver
cd
/etc/re6stnet
mkdir
-p
/var/log/re6stnet
re6stnet @re6stnet.conf
--ovpnlog
-I
$slapos_ifname
-i
$slapos_ifname
>>
/var/log/re6stnet/slapos-node.log 2>&1 &
echo
$!
>
/var/run/slapos-node-re6stnet.pid
disown
-h
...
...
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