<chapterid="ch_install_slapos"><title>Installing SlapOS node in the Windows</title>
<chapterid="ch_install_slapos"><title>Installing SlapOS node in the Windows</title>
<para>At first, we need to sign up in VIFIB community Cloud by clicking here <ulinkurl="https://www.slapos.org/login_form"/></para>
<para>At first, we need to sign up in VIFIB community Cloud by clicking here <ulinkurl="https://www.slapos.org/login_form"/></para>
<para>Then download the latest slapos windows installer from <ulinkurl="http://www.erp5.org/dists/installer"></ulink>, the filename of windows installer look like slapos-XXX-windows-x86-all-in-one.exe or slapos-XXX-windows.exe, XXX stands for version-release information. The all-in-one installer include all the files required by slapos node, so it can run in the computer which doesn't access internat; the later will download most of packages from internet and build, so it need more time than all-in-one installer. It's recommanded to use the former installer in case of slow or unstable internet even if the size of all-in-one installer is more than 100MB, compare of the latter which size is about 2MB.</para>
<para>Then download the latest slapos windows installer from <ulinkurl="http://www.erp5.org/dists/installer"></ulink>, the filename of windows installer look like slapos-XXX-windows-YYY-all-in-one.exe or slapos-XXX-windows-YYY.exe, XXX stands for version-release information. YYY could be i386 or x86_64, the former means 32-bit, the latter 64-bit windows. The all-in-one installer include all the files required by slapos node, so it can run in the computer which doesn't access internat; the later will download most of packages from internet and build, so it need more time than all-in-one installer. It's recommanded to use the former installer in case of slow or unstable internet even if the size of all-in-one installer is more than 100MB, compare of the latter which size is about 2MB.</para>
<para>Double click the installer, click Next, Next ...
<para>Double click the installer, click Next, Next ...
<note><para>If the current user isn't Administrator, you need run it as Administrator. Right click the installer, then click Run As Administrator.</para></note>
<note><para>If the current user isn't Administrator, you need run it as Administrator. Right click the installer, then click Run As Administrator.</para></note>
</para>
</para>
<para>At the final wizard page, click Install.</para>
<para>At the final wizard page, click Install.</para>
<para>Waiting for everything done.</para>
<para>Waiting for everything done.</para>
<para>If you prefer to install slapos node from sources, refer to the chapter <xreflinkend="ch_generate_window_installer"/>.</para>
<para>If you prefer to install slapos node from sources, refer to the chapter <xreflinkend="ch_run_slapos_from_sources"/>.</para>
</chapter>
</chapter>
<chapter><title>Using Slapos in the Windows</title>
<chapter><title>Using Slapos in the Windows</title>
<para>It used to generate all the configure files required by slapos slave node, you can run it anytime when you need change the configure of your slapos slave node.</para>
<para>It used to generate all the configure files required by slapos slave node, you can run it anytime when you need change the configure of your slapos slave node.</para>
<para>Go to slapos.org (or any other SlapOS Master), register if not already done, go to My Account and request an SSL certificate:
<para>Go to slapos.org (or any other SlapOS Master), register if not already done, go to My Account and request an SSL certificate:
<itemizedlist>
<itemizedlist>
<listitem><para>Copy the certificate in a file, save it in C:/slapos/cygwin/certificate</para></listitem>
<listitem><para>Copy the certificate in a file, save it in C:/slapos/cygwin/certificate</para></listitem>
<listitem><para>Copy the key in a file, save it in C:/slapos/cygwin/key</para></listitem>
<listitem><para>Copy the key in a file, save it in C:/slapos/cygwin/key</para></listitem>
</itemizedlist>
</itemizedlist>
You can save them anywhere, but it's better to save them in the path C:/slapos/cygwin which is your slapos installed, because it's the default path in the slapos configure script. More information refer to <ulinkurl="http://community.slapos.org/wiki/osoe-Lecture.SlapOS.Extended/developer-Installing.SlapOS.Client"></ulink></para>
You can save them anywhere, but it's better to save them in the path C:/slapos/cygwin which is your slapos installed, because it's the default path in the slapos configure script. </para>
<para>More information refer to <ulinkurl="http://community.slapos.org/wiki/osoe-Lecture.SlapOS.Extended/developer-Installing.SlapOS.Client"></ulink></para>
<para>Then register your computer to slapos.org community Cloud. By doing so, we will obtain X509 certificate and key which are later needed for the configuration process.
<para>Then register your computer to slapos.org community Cloud. By doing so, we will obtain X509 certificate and key which are later needed for the configuration process.
<itemizedlist>
<itemizedlist>
<listitem><para>Login to www.slapos.org. Go to the "My Space" area and then to the "My Servers" section. Click on the button "New Server". This button will lead you to a page where you can specify the name of your server.</para></listitem>
<listitem><para>Login to www.slapos.org. Go to the "My Space" area and then to the "My Servers" section. Click on the button "New Server". This button will lead you to a page where you can specify the name of your server.</para></listitem>
...
@@ -73,7 +74,7 @@ The configure script will guide you to configure slapos slave node, as the promp
...
@@ -73,7 +74,7 @@ The configure script will guide you to configure slapos slave node, as the promp
<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 then configuration and update the configure files.
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>
...
@@ -111,91 +112,6 @@ Be sure the configure scrip report successfully, otherwise fix the problem and r
...
@@ -111,91 +112,6 @@ Be sure the configure scrip report successfully, otherwise fix the problem and r
</section>
</section>
</chapter>
</chapter>
<!--
<chapter><title>Create slapos instance of Workpress in the Windows</title>
<para>After SlapOS has been installed successfully, you will find program group "SlapOS" which include the following entries:
Copy our cygwin inotifyx to download-cache/dist, so buildout will find it other than pypi.
</para>
<para>The common way to release a software is to login vifib website. But we haven't integrated this software.cfg into vifib, so we verify it in the local machine. It need a patch:
<para>Some dlls need to rebase in order to avoid fork issue in the Cygwin. Refer to <ulink url="http://cygwin.com/faq.html"></ulink> question 4.44 or search "rebase" in this page. First, exit all Cygwin processes and stop all Cygwin services.
<programlisting>
$ net stop cfgslapos
$ ps -ef | grep python2.7
# kill all these process which start by supervisord
$ exit
</programlisting>
If you install SlapOS node by MSI package, Click Start menu, select SlapOS program group, click Run rebaseall. Otherwise, download rebase-software.bat and save it in the cygwin root path.
Wait for a while, otherwise there is no partition assigned
$ bin/slapos node software
$ bin/slapos node instance
$ bin/slapos node start all
or
$ bin/slapos node start demoapp
$ bin/slapos node restart all
Recreate instance
$ bin/slapos node instance - -only_cp slappart9
$ bin/slapos request mydemoapp demoapp # not this, it request node in the cloud
Now, you can visit the demo in the browser by the url.
Refer to: http://community.slapos.org/wiki/osoe-Lecture.SlapOS.Extended/developer-Installing.SlapOS.Client
</para>
</chapter>
-->
<chapterid="ch_generate_window_installer"><title>Generating windows installer from sources</title>
<chapterid="ch_generate_window_installer"><title>Generating windows installer from sources</title>
<para>This chapter describes how to generate windows installer from sources.</para>
<para>This chapter describes how to generate windows installer from sources.</para>
<section><title>Setting Up Cygwin</title>
<section><title>Setting Up Cygwin</title>
...
@@ -207,19 +123,17 @@ Refer to: http://community.slapos.org/wiki/osoe-Lecture.SlapOS.Extended/develope
...
@@ -207,19 +123,17 @@ Refer to: http://community.slapos.org/wiki/osoe-Lecture.SlapOS.Extended/develope
<para>Or you can install cygwin by command console, first you need download setup.exe from cygwin.com, save to D:\temp\setup.exe or somewhere else.
<para>Or you can install cygwin by command console, first you need download setup.exe from cygwin.com, save to D:\temp\setup.exe or somewhere else.
<itemizedlist>
<itemizedlist>
<listitem><para>In the Windows destktop, Click Start</para></listitem>
<listitem><para>In the Windows destktop, Click Start</para></listitem>
<listitem><para>Click Run, type command: 'cmd', click OK to enter windows console. Be sure you start 'cmd' as Administrator:</para></listitem>
<listitem><para>Click Run, type command: 'cmd', click OK to enter windows console. Be sure you start 'cmd' as Administrator, if the login user isn't Administrator, run 'cmd' as Administrator:</para></listitem>
<listitem><para>Type the following commands:<programlisting>
<listitem><para>Type the following commands:<programlisting>
REM If you require docbook-utils indeed, uncomment the next line (remove REM). Refer to <xreflinkend="package-docbook-utils"/> to know what about docbook-utils.
</programlisting>Waiting for the installer finished.</para></listitem>
</programlisting>Waiting for the installer finished.</para></listitem>
</itemizedlist>
</itemizedlist>
A cygwin icon will be added in the windows desktop, click it to enter cygwin box, then run the following commands:
A cygwin icon will be added in the windows desktop, click it to enter cygwin box. If the current user isn't Administrator, then right click cygwin icon, click Run As Administrator. Be suer you have enough rights to run the following commands:
<!--
<!--
You can create your script to start Cygwin in a tty terminal
You can create your script to start Cygwin in a tty terminal
After exit cygwin, double click autorebase.bat in the Windows explorer.
After exit cygwin, double click autorebase.bat in the Windows explorer. If the current user isn't Administrator, then right click it, click Run As Administrator.
</para>
</para>
</section>
</section>
<section><title>Generating windows installer</title>
<section><title>Preparing the sources files for installer</title>
<section><title>Preparing the sources files for installer</title>
<para>Let's we start cygwin box, then clone slapos.package.git
<para>Let's we start cygwin box, then clone slapos.package.git
Then generate user-guide.html from using-slapos-in-windows.xml, it requires xslt and dockbook, make sure these packages installed in the Cygwin
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 <xreflinkend="package-docbook-utils"/> to know what about docbook-utils.
<programlisting>
<programlisting>
cd /opt/git/slapos.package/windows/docs
cd /opt/git/slapos.package/windows/docs
# Before run make, be sure there is the file /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl, if not, find it first
# Before run make, be sure there is the file /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl, if not, find it first
# find /usr -name docbook.xsl
# find /usr -name docbook.xsl
# Then replace the old file name with this one in the Makefile, then run make
# Then replace the old file name with this one in the ./Makefile, then run make
@@ -373,57 +286,20 @@ Assum SourceDir in the section "Setup" is "D:\slapos", the builder will find "D:
...
@@ -373,57 +286,20 @@ Assum SourceDir in the section "Setup" is "D:\slapos", the builder will find "D:
<para>Click menu Build -> Compile, then wait for the building process finished. You can check the installer in the OutputDir.</para>
<para>Click menu Build -> Compile, then wait for the building process finished. You can check the installer in the OutputDir.</para>
<para>There is another script "slapos.iss", it used to build network installer. All-in-one installer will include all the files, so no internet access required. However network installer need internet connection to download the files and packages. It's remarkable smaller than all-in-one installer.</para>
<para>There is another script "slapos.iss", it used to build network installer. All-in-one installer will include all the files, so no internet access required. However network installer need internet connection to download the files and packages. It's remarkable smaller than all-in-one installer.</para>
</section>
</section>
</chapter>
<!--
<chapterid="ch_run_slapos_from_sources"><title>Run SlapOS From Sources</title>
<section><title>IPv6 Support</title>
<para>This chapter describes how to run slapos slave node from sources in the windows.</para>
<para>If native IPv6 is available, skip this section. Otherwise be sure you have installed IPv6 by the command:
<para>First follow the instructions in the above chapter <xreflinkend="ch_generate_window_installer"/>, except the last section Making Installer.</para>
<para>Next register to slapos community to get client and computer certificate and key files, refer to <xreflinkend="sec_configure_slapos"/>.</para>
</para>
<para>Then open cygwin box as Administrator, if the current user isn't Administrator, then right click cygwin icon, click Run As Administrator. Be suer you have enough rights to run the following commands:
<para>Download openvpn windows installer, for example, openvpn-2.2.1-install.exe, then install openvpn. By default, it installed at <filename>C:\Program Files\OpenVPN</filename></para>
<para>Copy required files of openvpn to /opt/openvpn and edit client.ovpn
<para>Assume we have registered a server which id is 'COMP-161', and saved its key and certificate files in the home directory. So we can use script 'configure.sh' to do all the configuration.
If there are some errors when run both of scripts, fix them and run again, until no any error reported, and now you can run any slapos command in this terminal.
There is another package: Text/docbook-utils, it only used to generate user-guide.html from source file. But this package will increase required disk size remarkable, because many dependent packages are installed by Cygwin, so it recommand not to check this package when building slapos source or the installer.</para></note>
There is another package: Text/docbook-utils, it only used to generate user-guide.html from source file. But this package will increase required disk size remarkable, because many dependent packages are installed by Cygwin, so it recommand not to check this package when building slapos source or the installer. Only you really need to build the document, then install this package from cygwin setup gui interface by double clicking setup.exe downloaded from cygwin.com</para></note>