Commit d8d4fed0 authored by Jondy Zhao's avatar Jondy Zhao

Add cron service/know issues in the user guide

Change default install path to c:\slapos-node
parent 3f512eb3
...@@ -67,14 +67,34 @@ More information refer to <ulink url="http://community.slapos.org/wiki/osoe-Lect ...@@ -67,14 +67,34 @@ More information refer to <ulink url="http://community.slapos.org/wiki/osoe-Lect
<programlisting> <programlisting>
/etc/opt/slapos/scripts/slapos-configure.sh /etc/opt/slapos/scripts/slapos-configure.sh
</programlisting> </programlisting>
The configure script will guide you to configure slapos slave node, as the prompt: The configure script will guide you to configure slapos slave node, first, your need configure cron service:
<programlisting>
You must decide under what account the cron daemon will run.
If you are the only user on this machine, the daemon can run as yourself.
This gives access to all network drives but only allows you as user.
Otherwise cron should run under the local system account.
It will be capable of changing to other users without requiring a
password, using one of the three methods detailed in
http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1
Do you want the cron daemon to run as yourself? (yes/no) no
Running cron_diagnose ...
WARNING: Your computer does not appear to have a cron table for Administrator.
Please generate a cron table for Administrator using 'crontab -e'
... no problem found.
Do you want to start the cron daemon as a service now? (yes/no) yes
</programlisting>
Next configure script need certificate and key information:
<itemizedlist> <itemizedlist>
<listitem><para>Type computer certificate filename, if it's stored in the default path as above, type Enter directly</para></listitem> <listitem><para>Type computer certificate filename, if it's stored in the default path as above, type Enter directly</para></listitem>
<listitem><para>Type computer key filename, if it's stored in the default path as above, type Enter directly</para></listitem> <listitem><para>Type computer key filename, if it's stored in the default path as above, type Enter directly</para></listitem>
<listitem><para>Type client certificate filename, if it's stored in the default path as above, type Enter directly</para></listitem> <listitem><para>Type client certificate filename, if it's stored in the default path as above, type Enter directly</para></listitem>
<listitem><para>Type client key filename, if it's stored in the default path as above, type Enter directly</para></listitem> <listitem><para>Type client key filename, if it's stored in the default path as above, type Enter directly</para></listitem>
</itemizedlist> </itemizedlist>
Be sure the configure scrip report successfully, otherwise fix the problem and run it again. You can run Slapos Configure at anytime, and netx time you needn't input anything, configure scripts just checks all the configuration and update the configure files. Then waiting for configure script finished. Be sure the configure scrip report successfully, otherwise fix the problem and run it again. You can run Slapos Configure at anytime, and netx time you needn't input anything, configure scripts just checks all the configuration and update the configure files.
</para> </para>
</section> </section>
...@@ -96,12 +116,12 @@ Be sure the configure scrip report successfully, otherwise fix the problem and r ...@@ -96,12 +116,12 @@ Be sure the configure scrip report successfully, otherwise fix the problem and r
<section><title>Command Console</title> <section><title>Command Console</title>
<para>It will open a terminal, here you can run most of slapos command, for examples, <para>It will open a terminal, here you can run most of slapos command, for examples,
<programlisting> <programlisting>
/opt/slapos/bin/slapos node foramt -cv --now slapos node foramt -cv --now
/opt/slapos/bin/slapos supply slaprunner COMP-1658 slapos supply slaprunner COMP-1658
/opt/slapos/bin/slapos request "Jondy Web Runner In Windows 7" slaprunner --node computer_guid=COMP-1658 slapos request "Jondy Web Runner In Windows 7" slaposwebrunner --node computer_guid=COMP-1658
/opt/slapos/bin/slapos node software slapos node software
/opt/slapos/bin/slapos node instance slapos node instance
/opt/slapos/bin/slapos node status slapos node status
</programlisting> </programlisting>
</para> </para>
<para>For more information, refer to <ulink url="http://git.erp5.org/gitweb/slapos.core.git/blob/HEAD:/documentation/source/slapos.usage.rst?js=1"/></para> <para>For more information, refer to <ulink url="http://git.erp5.org/gitweb/slapos.core.git/blob/HEAD:/documentation/source/slapos.usage.rst?js=1"/></para>
...@@ -111,8 +131,8 @@ Be sure the configure scrip report successfully, otherwise fix the problem and r ...@@ -111,8 +131,8 @@ Be sure the configure scrip report successfully, otherwise fix the problem and r
<para>It just showes this documnet in the web browser.</para> <para>It just showes this documnet in the web browser.</para>
</section> </section>
<section><title>Background Jobs</title> <section><title>Cron Service</title>
<para>After run Configure SlapOS, then a cron job will run in the background which used to release software and create instance periodically. Open Cygwin Terminal, type the following command to check these jobs: <para>After run Configure SlapOS, a cron service will start in the background which used to release software and create instance periodically. Open Cygwin Terminal, type the following command to check cron jobs:
<programlisting> <programlisting>
# List all cron tabs # List all cron tabs
crontab -l crontab -l
...@@ -121,20 +141,30 @@ tail /var/log/messages ...@@ -121,20 +141,30 @@ tail /var/log/messages
# Edit cron tasks # Edit cron tasks
crontab -e crontab -e
# Stop cron # Stop cron
pid=$(ps -ef | grep "/usr/sbin/cron" | gawk '{ print $2; }') &amp;&amp; kill $pid net stop cron
# Start cron # Start cron
/usr/sbin/cron net start cron
disown -h
</programlisting> </programlisting>
</para> </para>
</section> </section>
<section><title>Known issues</title> <section><title>Known issues</title>
<para>service slapos-re6stnet cound't be stop, except kill all the openvpn in the windows task manager by manual, or: <para>Sometime cygwin service re6stnet cound't be stop by command "net stop", you need kill openvpn at first:
<programlisting> <programlisting>
TASKKILL /F /IM openvpn.exe TASKKILL /F /IM openvpn.exe
net stop slapos-re6stnet net stop re6stnet
</programlisting>
If you're in non-english environment, be sure Cygwin Terminal works well in your own chareset. Click Start -> SlapOS -> Command Console, then
<programlisting>
netsh interface ipv6 show interface
</programlisting>
Check localize connection name show correctly. If not, you need set your locale and charset
<programlisting>
echo "Locale=C" >> ~/.bashrc
echo "Charset=$(python -c 'import sys; print sys.getfilesystemencoding()')" >> ~/.bashrc
tail ~/.bashrc
</programlisting> </programlisting>
Then restart your command terminal.
</para> </para>
</section> </section>
...@@ -175,25 +205,22 @@ start mintty.exe -i /Cygwin-Terminal.ico - ...@@ -175,25 +205,22 @@ start mintty.exe -i /Cygwin-Terminal.ico -
</programlisting> </programlisting>
--> -->
<programlisting> <programlisting>
echo "export CYGWIN=server" >> ~/.bash_profile
sed -i -e "s/4\.3\.4/4.5.3/g" /usr/bin/libtool sed -i -e "s/4\.3\.4/4.5.3/g" /usr/bin/libtool
[[ -f /etc/passwd ]] || mkpasswd > /etc/passwd [[ -f /etc/passwd ]] || mkpasswd > /etc/passwd
[[ -f /etc/group ]] || mkgroup > /etc/group [[ -f /etc/group ]] || mkgroup > /etc/group
cp /etc/passwd /etc/passwd.orig cp /etc/passwd /etc/passwd.orig
myaccount=$(grep "^Administrator:" /etc/passwd | \
sed -e "s/Administrator:unused:500:/root:unused:0:/g")
echo $myaccount >> /etc/passwd
/usr/bin/cygserver-config --yes
/usr/bin/syslog-ng-config --yes
</programlisting> </programlisting>
If you'd like to make the font of command box bigger If you'd like to make the font of command box bigger
<programlisting> <programlisting>
cd ~ cd ~
DEFAULT_SYSTEM_CHARSET=$(python -c 'import sys; print sys.getfilesystemencoding()')
cat &lt;&lt;EOF &gt; .minttyrc cat &lt;&lt;EOF &gt; .minttyrc
BoldAsFont=no BoldAsFont=no
Font=Courier New Font=Courier New
FontHeight=16 FontHeight=16
Scrollbar=none Scrollbar=none
Locale=C
Charset=${DEFAULT_SYSTEM_CHARSET}
EOF EOF
</programlisting> </programlisting>
Then restart cygwin command box. Then restart cygwin command box.
...@@ -263,7 +290,7 @@ ac_cv_type_socklen_t=yes IFCONFIG="C:/WINDOWS/system32" LDFLAGS="-liphlpapi -lws ...@@ -263,7 +290,7 @@ ac_cv_type_socklen_t=yes IFCONFIG="C:/WINDOWS/system32" LDFLAGS="-liphlpapi -lws
make make
cp src/openvpn/.libs/openvpn.exe /usr/bin cp src/openvpn/.libs/openvpn.exe /usr/bin
</programlisting> </programlisting>
Now downlaod openvpn 2.3 for your window version, and install it. We need OpenVPN Tap-Windows Drivers files. <!-- Now downlaod openvpn 2.3 for your window version, and install it. We need OpenVPN Tap-Windows Drivers files. -->
</para> </para>
<para> <para>
Then generate user-guide.html from using-slapos-in-windows.xml, generally you need not do this, just copy this file (you're looking now) to /opt/git/slapos.package/windows/docs. If you require want to generate the document by your self, make sure docbook-utils package installed in the Cygwin. Refer to <xref linkend="package-docbook-utils"/> to know what about docbook-utils. Then generate user-guide.html from using-slapos-in-windows.xml, generally you need not do this, just copy this file (you're looking now) to /opt/git/slapos.package/windows/docs. If you require want to generate the document by your self, make sure docbook-utils package installed in the Cygwin. Refer to <xref linkend="package-docbook-utils"/> to know what about docbook-utils.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
AppName=SlapOS AppName=SlapOS
AppVersion=0.158 AppVersion=0.158
AppVerName=SlapOS Windows 0.158.6 AppVerName=SlapOS Windows 0.158.6
DefaultDirName=C:\slapos DefaultDirName=C:\slapos-node
DefaultGroupName=SlapOS DefaultGroupName=SlapOS
OutputBaseFilename=slapos-0.158.6-windows-x86-all-in-one OutputBaseFilename=slapos-0.158.6-windows-x86-all-in-one
OutputDir=D:\slapos\publish\Output OutputDir=D:\slapos\publish\Output
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
AppName=SlapOS AppName=SlapOS
AppVersion=0.158 AppVersion=0.158
AppVerName=SlapOS Windows 0.158.6 AppVerName=SlapOS Windows 0.158.6
DefaultDirName=C:\slapos DefaultDirName=C:\slapos-node
DefaultGroupName=SlapOS DefaultGroupName=SlapOS
OutputDir=D:\slapos\publish\Output OutputDir=D:\slapos\publish\Output
OutputBaseFilename=slapos-0.158.6-windows-x86 OutputBaseFilename=slapos-0.158.6-windows-x86
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment